Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1996

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

Search the Archive

Re: Different Plots in the Same Window?

  • To: mathgroup at
  • Subject: [mg4903] Re: [mg4852] Different Plots in the Same Window?
  • From: Allan Hayes <hay at>
  • Date: Fri, 4 Oct 1996 00:17:40 -0400
  • Sender: owner-wri-mathgroup at

bn at (bn)
[mg4852] Different Plots in the Same Window?

>Is it possible to display the plots of two different functions
>in the same window?
>For egs.
>I would like to see how the Contour plots of two or three functions

The general pattern is
	plt1 = ...;
	plt2 = ...;
	Show[plt1, plt2, ....]
However with ContourPlot a little more is required:

With the following you will find that the polygons that give the  
contour shading in cp2 cover cp1, which is not seen at all.

cp1 =ContourPlot[x^2 -y^2, {x,-1,1},{y,-1,1}]
cp2 = ContourPlot[x^2 +y^2, {x,-1,1},{y,-1,1}]

One way round this is to turn of the contour shading in the second  
plot (you can of course turn it off in the firs as well).

cp1 =ContourPlot[x^2 -y^2, {x,-1,1},{y,-1,1}]
cp2 = ContourPlot[x^2 +y^2, {x,-1,1},{y,-1,1}, ContourShading -> False]

Allan Hayes
hay at


  • Prev by Date: Re: list splitting
  • Next by Date: Comparison of Mathematica on Various Computers
  • Previous by thread: Re: optimal control
  • Next by thread: Re: Different Plots in the Same Window?