MathGroup Archive 2011

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

Search the Archive

Re: Multiple Styles


On 7/31/2011 7:26 AM, ace55555 wrote:
> I am trying to change both the thickness and color of four parametric curves using PlotStyle. However, I either get the thickness or the colors to work but not both. I tried two different lines of code at the end of ParametricPlot3D:
> ..,PlotStyle ->  {{RGBColor[1,0,0]},{RGBColor[0,1,0]},{RGBColor[0,0,1]},{RGBColor[0,0,0]}},PlotStyle ->  {Thickness[0.01]}
> ..,PlotStyle ->  {{RGBColor[1,0,0]},{RGBColor[0,1,0]},{RGBColor[0,0,1]},{RGBColor[0,0,0]},{Thickness[0.01]}}
> It would be deeply appreciated if someone could help me on this matter. Thanks.
>

You can use Directive to specify multiple styles for each curve. For 
example:


curves = Table[{r Cos[t], r Sin[t]}, {r, 1, 4}];

ParametricPlot[curves, {t, 0, 2 \[Pi]},
  PlotStyle -> {Directive[Red, Thick], Directive[Blue, Dashed],
    Directive[Green, Thick, Dashing[Large]],
    Directive[Purple, Dotted]}]


With some of the plotting functions it will also work to give a list of 
lists of Styles, like this:


ParametricPlot[curves, {t, 0, 2 \[Pi]},
  PlotStyle -> {{Red, Thick}, {Blue, Thick}, {Green, Thick}, {Purple,
     Thick,Dashed}}]


But sometimes Directive is required.


-- 
Helen Read
University of Vermont




  • Prev by Date: Re: Doesn't work in Mathematica 8
  • Next by Date: Re: FinancialData errors
  • Previous by thread: Re: Multiple Styles
  • Next by thread: The Largest subscript-known prime number Prime[n]