Re: Clarification [Overlay graphs ]

*To*: mathgroup at smc.vnet.net*Subject*: [mg49034] Re: Clarification [Overlay graphs ]*From*: J_o_s_e_f at hotmail.com (JosefG)*Date*: Tue, 29 Jun 2004 04:50:13 -0400 (EDT)*References*: <cbj3b6$q5n$1@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

Bill, You have hit the nail on the head. I would like the domains to overlap. If I added Pi/4 to x, the proof I am working on would automatically be solved. So the first Plot you provided will not work for me. I did experiment with the first Plot and I am pretty sure that I would get the same results overlaping the domains, but I have to be sure about results. I keep getting the error "Show::shx" when I use your second Plot. I don't know if it works. Thanks for your help, Josef Bill Rowe <readnewsciv at earthlink.net> wrote in message news:<cbj3b6$q5n$1 at smc.vnet.net>... > 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];