Re: Clarification [Overlay graphs ]
- To: mathgroup at smc.vnet.net
- Subject: [mg48995] Re: Clarification [Overlay graphs ]
- From: Bill Rowe <readnewsciv at earthlink.net>
- Date: Sat, 26 Jun 2004 01:55:39 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
On 6/25/04 at 5:52 PM, J_o_s_e_f at hotmail.com (JosefG) wrote: >I would like to superimpose Cos[x] {x,Pi/4,Pi/2} right on top of >Sin[x] {x,0,Pi/4}. I think the x axis would only be a length of >Pi/4 and it would show both Cos[x] {x,Pi/4,Pi/2} and Sin[x] >{x,0,Pi/4}. I admit a bit of confusion as to what you are trying to do. You talk about plotting one curve on top of the other but you specify two different domains that do not overlap. I can modify one of the curves by supplying an x offset which will cause the curves to plot in the same domain and overlap, i.e., Plot[{Cos[x+Pi/4],Sin[x]},{x,0,Pi/4}, PlotStyle->{Hue@0, Hue@.6}] Another way to interpret what you want would be to assume you want Sin[x] plotted from 0 to Pi/4 and Cos[x] to be plotted from Pi/4 to Pi/2. If so, this will do the trick Show[Block[{$DisplayFunction = Identity}, {Plot[Cos[x], {x, Pi/4, Pi/2}, PlotStyle -> Hue[0]], Plot[Sin[x], {x, 0, Pi/4}], PlotStyle -> Hue[0.6]}] PlotRange -> All]; -- To reply via email subtract one hundred and four