Re: plotting two functions on the one graph
- To: mathgroup at smc.vnet.net
- Subject: [mg52947] Re: [mg52902] plotting two functions on the one graph
- From: yehuda ben-shimol <benshimo at bgu.ac.il>
- Date: Fri, 17 Dec 2004 05:19:50 -0500 (EST)
- References: <200412160840.DAA27314@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Dear Frank, Since you are using Plot you can combine multiple plots on a single Plot command. The GraphicsArray displays an array of different plots. So, Plot[{Sin[x], x-x^3/6},{x,0,Pi}] will do it for you. since the curves are close for 0<x<Pi/4 you probably need to plot it with different colors or other PlotStyle definitions Plot[{Sin[x], x - x^3/6}, {x, 0, Pi}, PlotStyle -> {{}, Hue[0]}]. This will plot the curve of the polynomial with red color yehuda Frank Murphy wrote: >siafra at vaxsa.csied.unisa.it wrote: >: I'm a student in physics at the University of Salerno, Italy and I'm >using >: Mathematica 3.0 under Win95. My question is : >: how can I plot two functions f(x), g(x) with the same x range on two >different >: y-axes, say the one for f(x) at left and the one for g(x) at right ? >: Thanks. > > > > >My colleague and I have tried your suggested i.e. proposed answer on >the follwing website >http://mathforum.org/epigone/comp.soft-sys.math.mathematica/rybimglah/5rmns6$piu at smc.vnet.net >but when its plotted in mathematica it places one plot next to the >other. However we >would like one plot superimposed on the other in the same graph with >two different y-axes. >Can you please send us the commands in mathematica to complete this >task. > > >
- References:
- plotting two functions on the one graph
- From: fmurphy@nmrc.ie (Frank Murphy)
- plotting two functions on the one graph