Manual for Package pgfplots
2D/3D Plots in LATeX, Version 1.18.1
http://sourceforge.net/projects/pgfplots
Chapter 6 PGFplotsTable
PgfplotsTable is a lightweight sub-package of pgfplots which employs its table input methods and the number formatting techniques to convert tab-separated tables into tabulars.
Its input is a text file containing space-separated rows, possibly starting with column names. Its output is a LaTeX tabular99 which contains selected columns of the text table, rounded to the desired precision, printed in the desired number format (fixed point, integer, scientific etc.). The output is LaTeX code, and that code is finally typeset by LaTeX.
In other words, PgfplotsTable is nothing but a more-or-less smart code generator which spits out something like \begin{tabular}...\end{tabular}. Use it if you’d like to customize row or column dependent styles or if you have numerical data for which you want to have automatically formatted content.
It is used with
and requires pgfplots and pgf \(\ge 2.00\) installed.
-
\pgfplotstableset{key-value-options} ¶
-
1. As default settings for the complete document (or maybe a part of the document), using \pgfplotstableset{options}. For example, the document’s preamble may contain
to configure a precision of \(3\) digits after the period, including zeros to get exactly \(3\) digits for all fixed point numbers.
-
2. As option which affects just a single table. This is provided as optional argument to the respective table typesetting command, for example \pgfplotstabletypeset[options]{file}.
The user interface of this package is based on key-value-options. They determine what to display, how to format and what to compute.
Key–value pairs can be set in two ways:
Both ways are shown in the examples below.
Knowledge of pgfkeys is useful for a deeper insight into this package, as /.style, /.append style etc. are specific to pgfkeys. Please refer to the PGF/TikZ manual, Section “pgfkeys” or the shorter introduction [9] to learn more about pgfkeys. Otherwise, simply skip over to the examples provided in this document.
You will find key prefixes /pgfplots/table/ and /pgf/number format/. These prefixes can be skipped if they are used in PgfplotsTable; they belong to the “default key path” of pgfkeys.
99 Please see the remarks in Section 6.4.4 for plain TeX and ConTeXt.