I'm very new to using pgfplots, so maybe I'm just being impatient...

Here's the first five lines of my data file, plusMethods.csv. In total, the data file has 58 lines.


Here's the relevant portion of my document




                xlabel = Departure Rate,
                ylabel = Avg Portfolio Value]
            \addplot table[col sep=comma, y=PlusCost, x=$\lambda_{dep}$]{plusMethods.csv};
    \caption{Performance of Triage+ Methods}


When I build this in TeXnicCenter, it just hangs up...no errors, the green progress bar in the system tray keeps moving, the CPU fan spins up...but I've waited 15+ minutes and nothing.

Any ideas what I'm doing wrong? I can't imagine this is that complex a plot to build. Before it's all said and done I need to add three more series to this chart, and then produce four more charts just like this throughout the document...

  • Thanks! That did it...but why did the example here (tex.stackexchange.com/questions/121750/…) work? – jerH Apr 5 '15 at 18:13
  • pgfplotstable understands TeX headers up to a point but you have greek symbols, the link has only latin characters. Change those to something lambda or beta and they won't work either. – percusse Apr 5 '15 at 20:09

I haven't done the surgery for which exact reason it hangs but the culprit is using \mathchars in the the header of the table. A very rough explanation is that pgfplots' internal naming mechanism uses the header entry of the column as the internal column name macro. So let's say mycolumn is the header entry and with a sophisticated naming scheme, internally what happens is

\csname <internal pgfplots column name macro prefix> <mycolumn> \endcsname 

type of machinery gets invoked.

Even under normal circumstances \mathchars can not be handled but here you also provide yet another spectacular breaking point for TeX which are the math mode $ chars, for example,

\csname $\lambda$ \endcsname

already gives an error in the nonstop mode it prints one dollar sign and the \lambda. Internally this probably opens the math mode and breaks everything that follows in the wrong context.

The simplest remedy for it is to remove any TeX specific input in the table entries and use the column name for typesetting. For plotting just use standard names.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.