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.

I'm trying to draw a plot from this table:

ip   Min             Std
0    19.86764349     97.20356138
16   19.86764349    250.079659
22   19.86764349    168.2253117
23   19.86764349    169.2514577
33   19.86764349    142.664228
...
996  0.371543541    1.52E-07
997  0.371543312    1.85E-07
998  0.371543276    1.73E-07
999  0.371543154    1.97E-07
1000 0.371542976    1.99E-07

The code is this:

\documentclass{article}
\usepackage{pgfplots}
\begin{document}
  \begin{tikzpicture}
    \begin{axis}[
      scale only axis,
      enlargelimits=false,
      stack plots=y,
      area style
      ]
      \addplot[] table [x=ip,y=Min] {dataTablaEstadisticas.dat}; closedcycle;
      \addplot[draw=none,fill=green!50] table [x=ip,y=Std] {dataTablaEstadisticas.dat}; closedcycle;
    \end{axis}
  \end{tikzpicture}
\end{document}

enter image description here

I can't find my mistake. Any advice, please?

share|improve this question
add comment

1 Answer 1

up vote 4 down vote accepted

The command is \closedcycle (with a backslash), and it needs to be given inside the \addplot ... ; command, before the semicolon.

\documentclass{article}
\usepackage{pgfplots}
\begin{document}
  \begin{tikzpicture}
    \begin{axis}[
      scale only axis,
      enlargelimits=false,
      stack plots=y,
      area style
      ]
      \addplot[] table [x=ip,y=Min] \dataTablaEstadisticas \closedcycle;
      \addplot[draw=none,fill=green!50] table [x=ip,y=Std] \dataTablaEstadisticas \closedcycle;
    \end{axis}
  \end{tikzpicture}
\end{document}
share|improve this answer
    
Aaaahg!! Thanks a lot one more time, Jake. –  Fernando Nadal Dec 22 '11 at 12:19
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.