0
$\begingroup$

As the output of the following code shows, by default Mathematica does not necessarily place the axes label for 3D graphics at the positive ends of the axes, for axes emanating from the origin.

In the graphical output, the y-axis label is at the negative end, contrary to the way a mathematician would ordinarily label such a figure.

Is there some option to have the labels put at the positive ends?

 ParametricPlot3D[{2 Cos[θ], 2 Sin[θ], 0}, {θ, 0, π/2}, 
    PlotStyle -> Thick, PlotRange -> {{-3, 3}, {-3, 3}, {-2, 2}},
    Boxed -> False, AxesOrigin -> {0, 0, 0}, 
    AxesLabel -> (Style[#, 16] &) /@ {"x", "y", "z"}]

y-axis label is at negative end of axis

$\endgroup$
0
$\begingroup$
ParametricPlot3D[{2 Cos[\[Theta]], 2 Sin[\[Theta]], 0}, {\[Theta], 
  0, \[Pi]/2}, PlotStyle -> Thick, 
 PlotRange -> {{-3, 3}, {-3, 3}, {-1, 2}}, Boxed -> False, 
 AxesOrigin -> {0, 0, 0}, 
 AxesLabel -> (Style[#, 16] &) /@ {"x", "y", "z"}, ViewAngle -> Pi/8]

fig1

Second model

ParametricPlot3D[{2 Cos[\[Theta]], 2 Sin[\[Theta]], 0}, {\[Theta], 
  0, \[Pi]/2}, PlotStyle -> Thick, 
 PlotRange -> {{-3, 3}, {-3, 3}, {-1, 2}}, Boxed -> False, 
 AxesOrigin -> {0, 0, 0}, 
 AxesLabel -> {Style[x, 16], Style[y, 16], Style[z, 16]}]

fig2

$\endgroup$
  • $\begingroup$ Yes, I know about ViewAngle; and in fact one can just manually drag the 3D graphic to reorient the axes like that and so have axes "properly" labeled at their positive ends. But I was hoping for another option that forced the labels to the positive ends, no matter what the orientation. $\endgroup$ – murray Nov 30 '18 at 22:59
  • $\begingroup$ And the method of using ViewAngle, unfortunately, does not work if I give the parameter a variable terminal value and put the resulting ParametricPlot expression inside a Manipulate where that terminal value is the control variable. $\endgroup$ – murray Nov 30 '18 at 23:06
  • $\begingroup$ Correction to my comments: your input does not produce with Mathematica 11.3 the output you show! The axes retain their position as if the ViewAngle option were not there. $\endgroup$ – murray Nov 30 '18 at 23:10
  • $\begingroup$ @murray I just answered your question. If you want to ask another question ask it. $\endgroup$ – Alex Trounev Nov 30 '18 at 23:11
  • $\begingroup$ My ` $Version Out[]= "11.3.0 for Microsoft Windows (64-bit) (March 7, 2018)"` $\endgroup$ – Alex Trounev Nov 30 '18 at 23:14
0
$\begingroup$

While I still don't understand why, by default under the macOS front end, the original code oriented the axes with the positive x-axis pointing backwards, the following with use of ViewPoint gives the result I was looking for.

 ParametricPlot3D[{2 Cos[\[Theta]], 2 Sin[\[Theta]], 0}, {\[Theta], 0, \[Pi]/2}, PlotStyle -> Thick, 
   PlotRange -> {{-3, 3}, {-3, 3}, {-1, 2}}, Boxed -> False, 
   AxesOrigin -> {0, 0, 0}, AxesLabel -> (Style[#, 16] &) /@ {"x", "y", "z"}, 
   ViewPoint -> {Pi, Pi/2, 2}]

Orientation with positive x-axis pointing forward

$\endgroup$
  • 2
    $\begingroup$ this is not a solution. if you rotate the shape, the position of the labels changes. $\endgroup$ – Alex Trounev Dec 2 '18 at 15:45

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.