Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

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

Search the Archive

Re: plotting two functions on the one graph

  • To: mathgroup at
  • Subject: [mg52947] Re: [mg52902] plotting two functions on the one graph
  • From: yehuda ben-shimol <benshimo at>
  • Date: Fri, 17 Dec 2004 05:19:50 -0500 (EST)
  • References: <>
  • Sender: owner-wri-mathgroup at

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

Frank Murphy wrote:

>siafra at wrote:
>: I'm a student in physics at the University of Salerno, Italy and I'm
>: 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
>: 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
>$piu at
>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

  • Prev by Date: Re: Getting the file name in a package
  • Next by Date: Re: fullsimplify problem
  • Previous by thread: plotting two functions on the one graph
  • Next by thread: Re: plotting two functions on the one graph