As the title says, I would like to combine a Plot3D
object with a Graphics3D
object. However, it seems that Show
is recalculating the dimensions of the box.
So two questions:
Why is
Show
recalculating the box? I assumed that the box is created in thePlot3D
object?How do I prevent this? The
Graphics3D
object is supposed to be a custom-placed axes label, see the example below.
Alternatively, I'd be happy with a solution how to position AxesLabel
freely.
P.S.: the only thing I could find was How to have one or multiple Boxed graphics, mixed with non Boxed, in the same Graphics3D but that doesn't explain the issue and is 9 years old so my hope was that some simpler solution popped up since then.
MWE:
some3dplot = Plot3D[x + y, {x, -1, 1}, {y, -1, 1}, Boxed -> True];
someXAyesLabel = Graphics3D[Text["some label", {1, -2, -2}]];
plt = Show[some3dplot, someXAyesLabel, PlotRange -> All]
PlotRange -> All
. If you omit this, thenShow
will use options from the first of its arguments, namely from yoursome3dplot
, and will not "recalculate" the box. As for the positioning of labels: see Axes Origin & Labels in 3D Plot and Manually assigning Axes label position in Plot3D. $\endgroup$PlotRange->All
causes this, however, if I leave it out I don't see the "some label" anymore... $\endgroup${1, -2, -2}
, which is outside of the box :) Put it at, for example, positionScaled[{1, 0, 0}]
. $\endgroup$AxesLabel
... $\endgroup$