TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

is it possible to set a different orthonormal base for the xyz coordinate space? for example, the default one is x=(1,0,0) y=(0,1,0) and z=(0,0,1).

I would want to set this base: x=(1,0,0) y=(0,0,1) and z=(0,1,0) so that when i draw a line from (0,0,0) to (0,1,0) it will be rendered as a line from (0,0,0) to (0,0,1) using default xyz coordinates.

i tried setting


but it seems only to distort the drawing. I would like to avoid using pgfplots, if possible.

thank you in advance for your attention

share|improve this question
up vote 8 down vote accepted

According to the manual, the default z unit vector is (-3.85mm, -3.85mm). If you set y={(-3.85mm, -3.85mm)} and z={(0cm,1cm)} the default y and z axis will be switched, if I'm not mistaken. TikZ draws everything in 2D space, so the unit vectors are 2D as well.

share|improve this answer

Looks like a job for the tikz-3dplot package. It draws in the well known base.


    \draw[thick,->] (0,0,0) -- (1,0,0) node[anchor=north east]{$x$};
    \draw[thick,->] (0,0,0) -- (0,1,0) node[anchor=north west]{$y$};
    \draw[thick,->] (0,0,0) -- (0,0,1) node[anchor=south]{$z$};
share|improve this answer

Your Answer


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.