0

How to position the 3D axes besides the centre of the screen?

 \begin{tikzpicture}
% The axes
\draw[->] (xyz cs:x=-1.5) -- (xyz cs:x=1.5) node[above] {$x$};
\draw[->] (xyz cs:y=-1.5) -- (xyz cs:y=1.5) node[right] {$z$};
\draw[->] (xyz cs:z=-1.5) -- (xyz cs:z=1.5) node[above] {$y$};
 \end{tikzpicture}

The axes appear at the centre. How do I position it on left or right of screen?

Aschoolar
  • 147
  • 1
    In your previous posts you were able to present complete MWEs, i.e. documents that start with \documentclass and ended with \end{document}. What happened to that ability? And you'd greatly benefit from explaining what "centre of the screen" means. –  Jun 09 '18 at 02:52
  • 1
    Completed in the obvious way, those axes will appear on the left. So presumably you're completing it in some non-obvious way we-know-not-what. – cfr Jun 09 '18 at 03:07

1 Answers1

1

If I understand your question correctly, you want to move the axis. TikZ of course trims the picture. But if you put \path (coordinate); with some suitable coordinate there will be space to the left, to the right, above and/or below the axes, depending on your choice of (coordinate). Here are two examples, which are, by relativity, equivalent.

\documentclass[tikz,border=3.14mm]{standalone}
\begin{document}
\begin{tikzpicture}
% The axes
\path(0,0);
\begin{scope}[xshift=3cm]
\draw[->] (xyz cs:x=-1.5) -- (xyz cs:x=1.5) node[above] {$x$};
\draw[->] (xyz cs:y=-1.5) -- (xyz cs:y=1.5) node[right] {$z$};
\draw[->] (xyz cs:z=-1.5) -- (xyz cs:z=1.5) node[above] {$y$};
\end{scope}
\end{tikzpicture}

\begin{tikzpicture}
% The axes
\path(-3,0);
\draw[->] (xyz cs:x=-1.5) -- (xyz cs:x=1.5) node[above] {$x$};
\draw[->] (xyz cs:y=-1.5) -- (xyz cs:y=1.5) node[right] {$z$};
\draw[->] (xyz cs:z=-1.5) -- (xyz cs:z=1.5) node[above] {$y$};
\end{tikzpicture}

\end{document}

enter image description here