0
$\begingroup$
    p1 = Plot3D[Sin[x] t, {x, 0, 2}, {t, 0, 2}, Mesh -> None, Mesh -> All,
   MeshFunctions -> Automatic, PlotTheme -> "Business", 
  PlotStyle -> Purple, PlotPoints -> 50, 
  AxesLabel -> {x, t, Rotate["f(x,t)", 90 Degree] }, 
  PlotRange -> All ] 
p2 = Plot3D[Cos[x] t, {x, 0, 2}, {t, 0, 2}, Mesh -> None, Mesh -> All,
   MeshFunctions -> Automatic, PlotTheme -> "Business", 
  PlotStyle -> Blue, PlotPoints -> 50, 
  AxesLabel -> {x, t, Rotate["f(x,t)", 90 Degree] }, 
  PlotRange -> All ] 
p3 = Show[p1, p2 ]

enter image description here

I want to rotate 3d graphics above by code as follows :

enter image description here

But when I rotate the graphic by mouse, axes labels, etc. can't be rotated. Please find the green markers in the second graphic above.

$\endgroup$
3
$\begingroup$

Since you included both Mesh -> None and Mesh -> All it is not clear what you want. To relocate the axes labels use the option AxesEdge

Plot3D[{Sin[x] t, Cos[x] t}, {x, 0, 2}, {t, 0, 2},
 MeshStyle -> Gray,
 PlotStyle -> {Purple, Blue},
 PlotPoints -> 50,
 AxesLabel -> {x, t, "f(x,t)"},
 PlotRange -> All,
 PlotLegends -> "Expressions",
 SphericalRegion -> True,
 ViewPoint -> {1.3, 2.4, 2.},
 AxesEdge -> {{1, -1}, {1, -1}, {1, -1}}]

enter image description here

$\endgroup$
2
  • $\begingroup$ Thank you. That's what I want. Can you explain more how to decide right numbers 1.3, 2.4, 2 in ViewPoint -> {1.3, 2.4, 2.} ? $\endgroup$ – 1_student Apr 4 at 13:35
  • $\begingroup$ When entering the option ViewPoint, one of the choices in the context-sensitive menu was {1.3, -2.4, 2.}, I choose that and then reversed the y coordinate to approximate what you had shown. Alternatively, you could use a Manipulate with three controls for the ViewPoint coordinates and play with it until you find what you want. $\endgroup$ – Bob Hanlon Apr 4 at 13:42

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.