5

Consider this 3D plot:

\documentclass{standalone}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
  \begin{axis}
    \addplot3[surf,domain=-4.5:4.5]{(x^2)-(y^2)};
  \end{axis}
\end{tikzpicture}
\end{document}

original result

How can I alter the rendering style of the ticks so that

  1. ticks are only drawn next to their labels, not on the opposite axis?
  2. ticks are only drawn on the background faces of the 3D box, not the on the invisible foreground faces?

Here is the resulting picture I have in mind (I erased the unwanted ticks in the bitmap):

enter image description here

2

Pgfplots supports only the small crosses; it has no builtin option to draw ticks in a different way.

  • Is this something I could hack in some way, or does it requires deep knowledge of the pgfplots internals? – adl Jun 26 '14 at 19:45
  • Well, given enough skill and time, there are ways to modify that stuff. But it is involved. 3D axes have surprisingly many challenges. pgfplots boils it down to pairs of main axis and the axis in which you'd draw grid lines, and combines these pairs in a suitable way. That combination comes with high complexity. – Christian Feuersänger Jun 27 '14 at 18:48
  • OK, so I'll keep the current style :-) Thank you for answering. – adl Jun 27 '14 at 19:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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