1
$\begingroup$

I have Mathematica 8 and for some reason, the parameter "thickness" doesn't work in Parametric3D, it works in 2D very fine

ParametricPlot3D[{{t, 0, -t}, {0, t, 2 t}}, {t, 0, 100}, PlotStyle -> {Blue, Orange, Thickness[100]}]

Anyone know a remedy for this?

$\endgroup$
0

1 Answer 1

7
$\begingroup$

If you want different colours but the same thickness then you can set the thickness with BaseStyle

ParametricPlot3D[{{t, 0, -t}, {0, t, 2 t}}, {t, 0, 100}, 
 BaseStyle -> AbsoluteThickness[5], PlotStyle -> {Blue, Orange}]

...otherwise

ParametricPlot3D[{{t, 0, -t}, {0, t, 2 t}}, {t, 0, 100}, 
 PlotStyle -> {{Blue, AbsoluteThickness[15]}, {Orange, 
    AbsoluteThickness[5]}}]

or (probably better)

ParametricPlot3D[{{t, 0, -t}, {0, t, 2 t}}, {t, 0, 100}, 
 PlotStyle -> {Directive[Blue, AbsoluteThickness[15]], Directive[Orange, 
    AbsoluteThickness[5]]}]

BTW, what is happening when you have PlotStyle -> {Blue, Orange, Thickness[100]} is that your first bunch of data is styled blue, your second bunch of data is styled orange and your third bunch of data is styled "mega-thick" ...but you don't have a third bunch of data. So if you try this instead

ParametricPlot3D[{{t, 0, -t}, {0, t, 2 t}}, {t, 0, 100}, 
 PlotStyle -> {Blue, Thickness[1], Orange}]

now the second lot of data is styled thick. etc.

$\endgroup$
5
  • $\begingroup$ Good points. I guess he could use Directive as well. $\endgroup$ Dec 13, 2012 at 4:19
  • $\begingroup$ yes he could also use Directive and is probably the preferred way rather than lists $\endgroup$ Dec 13, 2012 at 4:21
  • $\begingroup$ I got a huge black cylinder when I used "ParametricPlot3D[{{t, 0, -t}, {0, t, 2 t}}, {t, 0, 100}, PlotStyle -> {Blue, Thickness[1], Orange}]" $\endgroup$
    – Lemon
    Dec 13, 2012 at 4:30
  • $\begingroup$ @jak exactly -- that was the point of the exercise. Your second set of data is now styled "mega-thick" (but not orange). ...If you are surprised by how thick that was you should read the docs for Thickness $\endgroup$ Dec 13, 2012 at 4:32
  • 1
    $\begingroup$ Yes, please use Directive to combine styles. $\endgroup$ Dec 13, 2012 at 4:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.