Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*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 2006

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

Search the Archive

Re: Combining ContourPlot and Plot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg64580] Re: [mg64566] Combining ContourPlot and Plot
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Thu, 23 Feb 2006 00:34:15 -0500 (EST)
  • Reply-to: hanlonr at cox.net
  • Sender: owner-wri-mathgroup at wolfram.com

You need to put the Plot on top of the ContourPlot

Needs["Graphics`"];

Show[
    ContourPlot[x^2+y^2,{x,-1,1},{y,-1,1},
      DisplayFunction->Identity],
    Plot[x,{x,-1,1},PlotStyle->Red,
      DisplayFunction->Identity],
    DisplayFunction->$DisplayFunction];

DisplayTogether[
    ContourPlot[x^2+y^2,{x,-1,1},{y,-1,1}],
    Plot[x,{x,-1,1},PlotStyle->Red]];


Bob Hanlon

> 
> From: dkjk at bigpond.net.au
To: mathgroup at smc.vnet.net
> Subject: [mg64580] [mg64566] Combining ContourPlot and Plot
> 
> Hi group,
> 
> The title says it all really. I want something like
> 
> Show[Plot[x,{x,-1,1}],ContourPlot[x^2+y^2,{x,-1,1},{y,-1,1}]]
> 
> I've looked through the usenet archive to no avail.
> 
> Thanks in advance.
> 
> James
> 
> 


  • Prev by Date: Re: How if I want to assume that -------
  • Next by Date: Re: Checking function syntax
  • Previous by thread: Re: Combining ContourPlot and Plot
  • Next by thread: Re: Combining ContourPlot and Plot