Re: Setting Colours of Plots
- To: mathgroup at smc.vnet.net
- Subject: [mg84611] Re: [mg84573] Setting Colours of Plots
- From: Murray Eisenberg <murray at math.umass.edu>
- Date: Sun, 6 Jan 2008 06:03:28 -0500 (EST)
- Organization: Mathematics & Statistics, Univ. of Mass./Amherst
- References: <200801050933.EAA19707@smc.vnet.net>
- Reply-to: murray at math.umass.edu
Evidently you're using Mathematica 6.x.
Easy: use PlotStyle. For example:
Plot[{x, x^2, x^3}, {x, 0, 1}, PlotStyle -> Red]
If you also want some additional directive for the PlotStyle, then
you'll need to combine the color with that additional directive by means
of Directive. For example:
Plot[{x,x^2,x^3}, {x,0,1}, PlotStyle -> Directive[Red, Thick, Dashed]]
Otherwise, if you try something like...
Plot[{x,x^2,x^3}, {x,0,1}, PlotStyle->{Red,Thick,Dashed}]
... then the three directives will apply separately to the individual
curves rather than collectively to all of them at once.
Gregory Lypny wrote:
> Hello everyone,
>
> I'm plotting five or six functions on one graph. Is there a way to
> force all of them to have the same colour?
>
> Regards,
>
> Gregory
>
--
Murray Eisenberg murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower phone 413 549-1020 (H)
University of Massachusetts 413 545-2859 (W)
710 North Pleasant Street fax 413 545-1801
Amherst, MA 01003-9305
- References:
- Setting Colours of Plots
- From: Gregory Lypny <gregory.lypny@videotron.ca>
- Setting Colours of Plots