I am looking for a way to manually control the positioning of labels in a 3D plot. For this purpose I used to follow the methods of the accepted answers in:
Axes Origin & Labels in 3D Plot
Manually assigning Axes label position in Plot3D
which basically achieves that using Show
and something like
Graphics3D[Text["x", Scaled[{0.5, -0.2, -0.2}] ]
I'm guessing this has something to do with the version 13.1, but this no longer works. In this version I can't even reproduce the accepted solutions above anymore. The labels simply don't show up.
Example:
Show[{Plot3D[x^2 + y^2 + 3, {x, -3, 3}, {y, -3, 3},PlotRange -> {-1, 20}],Graphics3D[{Text["x", Scaled[{-.05, .5, 0}], {0, -1}], Text["y", Scaled[{.5, -.05, 0}], {0, -1}], Text["z", Scaled[{.5, .5, 1.1}]]}]}]
returns:
no x y z labels...
I think the problem is that Scaled
brings the label outside the boundingbox of Graphics3D
, but PlotRange
doesn't fix that. I can play with Scaled
to bring the labels into the plot. In this picture it still may look fine to bring the labels inside, but in other cases it doesn't.
Also, if possibe, I'd like the answer not to involve the function Text
, because for aesthetic reasons I use the package Matex
, to produce labels as in
Graphics3D[Inset[MaTeX["x"], Scaled[{0.5, -0.2, -0.2}] ] ]
and hence some functionalities of Text may not carry over. Alternatives to this approach are also welcome though. Thank you.