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.

Pasted below is a helix created with PGFPlots package and now I need to add points to a helix. What I was able to get so far is pasted below. I also included a figure depicting desired output I created in Matlab [code].

\documentclass{minimal}
\usepackage{tikz}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}
\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}

PGFPlots example: enter image description here

Matlab output: enter image description here

share|improve this question

1 Answer 1

up vote 12 down vote accepted

You can add nodes just as you put nodes on the lines in a TikZ drawing as below or you can give 3D coordinates with an additional \addplot3 command.

\documentclass{standalone}
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\begin{document}
\begin{tikzpicture}
\begin{axis}
\addplot3+[domain=0:4*pi, samples=100, samples y=0,no marks, smooth](
  {cos(deg(x))},
  {sin(deg(x))},
  {x/(3*pi)}
) node[blue,circle,fill,pos=0.3]{} node[red,draw,pos=0.65,thick]{};
\end{axis}
\end{tikzpicture}
\end{document}

enter image description here

share|improve this answer

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.