1
$\begingroup$

I would like my axis labels to appear at the ends of my axes (much as would happen in a 2D plot) while using Plot3D and placing my AxesOrigin at {0,0,0}. Is there a simple way to achieve this?

p[i_] := ParametricPlot3D[{x, i, 5 (x^4 - 2 x^2) + 5}, {x, -2, 2}, 
  BoxRatios -> {1, 1, 1/2}, Boxed -> False, Axes -> True, 
  Ticks -> None, AxesOrigin -> {0, 0, 0}, PlotStyle -> Red, 
  AxesLabel -> {Style["\[Phi]", FontSize -> 12], 
    Style["i", FontSize -> 12], Style["\[Tau]", FontSize -> 12]}]
dot[i_] := Graphics3D[{PointSize[0.02], Point[{0, i, 0}]}]
Show[{p[0], p[1], p[2], p[3], dot[0], dot[1], dot[2], dot[3]}, 
 PlotRange -> {{-2, 2}, {-1, 4}, {-1, 7}}]

Result:

enter image description here

$\endgroup$
2
$\begingroup$

My solution was to create labels manually and place them. Not very appealing, but it gets the job done, I would be surprised if there isn't a better way to do this though.

p[i_] := ParametricPlot3D[{x, i, 5 (x^4 - 2 x^2) + 5}, {x, -2, 2}, 
  BoxRatios -> {1, 1, 1/2}, Boxed -> False, Axes -> True, 
  Ticks -> None, AxesOrigin -> {0, 0, 0}, PlotStyle -> Red]
dot[i_] := Graphics3D[{PointSize[0.02], Point[{0, i, 0}]}]
l1 = Graphics3D[Text[Style["\[Phi]", FontSize -> 12], {-2.3, 0, 0}]];
l2 = Graphics3D[Text[Style["\[Tau]", FontSize -> 12], {0, 0, 9}]];
l3 = Graphics3D[Text[Style["i", FontSize -> 12], {0, 4.3, 0}]];
Show[{p[0], p[1], p[2], p[3], dot[0], dot[1], dot[2], dot[3], l1, l2, 
  l3}, PlotRange -> {{-2, 2}, {-1, 4}, {-1, 8}}]

enter image description here

| improve this answer | |
$\endgroup$
  • 1
    $\begingroup$ You can use single Graphics3D $\endgroup$ – OkkesDulgerci Apr 5 '19 at 6:53

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.