I have some grid-lines I want to extend outside of the bounding box of 3D plot BarChart3D. I do want to keep the bounding box small, as I want the automatic axes on the bounding box edge remain next to data.
In case of 2D plots ImagePadding does the trick. In Plot3D it does not. Here is an example.
ρ = 1/2 ({{1, 0, 0, -1}, {0, 0, 0, 0}, {0, 0, 0, 0}, {-1, 0, 0, 1}});
Show[{
BarChart3D[ρ, BarSpacing -> {1, 1}, ChartLayout -> "Grid",
FaceGrids -> None, Method -> {"Canvas" -> None},
PlotRange -> {{-1, 8}, {-1, 8}, {-0.5, 0.5}}, Boxed -> True,
FaceGrids -> None, Axes -> {True, True, True},
ViewPoint -> {1, -5, 3},
Ticks -> {Range[-10, 10, 2], Range[-10, 10, 2],
Range[-10, 10, 2]}],
Graphics3D[{Table[Text[y, {10, y 2 - 1.5, 0}], {y, 1, 4}],
Table[Line[{{-4, y 2 - 1.5, 0}, {20, y 2 - 1.5, 0}}], {y, 1,
4}]}]}, PlotRangeClipping -> False, ImagePadding -> All
]
If I add PlotRange->All
I see, that the manual grid lines were clipped. I want the long lines, but BoundingBox
tightly around the bars.
There exists a trivial solution for same problem for 2D plots: Drawing outside Plot area
I do expect, there is a solution, which does not require re-implementation of axes, face grids and other features.
Mathematica
built in features the answer should remain, as might lead another reader. Someone should recover the answer if possible. $\endgroup$