RE: Several functions in a single 2D-plot
- To: mathgroup at smc.vnet.net
- Subject: [mg68758] RE: [mg68703] Several functions in a single 2D-plot
- From: "David Annetts" <davidannetts at aapt.net.au>
- Date: Fri, 18 Aug 2006 03:12:02 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Hi Vicent,
> I am new to Mathematica, and I have a quick question that
> will be very easy for you, I guess.
>
> How can I plot several functions within the same 2D graphic?
>
> For example, I want to draw the PDF of 3 continuous
> statistical distributions (I mean, 3 functions), but put
> together into the same 2D plot.
>
> Thank you in advance!
It's straightforward -- see examples in online help for Show[].
As an example, after defining a list of colours and a series of plots, we
can display them on the same axes using Show[].
col = Hue[#/11.] & /@ Range[10];
plt = Plot[BesselJ[#, x], {x, 0, 10},
PlotStyle -> col[[#]],
DisplayFunction -> Identity] & /@ Range[10];
Show[plt, DisplayFunction -> $DisplayFunction, PlotRange -> All];
Regards,
Dave.