# Method -> {“AxesInFront” -> False} for Graphics3D

I'm aware of two ways to manage positioning of Axes for Graphics3D: AxesOrigin and AxesEdge. They seem to be quite different in terms of what is actually happening:

GraphicsRow[{
Graphics3D[##, AxesOrigin -> {0, 0, 0}],
Graphics3D[##, AxesEdge -> {{-1, -1}, {-1, -1}, {-1, -1}}]
} &[Sphere[{1, 1, 1}, 1], Axes -> True, ViewPoint -> {5, 7, 3}]]


I want the graphics elements to be up front.

For axes being a part of the box it is natural to use AxesEdge since it gives me that effect.

However sometimes I want the axes origin to be inside the box. AxesEdge is useless and AxesOrigin creates strange effect:

Graphics3D[{Opacity@1, Sphere[{1, 1, 1}, 1]}, Axes -> True, AxesOrigin -> {1, 1, 1}]


Axes created with AxesOrigin seem to be different object than with AxesEdge. It looks like some kind of 2D projection in front of 3D graphics while AxesEdge creates something which is part of 3D graphics.

As one may know there (..find undocumented options...) is an undocumented option Method -> { "AxesInFront" -> False } to deal with this issue in $2D$ graphics.

It doesn't seem to work in $3D$. So my question is if anyone is aware of, maybe undocumented, option responsible for that.

If this is a projection it could be behind the Graphics3D objects too, couldn't it be? (that's a little bit naive, in form, question since I do not know much about graphics rendering etc)

P.s. I do not expect answers like "You can use FindDivisions+Line" etc. I'm looking for simple and fast solution. Or an answer that there isn't any. (spelunking appreciated too:))

-
fyi, I do not get the same image in your first draw. I get this !Mathematica graphics (on winows 7, V 9.01) –  Nasser Sep 12 at 8:09
@Nasser done. try now. –  Kuba Sep 12 at 8:13
spelnuking - is that when you nuke your spelling? –  Simon Woods Sep 12 at 15:05
@SimonWoods ehh. one could just check my posts looking for funny typos and it would be all week long game :P Thanks. –  Kuba Sep 12 at 15:06
Related: Arrows on axes in Plot3D –  Jens Sep 13 at 4:03
add comment

## 1 Answer

If I understand correctly, in the case of your sphere you'd like the sphere to obscure your axes and ticks, except perhaps for a little bit where they poke out at the edges.

This isn't currently possible without writing your own axes using Line and Inset.

The "AxesInFront" and other "...InFront" method options only apply to Graphics which doesn't have a natural $z$-order.

-
Hello, I believe we haven't talk ever before. Ok, judging by you profile it seems to be a final answer. :) But let me ask you about some detailas or the refference about my thoughts about nature of axes in graphics3D, do not leave me with only intuitive understanding. :) –  Kuba Sep 13 at 5:12
And yes, you understand correctly. Also, forgive me my curiosity, but the fact you have written ""AxesInFront" and other "...InFront" options", while here we are aware of only Axes and GridLines, 'forces' me to ask about some 'other' examples :) –  Kuba Sep 13 at 6:17
There's also "FrameInFront" but you're much less likely to run into cases where it might be useful. –  Brett Champion Sep 13 at 15:44
Thank you for this information :) –  Kuba Sep 13 at 15:57
add comment