4
$\begingroup$

When I use Plot3D, the ticks are hidden when I wanted to show the legends. Is there any way to solve it?

Plot3D[{Sin[x^2 + y], Cos[x^2 + y]}, {x, 0, Pi}, {y, 0, Pi}, ViewPoint -> {1.6, 2.4, 1.6}]

Plot3D[{Sin[x^2 + y], Cos[x^2 + y]}, {x, 0, Pi}, {y, 0, Pi}, ViewPoint -> {1.6, 2.4, 1.6}, PlotLegends -> Automatic]

enter image description here

$\endgroup$

2 Answers 2

7
$\begingroup$

You can set SphericalRegion -> False.

The default setting is Automatic, which is False when the graphic is on its own, but flips to True when it's in another construct (Legended, in this case.)

enter image description here

$\endgroup$
4
$\begingroup$
$Version

(* "12.3.1 for Mac OS X x86 (64-bit) (June 19, 2021)" *)

The axes are on the edges behind the plot. Explicitly place the axes on the desired edges using the option AxesEdge

Plot3D[{Sin[x^2 + y], Cos[x^2 + y]},
 {x, 0, Pi}, {y, 0, Pi},
 ViewPoint -> {1.6, 2.4, 1.6},
 PlotLegends -> Automatic, 
 AxesEdge -> {{1, -1}, {-1, 1}, {-1, 1}}]

enter image description here

$\endgroup$

Your Answer

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

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