3

I am trying to plot a big file of data http://www.warcomeb.it/private/load.csv.zip with this code:

    \documentclass{standalone}

\usepackage{pgfplots}
\pgfplotsset{/pgf/number format/use comma,compat=1.12}


\begin{document}


\begin{tikzpicture}
    \begin{axis}[
        xmin = 0,
%       xmax = 25000,
        ymin = 0,
        ymax = 60,
        width=19cm,
%       xtick={0,2500,5000},
%       xticklabels={0,2.5,5},
        xlabel=Time (day),
        ylabel=Temperature,
        grid=major,
        xtick scale label code/.code={},
        ]
%       \addplot [red, thick,mark=*,mark repeat=100] file [x=num,y=AccTwo]
        \addplot [red] file [x=Num, y=H1]
            {load.csv};
%       \addplot [green, thick] file [x=Num, y=H2]
%           {load.csv};
        \legend{Hive 1}
%       \legend{Hive 1,Hive 2}
    \end{axis}
\end{tikzpicture}

\end{document}

and I am compiling with lualatex and I receive this error:

! Dimension too large.
\pgfplotsaxisdeserializedatapointfrom@private@LUA ...
                                                  \pgfplotsaxisdeserializeda...
l.31    \end{axis}

What can I do?

1
  • Did the answer of JPi and the corresponding comment solve your problem or do you need further assistance? Please either accept the answer or edit your question accordingly. Thanks. Commented Feb 4, 2017 at 9:03

1 Answer 1

3

I've changed a couple of things to make it run for me. The important bits for you are the restrict y domain to and restrict x domain to. The irrelevant changes are that I converted it to space separated and changed the version number. It now runs fine with lualatex.

    \documentclass{standalone}

\usepackage{pgfplots}
\pgfplotsset{/pgf/number format/use comma,compat=newest}


\begin{document}


\begin{tikzpicture}
    \begin{axis}[
        xmin = 0,
%       xmax = 25000,
        ymin = 0,
        ymax = 60,
        width=19cm,
%       xtick={0,2500,5000},
%       xticklabels={0,2.5,5},
        xlabel=Time (day),
        ylabel=Temperature,
        grid=major,
        xtick scale label code/.code={},
         restrict y to domain=0:60,
         restrict x to domain=0:40
        ]
%       \addplot [red, thick,mark=*,mark repeat=100] file [x=num,y=AccTwo]
        \addplot [red] table [x =Num, y=H1]
            {load.csv};
%       \addplot [green, thick] file [x=Num, y=H2]
%           {load.csv};
        \legend{Hive 1}
%       \legend{Hive 1,Hive 2}
    \end{axis}
\end{tikzpicture}

\end{document}

enter image description here

3
  • 2
    And the reason something went wrong is that one of your x coordinates is missing a period. (should be 40.755)
    – JPi
    Commented Sep 27, 2015 at 1:47
  • I can't restrict the x domain to 0:40, because the points is the minute of ten day, so I cant't plot only the first 40 points!
    – warcomeb
    Commented Sep 28, 2015 at 7:22
  • Ok, restrict it to whatever it needs to be.
    – JPi
    Commented Sep 28, 2015 at 9:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .