Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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}]]

enter image description here

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}]

enter image description here

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:))

share|improve this question
    
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 '13 at 8:09
1  
@Nasser done. try now. –  Kuba Sep 12 '13 at 8:13
2  
spelnuking - is that when you nuke your spelling? –  Simon Woods Sep 12 '13 at 15:05
1  
@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 '13 at 15:06
    
Related: Arrows on axes in Plot3D –  Jens Sep 13 '13 at 4:03

1 Answer 1

up vote 5 down vote accepted

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.

share|improve this answer
    
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 '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 '13 at 6:17
2  
There's also "FrameInFront" but you're much less likely to run into cases where it might be useful. –  Brett Champion Sep 13 '13 at 15:44
    
Thank you for this information :) –  Kuba Sep 13 '13 at 15:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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