MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Plotting functions and lines on the same figure?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg113836] Re: Plotting functions and lines on the same figure?
  • From: Patrick Scheibe <pscheibe at trm.uni-leipzig.de>
  • Date: Mon, 15 Nov 2010 05:49:50 -0500 (EST)

Hi,

you can combine graphics with Show:

Show[{
  Plot[Sqrt[x], {x, 0, 100}],
  Graphics[{Line[{{0, 0}, {100, 10}}]}]
  }]

Another way is to have a look at the Epilog option of Plot.

Cheers
Patrick

On Sun, 2010-11-14 at 06:10 -0500, Marco Masi wrote:
> I would like to plot straight lines into a graph of a function, i.e. after Plot[f[x], {x, -l, +l}] I need to insert into the graph three straight lines. Could not bring to work graphics primitive Line since I could make it plot only on a separate graph. How can one Plot and Line on the same figure?
> 
> Mark.
> 



  • Prev by Date: Re: Balance point of a solid
  • Next by Date: sq[x_]:=x*x vs sq=Function[x, x*x]
  • Previous by thread: Re: Plotting functions and lines on the same figure?
  • Next by thread: Re: Plotting functions and lines on the same figure?