summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/pgfplots/pgfplotstable.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/pgfplots/pgfplotstable.tex')
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/pgfplotstable.tex22
1 files changed, 22 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplotstable.tex b/Master/texmf-dist/doc/latex/pgfplots/pgfplotstable.tex
index 1af5eb8b231..caf37fc33ac 100644
--- a/Master/texmf-dist/doc/latex/pgfplots/pgfplotstable.tex
+++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplotstable.tex
@@ -1405,6 +1405,28 @@ The parameters can be customized using the optional integer argument(s): if $\te
Although supported, I discourage from using |fixed zerofill| or |sci zerofill| in this context -- it may lead to a suggestion of higher precision than is actually used (because |fixed zerofill| might simply add |.00| although there was a different information before |relative| rounded the result).
\end{stylekey}
+\begin{keylist}{/pgf/number format/fixed relative}
+ Configures |\pgfmathprintnumber| to format numbers in a similar way to the |fixed| style, but the |precision| is interpreted relatively to the number's exponent.
+
+ The motivation is to get the same rounding effect as for |sci|, but to display the number in the |fixed| style:
+\begin{codeexample}[]
+\pgfkeys{/pgf/number format/.cd,fixed relative,precision=3}
+\pgfmathprintnumber{1000.0123}\hspace{1em}
+\pgfmathprintnumber{100.0567}\hspace{1em}
+\pgfmathprintnumber{0.000010003452}\hspace{1em}
+\pgfmathprintnumber{0.010073452}\hspace{1em}
+\pgfmathprintnumber{1.23567}\hspace{1em}
+\pgfmathprintnumber{1003.75}\hspace{1em}
+\pgfmathprintnumber{1006.75}\hspace{1em}
+\end{codeexample}
+
+ The effect of |fixed relative| is that the number is rounded to \emph{exactly} the first \meta{precision} non-zero digits, no matter how many leading zeros the number might have.
+
+ Use |fixed relative| if you want |fixed| and if you know that only the first $n$ digits are correct. Use |sci| if you need a scientific display style and only the first $n$ digits are correct.
+
+ Note that |fixed relative| ignores the |fixed zerofill| flag.
+\end{keylist}
+
\begin{key}{/pgf/number format/int detect}
Configures |\pgfmathprintnumber| to detect integers automatically. If the input number is an integer, no period is displayed at all. If not, the scientific format is chosen.