I have a rather complicated pgfplots graph mixing const plot with ybar stacked and it doesn't like the data sets I am importing due to coordinate mismatch.

However the graphs are correct and exactly what I need.

How can I either:

  • increase the nonstop error limit of MikTeX?
  • tell LaTeX to ignore this error?
  • eliminate this error from the code below?

(I have already logged a request to change the error to a warning with Christian.)

Here follows a light example approximating my requirements, it also throws three typical errors:

    \pgfplotsset{small, width=15cm, height=6cm,compat=1.7}

    \begin{axis}[ybar stacked]
    \addlegendimage{line legend,thick,legend image code/.code={
      \draw[#1] (0cm,0cm) --  (0.4cm,0cm);}};
    \addlegendimage{draw=black, fill=yellow}
    \addlegendimage{draw=black, fill=red}

    \addplot[const plot, thick] coordinates {
    \addplot[const plot, draw=none, forget plot] coordinates {
    \addplot [draw=black, fill=yellow] coordinates {
    \addplot[draw=black, fill=red] coordinates {
    \legend{target, s1,s2};

  • 3
    I have just seen your private email and I realize that you are referring to the error "Sorry, pgfplots expects stacked plots to have exactly the same number of coordinates". I suppose that you should create a minimal working example and post it here. This would allow others to find precise answers. – Christian Feuersänger May 20 '13 at 8:43
  • 3
    I will take a note on the todo list of pgfplots which would allow you to selectively overwrite this particular exception (it is currently impossible for this specific error). – Christian Feuersänger May 20 '13 at 8:44

I suppose you have used \pgfplotstableread and a row with either too many or too few columns.

In this case, you can suppress the error by overwriting the exception code.

In your case, it is an "unsupported operation" which can be overwritten as follows:




        /pgfplots/exception/unsupported operation/.code={},
    x y z
    1 1 1
    2 2 2
    3 3 3 3
    3 3

    \addplot table {\loadedtable};

It seems as if this exception type is used for too many exceptional cases while typesetting tables as well. I will correct that eventually.

For now, you should use this key with care: disabling errors can produce unanticipated side effects if pgfplots does not recover as gracefully as one wants to. "Care" means: try to restrict its application to a small context, do not overwrite it globally. In particular, do not disable it in the context of \pgfplotstabletypeset. This remark applies to pgfplots 1.8 .

  • I have proposed to undelete this post since it seems better to have an authoritative yet understandably partial answer rather than having it unanswered – percusse Mar 17 '14 at 22:19

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.