Re: Graphics help

• To: mathgroup at yoda.ncsa.uiuc.edu
• Subject: Re: Graphics help
• From: Frank Zizza <willamu!pioneer!zizza at uunet.UU.NET>
• Date: Wed, 7 Aug 91 13:24:15 PDT

```	You can use the Epilog option of ContourPlot to show the
two-dimensional graphics object.  Here is an example.  Let's say you
want to show the graph of y = x^2 with x varying from -1 to 1
together with the contour plot of the function x^2 + y^2 over the
unit square.  First generate the the plot of y = x^2.
curve = Plot[ x^2, {x, -1, 1}]
Then give the command to create the contour plot together with the
option Epilog -> curve[[1]]
ContourPlot[x^2 + y^2, {x, -1, 1}, {y, -1, 1}, Epilog -> curve[[1]] ]
The first part of curve (i.e. curve[[1]] ) is the primitive
graphics objects created with the plot, i.e. Line[{....}] etc.   Of
course these two commands can be spliced together to get the final
picture all at once.
ContourPlot[ x^2 + y^2, {x, -1, 1}, {y, -1, 1},

Epilog -> Plot[x^2, {x, -1, 1},

DisplayFunction -> Identity][[1]] ]

Frank Zizza
zizza at willamette.edu

```

• Prev by Date: DensityPlot details
• Next by Date: The argument of the complete elliptic integrals is m=k^2, not k.
• Previous by thread: DensityPlot details
• Next by thread: The argument of the complete elliptic integrals is m=k^2, not k.