Manual for Package pgfplots
2D/3D Plots in LATeX, Version 1.18.1
http://sourceforge.net/projects/pgfplots
About PGFPlots: Preliminaries
2.6Troubleshooting – Error Messages
This section discusses some problems which may occur when using pgfplots. Some of the error messages are shown in the index, take a look at the end of this manual (under “Errors”).
2.6.1Problems with available Dimen registers¶
To avoid problems with the many required TeX registers for pgf and pgfplots, you may want to include
\usepackage{etex}
as first package. This avoids problems with “no room for a new dimen” in most cases. It should work with any modern installation of TeX (it activates the \(\varepsilon \)-TeX extensions).
2.6.2Dimension Too Large Errors¶
The core mathematical engine of pgf relies on TeX registers to perform fast arithmetics. To compute \(50+299\), it actually computes 50pt+299pt and strips the pt suffix of the result. Since TeX registers can only contain numbers up to \(\pm 16384\), overflow error messages like “Dimension too large” occur if the result leaves the allowed range. Normally, this should never happen – pgfplots uses a floating point unit with data range \(\pm 10^{324}\) and performs all mappings automatically. However, there are some cases where this fails. Some of these cases are:
-
1. The axis range (for example, for \(x\)) becomes relatively small. It’s no matter if you have absolutely small ranges like \([10^{-17},10^{-16}]\). But if you have an axis range like \([1.99999999,2]\), where a lot of significant digits are necessary, this may be problematic.
I guess I can’t help here: you may need to prepare the data somehow before pgfplots processes it.
-
2. This may happen as well if you only view a very small portion of the data range.
This happens, for example, if your input data ranges from \(x\in [0,10^6]\), and you say xmax=10.
Consider using the restrict x to domain*=min:max key in such a case, where the min and max should be (say) four times of your axis limits (see page (??) for details).
-
3. The axis equal key will be confused if \(x\) and \(y\) have a very different scale.
-
4. You may have found a bug – please contact the developers.
2.6.3Restrictions for DVI Viewers and dvipdfm¶
pgf is compatible with
-
• latex/ dvips,
-
• latex/ dvipdfm,
-
• pdflatex,
-
• \(\vdots \)
However, there are some restrictions: I don’t know any DVI viewer which is capable of viewing the output of pgf (and therefor pgfplots as well). After all, DVI has never been designed to draw something different than text and horizontal/vertical lines. You will need to view the postscript file or the PDF file.
Then, the DVI/PDF combination doesn’t support all types of shadings (for example, the shader=interp is only available for dvips, pdftex, dvipdfmx, and xetex drivers).
Furthermore, pgf needs to know a driver so that the DVI file can be converted to the desired output. Depending on your system, you need the following options:
-
• latex/ dvips does not need anything special because dvips is the default driver if you invoke latex.
-
• pdflatex will also work directly because pdflatex will be detected automatically.
-
• lualatex will also be detected automatically.
-
• latex/ dvipdfm requires to use
\def\pgfsysdriver{pgfsys-dvipdfm.def} %\def\pgfsysdriver{pgfsys-pdftex.def} %\def\pgfsysdriver{pgfsys-dvips.def} %\def\pgfsysdriver{pgfsys-dvipdfmx.def} %\def\pgfsysdriver{pgfsys-xetex.def} %\def\pgfsysdriver{pgfsys-luatex.def} \usepackage{pgfplots}.
The uncommented commands could be used to set other drivers explicitly.
Please read the corresponding sections in the PGF/TikZ manual (Sections 7.2.1 and 7.2.2) if you have further questions. These sections also contain limitations of particular drivers.
The choice which won’t produce any problems at all is pdflatex.
2.6.4Problems with TeX’s Memory Capacities¶
pgfplots can handle small up to medium sized plots. However, TeX has never been designed for data plots – you will eventually face the problem of small memory capacities. See Section 7.1 for how to enlarge them.
2.6.5Problems with Language Settings and Active Characters¶
Both pgf and pgfplots use a lot of active characters – which may lead to incompatibilities with other packages which define active characters. Compatibility is better than in earlier versions, but may still be an issue. The manual compiles with the babel package for English and French, the german package does also work. If you experience any trouble, let me know. Sometimes it may work to disable active characters temporarily (babel provides such a command).
2.6.6Other Problems¶
Please read the mailing list at http://sourceforge.net/projects/pgfplots/support. Perhaps someone has also encountered your problem before, and maybe he came up with a solution.
Please write a note on the mailing list if you have a different problem. In case it is necessary to contact the authors directly, consider the addresses shown on the title page of this document.