0
$\begingroup$

New to Mathematica so forgive me if this seems trite.

Using the following code

RevolutionPlot3D[3 t, {t, 0, 3}, 
    PlotStyle -> Directive[RGBColor[0.5, 1, 1], Opacity[0.67]], 
    MeshStyle -> Directive[Opacity[0.67]], 
    PlotTheme -> "Marketing", BoxRatios -> {1, 1, 3}]

I get the following result

enter image description here

The problem is that with this theme, if I orient the graphic such that +x,+y, and +z all point in their standard directions, the half-box is oriented such that my solid is behind it. How could I change the axes such that my image is visible and with axes pointing in the appropriate direction?

$\endgroup$
  • $\begingroup$ Post your code in a code block so that readers can copy and paste it into a notebook. $\endgroup$ – Bob Hanlon Jul 15 '17 at 3:16
  • $\begingroup$ RevolutionPlot3D[3 t, {t, 0, 3}, PlotStyle -> Directive[RGBColor[0.5, 1, 1], Opacity[0.67]], MeshStyle -> Directive[Opacity[0.67]], PlotTheme -> "Marketing", BoxRatios -> {1, 1, 3}] $\endgroup$ – Lanier Freeman Jul 15 '17 at 3:20
  • $\begingroup$ In the meantime I've just turned axes off and am content with the result $\endgroup$ – Lanier Freeman Jul 15 '17 at 3:21
1
$\begingroup$

Your problem is that you are confused about what are the x,y,z axes. If you add AxesLabel->{x,y,z}, you'll see that in fact Plot was smart enough to color the "back" three sides. You've reoriented the output so that the vertical axis is -y, the horizontal axis is z, and the into the page axes is -x, which is why the labels are "reversed".

Based on your comments, I belive what you really want to ask is how to generate a surface of reovlution about the x axes. The answer to that is to use the RevolutionAxis option, as shown here

RevolutionPlot3D[3 t, {t, 0, 3}, 
    PlotStyle -> Directive[RGBColor[0.5, 1, 1], Opacity[0.67]], 
    MeshStyle -> Directive[Opacity[0.67]],
    PlotTheme -> "Marketing", 
    AxesLabel -> {x, y, z},
    BoxRatios -> {1, 1, 1},
    RevolutionAxis -> {1, 0, 0}        
]

This will generate what I belive to be the output you want, and if you rotated is the x is horizontal and z is vertical, you'll still see the labels you want: 0 to 3 from left to right for x, and -10 to 10 from bottom to top for the z axis.

$\endgroup$
  • $\begingroup$ This still isn't working when I use RevolutionPlot3D $\endgroup$ – Lanier Freeman Jul 15 '17 at 16:05
  • $\begingroup$ @LanierFreeman What version are you using? $\endgroup$ – Itai Seggev Jul 15 '17 at 16:34
  • $\begingroup$ 11.1 version of Mathematica $\endgroup$ – Lanier Freeman Jul 15 '17 at 16:34
  • $\begingroup$ I can't reproduce that with 11.1 on either OSX or Linux. Perhaps you should clarify what you mean by "the standard directions". I assumed the you meant a vertical z either positive up, horizontal x with postive to thr right, and y into the screen. That gives a back, left, and bottom screen with the cone pointed upwards in front the backdrop. $\endgroup$ – Itai Seggev Jul 15 '17 at 18:42
  • $\begingroup$ If you refer to my picture, note the vertical axis becomes negative as you go higher. I want that axis to become positive as you go higher $\endgroup$ – Lanier Freeman Jul 15 '17 at 18:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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