Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1996
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*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 smc.vnet.net
  • Subject: [mg4903] Re: [mg4852] Different Plots in the Same Window?
  • From: Allan Hayes <hay at haystack.demon.co.uk>
  • Date: Fri, 4 Oct 1996 00:17:40 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

bn at cacs.usl.edu (bn)
[mg4852] Different Plots in the Same Window?
asks

>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
>interset.

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}]
Show[cp1,cp2]

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]
Show[cp1,cp2]

Allan Hayes
hay at haystack.demon.co.uk





==== [MESSAGE SEPARATOR] ====


  • 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?