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

How can I remove the axes numbers on this plot Helix as well as the box enclosing it?

Would it be possible to now add a tikz 3d axis with pgf plots?

\tdplotsetmaincoords{72}{120}
\begin{tikzpicture}[line join = round, line cap = round, >=triangle 45, tdplot_main_coords]
\draw[->] (0,0,0) -- (0,5,0) node[right, scale = .75] {$y$};
\draw[->] (0,0,0) -- (0,0,5) node[above, scale = .75] {$z$};
\draw[->] (0,0,0) -- (6,0,0) node[below, scale = .75] {$x$};
share|improve this question
add comment

1 Answer

up vote 7 down vote accepted

I suppose you are looking for hide axis :

\documentclass{standalone}
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=1.7}

\begin{document}
\begin{tikzpicture}
\begin{axis}[
    hide axis,
    % necessary to get a tight bounding box 
    % (\pgfplotsset{compat=1.8} also yields correct bounding box *and*
    % correct clip path)
    clip=false,
]
\addplot3+[domain=0:6*pi, samples=100, samples y=0,no marks, smooth](
  {cos(deg(x))},
  {sin(deg(x))},
  {x/(3*pi)}
);
\end{axis}
\end{tikzpicture}
\end{document}

enter image description here

The clip=false key yields a tight bounding box (necessary for pgfplots up to and including version 1.7). As of pgfplots 1.8 and with \pgfplotsset{compat=1.8} or newer, the bounding box will always be tight and the clip path can be active nevertheless.

share|improve this answer
    
Thanks that is great. Would it be possible to use tikz to add in a x,y,z axis with the this or can I not combine tikz into pgfplots \tdplotsetmaincoords{72}{120} \begin{tikzpicture}[line join = round, line cap = round, >=triangle 45, tdplot_main_coords] \draw[->] (0,0,0) -- (0,5,0) node[right, scale = .75] {$y$}; \draw[->] (0,0,0) -- (0,0,5) node[above, scale = .75] {$z$}; \draw[->] (0,0,0) -- (6,0,0) node[below, scale = .75] {$x$}; –  dustin Mar 24 '13 at 19:38
    
I suppose that should become a separate question. Sounds as if you want to force pgfplots to use the same default coordinate system as tikz. In the end, the answer will be: yes, with some effort. There is some section in the pgfplots manual which addresses such a use-case. And there are the axis cs coordinate systems. Although I admit that I am a little bit unsure of why you hide the axis just such that you can draw it on your own? Is your question actually "how can I modify the axis' appearance"? –  Christian Feuersänger Mar 24 '13 at 19:50
    
I didn't want that boxed axis but realized I would like to add in the 3D axis from tikz that part came later. –  dustin Mar 24 '13 at 19:59
    
Ok. In addition to the mentioned manual section, you might also be interested in the key axis lines=center or its other values - it allows non-boxed axes. –  Christian Feuersänger Mar 26 '13 at 19:26
add comment

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.