summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-06-15 17:56:37 +0000
committerKarl Berry <karl@freefriends.org>2008-06-15 17:56:37 +0000
commit3f126e90ac9efa15e72c8b415a2f25d3b19c509a (patch)
tree3fb6f3eebbf51978c31e8d6ff1180432e50b9935 /Master
parent9667a29e9fef0ef89c9d7bd311e2d2a6aaccf50c (diff)
painful pgfplots update (14jun08)
git-svn-id: svn://tug.org/texlive/trunk@8751 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/context/pgfplots/pgfplotsexample.pdfbin0 -> 56287 bytes
-rw-r--r--Master/texmf-dist/doc/context/pgfplots/pgfplotsexample.tex47
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/README (renamed from Master/texmf-dist/doc/latex/pgfplots/README)11
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/ext_scripts/matlab2pgfplots.m (renamed from Master/texmf-dist/doc/latex/pgfplots/matlab2pgfplots.m)5
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/ext_scripts/matlab2pgfplots.sh (renamed from Master/texmf-dist/doc/latex/pgfplots/matlab2pgfplots.sh)0
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/ext_scripts/pgf2pdf.sh (renamed from Master/texmf-dist/doc/latex/pgfplots/pgf2pdf.sh)0
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/liststructuretest/liststructuretest.tex164
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/numtabletest/numtabletest.generated1.tex1
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/numtabletest/numtabletest.tex211
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/numtabletest/numtabletestdata11
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/numtabletest/numtabletestdata211
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/numtabletest/numtabletestdata2.brace11
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/numtabletest/numtabletestdata2.colon10
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/numtabletest/numtabletestdata2.csv11
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/numtabletest/numtabletestdata2.gnuplot8
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/numtabletest/numtabletestdata2.semicolon11
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/numtabletest/numtabletestdata310
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/pgfkeysaddition/pgfkeysadditiontest.tex251
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/pgfmathlogtest/pgfmathlogtest.tex (renamed from Master/texmf-dist/doc/latex/pgfplots/pgfmathlogtest.tex)216
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.align.tex215
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.axislines.tex259
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.axispath.tex41
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.enlargelimits.tex99
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.errorbars.tex153
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.expr.tex15
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.file.tex121
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.function.tex24
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.gnuplot_exp.gnuplot2
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.gnuplot_exp.table54
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.gnuplot_sin.gnuplot2
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.gnuplot_sin.table54
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.gridtick.tex84
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.hansmeine_app.tex114
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.legend.tex78
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.logplotenv.tex142
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.misc.tex171
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.parable.gnuplot2
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.parable.table29
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.plottypes.tex219
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.scaling.tex478
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.sinneg.gnuplot2
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.sinneg.table44
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.styledplot.gnuplot2
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.styledplot.table29
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.styledplot2.gnuplot2
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.styledplot2.table29
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.styles.tex135
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.tex182
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.ticks.tex296
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/plotdata/pgfplotstest_plot11
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/plotdata/pgfplotstest_plot2.gnuplot22
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/plotdata/pgfplotstest_plot311
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/plotdata/pgfplotstest_plot425
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/plotdata/pgfplotstest_plot524
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/plotdata/pgfplotstest_plotnocolnames9
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/valueplot-flowlines_1.dat92
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/valueplot-flowlines_2.dat221
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/valueplot-flowlines_3.dat39
-rw-r--r--Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/valueplot-flowlines_4.dat34
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/ChangeLog219
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/Makefile17
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/changelog.txt31
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/example.pdfbin19350 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_cubic.gnuplot2
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_cubic.table12
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_exp.gnuplot2
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_exp.table29
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_filesuffix.gnuplot2
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_filesuffix.table29
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_filesuffix1.gnuplot2
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_filesuffix1.table29
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_filesuffix2.gnuplot2
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_filesuffix2.table14
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_filesuffix_noise.gnuplot2
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_filesuffix_noise.table14
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_gnuplot_exp.gnuplot2
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_gnuplot_exp.table19
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_gnuplot_expv.gnuplot2
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_gnuplot_expv.table19
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_gnuplot_ppp.gnuplot2
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_gnuplot_ppp.table124
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_parable.gnuplot2
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_parable.table29
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_parablex.gnuplot2
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_parablex.table12
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_pgf-plot.gnuplot2
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_pgf-plot.table29
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_pow1.gnuplot2
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_pow1.table12
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_pow2.gnuplot2
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_pow2.table12
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_sin.gnuplot2
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_sin.table29
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_sinneg.gnuplot2
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_sinneg.table44
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_square.gnuplot2
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_square.table24
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/liststructuretest.tex193
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/pgfmanual-en-macros.tex943
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/pgfplots-macros.tex251
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/pgfplots.bib4
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/pgfplots.examples.tex899
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/pgfplots.idx457
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/pgfplots.install.tex40
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/pgfplots.intro.tex821
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/pgfplots.pdfbin619237 -> 803663 bytes
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/pgfplots.preamble.tex114
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.tex3816
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/pgfplots.testplot23
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/pgfplots.testtable10
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/pgfplots.testtable2.dat9
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/pgfplots.tex119
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/pgfplots.timeseries.dat19
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/pgfplotsexample.pdfbin0 -> 18949 bytes
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/pgfplotsexample.tex (renamed from Master/texmf-dist/doc/latex/pgfplots/example.tex)6
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/pgfplotstable.example1.csv13
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/pgfplotstable.example1.dat13
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/pgfplotstable.example1.out.tex1
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/pgfplotstable.idx110
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/pgfplotstable.pdfbin0 -> 226067 bytes
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/pgfplotstable.tex862
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/pgfplotstest.tex1108
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/plotdata/pgfplots_scatterdata1.dat35
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/plotdata/pgfplots_scatterdata1_latent.dat10
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/plotdata/pgfplots_scatterdata2.dat32
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/plotdata/pgfplots_scatterdata2_latent.dat9
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/todo.txt153
-rw-r--r--Master/texmf-dist/doc/plain/pgfplots/pgfplotsexample.pdfbin0 -> 17957 bytes
-rw-r--r--Master/texmf-dist/doc/plain/pgfplots/pgfplotsexample.tex48
-rw-r--r--Master/texmf-dist/tex/context/pgfplots/t-pgfplots.tex61
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/liststructure/pgfplotsarray.code.tex202
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/liststructure/pgfplotsliststructure.code.tex256
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/numtable/pgfplotstable.code.tex1007
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/numtable/pgfplotstable.coltype.code.tex85
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_loader.code.tex12
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_misc.code.tex96
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfkeysfiltered.code.tex927
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryplothandlers.code.tex922
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmathfloat.code.tex2007
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/pgfplots/pgfplots.code.tex5918
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/pgfplots/pgfplots.stackedplots.code.tex365
-rw-r--r--Master/texmf-dist/tex/latex/pgfplots/liststructure.sty196
-rw-r--r--Master/texmf-dist/tex/latex/pgfplots/pgfmathlog.sty215
-rw-r--r--Master/texmf-dist/tex/latex/pgfplots/pgfplots.sty2559
-rw-r--r--Master/texmf-dist/tex/latex/pgfplots/pgfplotshelpers.sty208
-rw-r--r--Master/texmf-dist/tex/latex/pgfplots/sciformat.sty861
-rw-r--r--Master/texmf-dist/tex/plain/pgfplots/pgfplots.tex49
-rwxr-xr-xMaster/tlpkg/bin/ctan2tds30
148 files changed, 23631 insertions, 7798 deletions
diff --git a/Master/texmf-dist/doc/context/pgfplots/pgfplotsexample.pdf b/Master/texmf-dist/doc/context/pgfplots/pgfplotsexample.pdf
new file mode 100644
index 00000000000..a51c938286b
--- /dev/null
+++ b/Master/texmf-dist/doc/context/pgfplots/pgfplotsexample.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/context/pgfplots/pgfplotsexample.tex b/Master/texmf-dist/doc/context/pgfplots/pgfplotsexample.tex
new file mode 100644
index 00000000000..2dc477fd49a
--- /dev/null
+++ b/Master/texmf-dist/doc/context/pgfplots/pgfplotsexample.tex
@@ -0,0 +1,47 @@
+%% ConTeXt file
+
+\usemodule[pgfplots]
+
+\starttext
+Using Con{\TeX}t.
+
+\starttikzpicture
+ \startloglogaxis
+ \addplot coordinates {
+ (1,1)
+ (16,16)
+ (32,64)
+ };
+ \stoploglogaxis
+\stoptikzpicture
+
+\starttikzpicture
+ \startloglogaxis[
+ xlabel=Cost,
+ ylabel=Error]
+ \addplot coordinates {
+ (5, 8.31160034e-02)
+ (17, 2.54685628e-02)
+ (49, 7.40715288e-03)
+ (129, 2.10192154e-03)
+ (321, 5.87352989e-04)
+ (769, 1.62269942e-04)
+ (1793, 4.44248889e-05)
+ (4097, 1.20714122e-05)
+ (9217, 3.26101452e-06)
+ };
+ \addplot coordinates {
+ (7, 8.47178381e-02)
+ (31, 3.04409349e-02)
+ (111, 1.02214539e-02)
+ (351, 3.30346265e-03)
+ (1023, 1.03886535e-03)
+ (2815, 3.19646457e-04)
+ (7423, 9.65789766e-05)
+ (18943, 2.87339125e-05)
+ (47103, 8.43749881e-06)
+ };
+ \legend{Case 1,Case 2}
+ \stoploglogaxis
+\stoptikzpicture
+\stoptext
diff --git a/Master/texmf-dist/doc/latex/pgfplots/README b/Master/texmf-dist/doc/generic/pgfplots/README
index 8b01a60342d..2712d896c26 100644
--- a/Master/texmf-dist/doc/latex/pgfplots/README
+++ b/Master/texmf-dist/doc/generic/pgfplots/README
@@ -1,4 +1,4 @@
-pgfplots - A tool to draw normal and/or logarithmic plots in LaTeX.
+pgfplots - A tool to draw normal and/or logarithmic plots in LaTeX/TeX/ConTeXt.
Pgfplots draws high-quality function plots in normal or logarithmic
scaling with a user-friendly interface. The user supplies axis labels, legend
@@ -6,13 +6,18 @@ entries and the plot coordinates for one or more plots and Pgfplots applies
axis scaling, computes any logarithms and axis ticks and draws the plots.
It is based on Till Tantau's package PGF/TikZ.
+Pgfplots also provides methods to typeset numeric tables, rounds to prescribed
+accuracy and typesets numbers in the desired format.
+
Please take a look at
- doc/latex/pgfplots/manual.pdf.
+ doc/latex/pgfplots/pgfplots.pdf
+and
+ doc/latex/pgfplots/pgfplotstable.pdf
The manual contains installation instructions and more detailed information.
Copyright 2007/2008 by Christian Feuersaenger.
-%
+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
diff --git a/Master/texmf-dist/doc/latex/pgfplots/matlab2pgfplots.m b/Master/texmf-dist/doc/generic/pgfplots/ext_scripts/matlab2pgfplots.m
index c591a7a4af7..5c1fc6296c6 100644
--- a/Master/texmf-dist/doc/latex/pgfplots/matlab2pgfplots.m
+++ b/Master/texmf-dist/doc/generic/pgfplots/ext_scripts/matlab2pgfplots.m
@@ -17,6 +17,10 @@ function matlab2pgfplots(varargin )
% Linestyles and markers will follow as an option. However, pgfplots has its
% own line styles which may be appropriate.
%
+% Although pgfplots can also handle bar and area plots, this script is not yet
+% capable of converting them. Feel free to modify it and send the final version
+% to me!
+%
% OPTIONS are key value pairs. Known options are
% - 'fig',HANDLE
% a figure handle (default is 'gcf').
@@ -34,6 +38,7 @@ function matlab2pgfplots(varargin )
% for details about pgfplots.
%
%
+%
% Copyright Christian Feuersaenger 2008
%
parser = inputParser;
diff --git a/Master/texmf-dist/doc/latex/pgfplots/matlab2pgfplots.sh b/Master/texmf-dist/doc/generic/pgfplots/ext_scripts/matlab2pgfplots.sh
index 9bc84642506..9bc84642506 100644
--- a/Master/texmf-dist/doc/latex/pgfplots/matlab2pgfplots.sh
+++ b/Master/texmf-dist/doc/generic/pgfplots/ext_scripts/matlab2pgfplots.sh
diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgf2pdf.sh b/Master/texmf-dist/doc/generic/pgfplots/ext_scripts/pgf2pdf.sh
index 027a6157b77..027a6157b77 100644
--- a/Master/texmf-dist/doc/latex/pgfplots/pgf2pdf.sh
+++ b/Master/texmf-dist/doc/generic/pgfplots/ext_scripts/pgf2pdf.sh
diff --git a/Master/texmf-dist/doc/generic/pgfplots/test/liststructuretest/liststructuretest.tex b/Master/texmf-dist/doc/generic/pgfplots/test/liststructuretest/liststructuretest.tex
new file mode 100644
index 00000000000..408b6d4cfb6
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/liststructuretest/liststructuretest.tex
@@ -0,0 +1,164 @@
+\documentclass[a4paper]{article}
+\usepackage{german}
+\usepackage[utf8]{inputenc} % erlaubt direkte Nutzung von Umlauten
+
+% \usepackage[a4paper,noheadfoot,pdftex,left=0.8cm,right=1cm,top=0.8cm,bottom=0.8cm]{geometry}
+% \usepackage{color}
+% \usepackage{colortbl}
+% \usepackage{longtable}
+% \usepackage[a4paper,colorlinks=true]{hyperref} % Querverweise etc. option pdftex,dvipdfm?
+% \usepackage{graphicx}
+% \usepackage[draft]{graphicx}
+% \usepackage{listings} % fuer codefragmente jeder art
+\usepackage[intlimits]{amsmath}
+\usepackage{amssymb}
+\usepackage{amsfonts}
+% \usepackage{amsthm}
+\usepackage{bibgerm}
+%\usepackage{simplelist}
+
+\usepackage{pgf}
+\makeatletter
+\input pgfplotsliststructure.code.tex
+\input pgfplotsarray.code.tex
+\makeatother
+
+% fuer endvironment 'sidewaysfigure' bspw
+% \usepackage{rotating}
+
+%\pdfinfo {
+% /Author (Christian Feuersaenger)
+%}
+
+%%
+% My user defined commands ...
+%
+\usepackage{mymath}
+\usepackage{myext}
+
+% von Alex: A4-Groesse, symmetrische Seitenraender.
+% \usepackage{mya4sym}
+
+
+% figure einstellungen:
+%\renewcommand{\topfraction}{0.85}
+%\renewcommand{\textfraction}{0.06}
+%\renewcommand{\floatpagefraction}{0.8}
+
+\def\testfile#1{\chapter{#1}}
+\def\testsection#1{\message{STARTING TEST SECTION '#1'}\section{#1}}
+\def\testsubsection#1{\message{STARTING TEST SUBSECTION '#1'}\subsection{#1}}
+\def\testsubsubsection#1{\message{STARTING TEST SUBSUBSECTION '#1'}\subsubsection{#1}}
+
+
+\author{Christian Feuersänger}
+%\title{}
+
+\begin{document}
+%\maketitle
+\testsection{pgfplotslist test}
+\message{pgfplotslist test}%
+{
+\tracingcommands=2
+\tracingmacros=2
+\pgfplotslistnewempty\probe
+\pgfplotslistpushback eins\to\probe
+\pgfplotslistpushback [probe]\to\probe
+\pgfplotslistpushback [probe2]\to\probe
+\pgfplotslistpushback [probe3]\to\probe
+
+Size: \pgfplotslistsize\probe\to{\count0}\the\count0
+
+Contents:
+
+\pgfplotslistforeach\probe\as\curlistelem{\curlistelem \par}
+
+\pgfplotslistnew\foolist{Eins\\Zwei\\Drei\\}%
+\pgfplotslistforeach\foolist\as\foo{Element \foo\par}%
+
+\testsubsection{select}
+\count1=1
+Element \the\count1: \pgfplotslistselect\count1\of\probe\to\elem\elem
+
+Element 3: \pgfplotslistselect3\of\probe\to\elem\elem
+
+count1 is now=\the\count1
+\vskip1cm
+
+\testsubsection{listpopfront}
+\pgfplotslistpopfront\probe\to\first
+first: \first
+
+remaining size: \pgfplotslistsize\probe\to{\count0}\the\count0
+
+\pgfplotslistpopfront\probe\to\first
+first: \first
+
+remaining size: \pgfplotslistsize\probe\to{\count0}\the\count0
+
+
+\testsubsection{list concat}
+new list:
+\pgfplotslistnew\foolist{First Element\\Second Element\\Third Element\\}
+\pgfplotslistnew\foolistX{Eins\\Zwei\\}
+
+Contents:
+\pgfplotslistforeach\foolist\as\curlistelem{\curlistelem \par}
+
+\pgfplotslistconcat\third=\foolist&\foolistX
+
+Result of concat:
+\pgfplotslistforeach\third\as\curlistelem{\curlistelem \par}
+}
+
+\section{pgfplotsarray test}
+\message{pgfplotsarray test}
+{
+\tracingcommands=2
+\tracingmacros=2
+
+\pgfplotsarraynewempty\probe
+\pgfplotsarraypushback eins\to\probe
+\pgfplotsarraypushback [probe]\to\probe
+\pgfplotsarraypushback [probe2]\to\probe
+\pgfplotsarraypushback [probe3]\to\probe
+
+Size: `\pgfplotsarraysize\probe\to{\count0}\the\count0'
+
+Content:
+
+\pgfplotsarrayforeach\probe\as\curarrayelem{\curarrayelem \par}
+
+\testsubsection{Select}
+Test list:
+
+\pgfplotsarraynew\fooarray{Eins\\Zwei\\Drei\\}%
+\pgfplotsarrayforeach\fooarray\as\foo{Element \foo\par}%
+
+Getting elements:
+
+\count1=1
+Element \the\count1: \pgfplotsarrayselect\count1\of\fooarray\to\elem\elem
+
+Element 2: \pgfplotsarrayselect2\of\fooarray\to\elem\elem
+
+\vskip1cm
+
+
+\testsubsection{Copy}
+
+Copy:
+\pgfplotsarraynew\fooarray{Eins\\Zwei\\Drei\\}%
+Source: \pgfplotsarrayforeach\fooarray\as\foo{Element \foo\par}%
+
+\pgfplotsarraycopy\fooarray\to\fooarrayX
+
+Copy: \pgfplotsarrayforeach\fooarrayX\as\foo{Element \foo\par}%
+}
+
+
+\bibliographystyle{gerabbrv} %gerapali} %gerabbrv} %gerunsrt.bst} %gerabbrv}% gerplain}
+% \bibliography{literatur.bib}
+\end{document}
+
+
diff --git a/Master/texmf-dist/doc/generic/pgfplots/test/numtabletest/numtabletest.generated1.tex b/Master/texmf-dist/doc/generic/pgfplots/test/numtabletest/numtabletest.generated1.tex
new file mode 100644
index 00000000000..54c32337a51
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/numtabletest/numtabletest.generated1.tex
@@ -0,0 +1 @@
+\begin {tabular}{ccccccccc}\toprule G&Basis&dof&L2&A&Lmax&cgiter&maxlevel&eps\\\midrule \rowcolor [gray]{0.9}\pgfutilensuremath {5}&\pgfutilensuremath {5}&\pgfutilensuremath {5}&\pgfutilensuremath {8.31\cdot 10^{-2}}&\pgfutilensuremath {0}&\pgfutilensuremath {0.18}&\pgfutilensuremath {2}&\pgfutilensuremath {2}&\pgfutilensuremath {-1}\\\pgfutilensuremath {17}&\pgfutilensuremath {17}&\pgfutilensuremath {17}&\pgfutilensuremath {2.55\cdot 10^{-2}}&\pgfutilensuremath {0}&\pgfutilensuremath {3.76\cdot 10^{-2}}&\pgfutilensuremath {5}&\pgfutilensuremath {3}&\pgfutilensuremath {-1}\\\rowcolor [gray]{0.9}\pgfutilensuremath {49}&\pgfutilensuremath {49}&\pgfutilensuremath {49}&\pgfutilensuremath {7.41\cdot 10^{-3}}&\pgfutilensuremath {0}&\pgfutilensuremath {1.49\cdot 10^{-2}}&\pgfutilensuremath {11}&\pgfutilensuremath {4}&\pgfutilensuremath {-1}\\\pgfutilensuremath {129}&\pgfutilensuremath {129}&\pgfutilensuremath {129}&\pgfutilensuremath {2.10\cdot 10^{-3}}&\pgfutilensuremath {0}&\pgfutilensuremath {4.23\cdot 10^{-3}}&\pgfutilensuremath {26}&\pgfutilensuremath {5}&\pgfutilensuremath {-1}\\\rowcolor [gray]{0.9}\pgfutilensuremath {321}&\pgfutilensuremath {321}&\pgfutilensuremath {321}&\pgfutilensuremath {5.87\cdot 10^{-4}}&\pgfutilensuremath {0}&\pgfutilensuremath {1.31\cdot 10^{-3}}&\pgfutilensuremath {43}&\pgfutilensuremath {6}&\pgfutilensuremath {-1}\\\pgfutilensuremath {769}&\pgfutilensuremath {769}&\pgfutilensuremath {769}&\pgfutilensuremath {1.62\cdot 10^{-4}}&\pgfutilensuremath {0}&\pgfutilensuremath {3.89\cdot 10^{-4}}&\pgfutilensuremath {49}&\pgfutilensuremath {7}&\pgfutilensuremath {-1}\\\rowcolor [gray]{0.9}\pgfutilensuremath {1{,}793}&\pgfutilensuremath {1{,}793}&\pgfutilensuremath {1{,}793}&\pgfutilensuremath {4.44\cdot 10^{-5}}&\pgfutilensuremath {0}&\pgfutilensuremath {1.13\cdot 10^{-4}}&\pgfutilensuremath {52}&\pgfutilensuremath {8}&\pgfutilensuremath {-1}\\\pgfutilensuremath {4{,}097}&\pgfutilensuremath {4{,}097}&\pgfutilensuremath {4{,}097}&\pgfutilensuremath {1.21\cdot 10^{-5}}&\pgfutilensuremath {0}&\pgfutilensuremath {3.20\cdot 10^{-5}}&\pgfutilensuremath {56}&\pgfutilensuremath {9}&\pgfutilensuremath {-1}\\\rowcolor [gray]{0.9}\pgfutilensuremath {9{,}217}&\pgfutilensuremath {9{,}217}&\pgfutilensuremath {9{,}217}&\pgfutilensuremath {3.26\cdot 10^{-6}}&\pgfutilensuremath {0}&\pgfutilensuremath {8.98\cdot 10^{-6}}&\pgfutilensuremath {59}&\pgfutilensuremath {10}&\pgfutilensuremath {-1}\\\bottomrule \end {tabular}
diff --git a/Master/texmf-dist/doc/generic/pgfplots/test/numtabletest/numtabletest.tex b/Master/texmf-dist/doc/generic/pgfplots/test/numtabletest/numtabletest.tex
new file mode 100644
index 00000000000..65eee3fd451
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/numtabletest/numtabletest.tex
@@ -0,0 +1,211 @@
+\documentclass[a4paper]{article}
+
+\usepackage[intlimits]{amsmath}
+\usepackage{amssymb}
+\usepackage{amsfonts}
+\usepackage{ifpdf}
+\usepackage{listings}
+\usepackage{rotating}
+
+\usepackage{array}
+\usepackage{booktabs}
+\usepackage{colortbl}
+
+\lstset{basicstyle=\ttfamily\footnotesize,tabsize=16}
+
+\ifpdf
+\else
+\def\pgfsysdriver{pgfsys-dvipdfm.def}
+\fi
+\usepackage{pgfplots}
+
+\parindent=0pt
+
+\def\testsection#1{\message{STARTING TEST SECTION '#1'}\section{#1}}
+\def\testsubsection#1{\message{STARTING TEST SUBSECTION '#1'}\subsection{#1}}
+\def\testsubsubsection#1{\message{STARTING TEST SUBSUBSECTION '#1'}\subsubsection{#1}}
+
+\author{Christian Feuers\"anger}
+\title{Test cases for pgfplotstable}
+
+\begin{document}
+\maketitle
+
+\testsection{Reading a tab-separated table with many entries}
+\begin{sidewaystable}
+ \lstinputlisting{numtabletestdata}
+\end{sidewaystable}
+\testsubsection{Reading it...}
+\tracingmacros=2\tracingcommands=2
+\pgfplotstableread{numtabletestdata}\table
+\tracingmacros=0\tracingcommands=0
+
+\testsubsection{Quering colnames...}
+%\tracingmacros=2\tracingcommands=2
+\pgfplotstablegetcolumnlist\table\to\cols
+\pgfplotslistforeach\cols\as\col{Column ``\col''\par}%
+%\tracingmacros=0\tracingcommands=0
+
+\testsubsection{Quering column content by column name}
+%\tracingmacros=2\tracingcommands=2
+\pgfplotstablegetcolumnbyname L2\of\table\to\colcontent
+\pgfplotslistforeach\colcontent\as\colc{Row data: ``\colc''\par}%
+%\tracingmacros=0\tracingcommands=0
+
+\testsubsection{Quering column content by column name for all cols}
+\pgfplotstablegetcolumnlist\table\to\cols
+\pgfplotslistforeach\cols\as\col{\textbf{Column ``\col''}\par
+ \pgfplotstablegetcolumnbyname\col\of\table\to\colcontent
+ \pgfplotslistforeach\colcontent\as\colc{Row data: ``\colc''\par}%
+}%
+
+\testsection{Reading gnuplot output for use in 'plot file'}
+\lstinputlisting{numtabletestdata2.gnuplot}
+%\tracingmacros=2\tracingcommands=2
+\pgfplotstableread{numtabletestdata2.gnuplot}\table
+%\tracingmacros=0\tracingcommands=0
+
+\testsubsection{Quering column content by column name for all cols}
+\pgfplotstablegetcolumnlist\table\to\cols
+\pgfplotslistforeach\cols\as\col{\textbf{Column ``\col''}\par
+ \pgfplotstablegetcolumnbyname\col\of\table\to\colcontent
+ \pgfplotslistforeach\colcontent\as\colc{Row data: ``\colc''\par}%
+}%
+
+\testsection{Table typesetting}
+%
+% Set this here globally:
+\pgfplotstableset{/pgf/number format/sci zerofill}% any number in SCI format shall use zero filling.
+
+\pgfplotstableread{numtabletestdata}\table
+
+\testsubsection{no options at all}
+\pgfplotstabletypeset\table
+
+\testsubsection{Basis, L2, no options}
+%\tracingmacros=2\tracingcommands=2
+\pgfplotstabletypeset[columns={Basis,L2}]\table
+%\tracingmacros=0\tracingcommands=0
+
+\testsubsection{some column adjustments}
+\pgfplotstabletypeset[
+ columns={maxlevel,Basis,L2,cgiter},
+ columns/maxlevel/.style={column name=$l_\infty$,column type=r},
+ columns/cgiter/.style={column name={CG}},
+ columns/L2/.style={column name={$L_2$},/pgf/number format/sci subscript,/pgf/number format/sci zerofill}]
+ \table
+
+\testsubsection{some row adjustments}
+\pgfplotstabletypeset[
+ /pgf/number format/sci subscript,/pgf/number format/sci zerofill,
+ every head row/.style={before row=\toprule,after row=\midrule},
+ every last row/.style={after row=\bottomrule},
+ ]
+ \table
+
+
+\testsubsection{coloring rows}
+
+\pgfplotstabletypeset[
+ every even row/.style={before row={\rowcolor[gray]{0.9}}},
+ every head row/.style={before row=\toprule,after row=\midrule},
+ every last row/.style={after row=\bottomrule},
+ ]
+ \table
+
+\testsubsubsection{writing to numtabletest.generated1.tex}%
+\pgfplotstabletypeset[
+ outfile=numtabletest.generated1.tex,
+ every even row/.style={before row={\rowcolor[gray]{0.9}}},
+ every head row/.style={before row=\toprule,after row=\midrule},
+ every last row/.style={after row=\bottomrule},
+ ]
+ \table
+
+\testsubsubsection{loading numtabletest.generated1.tex}
+\input{numtabletest.generated1.tex}
+
+\testsubsection{Choosing columns by index}
+%\tracingmacros=2\tracingcommands=2
+\pgfplotstabletypeset[
+ columns={[index]5,dof,[index]0}
+ ]
+ \table
+%\tracingmacros=0\tracingcommands=0
+
+\testsubsection{column styles}
+\pgfplotstabletypeset[
+ every even column/.style={column type={>{\columncolor[gray]{.8}[\tabcolsep]}l}},
+ ]
+ \table
+
+\begingroup
+\testsubsection{column styles + string type}
+\pgfplotstableread{numtabletestdata2}\table
+%\tracingmacros=2\tracingcommands=2
+\pgfplotstabletypeset[
+ every first column/.style={string type,column type={@{}r|},column name=},
+ every head row/.style={after row=\hline},
+ every even column/.style={column type={>{\columncolor[gray]{.8}[\tabcolsep]}l}},
+ ]
+ \table
+\endgroup
+
+\begingroup
+\testsubsection{column styles and special characters =/,}
+\pgfplotstableread{numtabletestdata3}\table
+\pgfplotstabletypeset[
+ columns/{grad(log(dof),log(L2))}/.style={
+ column name=$L_2$ slopes,
+ /pgf/number format/fixed,
+ /pgf/number format/precision=1,
+ /pgf/number format/fixed zerofill},
+ columns/L2/.style={
+ column name=$L_2$,
+ /pgf/number format/sci
+ }
+ ]
+ \table
+
+\testsubsection{Input formats}
+\tracingmacros=2\tracingcommands=2
+{
+\pgfplotstableset{columns/head/.style={string type}}
+\testsubsubsection{comma}
+\pgfplotstabletypesetfile[col sep=comma]{numtabletestdata2.csv}
+
+\testsubsubsection{colon}
+\pgfplotstabletypesetfile[col sep=colon]{numtabletestdata2.colon}
+
+\testsubsubsection{semicolon}
+\pgfplotstabletypesetfile[col sep=semicolon]{numtabletestdata2.semicolon}
+
+\testsubsubsection{brace}
+\pgfplotstabletypesetfile[col sep=braces]{numtabletestdata2.brace}
+\tracingmacros=0\tracingcommands=0
+}
+\endgroup
+
+
+{
+\testsection{Col type}
+
+\newcolumntype{L}[1]
+ {>{\begin{pgfplotstablecoltype}[#1]}r<{\end{pgfplotstablecoltype}}}
+
+\begin{tabular}{L{int detect}L{sci,sci subscript,sci zerofill}}
+9 & 2.50000000e-01\\
+25 & 6.25000000e-02\\
+81 & 1.56250000e-02\\
+289 & 3.90625000e-03\\
+1089 & 9.76562500e-04\\
+4225 & 2.44140625e-04\\
+16641 & 6.10351562e-05\\
+66049 & 1.52587891e-05\\
+263169 & 3.81469727e-06\\
+1050625& 9.53674316e-07\\
+\end{tabular}
+
+}
+
+\end{document}
diff --git a/Master/texmf-dist/doc/generic/pgfplots/test/numtabletest/numtabletestdata b/Master/texmf-dist/doc/generic/pgfplots/test/numtabletest/numtabletestdata
new file mode 100644
index 00000000000..44f9ca74722
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/numtabletest/numtabletestdata
@@ -0,0 +1,11 @@
+G Basis dof L2 A Lmax cgiter maxlevel eps
+$flags int:0 int:0 int:0 sci[subscript]:8 sci[subscript]:8 sci[subscript]:8 int:0 int:0 std:8
+5 5 5 8.31160034e-02 0.00000000e+00 1.80007647e-01 2 2 -1
+17 17 17 2.54685628e-02 0.00000000e+00 3.75580565e-02 5 3 -1
+49 49 49 7.40715288e-03 0.00000000e+00 1.49212716e-02 11 4 -1
+129 129 129 2.10192154e-03 0.00000000e+00 4.23330523e-03 26 5 -1
+321 321 321 5.87352989e-04 0.00000000e+00 1.30668515e-03 43 6 -1
+769 769 769 1.62269942e-04 0.00000000e+00 3.88658098e-04 49 7 -1
+1793 1793 1793 4.44248889e-05 0.00000000e+00 1.12651668e-04 52 8 -1
+4097 4097 4097 1.20714122e-05 0.00000000e+00 3.20339285e-05 56 9 -1
+9217 9217 9217 3.26101452e-06 0.00000000e+00 8.97617707e-06 59 10 -1
diff --git a/Master/texmf-dist/doc/generic/pgfplots/test/numtabletest/numtabletestdata2 b/Master/texmf-dist/doc/generic/pgfplots/test/numtabletest/numtabletestdata2
new file mode 100644
index 00000000000..775daaaa52a
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/numtabletest/numtabletestdata2
@@ -0,0 +1,11 @@
+head G Basis dof L2 A Lmax cgiter maxlevel eps
+$flags string int int int sci:8 sci:8 sci:8 int int std:8
+one 5 5 5 8.31160034e-02 0.00000000e+00 1.80007647e-01 2 2 -1
+two 17 17 17 2.54685628e-02 0.00000000e+00 3.75580565e-02 5 3 -1
+three 49 49 49 7.40715288e-03 0.00000000e+00 1.49212716e-02 11 4 -1
+four 129 129 129 2.10192154e-03 0.00000000e+00 4.23330523e-03 26 5 -1
+five 321 321 321 5.87352989e-04 0.00000000e+00 1.30668515e-03 43 6 -1
+six 769 769 769 1.62269942e-04 0.00000000e+00 3.88658098e-04 49 7 -1
+{with space} 1793 1793 1793 4.44248889e-05 0.00000000e+00 1.12651668e-04 52 8 -1
+{eight} 4097 4097 4097 1.20714122e-05 0.00000000e+00 3.20339285e-05 56 9 -1
+nine 9217 9217 9217 3.26101452e-06 0.00000000e+00 8.97617707e-06 59 10 -1
diff --git a/Master/texmf-dist/doc/generic/pgfplots/test/numtabletest/numtabletestdata2.brace b/Master/texmf-dist/doc/generic/pgfplots/test/numtabletest/numtabletestdata2.brace
new file mode 100644
index 00000000000..0c53d2a06e5
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/numtabletest/numtabletestdata2.brace
@@ -0,0 +1,11 @@
+{head} {G} {Basis} {dof} {L2} {A} {Lmax} {cgiter} {maxlevel} {eps}
+$flags {string} {int} {int} {int} {sci:8} {sci:8} {sci:8} {int} {int} {std:8}
+{one} {5} {5} {5} {8.31160034e-02} {0.00000000e+00} {1.80007647e-01} {2} {2} {-1}
+{two} {17} {17} {17} {2.54685628e-02} {0.00000000e+00} {3.75580565e-02} {5} {3} {-1}
+{three} {49} {49} {49} {7.40715288e-03} {0.00000000e+00} {1.49212716e-02} {11} {4} {-1}
+{four} {129} {129} {129} {2.10192154e-03} {0.00000000e+00} {4.23330523e-03} {26} {5} {-1}
+{five} {321} {321} {321} {5.87352989e-04} {0.00000000e+00} {1.30668515e-03} {43} {6} {-1}
+{six} {769} {769} {769} {1.62269942e-04} {0.00000000e+00} {3.88658098e-04} {49} {7} {-1}
+{with space} {1793} {1793} {1793} {4.44248889e-05} {0.00000000e+00} {1.12651668e-04} {52} {8} {-1}
+{{eight}} {4097} {4097} {4097} {1.20714122e-05} {0.00000000e+00} {3.20339285e-05} {56} {9} {-1}
+{nine} {9217} {9217} {9217} {3.26101452e-06} {0.00000000e+00} {8.97617707e-06} {59} {10} {-1}
diff --git a/Master/texmf-dist/doc/generic/pgfplots/test/numtabletest/numtabletestdata2.colon b/Master/texmf-dist/doc/generic/pgfplots/test/numtabletest/numtabletestdata2.colon
new file mode 100644
index 00000000000..a69d4987f3d
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/numtabletest/numtabletestdata2.colon
@@ -0,0 +1,10 @@
+head:G:Basis:dof:L2:A:Lmax:cgiter:maxlevel:eps
+one:5:5:5:8.31160034e-02:0.00000000e+00:1.80007647e-01:2:2:-1
+two:17:17:17:2.54685628e-02:0.00000000e+00:3.75580565e-02:5:3:-1
+three:49:49:49:7.40715288e-03:0.00000000e+00:1.49212716e-02:11:4:-1
+four:129:129:129:2.10192154e-03:0.00000000e+00:4.23330523e-03:26:5:-1
+five:321:321:321:5.87352989e-04:0.00000000e+00:1.30668515e-03:43:6:-1
+six:769:769:769:1.62269942e-04:0.00000000e+00:3.88658098e-04:49:7:-1
+{with space}:1793:1793:1793:4.44248889e-05:0.00000000e+00:1.12651668e-04:52:8:-1
+{eight}:4097:4097:4097:1.20714122e-05:0.00000000e+00:3.20339285e-05:56:9:-1
+nine:9217:9217:9217:3.26101452e-06:0.00000000e+00:8.97617707e-06:59:10:-1
diff --git a/Master/texmf-dist/doc/generic/pgfplots/test/numtabletest/numtabletestdata2.csv b/Master/texmf-dist/doc/generic/pgfplots/test/numtabletest/numtabletestdata2.csv
new file mode 100644
index 00000000000..cc712402b86
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/numtabletest/numtabletestdata2.csv
@@ -0,0 +1,11 @@
+head,G,Basis,dof,L2,A,Lmax,cgiter,maxlevel,eps
+$flags string,int,int,int,sci:8,sci:8,sci:8,int,int,std:8
+one,5,5,5,8.31160034e-02,0.00000000e+00,1.80007647e-01,2,2,-1
+two,17,17,17,2.54685628e-02,0.00000000e+00,3.75580565e-02,5,3,-1
+three,49,49,49,7.40715288e-03,0.00000000e+00,1.49212716e-02,11,4,-1
+four,129,129,129,2.10192154e-03,0.00000000e+00,4.23330523e-03,26,5,-1
+five,321,321,321,5.87352989e-04,0.00000000e+00,1.30668515e-03,43,6,-1
+six,769,769,769,1.62269942e-04,0.00000000e+00,3.88658098e-04,49,7,-1
+{with space},1793,1793,1793,4.44248889e-05,0.00000000e+00,1.12651668e-04,52,8,-1
+{eight},4097,4097,4097,1.20714122e-05,0.00000000e+00,3.20339285e-05,56,9,-1
+nine,9217,9217,9217,3.26101452e-06,0.00000000e+00,8.97617707e-06,59,10,-1
diff --git a/Master/texmf-dist/doc/generic/pgfplots/test/numtabletest/numtabletestdata2.gnuplot b/Master/texmf-dist/doc/generic/pgfplots/test/numtabletest/numtabletestdata2.gnuplot
new file mode 100644
index 00000000000..1222a3c59c0
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/numtabletest/numtabletestdata2.gnuplot
@@ -0,0 +1,8 @@
+#Curve 0, 20 points
+#x y type
+0.00000 0.00000 i
+0.52632 0.50235 i
+1.05263 0.86873 i
+1.57895 0.99997 i
+9.47368 -0.04889 i
+10.00000 -0.54402 i
diff --git a/Master/texmf-dist/doc/generic/pgfplots/test/numtabletest/numtabletestdata2.semicolon b/Master/texmf-dist/doc/generic/pgfplots/test/numtabletest/numtabletestdata2.semicolon
new file mode 100644
index 00000000000..97f7258d56f
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/numtabletest/numtabletestdata2.semicolon
@@ -0,0 +1,11 @@
+head;G;Basis;dof;L2;A;Lmax;cgiter;maxlevel;eps
+$flags string;int;int;int;sci;8;sci;8;sci;8;int;int;std;8
+one;5;5;5;8.31160034e-02;0.00000000e+00;1.80007647e-01;2;2;-1
+two;17;17;17;2.54685628e-02;0.00000000e+00;3.75580565e-02;5;3;-1
+three;49;49;49;7.40715288e-03;0.00000000e+00;1.49212716e-02;11;4;-1
+four;129;129;129;2.10192154e-03;0.00000000e+00;4.23330523e-03;26;5;-1
+five;321;321;321;5.87352989e-04;0.00000000e+00;1.30668515e-03;43;6;-1
+six;769;769;769;1.62269942e-04;0.00000000e+00;3.88658098e-04;49;7;-1
+{with space};1793;1793;1793;4.44248889e-05;0.00000000e+00;1.12651668e-04;52;8;-1
+{eight};4097;4097;4097;1.20714122e-05;0.00000000e+00;3.20339285e-05;56;9;-1
+nine;9217;9217;9217;3.26101452e-06;0.00000000e+00;8.97617707e-06;59;10;-1
diff --git a/Master/texmf-dist/doc/generic/pgfplots/test/numtabletest/numtabletestdata3 b/Master/texmf-dist/doc/generic/pgfplots/test/numtabletest/numtabletestdata3
new file mode 100644
index 00000000000..dba7ddc5d53
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/numtabletest/numtabletestdata3
@@ -0,0 +1,10 @@
+G Basis dof L2 A Lmax cgiter maxlevel eps grad(log(dof),log(L2))
+5 5 5 8.31160034e-02 0.00000000e+00 1.80007647e-01 2 2 -1 0
+17 17 17 2.54685628e-02 0.00000000e+00 3.75580565e-02 5 3 -1 -9.66510989e-01
+49 49 49 7.40715288e-03 0.00000000e+00 1.49212716e-02 11 4 -1 -1.16662631e+00
+129 129 129 2.10192154e-03 0.00000000e+00 4.23330523e-03 26 5 -1 -1.30124428e+00
+321 321 321 5.87352989e-04 0.00000000e+00 1.30668515e-03 43 6 -1 -1.39857512e+00
+769 769 769 1.62269942e-04 0.00000000e+00 3.88658098e-04 49 7 -1 -1.47240308e+00
+1793 1793 1793 4.44248889e-05 0.00000000e+00 1.12651668e-04 52 8 -1 -1.53027522e+00
+4097 4097 4097 1.20714122e-05 0.00000000e+00 3.20339285e-05 56 9 -1 -1.57673686e+00
+9217 9217 9217 3.26101452e-06 0.00000000e+00 8.97617707e-06 59 10 -1 -1.61422100e+00
diff --git a/Master/texmf-dist/doc/generic/pgfplots/test/pgfkeysaddition/pgfkeysadditiontest.tex b/Master/texmf-dist/doc/generic/pgfplots/test/pgfkeysaddition/pgfkeysadditiontest.tex
new file mode 100644
index 00000000000..0670f283cca
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/pgfkeysaddition/pgfkeysadditiontest.tex
@@ -0,0 +1,251 @@
+\documentclass[a4paper]{article}
+
+\usepackage[intlimits]{amsmath}
+\usepackage{amssymb}
+\usepackage{amsfonts}
+\usepackage{ifpdf}
+
+\ifpdf
+\else
+\def\pgfsysdriver{pgfsys-dvipdfm.def}
+\fi
+\usepackage{tikz}
+\usepackage{pgfplots}
+
+\parindent=0pt
+
+\def\testsection#1{\message{---------- STARTING TEST SECTION '#1'}\section{#1}}
+\def\testsubsection#1{\message{-------STARTING TEST SUBSECTION '#1'}\subsection{#1}}
+\def\testsubsubsection#1{\message{------STARTING TEST SUBSUBSECTION '#1'}\subsubsection{#1}}
+
+\author{Christian Feuers\"anger}
+\title{Test cases for pgfkeysaddition.sty}
+
+\begin{document}
+\maketitle
+
+\pgfkeys{/my group/option1/.code={\message{/my group/option1 set to '#1'!}}}
+\pgfkeys{/my group/option2/.code={\message{/my group/option2 set to '#1'!}}}
+\pgfkeys{/my other group/O1/.code={\message{/my other group/O1 set to '#1'!}}}
+\pgfkeys{/my other group/O2/.code={\message{/my other group/O2 set to '#1'!}}}
+
+\pgfkeys{/pgf/key filter handlers/log/.install key filter handler}%
+
+\testsection{Testing the `is descendant of -- predicate'}
+\pgfkeys{/pgf/key filters/is descendant of/.install key filter={/my group}}%
+\tracingmacros=2\tracingcommands=2
+\pgfkeysfiltered%
+ {/my group/.cd,option1=value for option1,/my other group/O1=value for O1}%
+\tracingmacros=0\tracingcommands=0
+
+\testsubsection{Testing it for a tikz style}
+\tikzstyle{mein style}=[/my group/option1=option1 value in a style!,/tikz/line width=1pt]
+\pgfkeys{/pgf/key filters/is descendant of/.install key filter={/my group}}%
+\pgfkeysfiltered%
+ {/my group/.cd,option1=value for option1,/my other group/O1=value for O1,/tikz/mein style}%
+
+
+\testsection{Testing filtering for errors}
+\testsubsection{unknown handler in /my group/}
+{
+\pgfkeys{/my group/.unknown/.code=\message{'#1' is unknown and the handler /my group/.unknown has been invoked!}}%
+\pgfkeys{/pgf/key filters/is descendant of/.install key filter={/my group}}%
+\pgfkeysfiltered%
+ {/my group/.cd,option1=value for option1,option42=42}%
+}
+
+\testsubsection{unknown handler in /handlers/}
+{
+\pgfkeys{/handlers/.unknown/.code=\message{'#1' is unknown and the handler /handlers/.unknown has been invoked!}}%
+\pgfkeys{/pgf/key filters/is descendant of/.install key filter={/my group}}%
+\pgfkeysfiltered%
+ {/my group/.cd,option1=value for option1,option42=42}%
+}
+
+
+\testsubsection{Check whether error messages come through}
+{
+\pgfkeys{/errors/mein fehler/.code=\message{My error message came through. That's good!}}%
+\pgfkeys{/handlers/.unknown/.code=\pgfkeysalso{/errors/mein fehler=foo}}%
+\pgfkeys{/pgf/key filters/is descendant of/.install key filter={/my group}}%
+\pgfkeysfiltered%
+ {/my group/.cd,option1=value for option1,option42=42}%
+}
+
+\testsection{Checking single key selection}
+{
+\pgfkeys{/test/a/.code=\message{'/test/a' is currently running; that's correct.}}%
+\pgfkeys{/test/b/.code=\errmessage{'/test/b' shouldn't run! test failed!}}%
+\pgfkeyssetvalue{/test/c}{Value of 'c'}%
+\pgfkeys{/test/d/.style={/test/a=bar}}%
+
+\testsubsection{command keys: select only /test/a}
+\pgfkeys{/pgf/key filters/equals/.install key filter={/test/a}}
+\pgfkeysfiltered%
+ {/test/a=4,/test/b=5}
+
+\testsubsection{value keys: select only /test/c}
+\pgfkeys{/pgf/key filters/equals/.install key filter={/test/c}}
+\pgfkeysfiltered%
+ {/test/a=4,/test/b=5,/test/c=7}
+
+\testsubsection{handler keys: select only /test/d}
+\pgfkeys{/pgf/key filters/equals/.install key filter={/test/d}}
+\pgfkeysfiltered%
+ {/test/a=4,/test/b=5,/test/d}
+}
+
+
+\testsection{Checking logical combinations}
+{
+\pgfkeys{/test/a/.code=\message{'/test/a' is currently running; that's correct.}}%
+\pgfkeys{/test/b/.code=\errmessage{'/test/b' shouldn't run! test failed!}}%
+\pgfkeys{/test/c/.code=\message{'/test/c' is currently running; that's correct.}}%
+\pgfkeys{/my group/A/.code=\message{'/my group/A' is currently running, that's correct.}}
+
+\testsubsection{NOT = /test/b}
+\pgfkeys{/pgf/key filters/not/.install key filter={/pgf/key filters/equals=/test/b}}
+\pgfkeysfiltered%
+ {/test/a=4,/test/b=5,/test/c}
+
+\testsubsection{AND}
+\pgfkeys{/pgf/key filters/and/.install key filter={{/pgf/key filters/equals={/test/a}}{/pgf/key filters/is descendant of=/test}}}
+\pgfkeysfiltered%
+ {/test/a=4,/test/b=5,/test/c}
+
+\testsubsection{OR}
+\pgfkeys{/pgf/key filters/or/.install key filter={{/pgf/key filters/equals={/test/a}}{/pgf/key filters/is descendant of=/my group}}}
+\pgfkeysfiltered%
+ {/test/a=4,/test/b=5,/my group/A=value 1}
+}
+
+\testsection{Testing filtered key collection}
+{
+\testsubsection{full keys}
+\tracingmacros=2\tracingcommands=2
+\pgfkeys{/pgf/key filters/is descendant of/.install key filter=/my group}
+\def\filtered{}%
+\pgfkeys{/pgf/key filter handlers/append filtered to/.install key filter handler=\filtered}%
+\pgfkeysfiltered%
+ {/my group/.cd,option1=value for option1,/my other group/O1=value for O1,/my other group/O2=value for O2}%
+\message{filtered = '\filtered'}
+\filtered
+
+\testsubsection{partial keys}
+\def\filtered{}%
+\pgfkeys{/pgf/key filters/or/.install key filter={{/pgf/key filters/is descendant of=/my group}{/pgf/key filters/equals=/my other group/.cd}}}
+\pgfkeysfiltered%
+ {/my group/.cd,option1=value for option1,/my other group/.cd,O1=value for O1,O2= value for O2}%
+\tracingmacros=2\tracingcommands=2
+\message{filtered = '\filtered'}
+\tracingmacros=0\tracingcommands=0
+\filtered
+
+\testsubsubsection{setting remaining keys}
+\pgfkeys{/my other group/.cd,/utils/exec=\pgfkeysalsofrom\filtered}
+}%
+
+
+\testsection{Testing search paths}
+{
+\pgfkeys{/my search path/.unknown/.code={%
+ \let\searchname=\pgfkeyscurrentname%
+ \pgfkeysalso{%
+ /my group/\searchname/.try=#1,
+ /my other group/\searchname/.lastretry=#1
+ }%
+ }%
+}
+\pgfkeys{/my other group/.unknown/.code=\message{/my other/group/.unknown: called with unknown option '#1'.}}%
+
+\testsubsection{First: no filtering}
+\pgfkeys{/my search path/.cd,option1=value for option1,O1=value for O1,an unknown option=foo}
+
+%--------------------------------------------------
+% \testsubsection{Second: with filtering}
+% \pgfkeysfiltered%
+% {\pgfkeysisdescendantoftwo{/my group}{/my search path}}%
+% {\pgfkeyslogfiltered}%
+% {/my search path/.cd,option1=value for option1,O1=value for O1,an unknown option=foo}
+% }
+%
+%--------------------------------------------------
+
+\testsection{Testing pgfkeysalsofiltered}
+{
+\def\filtered{}%
+\pgfkeys{/pgf/key filter handlers/append filtered to/.install key filter handler=\filtered}%
+
+\pgfkeys{/pgf/key filters/is descendant of/.install key filter=/my group}
+\pgfkeys{/my group/.cd,/utils/exec=\pgfkeysalsofiltered
+ {option1= value for option1,/my other group/O1=value for O1}}
+}
+
+\testsection{Testing family handling}
+{
+\testsubsection{testing .is family init:}
+\pgfkeys{/my group/.is family}
+\pgfkeysisfamilyactive{/my group}
+\ifpgfkeysfiltercontinue
+ \errmessage{TEST FAILED: /my group active: TRUE (EXPECTED FALSE)}%
+\else
+ \message{/my group active: FALSE (correct)}%
+\fi
+
+\testsubsection{testing .activate family:}
+\pgfkeys{/my group/.activate family}
+\pgfkeysisfamilyactive{/my group}
+\ifpgfkeysfiltercontinue
+ \message{/my group active: TRUE (correct)}%
+\else
+ \errmessage{TEST FAILED: /my group active: FALSE (EXPECTED: TRUE)}%
+\fi
+
+\testsubsection{testing .deactivate family:}
+\pgfkeys{/my group/.deactivate family}
+\pgfkeysisfamilyactive{/my group}
+\ifpgfkeysfiltercontinue
+ \errmessage{TEST FAILED: /my group active: TRUE (EXPECTED FALSE)}%
+\else
+ \message{/my group active: FALSE (correct)}%
+\fi
+
+\testsubsection{Testing filtering by active family}
+{
+\pgfkeys{/family1/.is family}
+\pgfkeys{/family2/.is family}
+\pgfkeys{/test/a/.code=\message{'/test/a' is currently running; that's correct.}}%
+\pgfkeys{/test/a/.belongs to family=/family1}
+
+\pgfkeys{/test/b/.code=\errmessage{'/test/b' shouldn't run! test failed!}}%
+\pgfkeys{/test/b/.belongs to family=/family2}%
+
+\pgfkeys{/test/c/.code=\errmessage{'/test/c' shouldn't run! test failed! }}%
+\pgfkeys{/test/d/.code=\message{'/test/d' currently running. Ok.}}
+\pgfkeys{/test/d/.belongs to family=/family2}
+
+\testsubsubsection{first: only /test/a should run}%
+\pgfkeys{/family1/.activate family}
+\pgfkeys{
+ /pgf/key filters/active families/.install key filter,
+ /pgf/key filter handlers/log/.install key filter handler}
+
+\pgfkeysfiltered
+ {/test/a=value for a,/test/b=value for b,/test/c=value for c}
+
+\testsubsubsection{second: no option should run}%
+\pgfkeys{/family1/.deactivate family}
+
+\pgfkeysfiltered
+ {/test/a=value for a,/test/b=value for b,/test/c=value for c}
+
+
+\testsubsubsection{once more again with dynamic family list detection pgfqkeysactivatefamiliesandfilteroptions}
+\tracingmacros=2\tracingcommands=2
+\pgfqkeysactivatefamiliesandfilteroptions{/family1,/family2}{/test}
+ {a=value for a,c=value for c,d=value for d}
+\tracingmacros=0\tracingcommands=0
+}}
+
+
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfmathlogtest.tex b/Master/texmf-dist/doc/generic/pgfplots/test/pgfmathlogtest/pgfmathlogtest.tex
index 86fa5795a87..d1264433055 100644
--- a/Master/texmf-dist/doc/latex/pgfplots/pgfmathlogtest.tex
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/pgfmathlogtest/pgfmathlogtest.tex
@@ -6,8 +6,10 @@
\usepackage{ifpdf}
\ifpdf
+ \usepackage{hyperref}
\else
-\def\pgfsysdriver{pgfsys-dvipdfm.def}
+ \def\pgfsysdriver{pgfsys-dvipdfm.def}
+ \usepackage[dvipdfm]{hyperref}
\fi
\usepackage{pgfmathlog}
@@ -17,6 +19,10 @@
\author{Christian Feuers\"anger}
\title{Test cases for pgfmathlog.sty}
+\def\testsection#1{\message{---------- STARTING TEST SECTION '#1'}\section{#1}}
+\def\testsubsection#1{\message{-------STARTING TEST SUBSECTION '#1'}\subsection{#1}}
+\def\testsubsubsection#1{\message{------STARTING TEST SUBSUBSECTION '#1'}\subsubsection{#1}}
+
\begin{document}
\maketitle
@@ -43,7 +49,7 @@
\begingroup
\message{NORMALISING #1...}%
\sciparse#1\to\M\powten\E
- \sciparsesign{#1}\S\MM\EE
+ \sciparsenumber{#1}\S\MM\EE
\[ #1 \mapsto \M \cdot 10^{\E}\quad \bigl( = \MM\cdot 10^{\EE}\quad [S=\S]\, \bigr) \]
\endgroup
}
@@ -64,7 +70,7 @@
% log(6.241e-7)=\pgfmathlog{6.241}\pgfmathadd{\pgfmathresult}{-16.11809}\pgfmathresult\par
%--------------------------------------------------
-\section{logarithms, compared with PGF arithmetics}
+\testsection{logarithms, compared with PGF arithmetics}
\vgl{0.1}{-2.30259}
\vgl{0.12}{-2.12026}
@@ -121,18 +127,29 @@
\vgl{9217}{9.12880488399366}%
-\section{Conversion to normalised floating point numbers basis 10}
+\testsection{Conversion to normalised floating point numbers basis 10}
\normalize{123.41251}%
+\normalize{1023.52}
\normalize{123412.51}%
\normalize{12341251.0}%
\tracingmacros=2\tracingcommands=2
\normalize{-12341251.0}%
\tracingmacros=0\tracingcommands=0
\normalize{1.2341251}%
+\normalize{8.02410024}
+\normalize{8.024100}
+\normalize{0001234.3100}
+\normalize{0001234.00001}
+\normalize{0001000.00001}
+\normalize{0001000.00001000}
\normalize{0.12341251}%
\normalize{0.0012341251}%
\normalize{0.00000012341251}%
\normalize{-0.00000012341251}%
+\normalize{10}
+\normalize{100}
+\normalize{99999}
+\normalize{999.000}
\normalize{8.31160034e-02}%
\normalize{2.54685628e-02}%
@@ -160,8 +177,11 @@
\normalize{1141}
\normalize{-53e-5}
-\section{Test for prettyprinter}
+\testsection{Test for prettyprinter}
\message{PRETTY PRINTING}
+{
+\twocolumn
+\def\prettytest{
\pretty{1}
\pretty{1.0}
\pretty{-1.02311}
@@ -175,11 +195,114 @@
\pretty{9.}
\pretty{-0.559}
\pretty{-0.554}
+\pretty{-0.00000141}
+\pretty{1.234e10}
+\pretty{123456781}
+\pretty{1234}
+\pretty{8}
+\pretty{-9.995}
+\pretty{-0.015}
+\pretty{-0.1}
+\pretty{-0.15}
+\pretty{0.15}
+\pretty{-0}
+\pretty{9.00}
+\pretty{200.01}
+\pretty{200.0000}
+\pretty{1.5e-7}
+\pretty{0.00035}
+\pretty{0.00005}
+\pretty{nan}
+\pretty{inf}
+\pretty{-inf}
+\pretty{10}
+\pretty{100}
+\pretty{200}
+\pretty{500}
+\pretty{1000}
+}
+
+\testsubsection{STD format}
+\pgfkeys{/numbers/std}
+\prettytest
+
+{
+\testsubsection{FIXED format}
+\testsubsubsection{with period}
+\pgfkeys{/numbers/fixed,/numbers/use period}
+\prettytest
+
+\testsubsubsection{with comma}
+\pgfkeys{/numbers/fixed,/numbers/use comma}
+\prettytest
+}
+
+{
+\testsubsection{FIXED ZEROFILL format}
+\testsubsubsection{with period}
+\pgfkeys{/numbers/fixed zerofill,/numbers/use period}
+\prettytest
+
+\testsubsubsection{with comma}
+\pgfkeys{/numbers/fixed zerofill,/numbers/use comma}
+\prettytest
+}
+
+{
+\testsubsection{sci format}
+\testsubsubsection{with period}
+\pgfkeys{/numbers/sci,/numbers/use period}
+\prettytest
+
+\testsubsubsection{with comma}
+\pgfkeys{/numbers/sci,/numbers/use comma}
+\prettytest
+
+%\testsubsection{may skip mantisse}
+%\pgfkeys{/numbers/sci may skip mantisse=true}
+%\prettytest
+
+}{
+\testsubsection{sci format zerofill}
+\testsubsubsection{with period}
+\pgfkeys{/numbers/sci zerofill,/numbers/use period}
+\prettytest
-\section{testing scimathlessthan}
+\testsubsubsection{with comma}
+\pgfkeys{/numbers/sci zerofill,/numbers/use comma}
+\prettytest
+
+\testsubsubsection{e-style}
+\pgfkeys{/numbers/sci e}
+\prettytest
+
+\testsubsubsection{subscript-style}
+\pgfkeys{/numbers/sci subscript}
+\prettytest
+
+\testsubsubsection{subscript-style + period + no zero fill}
+\pgfkeys{/numbers/sci subscript,/numbers/use period,/numbers/sci}
+\prettytest
+
+\testsubsubsection{subscript-style precision 4}
+\pgfkeys{/numbers/sci subscript,/numbers/precision=4}
+\prettytest
+}
+
+\testsubsection{int trunc format}
+\pgfkeys{/numbers/int trunc}
+\prettytest
+
+\testsubsection{int detect format}
+\pgfkeys{/numbers/int detect}
+\prettytest
+}
+\onecolumn
+
+\testsection{testing scimathlessthan}
\def\testsci#1#2{%
- \sciparsesign{#1}\S\M\E
- \sciparsesign{#2}\SS\MM\EE
+ \sciparsenumber{#1}\S\M\E
+ \sciparsenumber{#2}\SS\MM\EE
\message{checking #1 <= #2; [\S] \M * 10^\E <= [\SS] \MM * 10^\EE}%
\scimathlessthan\S\M\E\and\SS\MM\EE
\ifscimathlessthan
@@ -206,9 +329,9 @@
\testsci{-141285}{-50}
\testsci{-141285}{-12498149012}
-\section{Sci to fixed test}
+\testsection{Sci to fixed test}
\def\testscitofixed#1{%
- \sciparsesign{#1}\S\M\E
+ \sciparsenumber{#1}\S\M\E
%\tracingmacros=2\tracingcommands=2
\message{converting #1 = [\S] \M * 10^\E\ to fixed point}%
\scitofixed\S\M\E\result
@@ -235,10 +358,10 @@
\testscitofixed{15}
\testscitofixed{-20}
-\section{Testing scimathmax and scimathmin}
+\testsection{Testing scimathmax and scimathmin}
\def\testscimathminmax#1#2{%
- \sciparsesign{#1}\S\M\E
- \sciparsesign{#2}\SS\MM\EE
+ \sciparsenumber{#1}\S\M\E
+ \sciparsenumber{#2}\SS\MM\EE
%\tracingmacros=2\tracingcommands=2
\message{computing min/max #1 and #2}%
\scimathmin\S\M\E\and\SS\MM\EE\to\SSS\MMM\EEE
@@ -254,9 +377,9 @@
\testscimathminmax{1e12}{5.235412e24}
\testscimathminmax{-12}{-145}
-\section{Testing scimathshift}
+\testsection{Testing scimathshift}
\def\testscimathshift#1#2{%
- \sciparsesign{#1}\S\M\E
+ \sciparsenumber{#1}\S\M\E
\message{computing mathshift #1 by #2}%
\let\SS=\S\let\MM=\M\let\EE=\E
\scimathshift\S\M\E{#2}%
@@ -271,12 +394,12 @@
\testscimathshift{1.1415130}{-2}
\testscimathshift{1.1415130}{5}
-\section{Testing name floating point data structure}
+\testsection{Testing name floating point data structure}
\let\SS=\empty
\let\MM=\empty
\let\EE=\empty
\def\testsciDS#1#2{%
- \sciparsesign{#1}\S\M\E
+ \sciparsenumber{#1}\S\M\E
\message{assigning #1=(\S,\M,\E) to single-name-macro ... }%
\scisetcomponents{#2}\S\M\E
\scigetcomponents{#2}\SS\MM\EE
@@ -299,15 +422,18 @@
\scitofixed{1}{1.0}{2}\result\result
-\section{Testing fixedpointround}
+\testsection{Testing fixedpointround}
\def\testfpround#1#2{%
\tracingmacros=2\tracingcommands=2
\message{computing fixedpointround(#1):}%
- \fixedpointround#1\prec#2\to\result
- \message{fixedpointround(#1) -> \result}%
- \[ \text{rnd }#1 \text{ to }#2 \to \result \]
+ \def\sciroundprecision{#2}%
+ \fixedpointround{#1}\result
+ \fixedpointroundzerofill{#1}\resultz
+ \message{fixedpointround(#1) -> \result; (\resultz)}%
+ \[ \text{rnd }#1 \text{ to }#2 \to \result\; (\resultz) \]
\tracingmacros=0\tracingcommands=0
}%
+\[ \text{rnd }x \text{ to PREC} \to \text{no trailing zeros }\; (\text{trailing zeros}) \]
\testfpround{1.0000}{2}
\testfpround{-1.0000}{2}
\testfpround{+1.0000}{2}
@@ -315,6 +441,10 @@
\testfpround{-1.003}{2}
\testfpround{1.123}{2}
\testfpround{1.12300012}{5}
+\testfpround{-9.995}{2}
+\testfpround{-0.995}{2}
+\testfpround{-9.95}{1}
+\testfpround{-0.95}{1}
\testfpround{9}{2}
\testfpround{1341}{2}
\testfpround{0.996}{2}
@@ -330,4 +460,48 @@
\testfpround{0.0004982}{8}
\testfpround{0.0004982}{9}
+\testsection{Testing sciround}
+\def\testsciround#1#2{%
+\tracingmacros=2\tracingcommands=2
+ \message{computing sciround(#1):}%
+ \sciparsenumber{#1}\S\M\E
+ \def\sciroundprecision{#2}%
+ \sciround\S\M\E\to\rS\rM\rE
+ % DOESN'T WORK BECAUSE PERIOD IS MISSING:
+% \scitofixed\rS\rM\rE\result
+ \sciroundzerofill\S\M\E\to\rrS\rrM\rrE
+ \scitofixed\rrS\rrM\rrE\resultz
+ \message{#1: round([\S] \M \cdot 10^{\E}) to #2 -> [\rS] \rM * 10^{\rM}; ([\rrS] \rrM * 10^{\rrE})}%
+ \[ #1:
+ \text{rnd}([\S] \M \cdot 10^{\E})
+ \text{ to } #2
+ \to
+ [\rS] \rM \cdot 10^{\rE} %= \result
+ \quad
+ ([\rrS] \rrM \cdot 10^{\rrE} = \resultz)
+ \]
+\tracingmacros=0\tracingcommands=0
+}%
+\[ \text{rnd }x \text{ to PREC} \to \text{no trailing zeros }\; (\text{trailing zeros}) \]
+\testsciround{1.0000}{2}
+\testsciround{-1.0000}{2}
+\testsciround{+1.0000}{2}
+\testsciround{1.003}{2}
+\testsciround{-1.003}{2}
+\testsciround{1.123}{2}
+\testsciround{1.12300012}{5}
+\testsciround{9}{2}
+\testsciround{1341}{2}
+\testsciround{0.996}{2}
+\testsciround{19999.9996}{2}
+\testsciround{-19999.9996}{2}
+\testsciround{+19999.9996}{2}
+\testsciround{9999.9996}{2}
+\testsciround{0.0004982}{3}
+\testsciround{0.0004982}{4}
+\testsciround{0.0004982}{5}
+\testsciround{0.0004982}{6}
+\testsciround{0.0004982}{7}
+\testsciround{0.0004982}{8}
+\testsciround{0.0004982}{9}
\end{document}
diff --git a/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.align.tex b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.align.tex
new file mode 100644
index 00000000000..036ee5c71a0
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.align.tex
@@ -0,0 +1,215 @@
+\testfile{pgfplotstest.align.tex}
+\testsection{Anchors, alignment, baselines, sub nodes}%
+\testsubsection{Baseline alignment}
+\noindent
+\begin{tikzpicture}[baseline]
+ \begin{axis}[width=0.4\linewidth,xlabel=An x label]
+ \smallplotstest
+ \end{axis}
+\end{tikzpicture}
+\hspace{1cm}
+\begin{tikzpicture}[baseline]
+ \begin{axis}[width=0.4\linewidth,xlabel={\Huge An x label}]
+ \smallplotstest
+ \end{axis}
+\end{tikzpicture}
+
+\testsubsection{Baseline alignment and externalized graphics}
+One needs \texttt{\textbackslash beginpgfgraphicnamed} around the complete paragraph, so this here doesn't work (see source code):
+
+\beginpgfgraphicnamed{baselinetesta}
+\begin{tikzpicture}[baseline]
+\begin{axis}[width=0.4\linewidth,xlabel=An x label]
+ \smallplotstest
+\end{axis}
+\end{tikzpicture}
+\endpgfgraphicnamed
+%
+%
+\hspace{1cm}
+\beginpgfgraphicnamed{baselinetestb}
+\begin{tikzpicture}[baseline]
+\begin{axis}[width=0.4\linewidth,xlabel={\Huge An x label}]
+ \smallplotstest
+\end{axis}
+\end{tikzpicture}
+\endpgfgraphicnamed
+
+\testsubsection{Baseline alignment and externalized graphics II}
+\beginpgfgraphicnamed{baselinetestc}
+\begin{tikzpicture}[baseline]
+\begin{axis}[width=0.4\linewidth,xlabel=An x label]
+ \smallplotstest
+\end{axis}
+\end{tikzpicture}
+%
+%
+\hspace{1cm}
+\begin{tikzpicture}[baseline]
+\begin{axis}[width=0.4\linewidth,xlabel={\Huge An x label}]
+ \smallplotstest
+\end{axis}
+\end{tikzpicture}
+\endpgfgraphicnamed
+
+\testsubsection{Horizontal and Vertical alignment}
+\begin{tikzpicture}[baseline]
+\begin{axis}[width=0.4\linewidth,xlabel=An x label,ylabel=An y label]
+ \smallplotstest
+\end{axis}
+
+\begin{scope}[yshift=-4cm]
+\begin{axis}[width=0.4\linewidth,xlabel=An x label,ylabel={$\displaystyle\sum_{k=1}^n \frac 1n$}]
+ \smallplotstest
+\end{axis}
+\end{scope}
+
+\node[fill=yellow,circle] at (0,0) {$(0,0)$};
+\end{tikzpicture}
+%
+%
+\hspace{1cm}
+\begin{tikzpicture}[baseline]
+\begin{axis}[width=0.4\linewidth,xlabel={\Huge An x label}]
+ \smallplotstest
+\end{axis}
+
+\begin{scope}[yshift=-4cm]
+\begin{axis}[width=0.4\linewidth,xlabel={\Huge An x label},ylabel={$\displaystyle\sum_{k=1}^n \frac 1n$}]
+ \smallplotstest
+\end{axis}
+\end{scope}
+\node[fill=yellow,circle] at (0,0) {$(0,0)$};
+\end{tikzpicture}
+
+\testsubsection{Anchortest}
+{
+\setlength{\fboxsep}{0pt}%
+\def\plot#1{
+ \vbox{\hsize=5cm
+ #1:
+
+ \pgfplotsset{every axis legend/.append style={at={(1.03,1)},anchor=north west}}
+ \fbox{%
+ \begin{tikzpicture}
+ \begin{axis}[
+ width=5cm,
+ anchor=#1,
+ title=My title,
+ xlabel=$x$,
+ ylabel=$y$
+ ]
+ \smallplotstest
+ \addlegendentry{My plot}
+ \end{axis}
+ \begin{pgfinterruptboundingbox}
+ \node[fill=yellow,circle] at (0,0) {$(0,0)$};
+ \end{pgfinterruptboundingbox}
+ \end{tikzpicture}
+ }%
+ }
+}%
+\plot{outer center}
+\plot{outer north}
+\plot{outer north east}
+\plot{outer east}
+\plot{outer south east}
+\plot{outer south}
+\plot{outer south west}
+\plot{outer west}
+\plot{outer north west}
+\plot{center}
+\plot{north}
+\plot{north east}
+\plot{east}
+\plot{south east}
+\plot{south}
+\plot{south west}
+\plot{west}
+\plot{north west}
+\plot{above north}
+\plot{above north east}
+\plot{right of north east}
+\plot{right of east}
+\plot{right of south east}
+\plot{below south east}
+\plot{below south}
+\plot{below south west}
+\plot{left of south west}
+\plot{left of west}
+\plot{left of north west}
+\plot{above north west}
+}
+
+
+\testsubsection{Accessing sub-nodes}
+\begin{tikzpicture}[baseline]%
+ \node[circle,draw=black] at (0,0) {Origin};
+ \begin{loglogaxis}[
+ anchor=north,
+ name=firstplot,
+ xlabel=Cost,
+ ylabel=Error,
+ y label style={name=myylabel},
+ x label style={name=myxlabel},
+ legend style={name=mylegend,
+ row 1 column 2/.style={blue,name=firstentry}% doesn't work!
+ }
+ ]
+ \addplot plot coordinates {
+ (5, 8.31160034e-02)
+ (17, 2.54685628e-02)
+ (49, 7.40715288e-03)
+ (129, 2.10192154e-03)
+ (321, 5.87352989e-04)
+ (769, 1.62269942e-04)
+ (1793, 4.44248889e-05)
+ (4097, 1.20714122e-05)
+ (9217, 3.26101452e-06)
+ };
+ \addplot plot coordinates {
+ (7, 8.47178381e-02)
+ (31, 3.04409349e-02)
+ (111, 1.02214539e-02)
+ (351, 3.30346265e-03)
+ (1023, 1.03886535e-03)
+ (2815, 3.19646457e-04)
+ (7423, 9.65789766e-05)
+ (18943, 2.87339125e-05)
+ (47103, 8.43749881e-06)
+ };
+ \legend{Case 1\\Case 2\\}
+ \end{loglogaxis}
+
+ \node[pin=45:legend] at (mylegend.center) {};
+ \node[pin=-45:x label] at (myxlabel.center) {};
+ \node[pin=180:y label] at (myylabel.center) {};
+\end{tikzpicture}%
+
+
+\testsubsection{Funny bounding boxes}
+\testsubsubsection{(my plot.below south west) rectangle (my plot.above north east)}
+{
+The following figure is centered:
+\setlength{\fboxsep}{0pt}%
+\begin{center}
+\fbox{%
+\begin{tikzpicture}%
+ \begin{pgfinterruptboundingbox}
+ \pgfplotsset{every axis legend/.append style={at={(1.03,1)},anchor=north west}}
+ \begin{axis}[
+ name=my plot,
+ title=A title,
+ xlabel={\Huge An x label},
+ ylabel={$\displaystyle\sum_{k=1}^n \frac 1n$}
+ ]
+ \smallplotstest
+ \addlegendentry{My plot}
+ \end{axis}
+ \end{pgfinterruptboundingbox}
+
+ \useasboundingbox (my plot.below south west) rectangle (my plot.above north east);
+\end{tikzpicture}%
+}%
+\end{center}
+}
diff --git a/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.axislines.tex b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.axislines.tex
new file mode 100644
index 00000000000..351fc07d65a
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.axislines.tex
@@ -0,0 +1,259 @@
+\testfile{pgfplotstest.axislines.tex}
+\testsection{Axislines placement}
+
+\def\smallplotstestyoffset{%
+\addplot[smooth,blue,mark=*] coordinates {
+ (-1, 11)
+ (-0.75, 10.5625)
+ (-0.5, 10.25)
+ (-0.25, 10.0625)
+ (0, 10)
+ (0.25, 10.0625)
+ (0.5, 10.25)
+ (0.75, 10.5625)
+ (1, 11)
+};
+}
+
+\def\smallplotstestyoffsetneg{%
+\addplot[smooth,blue,mark=*] coordinates {
+ (-1, -11)
+ (-0.75, -10.5625)
+ (-0.5, -10.25)
+ (-0.25, -10.0625)
+ (0, -10)
+ (0.25, -10.0625)
+ (0.5, -10.25)
+ (0.75, -10.5625)
+ (1, -11)
+};
+}
+
+\def\smallplotstestxoffset{%
+\addplot[smooth,blue,mark=*] coordinates {
+ (9, 1)
+ (9.25, 0.5625)
+ (9.5, 0.25)
+ (9.75, 0.0625)
+ (10, 0)
+ (10.25, -0.0625)
+ (10.5, -0.25)
+ (10.75, -0.5625)
+ (11, -1)
+};
+}
+
+\def\smallplotstestxoffsetneg{%
+\addplot[smooth,blue,mark=*] coordinates {
+ (-9, 1)
+ (-9.25, 0.5625)
+ (-9.5, 0.25)
+ (-9.75, 0.0625)
+ (-10, 0)
+ (-10.25, -0.0625)
+ (-10.5, -0.25)
+ (-10.75, -0.5625)
+ (-11, -1)
+};
+}
+
+\testsubsection{tick align=outside}
+\begin{tikzpicture}
+\begin{axis}[
+ tick align=outside,
+ ]
+ \smallplotstest
+\end{axis}
+\end{tikzpicture}
+
+\testsubsection{axis y line/ axis x line}
+\begin{tikzpicture}
+\begin{axis}[
+ axis y line=center,
+ axis x line=bottom
+ ]
+ \smallplotstest
+\end{axis}
+\end{tikzpicture}
+
+\testsubsection{axis [xy] line/ tick align/ y discont}
+\begin{tikzpicture}
+\begin{axis}[
+ axis y discontinuity=crunch,
+ axis y line=center,
+ axis x line=bottom,
+ tick align=center,
+ ymin=9
+ ]
+ \smallplotstestyoffset
+\end{axis}
+\end{tikzpicture}
+
+\begin{tikzpicture}
+\begin{axis}[
+ enlargelimits=false,
+ minor tick num=3,
+ axis y line=box,
+ axis x line=middle
+ ]
+ \addplot[blue,mark=none] plot[id=sinneg,domain=-10:0,samples=40] function{sin(x)};
+\end{axis}
+\end{tikzpicture}
+
+\begin{tikzpicture}
+\begin{axis}[
+ enlargelimits=false,
+ minor tick num=3,
+ axis y line=left,
+ axis x line=middle
+ ]
+ \addplot[blue,mark=none] plot[id=sinneg,domain=-10:0,samples=40] function{sin(x)};
+\end{axis}
+\end{tikzpicture}
+
+\begin{tikzpicture}
+\begin{axis}[
+ enlargelimits=false,
+ minor tick num=3,
+ axis y line=right,
+ axis x line=middle
+ ]
+ \addplot[blue,mark=none] plot[id=sinneg,domain=-10:0,samples=40] function{sin(x)};
+\end{axis}
+\end{tikzpicture}
+
+\begin{tikzpicture}
+\begin{axis}[
+ enlargelimits=false,
+ minor tick num=3,
+ axis y line=center,
+ axis x line=box,
+ ymin=0, ymax=25
+ ]
+ \addplot[blue,mark=none] plot[id=sinneg,domain=-5:5,samples=40] function{x*x+1};
+\end{axis}
+\end{tikzpicture}
+
+\begin{tikzpicture}
+\begin{axis}[
+ enlargelimits=false,
+ minor tick num=3,
+ axis y line=center,
+ axis x line=top,
+ ymin=0, ymax=25
+ ]
+ \addplot[blue,mark=none] plot[id=sinneg,domain=-5:5,samples=40] function{x*x+1};
+\end{axis}
+\end{tikzpicture}
+
+\begin{tikzpicture}
+\begin{axis}[
+ enlargelimits=false,
+ minor tick num=3,
+ axis y line=center,
+ axis x line=bottom,
+ ymin=0, ymax=25
+ ]
+ \addplot[blue,mark=none] plot[id=sinneg,domain=-5:5,samples=40] function{x*x+1};
+\end{axis}
+\end{tikzpicture}
+
+
+\begin{tikzpicture}
+\begin{axis}[
+ enlargelimits=false,
+ minor tick num=3,
+ axis y line=center,
+ axis x line=middle
+ ]
+ \addplot[blue,mark=none] plot[id=sinneg,domain=-5:5,samples=40] function{sin(x)};
+\end{axis}
+\end{tikzpicture}
+
+
+
+
+
+
+\testsubsection{axis [xy] line/ tick align/ x discont}
+\begin{tikzpicture}
+\begin{axis}[
+ axis y line=box,
+ axis x discontinuity=parallel,
+ axis x line=middle,
+ tick align=outside,
+ xmin=8.5
+ ]
+ \smallplotstestxoffset
+\end{axis}
+\end{tikzpicture}
+
+\begin{tikzpicture}
+\begin{axis}[
+ axis y line=box,
+ axis x discontinuity=parallel,
+ axis x line=middle,
+ tick align=outside,
+ xmin=8.5
+ ]
+ \smallplotstestxoffsetneg
+\end{axis}
+\end{tikzpicture}
+
+\begin{tikzpicture}
+\begin{axis}[
+ axis y line=box,
+ axis x discontinuity=crunch,
+ axis x line=middle,
+ tick align=outside,
+ xmin=8.5
+ ]
+ \smallplotstestxoffset
+\end{axis}
+\end{tikzpicture}
+
+
+\begin{tikzpicture}
+\begin{axis}[
+ axis y line=box,
+ axis x discontinuity=crunch,
+ axis x line=middle,
+ tick align=outside,
+ xmin=8.5
+ ]
+ \smallplotstestxoffsetneg
+\end{axis}
+\end{tikzpicture}
+
+\begin{tikzpicture}
+\begin{axis}[
+ axis y line=right,
+ axis x discontinuity=crunch,
+ axis x line=bottom,
+ tick align=outside,
+ xmin=8.5
+ ]
+ \smallplotstestxoffsetneg
+\end{axis}
+\end{tikzpicture}
+
+\begin{tikzpicture}
+\begin{axis}[
+ axis y line=right,
+ axis y discontinuity=crunch,
+ axis x line=top,
+ tick align=outside,
+ xmin=8.5
+ ]
+ \smallplotstestyoffsetneg
+\end{axis}
+\end{tikzpicture}
+
+\testsubsection{axis y discontinuity}
+\begin{tikzpicture}
+\begin{axis}[
+ axis y discontinuity=parallel,
+ ]
+ \smallplotstest
+\end{axis}
+\end{tikzpicture}
diff --git a/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.axispath.tex b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.axispath.tex
new file mode 100644
index 00000000000..757130e5958
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.axispath.tex
@@ -0,0 +1,41 @@
+\testfile{pgfplotstest.axispath.tex}
+\testsection{Testing path commands inside of axis}
+\testsubsection{log plot}
+\begin{tikzpicture}
+\begin{loglogaxis}[title=A test title,xlabel=Dof,ylabel=Error]
+\loglogtestplot
+
+\draw (axis cs:9217, 3.261015e-06) -| (axis cs:4097, 1.207141e-05);
+
+\node[pin=45:good!] at (axis cs:1023, 1.038865e-03) {};
+\end{loglogaxis}
+\end{tikzpicture}
+
+\testsubsection{Linear plot}
+\begin{tikzpicture}
+\begin{axis}
+\smallplotstest
+
+\draw (axis cs:-1,0) -- (axis cs:1,1);
+
+\node[font=\footnotesize,pin=45:{$(-0.25,0.0625)$}] at (axis cs:-0.25, 0.0625) {};
+\end{axis}
+\end{tikzpicture}
+
+\testsection{Checking plot expression}
+\begin{tikzpicture}
+\begin{axis}[domain=1:4,ymin=0,ymax=3,enlargelimits]
+\smallplotstest
+\addlegendentry{$g(x)$}
+
+\addplot (\x,{0.05*exp(\x)});
+\addlegendentry{$f(x) = \frac{1}{20} \mathrm e^x$}
+\end{axis}
+\end{tikzpicture}
+
+\begin{tikzpicture}
+\begin{axis}[ymin=0,ymax=4,enlargelimits]
+\addplot plot[domain=2:4.5] (\x,{0.05*exp(\x)});
+\addlegendentry{$f(x) = \frac{1}{20} \mathrm e^x$}
+\end{axis}
+\end{tikzpicture}
diff --git a/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.enlargelimits.tex b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.enlargelimits.tex
new file mode 100644
index 00000000000..055a47ac6dc
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.enlargelimits.tex
@@ -0,0 +1,99 @@
+\testfile{pgfplotstest.enlargelimits.tex}
+\testsection{Limit computation}
+\testsubsection{User specified limits}
+{\pgfplotsset{every axis/.append style={scaled ticks=false,enlargelimits=false}}
+[scaled ticks = false,enlargelimits=false] in this section
+\testsubsubsection{linear plot, unconstraint}
+\begin{tikzpicture}
+ \begin{axis}
+ \addplot file{pgfplots.testplot};
+ \end{axis}
+\end{tikzpicture}
+
+\testsubsubsection{linear plot, limited to $x \in [-20,20]$}
+\begin{tikzpicture}
+ \begin{axis}[xmin=-20,xmax=20]
+ \addplot file{pgfplots.testplot};
+ \end{axis}
+\end{tikzpicture}
+
+\testsubsubsection{linear plot, limited to $y \in [-12000,800]$}
+\begin{tikzpicture}
+ \begin{axis}[ymin=-12000,ymax=800]
+ \addplot file{pgfplots.testplot};
+ \end{axis}
+\end{tikzpicture}
+
+\testsubsubsection{linear plot, limited to $x \in [-20,20]; y \in [-12000,800]$}
+\begin{tikzpicture}
+ \begin{axis}[xmin=-20,xmax=20,ymin=-12000,ymax=800]
+ \addplot file{pgfplots.testplot};
+ \end{axis}
+\end{tikzpicture}
+
+\testsubsubsection{linear plot, limited to empty $x$-range}
+\begin{tikzpicture}
+ \begin{axis}[xmin=2000,xmax=20000]
+ \addplot file{pgfplots.testplot};
+ \end{axis}
+\end{tikzpicture}
+
+
+
+\testsubsection{Log plots}
+Log--plots use the same code; they should work in the same way!
+
+\testsubsubsection{log plot unconstraint}
+\begin{tikzpicture}
+ \begin{loglogaxis}
+ \loglogtestplot
+ \end{loglogaxis}
+\end{tikzpicture}
+
+\testsubsubsection{log plot limited to $x \in [10^3,5\cdot 10^5]$}
+\begin{tikzpicture}
+ \begin{loglogaxis}[xmin=1e3,xmax=5e5]
+ \loglogtestplot
+ \end{loglogaxis}
+\end{tikzpicture}
+
+\testsubsubsection{log plot limited to $y \in [10^{-5},2\cdot 10^{-3}]$}
+\begin{tikzpicture}
+ \begin{loglogaxis}[ymin=1e-5,ymax=2e-3]
+ \loglogtestplot
+ \end{loglogaxis}
+\end{tikzpicture}
+}
+
+\testsubsection{Enlargelimits tests}
+\testsubsubsection{enlargelimits=false, x limits provided}
+\begin{tikzpicture}
+\begin{axis}[%
+ enlargelimits=false,
+ xmin=0,xmax=1,
+ xtick={-1.5,-1.25,...,1.5}]
+\smallplotstest
+\end{axis}
+\end{tikzpicture}
+
+\testsubsubsection{enlargelimits=false, no limits provided}
+\begin{tikzpicture}
+\begin{axis}[enlargelimits=false]
+\smallplotstest
+\end{axis}
+\end{tikzpicture}
+
+\testsubsubsection{enlargelimits=true, all limits provided $[-1,1]\times [-1,1]$}
+\begin{tikzpicture}
+\begin{axis}[enlargelimits=true,xmin=-1,xmax=1,ymin=-1,ymax=1]
+\smallplotstest
+\end{axis}
+\end{tikzpicture}
+
+\testsubsubsection{enlargelimits=0.5}
+\begin{tikzpicture}
+\begin{axis}[enlargelimits=0.5]
+\smallplotstest
+\end{axis}
+\end{tikzpicture}
+
diff --git a/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.errorbars.tex b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.errorbars.tex
new file mode 100644
index 00000000000..c90f00287e6
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.errorbars.tex
@@ -0,0 +1,153 @@
+\testfile{pgfplotstest.errorbars.tex}
+\testsection{Errorbars}
+{
+%\tracingmacros=2\tracingcommands=2
+\begin{tikzpicture}
+\begin{axis}
+\addplot plot[
+ /pgfplots/error bars/.cd,
+ y dir=both,y explicit,
+ x dir=both,x fixed relative=0.5,
+ error mark=diamond*,
+]
+ coordinates
+ {(0,0) +- (0.5,0.1)
+ (0.1,0.1) +- (0.05,0.2)
+ (0.2,0.2) +- (0,0.05)
+ (0.5,0.5)
+ (1,1)};
+\end{axis}
+\end{tikzpicture}
+
+\testsubsubsection{changing styles}
+\begin{tikzpicture}
+\begin{axis}
+\addplot plot[
+ /pgfplots/error bars/.cd,
+ y dir=plus,y explicit,
+ error bar style={black,dotted,/pgfplots/error bars/error mark=square*,/pgfplots/error bars/error mark options={current plot style}},
+]
+ coordinates
+ {(0,0) +- (0.5,0.1)
+ (0.1,0.1) +- (0.05,0.2)
+ (0.2,0.2) +- (0,0.05)
+ (0.5,0.5) +- (0.1,0.2)
+ (1,1) +- (0.3,0.1)
+ };
+\end{axis}
+\end{tikzpicture}
+
+\testsubsubsection{using 100\% minus}
+\begin{tikzpicture}
+\begin{axis}
+\addplot plot[
+ /pgfplots/error bars/.cd,
+ y dir=minus,y fixed relative=1,
+ x dir=minus,x fixed relative=1,
+ error mark=none,
+ error bar style={dotted},
+]
+ coordinates
+ {(0,0)
+ (0.1,0.1)
+ (0.2,0.2)
+ (0.5,0.5)
+ (1,1)
+ };
+\end{axis}
+\end{tikzpicture}
+%
+\testsubsubsection{with plot table}
+\begin{sidewaystable}
+{%
+\lstset{
+ showtabs=true,
+ showspaces=true,
+ basicstyle=\footnotesize\ttfamily,
+ numbers=left,
+ numberblanklines=true,
+ breaklines=false,
+ tabsize=15}
+\lstinputlisting{plotdata/pgfplotstest_plot}
+}
+\caption{The table used for the plot table tests and error bars.}
+\label{tbl:k}
+\end{sidewaystable}
+
+\begin{tikzpicture}
+\begin{axis}[title={maxlevel versus cgiter, table~\ref{tbl:k}}]
+\addplot plot[
+ /pgfplots/error bars/.cd,
+ y dir=both,y explicit,
+] table[x=maxlevel,y=cgiter,y error=cgiter_err] {plotdata/pgfplotstest_plot};
+
+\end{axis}
+\end{tikzpicture}
+
+\testsubsection{Log-plot}
+\testsubsubsection{relative errors}
+\begin{tikzpicture}
+\begin{loglogaxis}[
+ grid=both]
+\addplot plot[
+ /pgfplots/error bars/.cd,
+ y dir=both,y explicit relative,
+ x dir=both,x fixed relative=0.5,
+ error mark=triangle*,
+]
+ coordinates {
+ (32,32)
+ (64,64)
+ (128,128) +- (0,0.3)
+ (1024,1024) +- (0,0.2)
+ (32068,32068) +- (0,0.6)
+ (64000,64000) +- (0,0.6)
+ (128000,128000) +- (0,0.6)
+ };
+
+\end{loglogaxis}
+\end{tikzpicture}
+
+\testsubsubsection{x fixed=500, y explicit relative}
+\begin{tikzpicture}
+\begin{loglogaxis}[
+ grid=both]
+\addplot plot[
+ /pgfplots/error bars/.cd,
+ y dir=both,y explicit relative,
+ x dir=both,x fixed=500,
+ error mark=triangle*,
+]
+ coordinates {
+ (32,32)
+ (64,64)
+ (128,128) +- (0,0.3)
+ (1024,1024) +- (0,0.2)
+ (32068,32068) +- (0,0.6)
+ (64000,64000) +- (0,0.6)
+ (128000,128000) +- (0,0.6)
+ };
+
+\end{loglogaxis}
+\end{tikzpicture}
+
+\testsubsubsection{with plot table}
+\begin{tikzpicture}
+\begin{loglogaxis}[title={dof versus Lmax, table~\ref{tbl:k}}]
+\addplot plot[
+ /pgfplots/error bars/.cd,
+ y dir=both,y explicit relative,
+] table[x=dof,y=Lmax,y error=Lmax_relerror] {plotdata/pgfplotstest_plot};
+\end{loglogaxis}
+\end{tikzpicture}
+
+\testsubsubsection{with plot table absolute}
+\begin{tikzpicture}
+\begin{loglogaxis}[grid=both,title={dof versus L2, table~\ref{tbl:k}}]
+\addplot plot[
+ /pgfplots/error bars/.cd,
+ y dir=both,y explicit,
+] table[x=dof,y=L2,y error=L2_abserror] {plotdata/pgfplotstest_plot};
+\end{loglogaxis}
+\end{tikzpicture}
+}
diff --git a/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.expr.tex b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.expr.tex
new file mode 100644
index 00000000000..5cfc1992905
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.expr.tex
@@ -0,0 +1,15 @@
+\testfile{pgfplotstest.expr.tex}
+\testsection{`plot expression' test}
+\testsubsection{sin(x)}
+\begin{tikzpicture}
+\begin{axis}
+\addplot (\x,{sin(\x r)});
+\end{axis}
+\end{tikzpicture}
+
+\testsubsection{$x^2$}
+\begin{tikzpicture}
+\begin{axis}
+\addplot plot[domain=0:10] (\x,\x^2);
+\end{axis}
+\end{tikzpicture}
diff --git a/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.file.tex b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.file.tex
new file mode 100644
index 00000000000..423b2c4ee0d
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.file.tex
@@ -0,0 +1,121 @@
+\testfile{pgfplotstest.file.tex}
+{%
+\lstset{
+ showtabs=true,
+ showspaces=true,
+ basicstyle=\footnotesize\ttfamily,
+ numbers=left,
+ numberblanklines=true,
+ breaklines=false,
+ tabsize=10}
+\testsection{`plot file' test}
+\testsubsection{A file in gnuplot format 'num num i'}
+\lstinputlisting{plotdata/pgfplotstest_plot2.gnuplot}
+\begin{tikzpicture}
+\begin{axis}
+\addplot plot file{plotdata/pgfplotstest_plot2.gnuplot};
+\end{axis}
+\end{tikzpicture}
+
+\testsubsubsection{Same file loaded with `plot table'}
+\begin{tikzpicture}
+\begin{axis}
+\addplot plot table{plotdata/pgfplotstest_plot2.gnuplot};
+\end{axis}
+\end{tikzpicture}
+
+
+\testsubsection{A file which differs slightly from gnuplot format}
+\lstinputlisting{plotdata/pgfplotstest_plot4}
+\begin{tikzpicture}
+\begin{axis}
+\addplot plot file{plotdata/pgfplotstest_plot4};
+\end{axis}
+\end{tikzpicture}
+
+\testsubsection{A file which starts with newlines}
+\lstinputlisting{plotdata/pgfplotstest_plot5}
+\begin{tikzpicture}
+\begin{axis}
+\addplot plot file{plotdata/pgfplotstest_plot5};
+\end{axis}
+\end{tikzpicture}
+
+\testsubsubsection{Same file loaded with `plot table'}
+The first data point should have been identified as column name.
+
+\begin{tikzpicture}
+\begin{axis}
+\addplot plot table{plotdata/pgfplotstest_plot5};
+\end{axis}
+\end{tikzpicture}
+
+\testsubsubsection{testing space gobbling in 'plot file' command}
+\begin{tikzpicture}
+\begin{axis}
+\addplot plot file {plotdata/pgfplotstest_plot2.gnuplot};
+\end{axis}
+\end{tikzpicture}
+
+\testsection{`plot table' test}
+\begin{sidewaystable}
+\lstinputlisting{plotdata/pgfplotstest_plot}
+\caption{\texttt{pgfplotstest\_plot}}
+\end{sidewaystable}
+\testsubsection{Plot by column `dof' versus column `Lmax'}
+\begin{tikzpicture}
+\begin{loglogaxis}[xlabel=Dof,ylabel=$L_\infty$ error,title=Read from file `pgfplotstest\_plot']
+\addplot plot table[x=dof,y=Lmax] {plotdata/pgfplotstest_plot};
+\end{loglogaxis}
+\end{tikzpicture}
+
+\testsubsection{Plot by column \#2 versus column \#3}
+\begin{tikzpicture}
+\begin{loglogaxis}[
+ xlabel=Dof,
+ ylabel=$L_2$ error,
+ title=Read from file `pgfplotstest\_plot'
+]
+\addplot plot table[x index=2,y index=3]{plotdata/pgfplotstest_plot};
+
+\end{loglogaxis}
+\end{tikzpicture}
+
+\testsubsection{Plot by preloaded tables}
+{
+\begin{sidewaystable}
+\lstinputlisting{plotdata/pgfplotstest_plot3}
+\caption{\texttt{pgfplotstest\_plot3}}
+\end{sidewaystable}
+\pgfnumtableread{plotdata/pgfplotstest_plot} to \tableA
+\pgfnumtableread{plotdata/pgfplotstest_plot3} to \tableB
+\begin{tikzpicture}
+\begin{loglogaxis}[
+ xlabel=Dof,
+ ylabel=$L_2$ error,
+ title=Read from file `pgfplotstest\_plot' and `pgfplotstest\_plot3'
+]
+ \addplot plot table[x=dof,y=L2] from \tableA;
+ \addplot plot table[x=dof,y=L2] from \tableB;
+ \legend{$d=2$\\$d=3$\\}%
+\end{loglogaxis}
+\end{tikzpicture}
+}
+
+\testsubsection{a table which has no column names}
+\begin{sidewaystable}
+\lstinputlisting{plotdata/pgfplotstest_plotnocolnames}
+\caption{\texttt{plotdata/pgfplotstest\_plotnocolnames}}
+\end{sidewaystable}
+\begin{tikzpicture}
+\begin{loglogaxis}[
+ xlabel=Dof,
+ ylabel=$L_2$ error,
+ title=Read from file `pgfplotstest\_plotnocolnames'
+]
+\addplot plot table[x index=2,y index=3]{plotdata/pgfplotstest_plotnocolnames};
+
+\end{loglogaxis}
+\end{tikzpicture}
+
+}
diff --git a/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.function.tex b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.function.tex
new file mode 100644
index 00000000000..d82eafd280d
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.function.tex
@@ -0,0 +1,24 @@
+\testfile{pgfplotstest.function.tex}
+\testsection{`plot function' test}
+\testsubsection{sin(x)}
+\begin{tikzpicture}
+\begin{axis}
+\addplot plot[id=gnuplot_sin,samples=50] function{sin(x)};
+\end{axis}
+\end{tikzpicture}
+
+\testsubsection{exp(x)}
+\testsubsubsection{linear}
+\begin{tikzpicture}
+\begin{axis}
+\addplot plot[id=gnuplot_exp,samples=50,domain=-5:15] function{exp(x)};
+\end{axis}
+\end{tikzpicture}
+
+\testsubsubsection{semilogy}
+\begin{tikzpicture}
+\begin{semilogyaxis}
+\addplot plot[id=gnuplot_exp,samples=50,domain=-5:15] function{exp(x)};
+\end{semilogyaxis}
+\end{tikzpicture}
+
diff --git a/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.gnuplot_exp.gnuplot b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.gnuplot_exp.gnuplot
new file mode 100644
index 00000000000..9885481c6da
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.gnuplot_exp.gnuplot
@@ -0,0 +1,2 @@
+set terminal table; set output "pgfplotstest.gnuplot_exp.table"; set format "%.5f"
+set format "\%.7e"; set samples 50; plot [x=-5:15] exp(x)
diff --git a/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.gnuplot_exp.table b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.gnuplot_exp.table
new file mode 100644
index 00000000000..cf4dcd6694d
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.gnuplot_exp.table
@@ -0,0 +1,54 @@
+
+#Curve 0 of 1, 50 points
+#x y type
+-5.00000 0.00674 i
+-4.59184 0.01013 i
+-4.18367 0.01524 i
+-3.77551 0.02293 i
+-3.36735 0.03448 i
+-2.95918 0.05186 i
+-2.55102 0.07800 i
+-2.14286 0.11732 i
+-1.73469 0.17645 i
+-1.32653 0.26540 i
+-0.91837 0.39917 i
+-0.51020 0.60037 i
+-0.10204 0.90299 i
+0.30612 1.35815 i
+0.71429 2.04273 i
+1.12245 3.07237 i
+1.53061 4.62101 i
+1.93878 6.95024 i
+2.34694 10.45352 i
+2.75510 15.72265 i
+3.16327 23.64769 i
+3.57143 35.56737 i
+3.97959 53.49519 i
+4.38776 80.45959 i
+4.79592 121.01547 i
+5.20408 182.01364 i
+5.61224 273.75811 i
+6.02041 411.74662 i
+6.42857 619.28862 i
+6.83673 931.44272 i
+7.24490 1400.93894 i
+7.65306 2107.08599 i
+8.06122 3169.16837 i
+8.46939 4766.59625 i
+8.87755 7169.21197 i
+9.28571 10782.87262 i
+9.69388 16218.00868 i
+10.10204 24392.73976 i
+10.51020 36687.96612 i
+10.91837 55180.63453 i
+11.32653 82994.58239 i
+11.73469 124828.22579 i
+12.14286 187748.23013 i
+12.55102 282383.23259 i
+12.95918 424719.26363 i
+13.36735 638800.15552 i
+13.77551 960789.09915 i
+14.18367 1445077.43942 i
+14.59184 2173472.62555 i
+15.00000 3269017.37247 i
+
diff --git a/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.gnuplot_sin.gnuplot b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.gnuplot_sin.gnuplot
new file mode 100644
index 00000000000..609f9f7e41a
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.gnuplot_sin.gnuplot
@@ -0,0 +1,2 @@
+set terminal table; set output "pgfplotstest.gnuplot_sin.table"; set format "%.5f"
+set format "\%.7e"; set samples 50; plot [x=-5:5] sin(x)
diff --git a/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.gnuplot_sin.table b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.gnuplot_sin.table
new file mode 100644
index 00000000000..2feafa78b59
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.gnuplot_sin.table
@@ -0,0 +1,54 @@
+
+#Curve 0 of 1, 50 points
+#x y type
+-5.00000 0.95892 i
+-4.79592 0.99651 i
+-4.59184 0.99274 i
+-4.38776 0.94777 i
+-4.18367 0.86346 i
+-3.97959 0.74331 i
+-3.77551 0.59231 i
+-3.57143 0.41672 i
+-3.36735 0.22384 i
+-3.16327 0.02167 i
+-2.95918 -0.18140 i
+-2.75510 -0.37694 i
+-2.55102 -0.55684 i
+-2.34694 -0.71362 i
+-2.14286 -0.84079 i
+-1.93878 -0.93306 i
+-1.73469 -0.98660 i
+-1.53061 -0.99919 i
+-1.32653 -0.97032 i
+-1.12245 -0.90116 i
+-0.91837 -0.79461 i
+-0.71429 -0.65508 i
+-0.51020 -0.48836 i
+-0.30612 -0.30136 i
+-0.10204 -0.10186 i
+0.10204 0.10186 i
+0.30612 0.30136 i
+0.51020 0.48836 i
+0.71429 0.65508 i
+0.91837 0.79461 i
+1.12245 0.90116 i
+1.32653 0.97032 i
+1.53061 0.99919 i
+1.73469 0.98660 i
+1.93878 0.93306 i
+2.14286 0.84079 i
+2.34694 0.71362 i
+2.55102 0.55684 i
+2.75510 0.37694 i
+2.95918 0.18140 i
+3.16327 -0.02167 i
+3.36735 -0.22384 i
+3.57143 -0.41672 i
+3.77551 -0.59231 i
+3.97959 -0.74331 i
+4.18367 -0.86346 i
+4.38776 -0.94777 i
+4.59184 -0.99274 i
+4.79592 -0.99651 i
+5.00000 -0.95892 i
+
diff --git a/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.gridtick.tex b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.gridtick.tex
new file mode 100644
index 00000000000..6ca72bc32e1
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.gridtick.tex
@@ -0,0 +1,84 @@
+\testfile{pgfplotstest.gridtick.tex}
+\testsection{Grid lines test}
+\begin{tikzpicture}
+ \begin{axis}[xmajorgrids]
+ \smallplotstest
+ \end{axis}
+\end{tikzpicture}
+
+\begin{tikzpicture}
+ \begin{axis}[ymajorgrids,xmajorgrids]
+ \smallplotstest
+ \end{axis}
+\end{tikzpicture}
+
+\begin{tikzpicture}
+ \begin{loglogaxis}[ymajorgrids,xmajorgrids]
+ \loglogtestplot
+ \end{loglogaxis}
+\end{tikzpicture}
+
+\begin{tikzpicture}
+ \begin{loglogaxis}[grid=both]
+ \loglogtestplot
+ \end{loglogaxis}
+\end{tikzpicture}
+
+{
+\pgfplotsset{every major tick/.append style={color=black,thick}}
+\begin{tikzpicture}
+ \begin{loglogaxis}[grid=major]
+ \loglogtestplot
+ \end{loglogaxis}
+\end{tikzpicture}
+
+\pgfplotsset{every minor tick/.append style={color=black,thick}}
+\begin{tikzpicture}
+ \begin{loglogaxis}[grid=both]
+ \loglogtestplot
+ \end{loglogaxis}
+\end{tikzpicture}
+}
+
+\testsection{Tick lines test}
+\begin{tikzpicture}
+ \begin{loglogaxis}[xmajorticks=false,xminorticks=true]
+ \loglogtestplot
+ \end{loglogaxis}
+\end{tikzpicture}
+
+\begin{tikzpicture}
+ \begin{loglogaxis}[ymajorticks=false,yminorticks=false]
+ \loglogtestplot
+ \end{loglogaxis}
+\end{tikzpicture}
+
+\begin{tikzpicture}
+ \begin{loglogaxis}[ticks=none]
+ \loglogtestplot
+ \end{loglogaxis}
+\end{tikzpicture}
+
+\begin{tikzpicture}
+ \begin{loglogaxis}[ticks=major]
+ \loglogtestplot
+ \end{loglogaxis}
+\end{tikzpicture}
+
+\testsection{TikZ-coordinate system ``axis''}
+\begin{tikzpicture}
+\begin{axis}
+\smallplotstest
+\axispath\draw (axis cs:0.5,0.6) -- (axis cs:-1,0);
+\end{axis}
+\end{tikzpicture}
+
+\begin{tikzpicture}
+ \begin{loglogaxis}
+ \axispath\draw
+ (axis cs:18943,2.873391e-05) |- (axis cs:47103,8.437499e-06);
+ \loglogtestplot
+ \end{loglogaxis}
+\end{tikzpicture}
+
+
diff --git a/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.hansmeine_app.tex b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.hansmeine_app.tex
new file mode 100644
index 00000000000..7f4dbd77ae4
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.hansmeine_app.tex
@@ -0,0 +1,114 @@
+\testfile{pgfplotstest.hansmeine\_app.tex}
+\testsection{Application example of Hans Meine}
+\begingroup
+This example has been copied with permission from
+
+\noindent
+\url{http://kogs-www.informatik.uni-hamburg.de/~meine/tikz/plots}.
+
+Please note that the first plot's input data as it is found in the url above is slightly shifted compared to the other plots.
+
+\tikzstyle{plot legend}=[
+ rounded corners=2.5pt,inner xsep=3pt,inner ysep=2pt,
+ draw=black!50,fill=white,
+ font=\footnotesize,cells={anchor=center},
+ nodes={inner sep=2pt,text depth=0.15em,rounded corners=0pt,right}]
+
+\tikzstyle{every axis legend}=[plot legend,at={(.85,0.8)},below right]
+%\tikzstyle{every axis y label}=[at={(0,0.5)},xshift=-25pt,rotate=90]
+
+\begin{tikzpicture}[mark size=1.5pt,remember picture]
+
+\begin{axis}[
+ xmin=-5,xmax=5,
+ %ymin=0,ymax=25,
+ %ytick={0,5,...,25},
+ xlabel={arc length distance $t$ from saddle [pixels]},
+ ylabel={boundary indicator value $|\vec{b}_g(t)|$}]
+
+\addplot plot coordinates {
+ (-6.74792,2.41861) (-6.66786,2.41852) (-6.58805,2.41824) (-6.50996,2.41777) (-6.41075,2.41679) (-6.30551,2.41505) (-6.15340,2.41075) (-5.93965,2.40070) (-5.62466,2.37734) (-5.15092,2.32533) (-4.81777,2.27973) (-4.31289,2.20389) (-3.90792,2.14396) (-3.56562,2.09832) (-3.27459,2.06512) (-3.02640,2.04160) (-2.81205,2.02498) (-2.62515,2.01318) (-2.46036,2.00469) (-2.31403,1.99851) (-2.18241,1.99390) (-2.06229,1.99036) (-1.95106,1.98758) (-1.84645,1.98531) (-1.74609,1.98339) (-1.64791,1.98171) (-1.54947,1.98017) (-1.44841,1.97871) (-1.34122,1.97723) (-1.22126,1.97565) (-1.06446,1.97363) (-0.80552,1.97038) (-0.54659,1.96739) (-0.36271,1.96559) (-0.20000,1.96437) (0.00000,1.96349) (0.10000,1.96337) (0.20000,1.96350) (0.40000,1.96457) (0.66334,1.96786) (0.82469,1.97106) (1.00410,1.97577) (1.20014,1.98238) (1.41256,1.99137) (1.64222,2.00335) (1.88995,2.01902) (2.15698,2.03926) (2.44428,2.06507) (2.75132,2.09742) (3.07466,2.13693) (3.40793,2.18352) (3.74762,2.23692) (4.09685,2.29747) (4.45942,2.36533) (4.83307,2.43910) (5.20177,2.51426) (5.54872,2.58624) (5.87085,2.65390) (6.17726,2.71933) (6.47863,2.78542) (6.78862,2.85637) (7.13375,2.94064) (7.59098,3.06389) (8.13953,3.23189) (8.67260,3.41315) (9.39853,3.66690) (9.83987,3.80614) (10.13601,3.88485) (10.36232,3.93412) (10.54394,3.96577) (10.69550,3.98653) (10.83385,4.00111) (10.95513,4.01094) (11.03401,4.01619) (11.09168,4.01963) (11.14379,4.02251) (11.19194,4.02503) (11.28684,4.02965) (11.33618,4.03190) (11.38800,4.03416) (11.44303,4.03643) (11.50199,4.03872) (11.56561,4.04104) (11.63478,4.04335) (11.70991,4.04562) (11.79157,4.04779) (11.87873,4.04976) (11.96931,4.05140) (12.05829,4.05260) (12.14019,4.05335) (12.20972,4.05369) (12.26727,4.05379)
+};
+\addlegendentry{undesired, noise-induced edge}
+
+\addplot[mark=|,red] plot coordinates {
+ (-3.76974,23.44724) (-3.68200,23.44695) (-3.64029,23.44663) (-3.57390,23.44586) (-3.51311,23.44490) (-3.46300,23.44393) (-3.39804,23.44243) (-3.36070,23.44145) (-3.29129,23.43940) (-3.22822,23.43728) (-3.18614,23.43574) (-3.13754,23.43383) (-3.04637,23.42987) (-2.95967,23.42567) (-2.90068,23.42257) (-2.83380,23.41883) (-2.77416,23.41531) (-2.70061,23.41071) (-2.66154,23.40816) (-2.52857,23.39898) (-2.44938,23.39318) (-2.39931,23.38941) (-2.33883,23.38476) (-2.17413,23.37174) (-2.05644,23.36230) (-1.98196,23.35636) (-1.93330,23.35251) (-1.84825,23.34590) (-1.62954,23.32990) (-1.52996,23.32327) (-1.47585,23.31985) (-1.40329,23.31551) (-1.27105,23.30830) (-1.19944,23.30478) (-1.13051,23.30165) (-1.04894,23.29825) (-0.96702,23.29516) (-0.87382,23.29203) (-0.79070,23.28955) (-0.74927,23.28843) (-0.70129,23.28721) (-0.64637,23.28592) (-0.60115,23.28493) (-0.53219,23.28358) (-0.45855,23.28230) (-0.38244,23.28116) (-0.32153,23.28038) (-0.26284,23.27973) (-0.19690,23.27911) (-0.13978,23.27868) (-0.08064,23.27834) (-0.02275,23.27808) (0.00000,23.27801) (0.10000,23.27787) (0.20000,23.27802) (0.27601,23.27832) (0.36681,23.27891) (0.46110,23.27978) (0.55399,23.28091) (0.64198,23.28223) (0.70081,23.28326) (0.75328,23.28427) (0.81782,23.28563) (0.85871,23.28657) (0.93657,23.28849) (0.98295,23.28974) (1.05394,23.29177) (1.14949,23.29476) (1.16854,23.29539) (1.25761,23.29848) (1.31224,23.30049) (1.37408,23.30286) (1.44949,23.30589) (1.51818,23.30877) (1.57749,23.31135) (1.64391,23.31433) (1.69761,23.31680) (1.77152,23.32030) (1.82174,23.32272) (1.88683,23.32592) (1.95135,23.32914) (2.04539,23.33393) (2.09220,23.33636) (2.15071,23.33942) (2.21378,23.34276) (2.27209,23.34589) (2.32331,23.34867) (2.37362,23.35143) (2.42883,23.35450) (2.48828,23.35785) (2.54699,23.36122) (2.60335,23.36450) (2.65867,23.36780) (2.71561,23.37126) (2.77485,23.37495) (2.83543,23.37882) (2.89585,23.38280) (2.95675,23.38694) (3.01953,23.39134) (3.08437,23.39604) (3.15018,23.40099) (3.21683,23.40618) (3.28460,23.41165) (3.35451,23.41750) (3.42648,23.42374) (3.49957,23.43030) (3.57365,23.43717) (3.64867,23.44436) (3.72416,23.45181) (3.80056,23.45956) (3.87760,23.46758) (3.95468,23.47580) (4.03184,23.48421) (4.10882,23.49279) (4.18576,23.50154) (4.26266,23.51047) (4.33974,23.51959) (4.41715,23.52894) (4.49513,23.53857) (4.57441,23.54856) (4.65443,23.55888) (4.73544,23.56957) (4.81782,23.58073) (4.90189,23.59242) (4.98799,23.60474) (5.07646,23.61781) (5.16730,23.63169) (5.26080,23.64652) (5.35672,23.66236) (5.45528,23.67937) (5.55634,23.69766) (5.65938,23.71731) (5.76425,23.73845) (5.87131,23.76132) (5.98009,23.78602) (6.09098,23.81280) (6.20325,23.84165) (6.31760,23.87290) (6.43432,23.90677) (6.55406,23.94363) (6.67738,23.98385) (6.80482,24.02785) (6.93717,24.07624) (7.07526,24.12974) (7.21979,24.18923) (7.37205,24.25606) (7.53441,24.33248) (7.70924,24.42131) (7.89952,24.52650) (8.10836,24.65314) (8.34148,24.80958) (8.60710,25.00889) (8.91106,25.26703) (9.25007,25.59714) (9.68649,26.09883) (10.13522,26.72731) (10.40807,27.17870) (10.65277,27.63495) (10.90256,28.15483) (11.16477,28.76174) (11.44948,29.49245) (11.77047,30.40424) (12.15016,31.59520) (12.65258,33.31831) (13.42664,36.04860) (13.62630,36.71383) (13.83415,37.37658) (14.01722,37.93327) (14.18297,38.41524) (14.33800,38.84736) (14.48085,39.22980) (14.61486,39.57508) (14.74229,39.89128) (14.86436,40.18308) (14.98202,40.45398) (15.09625,40.70715) (15.20802,40.94540) (15.31824,41.17117) (15.42790,41.38667) (15.53783,41.59355) (15.64893,41.79333) (15.76206,41.98717) (15.87814,42.17606) (15.99810,42.36076) (16.12295,42.54179) (16.25372,42.71942) (16.39138,42.89353) (16.53689,43.06372) (16.69101,43.22914) (16.85414,43.38846) (17.02662,43.54044) (17.20801,43.68337) (17.39742,43.81578) (17.59106,43.93517) (17.78192,44.03878) (17.95844,44.12362) (18.11107,44.18940) (18.24056,44.24023) (18.35635,44.28212) (18.46640,44.31902) (18.57116,44.35166) (18.66833,44.37986) (18.75731,44.40398) (18.84002,44.42498) (18.91841,44.44364) (18.99328,44.46033) (19.06445,44.47519) (19.13176,44.48832) (19.19514,44.49987) (19.25495,44.51004) (19.31152,44.51899) (19.36506,44.52686) (19.46346,44.53976) (19.50769,44.54489) (19.58677,44.55300) (19.65524,44.55890) (19.71276,44.56302) (19.78112,44.56692) (19.84673,44.56961) (19.88347,44.57064) (19.97685,44.57176)
+};
+\addlegendentry{real, high-contrast image edge}
+
+\addplot plot coordinates {
+ (-1.15451,10.36685) (-1.07964,10.36621) (-1.02056,10.36481) (-0.96257,10.36271) (-0.90533,10.35997) (-0.84858,10.35665) (-0.79205,10.35281) (-0.73561,10.34850) (-0.67917,10.34380) (-0.62272,10.33880) (-0.56633,10.33358) (-0.50992,10.32825) (-0.45352,10.32290) (-0.39747,10.31767) (-0.34169,10.31266) (-0.28682,10.30800) (-0.23402,10.30388) (-0.18313,10.30031) (-0.12560,10.29684) (-0.03525,10.29280) (0.00000,10.29174) (0.10000,10.29044) (0.20000,10.29175) (0.28114,10.29471) (0.34449,10.29811) (0.44379,10.30512) (0.53029,10.31253) (0.59874,10.31897) (0.66221,10.32520) (0.72320,10.33125) (0.78138,10.33692) (0.83700,10.34216) (0.89028,10.34690) (0.94149,10.35114) (1.03860,10.35813) (1.12980,10.36322) (1.21498,10.36658) (1.29044,10.36838) (1.37969,10.36912)
+};
+\addlegendentry{real, low-contrast image edge}
+
+\addplot plot coordinates {
+ (-3.14098,15.46859) (-3.05005,15.46793) (-3.03205,15.46764) (-2.93375,15.46514) (-2.84266,15.46145) (-2.76309,15.45344) (-2.68022,15.42299) (-2.61653,15.38079) (-2.43041,15.16335) (-2.21648,14.74227) (-1.83556,13.53895) (-1.54884,12.22611) (-1.26239,10.54200) (-0.83897,7.52613) (-0.20000,3.62234) (-0.00000,3.13037) (0.10000,3.06780) (0.20000,3.12986) (0.40000,3.60861) (0.81954,5.76144) (1.21229,8.25063) (1.49830,9.82046) (1.71955,10.77871) (1.91907,11.45069) (2.13743,12.00227) (2.51547,12.56801) (2.54747,12.59468) (2.67448,12.66844) (2.75913,12.68968) (2.82919,12.69491) (2.90099,12.69776) (2.97321,12.69961) (3.00861,12.70015) (3.07604,12.70055)
+};
+\addlegendentry{streamer (converging to real edges)}
+
+\draw[dotted] (axis cs:0,0) -- (axis cs:0,14) node[right] {saddle pos};
+
+\end{axis}
+
+\end{tikzpicture}
+
+
+\testsubsection{With plot file}
+\begin{tikzpicture}[mark size=1.5pt]
+\begin{axis}[
+ xmin=-5,xmax=5,
+ xlabel={arc length distance $t$ from saddle [pixels]},
+ ylabel={boundary indicator value $|\vec{b}_g(t)|$}]
+
+\addplot file {valueplot-flowlines_1.dat};
+\addlegendentry{undesired, noise-induced edge}
+
+\addplot[mark=|,red] file {valueplot-flowlines_2.dat};
+\addlegendentry{real, high-contrast image edge}
+
+\addplot file {valueplot-flowlines_3.dat};
+\addlegendentry{real, low-contrast image edge}
+
+\addplot file {valueplot-flowlines_4.dat};
+\addlegendentry{streamer (converging to real edges)}
+
+\draw[dotted] (axis cs:0,0) -- (axis cs:0,14) node[right] {saddle pos};
+
+\end{axis}
+\end{tikzpicture}
+
+\testsubsection{With plot file and restricted bounding box, centered}
+\begin{center}
+\setlength{\fboxsep}{0pt}%
+\fbox{%
+\begin{tikzpicture}[mark size=1.5pt]
+\begin{pgfinterruptboundingbox}
+\begin{axis}[
+ name=hans example,
+ xmin=-5,xmax=5,
+ xlabel={arc length distance $t$ from saddle [pixels]},
+ ylabel={boundary indicator value $|\vec{b}_g(t)|$}]
+
+\addplot file {valueplot-flowlines_1.dat};
+\addlegendentry{undesired, noise-induced edge}
+
+\addplot[mark=|,red] file {valueplot-flowlines_2.dat};
+\addlegendentry{real, high-contrast image edge}
+
+\addplot file {valueplot-flowlines_3.dat};
+\addlegendentry{real, low-contrast image edge}
+
+\addplot file {valueplot-flowlines_4.dat};
+\addlegendentry{streamer (converging to real edges)}
+
+\draw[dotted] (axis cs:0,0) -- (axis cs:0,14) node[right] {saddle pos};
+
+\end{axis}
+\end{pgfinterruptboundingbox}
+
+\useasboundingbox (hans example.below south west) (hans example.above north east);
+\end{tikzpicture}%
+}%
+\end{center}
+
+\endgroup
diff --git a/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.legend.tex b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.legend.tex
new file mode 100644
index 00000000000..81dc332cfa5
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.legend.tex
@@ -0,0 +1,78 @@
+\testfile{pgfplotstest.legend.tex}
+\testsection{Legends}
+\begingroup
+\testsubsection{Old-format legends with two backslashes as separator}
+\begin{tikzpicture}
+\begin{loglogaxis}[title=A test title,xlabel=Dof,ylabel=Error]
+\manylogplotsnolegend
+\legend{one\\two\\three\\four\\five\\six\\}%
+\end{loglogaxis}
+\end{tikzpicture}
+
+\testsubsection{Using comma-separated-legends}
+\begin{tikzpicture}
+\begin{loglogaxis}[title=A test title,xlabel=Dof,ylabel=Error]
+\manylogplotsnolegend
+\legend{one,two,three,four,five,six}%
+\end{loglogaxis}
+\end{tikzpicture}
+
+\testsubsection{testing legend columns}
+\begin{tikzpicture}
+\begin{loglogaxis}[title=A test title,xlabel=Dof,ylabel=Error,legend columns=2]
+\manylogplots
+\end{loglogaxis}
+\end{tikzpicture}
+
+\begin{tikzpicture}
+\begin{loglogaxis}[title=A test title,xlabel=Dof,ylabel=Error,legend columns=3]
+\manylogplots
+\end{loglogaxis}
+\end{tikzpicture}
+
+{
+\pgfplotsset{every axis legend/.append style={inner sep=0pt,nodes={inner sep=0pt}}}
+\begin{tikzpicture}
+\begin{loglogaxis}[title=A test title,xlabel=Dof,ylabel=Error,legend columns=4]
+\manylogplots
+\end{loglogaxis}
+\end{tikzpicture}
+}
+
+{\pgfplotsset{every axis legend/.append style={at={(0.5,-0.2)},anchor=north}}
+\begin{tikzpicture}
+\begin{loglogaxis}[title=A test title,xlabel=Dof,ylabel=Error,legend columns=6]
+\manylogplots
+\end{loglogaxis}
+\end{tikzpicture}
+}%
+
+{\pgfplotsset{every axis legend/.append style={at={(0.5,0.98)},anchor=north,inner sep=0pt}}
+\begin{tikzpicture}
+\begin{loglogaxis}[title=A test title,xlabel=Dof,ylabel=Error,legend columns=-1]
+\manylogplots
+\end{loglogaxis}
+\end{tikzpicture}
+}%
+
+\testsubsection{``legend plot pos'' options}
+\begin{tikzpicture}
+\begin{loglogaxis}[title=A test title,xlabel=Dof,ylabel=Error,legend plot pos=left]
+\manylogplots
+\end{loglogaxis}
+\end{tikzpicture}
+
+\begin{tikzpicture}
+\begin{loglogaxis}[title=A test title,xlabel=Dof,ylabel=Error,legend plot pos=right]
+\manylogplots
+\end{loglogaxis}
+\end{tikzpicture}
+
+\begin{tikzpicture}
+\begin{loglogaxis}[title=A test title,xlabel=Dof,ylabel=Error,legend plot pos=none]
+\manylogplots
+\end{loglogaxis}
+\end{tikzpicture}
+\endgroup
+
+
diff --git a/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.logplotenv.tex b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.logplotenv.tex
new file mode 100644
index 00000000000..f2bd4e6b2a1
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.logplotenv.tex
@@ -0,0 +1,142 @@
+\testfile{pgfplotstest.logplotenv.tex}
+
+\testsection{Default options log plot}
+\testsubsection{Default size}
+\begin{tikzpicture}
+\begin{loglogaxis}
+\loglogtestplot
+\end{loglogaxis}
+\end{tikzpicture}
+
+\testsubsection{Small size}
+\begin{tikzpicture}
+\begin{loglogaxis}[width=6cm]
+\loglogtestplot
+\end{loglogaxis}
+\end{tikzpicture}
+%
+\begin{tikzpicture}
+\begin{loglogaxis}[width=6cm]
+\addplot plot coordinates {
+ (5, 8.311600e-03)
+ (9217, 3.261015e-07)
+};
+\end{loglogaxis}
+\end{tikzpicture}
+
+\begin{tikzpicture}
+\begin{loglogaxis}[width=6cm,ytick={1.0e0,1e-2,1e-4}]
+\addplot plot coordinates {
+ (5, 1.1e-00)
+ (9217, 1e-05)
+};
+\end{loglogaxis}
+\end{tikzpicture}
+
+\testsubsection{Very small size}
+\begin{tikzpicture}
+\begin{loglogaxis}[width=4cm]
+\loglogtestplot
+\end{loglogaxis}
+\end{tikzpicture}
+
+\testsubsection{Large size}
+\begin{tikzpicture}
+\begin{loglogaxis}[width=\linewidth]
+\loglogtestplot
+\end{loglogaxis}
+\end{tikzpicture}
+
+\testsubsection{Large size; large range}
+\begin{tikzpicture}
+\begin{loglogaxis}[width=\linewidth]
+\addplot coordinates {
+ (1e0,1e12)
+ (1e16,1e-12)
+};
+\end{loglogaxis}
+\end{tikzpicture}
+
+
+\testsubsection{Extremely small y range for log plot}
+\testsubsubsection{Without extra ticks, enlargelimits=false}
+\begin{tikzpicture}
+\begin{loglogaxis}[
+ enlargelimits=false,
+]
+\addplot coordinates {
+ (1e0,1.5e-4)
+ (1e24,2e-3)
+};
+\end{loglogaxis}
+\end{tikzpicture}
+
+\testsubsubsection{With extra ticks, enlargelimits=false}
+extra y ticks=\{2e-4,3e-4,4e-4,5e-4,6e-4,7e-4,8e-4,9e-4,1.2e-3\}
+
+\begin{tikzpicture}
+\begin{loglogaxis}[
+ enlargelimits=false,
+ extra y ticks={2e-4,3e-4,4e-4,5e-4,6e-4,7e-4,8e-4,9e-4,1.2e-3},
+]
+\addplot coordinates {
+ (1e0,1.5e-4)
+ (1e24,2e-3)
+};
+\end{loglogaxis}
+\end{tikzpicture}
+
+\testsection{Semilogy plot}
+\begin{tikzpicture}
+ \begin{semilogyaxis}[xlabel=Index,ylabel=Value]
+ \addplot[color=blue,mark=*] plot coordinates {
+ (1,8)
+ (2,16)
+ (3,32)
+ (4,64)
+ (5,128)
+ (6,256)
+ (7,512)
+ };
+ \end{semilogyaxis}
+\end{tikzpicture}
+
+\testsection{Semilogx plot}
+\begin{tikzpicture}
+ \begin{semilogxaxis}[xlabel=Index,ylabel=Value]
+ \addplot[color=blue,mark=*] plot coordinates {
+ (8,1)
+ (16,2)
+ (32,3)
+ (64,4)
+ (128,5)
+ (256,6)
+ (512,7)
+ };
+ \end{semilogxaxis}
+\end{tikzpicture}
+
+\testsubsection{Extra ticks}
+Options:
+
+extra x ticks=\{6e0,9e0,2e1,3e1,4e1,5e2,6e2,7e2,8e2,9e2\},
+
+extra x tick style=\{/pgf/number format/sci subscript,font=footnotesize\},
+
+\begin{tikzpicture}
+ \begin{semilogxaxis}[xlabel=Index,ylabel=Value,
+ width=\linewidth,
+ extra x ticks={6e0,9e0,2e1,3e1,4e1,5e2,6e2,7e2,8e2,9e2},
+ extra x tick style={/pgf/number format/sci subscript,font=\footnotesize},
+ ]
+ \addplot[color=blue,mark=*] plot coordinates {
+ (8,1)
+ (16,2)
+ (32,3)
+ (64,4)
+ (128,5)
+ (256,6)
+ (512,7)
+ };
+ \end{semilogxaxis}
+\end{tikzpicture}
diff --git a/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.misc.tex b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.misc.tex
new file mode 100644
index 00000000000..fcc77133f52
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.misc.tex
@@ -0,0 +1,171 @@
+\testfile{pgfplotstest.misc.tex}
+\testsection{Paths after addplot}
+\testsubsection{plot coordinates}
+\testsubsubsection{without space after 'coordinates'}
+\begin{tikzpicture}
+\begin{axis}[ymin=-1,ymax=2]
+\addplot+[fill=blue!50!black] coordinates{(0,0.5) (1,1)} |- (axis cs:0,-0.5) -- cycle;
+\end{axis}
+\end{tikzpicture}
+
+\testsubsubsection{with space after 'coordinates'}
+\begin{tikzpicture}
+\begin{axis}[ymin=-1,ymax=2]
+\addplot+[fill=blue!50!black] coordinates {(0,0.5) (1,1)} |- (axis cs:0,-0.5) -- cycle;
+\end{axis}
+\end{tikzpicture}
+
+\testsubsubsection{using closedcycle path}
+\begin{tikzpicture}
+\begin{axis}[ymin=-1,ymax=3]
+\addplot coordinates {(3,0.5) (4,2) (5,1)} ;
+\addplot+[fill=blue!50!black] coordinates {(3,0.5) (4,2) (5,1)}
+ \closedcycle;
+\end{axis}
+\end{tikzpicture}
+
+\testsubsection{plot table}
+\begin{tikzpicture}
+\begin{axis}
+\addplot+[fill=blue!50!black] table[x index=0,y index=1,header=false]{plotdata/pgfplotstest_plot2.gnuplot} |- (axis cs:0,-1) -- cycle;
+\end{axis}
+\end{tikzpicture}
+
+\testsubsection{plot function}
+\begin{tikzpicture}
+\begin{axis}
+\addplot plot[id=parable,domain=-5:5] function{4*x**2 - 5} node[pin=180:{$4x^2-5$}]{};
+\end{axis}
+\end{tikzpicture}
+
+
+\testsection{Title-option}
+\begin{tikzpicture}
+\begin{loglogaxis}[title=A test title,xlabel=Dof,ylabel=Error]
+\loglogtestplot
+\end{loglogaxis}
+\end{tikzpicture}
+
+\testsection{Filter test}
+{%
+\def\myOwnYfilter#1\to#2{%
+ \def#2{0.5}%
+}%
+\begin{tikzpicture}
+%
+\begin{axis}[yfilter={\myOwnYfilter}]
+\addplot plot coordinates {
+ (4,0)
+ (6,1)
+};
+\end{axis}
+\end{tikzpicture}
+
+\begin{tikzpicture}
+\begin{axis}[y filter/.code={\def\pgfmathresult{0.5}}]
+\addplot plot coordinates {
+ (4,0)
+ (6,1)
+};
+\end{axis}
+\end{tikzpicture}
+
+\begin{tikzpicture}
+\begin{axis}[x filter/.code={\ifnum\coordindex>4\def\pgfmathresult{}\fi}]
+\addplot (\x,\x^2);
+\end{axis}
+\end{tikzpicture}
+}%
+
+\testsection{Test for addplot+[...]}
+{
+\pgfplotsset{every axis legend/.append style={at={(1.03,1)},anchor=north west}}
+\begin{enumerate}
+ \item Ohne aenderung:
+
+\begin{tikzpicture}
+\begin{axis}
+\smallplotstest
+
+\addplot plot coordinates {
+ (4,0)
+ (6,1)
+};
+\legend{eins\\zwei\\}%
+\end{axis}
+\end{tikzpicture}
+
+\item MIT aenderung:
+
+\begin{tikzpicture}
+\begin{axis}
+\smallplotstest
+
+\addplot+[only marks] plot coordinates {
+ (4,0)
+ (6,1)
+};
+\legend{eins\\zwei\\}%
+\end{axis}
+\end{tikzpicture}
+\end{enumerate}
+}
+
+\testsection{Hide axis test}
+\begin{tikzpicture}
+ \begin{axis}
+ \smallplotstest
+ \end{axis}
+\end{tikzpicture}
+\begin{tikzpicture}
+ \begin{axis}[hide axis]
+ \smallplotstest
+ \end{axis}
+\end{tikzpicture}
+\vskip 1cm
+\noindent
+\begin{tikzpicture}
+ \begin{axis}[hide axis,title=A plot with hidden axis]
+ \smallplotstest
+ \end{axis}
+\end{tikzpicture}
+\begin{tikzpicture}
+ \begin{axis}[hide axis,title=A plot with hidden axis]
+ \smallplotstest
+ \legend{A legend\\}
+ \end{axis}
+\end{tikzpicture}
+
+
+\testsection{disabledatascaling / disablelogfilter}
+\testsubsection{disabledatascaling}
+\begin{tikzpicture}
+\begin{axis}[disabledatascaling]
+ \smallplotstest
+\end{axis}
+\end{tikzpicture}
+
+\testsubsection{disabledatascaling + explicit limits}
+\begin{tikzpicture}
+\begin{axis}[disabledatascaling, xmin=0, xmax=1, ymin=0, ymax=1]
+ \smallplotstest
+\end{axis}
+\end{tikzpicture}
+
+\testsubsection{disabledatascaling + explicit limits + error bars}
+\begin{tikzpicture}
+\begin{axis}[disabledatascaling, xmin=-0.5, xmax=1.5, ymin=-0.5, ymax=1.5]
+\addplot plot[
+ /pgfplots/error bars/.cd,
+ y dir=both,y explicit,
+ x dir=both,x fixed relative=0.5,
+ error mark=diamond*,
+]
+ coordinates
+ {(0,0) +- (0.5,0.1)
+ (0.1,0.1) +- (0.05,0.2)
+ (0.2,0.2) +- (0,0.05)
+ (0.5,0.5)
+ (1,1)};
+\end{axis}
+\end{tikzpicture}
diff --git a/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.parable.gnuplot b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.parable.gnuplot
new file mode 100644
index 00000000000..95805571bec
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.parable.gnuplot
@@ -0,0 +1,2 @@
+set terminal table; set output "pgfplotstest.parable.table"; set format "%.5f"
+set format "\%.7e"; set samples 25; plot [x=-5:5] 4*x**2 - 5
diff --git a/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.parable.table b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.parable.table
new file mode 100644
index 00000000000..d472640e119
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.parable.table
@@ -0,0 +1,29 @@
+
+#Curve 0 of 1, 25 points
+#x y type
+-5.00000 95.00000 i
+-4.58333 79.02778 i
+-4.16667 64.44444 i
+-3.75000 51.25000 i
+-3.33333 39.44444 i
+-2.91667 29.02778 i
+-2.50000 20.00000 i
+-2.08333 12.36111 i
+-1.66667 6.11111 i
+-1.25000 1.25000 i
+-0.83333 -2.22222 i
+-0.41667 -4.30556 i
+0.00000 -5.00000 i
+0.41667 -4.30556 i
+0.83333 -2.22222 i
+1.25000 1.25000 i
+1.66667 6.11111 i
+2.08333 12.36111 i
+2.50000 20.00000 i
+2.91667 29.02778 i
+3.33333 39.44444 i
+3.75000 51.25000 i
+4.16667 64.44444 i
+4.58333 79.02778 i
+5.00000 95.00000 i
+
diff --git a/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.plottypes.tex b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.plottypes.tex
new file mode 100644
index 00000000000..7198e85dea2
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.plottypes.tex
@@ -0,0 +1,219 @@
+\testfile{pgfplotstest.plottypes.tex}
+\testsection{Stacked plots}
+%\pgfplotsset{every axis/.append style={reverse stacked plots=false}}
+\testsubsection{stack y, sharp plot}
+\begin{tikzpicture}
+%\tracingmacros=2\tracingcommands=2
+ \begin{axis}[stack plots=y,
+ legend style={at={(0.03,0.97)},anchor=north west}
+ ]
+ \addplot coordinates {(0,0) (1,1) (2,1) (3,2)};
+ \addplot coordinates {(0,0) (1,1) (2,1) (3,2)};
+ \addplot coordinates {(0,0) (1,1) (2,1) (3,2)};
+ \legend{1,2,3}%
+ \end{axis}
+%\tracingmacros=0\tracingcommands=0
+\end{tikzpicture}
+
+\testsubsubsection{with closedcycle}
+\begingroup
+\def\example#1{%
+\begin{tikzpicture}
+ \begin{axis}[stack plots=y,
+ legend style={at={(0.03,0.97)},anchor=north west}
+ ]
+ \addplot+[#1] coordinates {(0,0) (1,1) (2,1) (3,2)} \closedcycle;
+ \addplot+[#1] coordinates {(0,0) (1,1) (2,1) (3,2)} \closedcycle;
+ \addplot+[#1] coordinates {(0,0) (1,1) (2,1) (3,2)} \closedcycle;
+ \legend{1,2,3}%
+ \end{axis}
+\end{tikzpicture}
+}
+
+\example{}
+
+\example{fill}
+\endgroup
+
+\testsubsubsection{with closedcycle and const plots}
+\begingroup
+\def\example#1{%
+\begin{tikzpicture}[#1]
+ \begin{axis}[stack plots=y,
+ legend style={at={(0.03,0.97)},anchor=north west}
+ ]
+ \addplot+[fill] coordinates {(0,0.5) (1,1) (2,1) (3,2) (4,2)} \closedcycle;
+ \addplot+[fill] coordinates {(0,0.5) (1,1) (2,1) (3,2) (4,2)} \closedcycle;
+ \addplot+[fill] coordinates {(0,0.5) (1,1) (2,1) (3,2) (4,2)} \closedcycle;
+ \legend{1,2,3}%
+ \end{axis}
+\end{tikzpicture}
+}
+
+\example{const plot mark left}
+
+\example{const plot mark right}
+\endgroup
+
+\testsubsection{stack y, ybar}
+\begin{tikzpicture}
+ \begin{axis}[
+ ybar stacked,
+ legend style={at={(0.03,0.97)},anchor=north west},
+ ]
+ \addplot coordinates {(0,0) (1,1) (2,1) (3,2)};
+ \addplot coordinates {(0,0) (1,1) (2,1) (3,2)};
+ \addplot coordinates {(0,0) (1,1) (2,1) (3,2)};
+ \legend{1,2,3}%
+ \end{axis}
+\end{tikzpicture}
+
+\testsubsection{stack y, ybar, minus}
+\begin{tikzpicture}
+ \begin{axis}[
+ ybar stacked=minus,
+ ]
+ \addplot coordinates {(0,0) (1,1) (2,1) (3,2)};
+ \addplot coordinates {(0,0) (1,1) (2,1) (3,2)};
+ \addplot coordinates {(0,0) (1,1) (2,1) (3,2)};
+ \legend{1,2,3}%
+ \end{axis}
+\end{tikzpicture}
+
+\testsubsection{stack x, sharp plot [not useful]}
+\begin{tikzpicture}
+%\tracingmacros=2\tracingcommands=2
+ \begin{axis}[stack plots=x,
+ legend style={at={(0.97,0.03)},anchor=south east},
+ xtick={0,...,30},
+ ]
+ \addplot coordinates {(2,0) (1,1) (1,2) (3,3)};
+ \addplot coordinates {(2,0) (1,1) (1,2) (3,3)};
+ \addplot coordinates {(2,0) (1,1) (1,2) (3,3)};
+ \legend{1,2,3}%
+ \end{axis}
+%\tracingmacros=0\tracingcommands=0
+\end{tikzpicture}
+
+\testsubsection{stack x, xbar}
+\begin{tikzpicture}
+ \begin{axis}[
+ xbar stacked,
+ xtick={0,...,30},
+ legend style={at={(0.97,0.03)},anchor=south east},
+ ]
+ \addplot coordinates {(2,0) (1,1) (1,2) (3,3)};
+ \addplot coordinates {(2,0) (1,1) (1,2) (3,3)};
+ \addplot coordinates {(2,0) (1,1) (1,2) (3,3)};
+ \legend{1,2,3}%
+ \end{axis}
+\end{tikzpicture}
+
+\testsubsection{stack x, xbar, minus}
+\begin{tikzpicture}
+ \begin{axis}[xbar stacked=minus]
+ \addplot coordinates {(2,0) (1,1) (1,2) (3,3)};
+ \addplot coordinates {(2,0) (1,1) (1,2) (3,3)};
+ \addplot coordinates {(2,0) (1,1) (1,2) (3,3)};
+ \legend{1,2,3}%
+ \end{axis}
+\end{tikzpicture}
+
+\testsection{Bar diagrams}
+{
+\begin{tikzpicture}
+ \begin{axis}[
+ %xmin=1925,xmax=1975,disabledatascaling=false,
+ %xtick={1930,1940,1950,1960,1970},
+ x tick label style={/pgf/number format/set thousands separator=},
+ ylabel=Population,
+ enlargelimits=0.15,
+ legend style={at={(0.5,-0.1)},anchor=north,legend columns=-1},
+ ybar,
+ ]
+%\tracingmacros=2\tracingcommands=2
+ \addplot[draw=blue,mark=none,fill=blue!80!black]
+ plot coordinates {(1930,50e6) (1940,33e6) (1950,40e6) (1960,50e6) (1970,70e6)};
+ \addlegendentry{FarFarAway}
+
+ \addplot[mark=none,red,fill=red!80!black]
+ plot coordinates {(1930,38e6) (1940,42e6) (1950,43e6) (1960,45e6) (1970,65e6)};
+ \addlegendentry{NotSoFar}
+
+ \addplot[mark=none,brown,fill=brown!80!black]
+ plot coordinates {(1930,15e6) (1940,12e6) (1950,13e6) (1960,25e6) (1970,35e6)};
+ \addlegendentry{Near}
+ \end{axis}
+\end{tikzpicture}
+
+\testsubsection{Interval bar handlers}
+\begin{tikzpicture}
+ \begin{axis}[
+ x tick label style={/pgf/number format/set thousands separator=},
+ ylabel=Population,
+ enlargelimits=0.05,
+ legend style={at={(0.5,-0.1)},anchor=north,legend columns=-1},
+ ybar interval=0.7,
+ ]
+ \addplot[draw=blue,mark=none,fill=blue!80!black]
+ plot coordinates {(1930,50e6) (1940,33e6) (1950,40e6) (1960,50e6) (1970,70e6) (1980,70e6)};
+ \addlegendentry{FarFarAway}
+
+ \addplot[mark=none,red,fill=red!80!black]
+ plot coordinates {(1930,38e6) (1940,42e6) (1950,43e6) (1960,45e6) (1970,65e6) (1980,70e6)};
+ \addlegendentry{NotSoFar}
+
+ \addplot[mark=none,brown,fill=brown!80!black]
+ plot coordinates {(1930,15e6) (1940,12e6) (1950,13e6) (1960,25e6) (1970,35e6) (1980,70e6)};
+ \addlegendentry{Near}
+ \end{axis}
+\end{tikzpicture}
+
+\begin{tikzpicture}
+ \begin{axis}[
+ xmin=0,xmax=53,
+ ylabel=Age,
+ xlabel=Quantity,
+ y label style={yshift=0.7cm},
+ enlargelimits=false,
+ ytick={5,10,13,18,21,25,30,50,70},
+ yticklabel={$\pgfmathprintnumber{\tick}$ -- $\pgfmathprintnumber{\nexttick}$},
+ xbar interval,
+ ]
+ \addplot[draw=blue,mark=none,fill=blue!80!black]
+ plot coordinates {(10,5) (10.5,10) (15,13) (24,18) (50,21) (23,25) (10,30) (3,50) (3,70)};
+ \end{axis}
+\end{tikzpicture}
+
+
+\testsection{const plot}
+\begin{tikzpicture}
+ \begin{axis}
+ \addplot+[const plot]
+ coordinates {(0,0.1) (0.1,0.2) (0.2,0.2) (0.3,0.5) (0.4,0.45) (0.5,1) (0.6,1) (0.7,0.1) (0.8,0.15) (0.9,0.2) (1,0.2)};
+ \end{axis}
+\end{tikzpicture}
+
+\testsection{const plot mark right}
+\begin{tikzpicture}
+ \begin{axis}
+ \addplot+[const plot mark right]
+ coordinates {(0,0.1) (0.1,0.2) (0.2,0.2) (0.3,0.5) (0.4,0.45) (0.5,1) (0.6,1) (0.7,0.1) (0.8,0.15) (0.9,0.2) (1,0.2)};
+ \end{axis}
+\end{tikzpicture}
+
+\testsection{jump mark right}
+\begin{tikzpicture}
+ \begin{axis}
+ \addplot+[jump mark right]
+ coordinates {(0,0.1) (0.1,0.2) (0.2,0.2) (0.3,0.5) (0.4,0.45) (0.5,1) (0.6,1) (0.7,0.1) (0.8,0.15) (0.9,0.2) (1,0.2)};
+ \end{axis}
+\end{tikzpicture}
+
+\testsection{jump mark left}
+\begin{tikzpicture}
+ \begin{axis}
+ \addplot+[jump mark left]
+ coordinates {(0,0.1) (0.1,0.2) (0.2,0.2) (0.3,0.5) (0.4,0.45) (0.5,1) (0.6,1) (0.7,0.1) (0.8,0.15) (0.9,0.2) (1,0.2)};
+ \end{axis}
+\end{tikzpicture}
diff --git a/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.scaling.tex b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.scaling.tex
new file mode 100644
index 00000000000..d52d8024dab
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.scaling.tex
@@ -0,0 +1,478 @@
+\testfile{pgfplotstest.scaling.tex}
+\testsection{Standard placement normal plot}
+\begin{tikzpicture}
+\begin{axis}
+\smallplotstest
+\end{axis}
+\end{tikzpicture}
+
+
+\testsection{Scaling tests}
+\testsubsection{width=5cm}
+\begin{tikzpicture}
+\begin{axis}[width=5cm]
+\smallplotstest
+\end{axis}
+\end{tikzpicture}
+
+\testsubsection{width=linewidth}
+\begin{tikzpicture}
+\begin{axis}[width=\linewidth]
+\smallplotstest
+\end{axis}
+\end{tikzpicture}
+
+\testsubsection{width=linewidth, height=textheight}
+\begin{tikzpicture}
+\begin{axis}[height=\textheight,width=\linewidth]
+\smallplotstest
+\end{axis}
+\end{tikzpicture}
+
+\testsubsection{height=3cm}
+\begin{tikzpicture}
+\begin{axis}[height=3cm]
+\smallplotstest
+\end{axis}
+\end{tikzpicture}
+
+\testsubsection{x=3cm}
+\hrule width3cm height1pt
+\vskip10pt
+\begin{tikzpicture}[baseline]
+\begin{axis}[x=3cm]
+\smallplotstest
+\end{axis}
+\end{tikzpicture}
+
+\testsubsection{x=3cm, y=4cm}
+\hrule width3cm height1pt
+\noindent
+\vrule height4cm width1pt
+\hskip10pt
+\begin{tikzpicture}[baseline]
+\begin{axis}[x=3cm,y=4cm]
+\smallplotstest
+\end{axis}
+\end{tikzpicture}
+
+\testsubsection{y=3cm}
+\noindent
+\vrule height3cm width1pt
+\hskip10pt
+\begin{tikzpicture}[baseline]
+\begin{axis}[y=3cm]
+\smallplotstest
+\end{axis}
+\end{tikzpicture}
+
+\testsubsection{Scale vs. Datascale trafo}
+All should have the same size; especially the same height.
+This tests the data scale transformation and rounding inaccuracies during the computation of $x$~and~$y$ unit vectors,
+\[ x = \frac{W}{T(\bar x) - T(\underline x)}. \]
+The larger $x$, the higher the scaling accuracy. Large $x$ means small $T(\bar x) - T(\underline x)$ (relative to width~$W$). But this implies low accuracy for the input data! And nobody wants inaccurate plots.
+
+The datascale transformation~$T$ is set up such that $O(W) = O(x)$, but I am not sure if I need to adjust some parameters. Some parameters lead to inaccurate~$x$ and~$y$ vectors, such that axis sizes are \emph{not} the same although $W$~and~$H$ (width and height) are the same.
+
+\noindent
+{\pgfplotsset{every picture/.append style={baseline}}
+\pgfplotsset{every axis/.append style={width=3cm,scale only axis,ytick=\empty,cycle list=blue}}%
+\def\TESTPLOTS{%
+\begin{tikzpicture}%
+\begin{axis}
+\addplot plot coordinates {
+ (0.000000, 0.113142)
+ (0.062500, 0.114457)
+ (0.125000, 0.115773)
+ (0.187500, 0.117088)
+ (0.250000, 0.118404)
+ (0.312500, 0.119719)
+ (0.375000, 0.121035)
+ (0.437500, 0.122350)
+ (0.500000, 0.123666)
+ (0.562500, 0.124981)
+ (0.625000, 0.126297)
+ (0.687500, 0.127612)
+ (0.750000, 0.128928)
+ (0.812500, 0.130243)
+ (0.875000, 0.131559)
+ (0.937500, 0.132874)
+ (1.000000, 0.134190)
+};
+\end{axis}
+\end{tikzpicture}%
+\begin{tikzpicture}%
+\begin{axis}
+\addplot plot coordinates {
+ (0.000000, 0.192392)
+ (0.020408, 0.551660)
+ (0.040816, 0.816371)
+ (0.061224, 0.957528)
+ (0.081633, 0.936301)
+ (0.102041, 0.784097)
+ (0.122449, 0.539922)
+ (0.142857, 0.257432)
+ (0.163265, -0.039651)
+ (0.183673, -0.313379)
+ (0.204082, -0.533386)
+ (0.224490, -0.712582)
+ (0.244898, -0.856655)
+ (0.265306, -0.932880)
+ (0.285714, -0.953862)
+ (0.306122, -0.957749)
+ (0.326531, -0.890993)
+ (0.346939, -0.774152)
+ (0.367347, -0.602360)
+ (0.387755, -0.396801)
+ (0.408163, -0.132261)
+ (0.428571, 0.161664)
+ (0.448980, 0.460018)
+ (0.469388, 0.720198)
+ (0.489796, 0.880398)
+ (0.510204, 0.967384)
+ (0.530612, 0.900632)
+ (0.551020, 0.729232)
+ (0.571429, 0.460479)
+ (0.591837, 0.155311)
+ (0.612245, -0.153827)
+ (0.632653, -0.430787)
+ (0.653061, -0.653561)
+ (0.673469, -0.819444)
+ (0.693878, -0.931060)
+ (0.714286, -0.984394)
+ (0.734694, -0.981970)
+ (0.755102, -0.940272)
+ (0.775510, -0.825804)
+ (0.795918, -0.664138)
+ (0.816327, -0.465371)
+ (0.836735, -0.219185)
+ (0.857143, 0.070697)
+ (0.877551, 0.377456)
+ (0.897959, 0.658660)
+ (0.918367, 0.853564)
+ (0.938776, 0.925472)
+ (0.959184, 0.868936)
+ (0.979592, 0.629528)
+ (1.000000, 0.228732)
+};
+\end{axis}
+\end{tikzpicture}%
+\begin{tikzpicture}%
+\begin{axis}
+
+\addplot plot coordinates {
+ (0.000000, 0.112104)
+ (0.062500, 0.098029)
+ (0.125000, 0.083954)
+ (0.187500, 0.069879)
+ (0.250000, 0.055804)
+ (0.312500, 0.041729)
+ (0.375000, 0.027654)
+ (0.437500, 0.013579)
+ (0.500000, -0.000496)
+ (0.562500, -0.014571)
+ (0.625000, -0.028646)
+ (0.687500, -0.042722)
+ (0.750000, -0.056797)
+ (0.812500, -0.070872)
+ (0.875000, -0.084947)
+ (0.937500, -0.099022)
+ (1.000000, -0.113097)
+};
+\end{axis}
+\end{tikzpicture}%
+\begin{tikzpicture}%
+\begin{axis}
+\addplot plot coordinates {
+ (0.000000, -0.963159)
+ (0.020408, -0.781664)
+ (0.040816, -0.488585)
+ (0.061224, -0.137738)
+ (0.081633, 0.234861)
+ (0.102041, 0.556489)
+ (0.122449, 0.791942)
+ (0.142857, 0.941856)
+ (0.163265, 0.977486)
+ (0.183673, 0.930499)
+ (0.204082, 0.809581)
+ (0.224490, 0.653308)
+ (0.244898, 0.474588)
+ (0.265306, 0.268631)
+ (0.285714, 0.048692)
+ (0.306122, -0.168568)
+ (0.326531, -0.380963)
+ (0.346939, -0.577633)
+ (0.367347, -0.751043)
+ (0.387755, -0.893755)
+ (0.408163, -0.960465)
+ (0.428571, -0.932380)
+ (0.448980, -0.841830)
+ (0.469388, -0.650880)
+ (0.489796, -0.346509)
+ (0.510204, -0.007265)
+ (0.530612, 0.329744)
+ (0.551020, 0.621489)
+ (0.571429, 0.826905)
+ (0.591837, 0.947602)
+ (0.612245, 0.956706)
+ (0.632653, 0.872426)
+ (0.653061, 0.724325)
+ (0.673469, 0.528915)
+ (0.693878, 0.310032)
+ (0.714286, 0.081807)
+ (0.734694, -0.143046)
+ (0.755102, -0.363063)
+ (0.775510, -0.559141)
+ (0.795918, -0.733031)
+ (0.816327, -0.880063)
+ (0.836735, -0.959350)
+ (0.857143, -0.968957)
+ (0.877551, -0.885145)
+ (0.897959, -0.702171)
+ (0.918367, -0.410704)
+ (0.938776, -0.035900)
+ (0.959184, 0.359062)
+ (0.979592, 0.719407)
+ (1.000000, 0.940563)
+};
+\end{axis}
+\end{tikzpicture}%
+}%
+\TESTPLOTS
+
+once more again without `scale only axis':
+\pgfplotsset{every axis/.append style={scale only axis=false}}%
+
+\TESTPLOTS
+}
+
+\testsubsection{Testing numeric artefacts around tick position `0'}
+{\pgfplotsset{every axis/.append style={scaled ticks=false}}
+[scaled ticks=false] in this subsection
+
+\begin{tikzpicture}
+\begin{axis}
+ \addplot coordinates {
+ (-4.5,-8)
+ (16,12)
+ };
+\end{axis}
+\end{tikzpicture}
+
+\begin{tikzpicture}
+\begin{axis}
+ \addplot coordinates {
+ (-0.7,-8)
+ (1.3,12)
+ };
+\end{axis}
+\end{tikzpicture}
+
+\begin{tikzpicture}
+\begin{axis}
+ \addplot coordinates {
+ (-7000,-0.0008)
+ (13000,0.0012)
+ };
+\end{axis}
+\end{tikzpicture}
+}
+
+\testsection{Scaling log plots}
+\hrule
+\nobreak
+\vskip10pt
+\nobreak
+\noindent
+\begin{tikzpicture}
+\begin{loglogaxis}[width=\linewidth]
+\loglogtestplot
+\end{loglogaxis}
+\end{tikzpicture}
+
+\begin{tikzpicture}
+\begin{loglogaxis}[width=\linewidth,height=\textheight]
+\loglogtestplot
+\end{loglogaxis}
+\end{tikzpicture}
+
+\begin{tikzpicture}
+\begin{loglogaxis}[height=5.5cm]
+\loglogtestplot
+\end{loglogaxis}
+\end{tikzpicture}
+
+\testsection{Scaletest}
+
+{
+\pgfplotsset{every axis/.append style={cycle list={%
+ red,only marks,mark options={fill=red!80!black},mark=*\\%
+ black,only marks,mark options={fill=black},mark=square*\\%
+ }}}
+\begin{tikzpicture}
+\begin{axis}[%
+ width=8cm,
+ height=2cm,
+ xtick=\empty,
+ ytick=\empty
+]
+
+\addplot plot coordinates {
+ (0.968555, 0.000000)
+ (0.984277, 0.000000)
+ (0.030884, 0.000000)
+ (0.250000, 0.000000)
+ (0.750000, 0.000000)
+ (0.468750, 0.000000)
+ (0.750000, 0.000000)
+ (0.484375, 0.000000)
+ (0.968555, 0.000000)
+ (0.968555, 0.000000)
+ (1.000000, 0.000000)
+ (1.000000, 0.000000)
+ (0.030176, 0.000000)
+ (0.250000, 0.000000)
+ (0.250000, 0.000000)
+ (0.250000, 0.000000)
+ (0.750000, 0.000000)
+ (1.000000, 0.000000)
+ (0.500000, 0.000000)
+ (0.500000, 0.000000)
+ (0.234375, 0.000000)
+ (0.500000, 0.000000)
+ (0.750000, 0.000000)
+ (0.000000, 0.000000)
+ (0.750000, 0.000000)
+ (0.468750, 0.000000)
+ (0.500000, 0.000000)
+ (0.000000, 0.000000)
+ (0.468750, 0.000000)
+ (0.000000, 0.000000)
+ (0.750000, 0.000000)
+ (0.000000, 0.000000)
+ (0.234375, 0.000000)
+ (1.000000, 0.000000)
+};
+\addplot plot coordinates {
+ (0.367188, 0.000000)
+ (0.625000, 0.000000)
+ (0.312500, 0.000000)
+ (0.656250, 0.000000)
+ (0.312500, 0.000000)
+ (0.148438, 0.000000)
+ (0.125000, 0.000000)
+ (0.640625, 0.000000)
+ (0.136719, 0.000000)
+ (0.875000, 0.000000)
+ (0.390625, 0.000000)
+ (0.828125, 0.000000)
+ (0.875000, 0.000000)
+ (0.656250, 0.000000)
+ (0.125000, 0.000000)
+ (0.343750, 0.000000)
+ (0.861328, 0.000000)
+ (0.312500, 0.000000)
+ (0.578125, 0.000000)
+ (0.578125, 0.000000)
+ (0.625000, 0.000000)
+ (0.375000, 0.000000)
+ (0.875000, 0.000000)
+ (0.812500, 0.000000)
+ (0.847656, 0.000000)
+ (0.589844, 0.000000)
+ (0.343750, 0.000000)
+ (0.125000, 0.000000)
+ (0.875000, 0.000000)
+ (0.125000, 0.000000)
+ (0.609375, 0.000000)
+ (0.156250, 0.000000)
+};
+\end{axis}
+\end{tikzpicture}
+}
+
+\testsection{Scaling test for very small or very large x values}
+{
+\testsubsection{1e-2}
+\begin{tikzpicture}
+\begin{axis}
+ \addplot plot coordinates {
+ (0.005,1)
+ (0.01,2)
+ (0.02,4)
+ };
+\end{axis}
+\end{tikzpicture}
+
+\testsubsection{1e+2}
+% \tracingmacros=2\tracingcommands=2
+\begin{tikzpicture}
+\begin{axis}
+ \addplot plot coordinates {
+ (50,1)
+ (100,2)
+ (200,4)
+ };
+\end{axis}
+\end{tikzpicture}
+% \tracingmacros=0\tracingcommands=0
+
+\testsubsection{x=1e+11; y=1e-6}
+{
+%\pgfplotsset{every x tick label/.append style={font=\Huge}}
+%\pgfplotsset{every x tick scale label/.append style={anchor=base}}
+\begin{tikzpicture}
+\begin{axis}
+ \addplot plot coordinates {
+ (5e10,1e-6)
+ (1e11,2e-6)
+ (2e11,4e-6)
+ };
+\end{axis}
+\end{tikzpicture}
+}
+
+\testsubsection{1e+1}
+\begin{tikzpicture}
+\begin{axis}
+ \addplot plot coordinates {
+ (5,1)
+ (10,2)
+ (20,4)
+ };
+\end{axis}
+\end{tikzpicture}
+
+\testsubsection{1e+3}
+\begin{tikzpicture}
+\begin{axis}
+ \addplot plot coordinates {
+ (0.5,1e3)
+ (10,2e3)
+ (200,4e3)
+ };
+\end{axis}
+\end{tikzpicture}
+
+\testsubsection{1e+4}
+\begin{tikzpicture}
+\begin{axis}
+ \addplot plot coordinates {
+ (0.1,2e4)
+ (0.2,4e4)
+ (0.5,1e4)
+ };
+\end{axis}
+\end{tikzpicture}
+
+\testsubsection{1e-2, 1e+4}
+\begin{tikzpicture}
+\begin{axis}
+ \addplot plot coordinates {
+ (0.01,2e4)
+ (0.02,4e4)
+ (0.05,1e4)
+ };
+\end{axis}
+\end{tikzpicture}
+}
diff --git a/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.sinneg.gnuplot b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.sinneg.gnuplot
new file mode 100644
index 00000000000..d892082391d
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.sinneg.gnuplot
@@ -0,0 +1,2 @@
+set terminal table; set output "pgfplotstest.sinneg.table"; set format "%.5f"
+set format "\%.7e"; set samples 40; plot [x=-5:5] sin(x)
diff --git a/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.sinneg.table b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.sinneg.table
new file mode 100644
index 00000000000..9114bbb94be
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.sinneg.table
@@ -0,0 +1,44 @@
+
+#Curve 0 of 1, 40 points
+#x y type
+-5.0000000e+00 9.5892427e-01 i
+-4.7435897e+00 9.9951330e-01 i
+-4.4871795e+00 9.7474735e-01 i
+-4.2307692e+00 8.8624579e-01 i
+-3.9743590e+00 7.3979547e-01 i
+-3.7179487e+00 5.4497229e-01 i
+-3.4615385e+00 3.1451512e-01 i
+-3.2051282e+00 6.3492814e-02 i
+-2.9487179e+00 -1.9168108e-01 i
+-2.6923077e+00 -4.3432157e-01 i
+-2.4358974e+00 -6.4856316e-01 i
+-2.1794872e+00 -8.2039728e-01 i
+-1.9230769e+00 -9.3858826e-01 i
+-1.6666667e+00 -9.9540796e-01 i
+-1.4102564e+00 -9.8714112e-01 i
+-1.1538462e+00 -9.1432829e-01 i
+-8.9743590e-01 -7.8173046e-01 i
+-6.4102564e-01 -5.9801779e-01 i
+-3.8461538e-01 -3.7520265e-01 i
+-1.2820513e-01 -1.2785421e-01 i
+1.2820513e-01 1.2785421e-01 i
+3.8461538e-01 3.7520265e-01 i
+6.4102564e-01 5.9801779e-01 i
+8.9743590e-01 7.8173046e-01 i
+1.1538462e+00 9.1432829e-01 i
+1.4102564e+00 9.8714112e-01 i
+1.6666667e+00 9.9540796e-01 i
+1.9230769e+00 9.3858826e-01 i
+2.1794872e+00 8.2039728e-01 i
+2.4358974e+00 6.4856316e-01 i
+2.6923077e+00 4.3432157e-01 i
+2.9487179e+00 1.9168108e-01 i
+3.2051282e+00 -6.3492814e-02 i
+3.4615385e+00 -3.1451512e-01 i
+3.7179487e+00 -5.4497229e-01 i
+3.9743590e+00 -7.3979547e-01 i
+4.2307692e+00 -8.8624579e-01 i
+4.4871795e+00 -9.7474735e-01 i
+4.7435897e+00 -9.9951330e-01 i
+5.0000000e+00 -9.5892427e-01 i
+
diff --git a/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.styledplot.gnuplot b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.styledplot.gnuplot
new file mode 100644
index 00000000000..4111f8a51c0
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.styledplot.gnuplot
@@ -0,0 +1,2 @@
+set terminal table; set output "pgfplotstest.styledplot.table"; set format "%.5f"
+set format "\%.7e"; set samples 25; plot [x=-5:5] (40*x**2 - 5*x +3)/2000
diff --git a/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.styledplot.table b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.styledplot.table
new file mode 100644
index 00000000000..09a6e32bac9
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.styledplot.table
@@ -0,0 +1,29 @@
+
+#Curve 0 of 1, 25 points
+#x y type
+-5.00000 0.51400 i
+-4.58333 0.43310 i
+-4.16667 0.35914 i
+-3.75000 0.29213 i
+-3.33333 0.23206 i
+-2.91667 0.17893 i
+-2.50000 0.13275 i
+-2.08333 0.09351 i
+-1.66667 0.06122 i
+-1.25000 0.03587 i
+-0.83333 0.01747 i
+-0.41667 0.00601 i
+0.00000 0.00150 i
+0.41667 0.00393 i
+0.83333 0.01331 i
+1.25000 0.02962 i
+1.66667 0.05289 i
+2.08333 0.08310 i
+2.50000 0.12025 i
+2.91667 0.16435 i
+3.33333 0.21539 i
+3.75000 0.27337 i
+4.16667 0.33831 i
+4.58333 0.41018 i
+5.00000 0.48900 i
+
diff --git a/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.styledplot2.gnuplot b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.styledplot2.gnuplot
new file mode 100644
index 00000000000..0d28a61916f
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.styledplot2.gnuplot
@@ -0,0 +1,2 @@
+set terminal table; set output "pgfplotstest.styledplot2.table"; set format "%.5f"
+set format "\%.7e"; set samples 25; plot [x=-5:5] (x**5 - 3)/2000
diff --git a/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.styledplot2.table b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.styledplot2.table
new file mode 100644
index 00000000000..2ccfd17f9fe
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.styledplot2.table
@@ -0,0 +1,29 @@
+
+#Curve 0 of 1, 25 points
+#x y type
+-5.00000 -1.56400 i
+-4.58333 -1.01279 i
+-4.16667 -0.62943 i
+-3.75000 -0.37229 i
+-3.33333 -0.20726 i
+-2.91667 -0.10704 i
+-2.50000 -0.05033 i
+-2.08333 -0.02112 i
+-1.66667 -0.00793 i
+-1.25000 -0.00303 i
+-0.83333 -0.00170 i
+-0.41667 -0.00151 i
+0.00000 -0.00150 i
+0.41667 -0.00149 i
+0.83333 -0.00130 i
+1.25000 0.00003 i
+1.66667 0.00493 i
+2.08333 0.01812 i
+2.50000 0.04733 i
+2.91667 0.10404 i
+3.33333 0.20426 i
+3.75000 0.36929 i
+4.16667 0.62643 i
+4.58333 1.00979 i
+5.00000 1.56100 i
+
diff --git a/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.styles.tex b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.styles.tex
new file mode 100644
index 00000000000..164ce85dc08
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.styles.tex
@@ -0,0 +1,135 @@
+\testfile{pgfplotstest.styles.tex}
+\testsection{Style--tests}
+\testsubsection{Limits in `every axis'; `cycle list' option and `cycle list name' option}
+{
+%\tracingmacros=2\tracingcommands=2
+\pgfplotsset{every linear axis/.append style={xmin=-3,xmax=3}}
+\pgfplotsset{every linear axis/.append style={cycle list name={\blackwhiteplotspeclist}}}
+\pgfplotsset{every loglog axis/.append style={cycle list={green\\yellow\\}}}
+\begin{tikzpicture}
+ \begin{axis}
+ \smallplotstest
+ \end{axis}
+\end{tikzpicture}
+
+\testsubsection{testing `every loglog axis' style}
+\begin{tikzpicture}
+ \begin{loglogaxis}
+ \loglogtestplot
+ \end{loglogaxis}
+\end{tikzpicture}
+}
+
+\testsubsection{Using several `every ...' styles}
+{
+\pgfplotsset{every axis/.append style={ylabel={$L_2$ Error},line width=1pt,mark=*}}
+\pgfplotsset{every axis x label/.append style={name=my x label}}
+\pgfplotsset{every axis legend/.append style={legend columns=2}}
+\pgfplotsset{every loglog axis/.append style={xmin=1e2,xmax=1e4}}
+\begin{tikzpicture}
+ \begin{loglogaxis}[xlabel={A -- quite long -- $x$ label}]
+ \loglogtestplot
+ \end{loglogaxis}
+ \fill[red] (my x label.south east) circle(0.3cm);
+\end{tikzpicture}
+}
+
+\testsubsection{Using the `style=' option}
+{
+\pgfkeys{/pgfplots/my personal axis/.style={ylabel=Mine!,cycle list name=\blackwhiteplotspeclist,title=My personal title,title style={font=\Huge}}}
+\begin{tikzpicture}
+ \begin{loglogaxis}[my personal axis]
+ \loglogtestplot
+ \end{loglogaxis}
+\end{tikzpicture}
+}
+
+\testsubsection{legend style, grid style, x label style etc. options}
+{
+\pgfplotsset{every loglog axis/.append style={legend style={legend columns=2,draw=yellow}}}
+\pgfplotsset{every axis/.append style={grid style={grid=major}}}
+\pgfplotsset{every axis/.append style={x label style={xlabel=Dof,font=\bfseries\Huge},x tick label style={font=\large}}}
+\begin{tikzpicture}
+ \begin{loglogaxis}
+ \loglogtestplot
+ \end{loglogaxis}
+\end{tikzpicture}
+
+\testsubsection{Providing TikZ-options to either tikzpicture or axis}
+\begin{tikzpicture}[color=blue]
+ \begin{loglogaxis}
+ \loglogtestplot
+ \end{loglogaxis}
+\end{tikzpicture}
+
+\begin{tikzpicture}
+ \begin{loglogaxis}[/tikz/color=blue]
+ \loglogtestplot
+ \end{loglogaxis}
+\end{tikzpicture}
+}
+
+\testsubsection{Collecting many options together}
+\begin{tikzpicture}
+ \begin{axis}[
+ legend style={legend columns=2},
+ grid style={draw=brown},
+ grid=major,
+ max space between ticks=25,
+ name=a styled plot,
+ y tick label style={/pgf/number format/fixed zerofill,/pgf/number format/use comma,/pgf/number format/precision=3},
+ tick label style={/pgf/number format/sci,/pgf/number format/sci e,font=\footnotesize},
+ ]
+
+ \addplot plot[id=styledplot] function{(40*x**2 - 5*x +3)/2000};
+ \addlegendentry{$\frac{1}{2000}(40x^2 - 5x +3)$}
+
+ \addplot plot[id=styledplot2] function{(x**5 - 3)/2000};
+ \addlegendentry{$\frac{1}{2000}(x^5 - 3)$}
+
+ \end{axis}
+\end{tikzpicture}
+
+\testsubsubsection{Putting the same options into a style...}
+{\pgfkeys{/pgfplots/my style/.style={
+ legend style={legend columns=2},
+ grid style={draw=brown},
+ grid=major,
+ max space between ticks=25,
+ name=a styled plot,
+ y tick label style={/pgf/number format/fixed zerofill,/pgf/number format/use comma,/pgf/number format/precision=3},
+ tick label style={/pgf/number format/sci,/pgf/number format/sci e,font=\footnotesize},
+ }
+}%
+\begin{tikzpicture}
+ \begin{axis}[my style]
+
+ \addplot plot[id=styledplot] function{(40*x**2 - 5*x +3)/2000};
+ \addlegendentry{$\frac{1}{2000}(40x^2 - 5x +3)$}
+
+ \addplot plot[id=styledplot2] function{(x**5 - 3)/2000};
+ \addlegendentry{$\frac{1}{2000}(x^5 - 3)$}
+
+ \end{axis}
+\end{tikzpicture}
+
+\testsubsection{Line width}
+\testsubsubsection{2pt global}
+{
+\tikzset{every picture/.style={line width=2pt}}
+\begin{tikzpicture}
+ \begin{axis}[grid =major]
+ \addplot coordinates {(0,0) (4,4)};
+ \end{axis}
+\end{tikzpicture}
+}
+
+\testsubsubsection{2pt in every axis}
+{
+\pgfplotsset{every axis/.append style={line width=2pt}}
+\begin{tikzpicture}
+ \begin{axis}[grid =major]
+ \addplot coordinates {(0,0) (4,4)};
+ \end{axis}
+\end{tikzpicture}
+}
diff --git a/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.tex b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.tex
new file mode 100644
index 00000000000..2d5ca9f0dac
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.tex
@@ -0,0 +1,182 @@
+\documentclass[a4paper,twocolumn]{report}
+\usepackage[intlimits]{amsmath}
+\usepackage{amssymb}
+\usepackage{amsfonts}
+\usepackage{listings}
+\usepackage{courier}
+\usepackage{rotating}
+\lstset{%
+ basicstyle=\ttfamily,
+ language=[LaTeX]tex, % Seems as if \lstset{language=tex} must be invoked BEFORE loading tikz!?
+ tabsize=4,
+ breaklines=true,
+ breakindent=0pt
+}
+
+\usepackage{ifpdf}
+\ifpdf
+ \usepackage[pdftex]{hyperref}
+ \pdfinfo {
+ /Author (Christian Feuersaenger)
+ }
+ \usepackage[a4paper,noheadfoot,pdftex,left=0.8cm,right=1cm,top=0.8cm,bottom=0.8cm]{geometry}
+
+\else
+ \usepackage[a4paper,noheadfoot,dvipdfm,left=0.8cm,right=1cm,top=0.8cm,bottom=0.8cm]{geometry}
+ \usepackage[dvipdfm]{hyperref}
+ \def\pgfsysdriver{pgfsys-dvipdfm.def}
+\fi
+%\def\pgfsysdriver{pgfsys-pdftex.def}
+\usepackage{pgfplots}
+\usetikzlibrary{patterns}
+
+\pgfrealjobname{pgfplotstest}
+
+\def\testfile#1{\chapter{#1}}
+\def\testsection#1{\message{STARTING TEST SECTION '#1'}\section{#1}}
+\def\testsubsection#1{\message{STARTING TEST SUBSECTION '#1'}\subsection{#1}}
+\def\testsubsubsection#1{\message{STARTING TEST SUBSUBSECTION '#1'}\subsubsection{#1}}
+
+\def\smallplotstest{%
+\addplot[smooth,blue,mark=*] coordinates {
+ (-1, 1)
+ (-0.75, 0.5625)
+ (-0.5, 0.25)
+ (-0.25, 0.0625)
+ (0, 0)
+ (0.25, 0.0625)
+ (0.5, 0.25)
+ (0.75, 0.5625)
+ (1, 1)
+};
+}
+
+\def\loglogtestplot{
+\addplot plot coordinates {
+ (5, 8.311600e-02)
+ (17, 2.546856e-02)
+ (49, 7.407153e-03)
+ (129, 2.101922e-03)
+ (321, 5.873530e-04)
+ (769, 1.622699e-04)
+ (1793, 4.442489e-05)
+ (4097, 1.207141e-05)
+ (9217, 3.261015e-06)
+};
+\addlegendentry{$d=2$}
+
+\addplot plot coordinates {
+ (7, 8.471784e-02)
+ (31, 3.044093e-02)
+ (111, 1.022145e-02)
+ (351, 3.303463e-03)
+ (1023, 1.038865e-03)
+ (2815, 3.196465e-04)
+ (7423, 9.657898e-05)
+ (18943, 2.873391e-05)
+ (47103, 8.437499e-06)
+};
+\addlegendentry{$d=3$}
+}%
+
+\def\manylogplotsnolegend{%
+ \addplot plot coordinates {
+ (5, 8.312e-02)
+ (17, 2.547e-02)
+ (49, 7.407e-03)
+ (129, 2.102e-03)
+ (321, 5.874e-04)
+ (769, 1.623e-04)
+ (1793, 4.442e-05)
+ (4097, 1.207e-05)
+ (9217, 3.261e-06)
+ };
+
+ \addplot plot coordinates {
+ (7, 8.472e-02)
+ (31, 3.044e-02)
+ (111, 1.022e-02)
+ (351, 3.303e-03)
+ (1023, 1.039e-03)
+ (2815, 3.196e-04)
+ (7423, 9.658e-05)
+ (18943, 2.873e-05)
+ (47103, 8.437e-06)
+ };
+
+ \addplot plot coordinates {
+ (9, 7.881e-02)
+ (49, 3.243e-02)
+ (209, 1.232e-02)
+ (769, 4.454e-03)
+ (2561, 1.551e-03)
+ (7937, 5.236e-04)
+ (23297, 1.723e-04)
+ (65537, 5.545e-05)
+ (178177, 1.751e-05)
+ };
+
+ \addplot plot coordinates {
+ (11, 6.887e-02)
+ (71, 3.177e-02)
+ (351, 1.341e-02)
+ (1471, 5.334e-03)
+ (5503, 2.027e-03)
+ (18943, 7.415e-04)
+ (61183, 2.628e-04)
+ (187903, 9.063e-05)
+ (553983, 3.053e-05)
+ };
+
+ \addplot plot coordinates {
+ (13, 5.755e-02)
+ (97, 2.925e-02)
+ (545, 1.351e-02)
+ (2561, 5.842e-03)
+ (10625, 2.397e-03)
+ (40193, 9.414e-04)
+ (141569, 3.564e-04)
+ (471041, 1.308e-04)
+ (1496065, 4.670e-05)
+ };
+ \legend{$d=2$\\$d=3$\\$d=4$\\$d=5$\\$d=6$\\}
+}%
+
+\def\manylogplots{%
+ \manylogplotsnolegend
+ \legend{$d=2$\\$d=3$\\$d=4$\\$d=5$\\$d=6$\\}
+}%
+
+%\includeonly{pgfplotstest.axislines}
+
+\parindent=0pt
+\parskip=5pt
+
+\author{Christian Feuers\"anger}
+\title{Tests for pgfplots.sty}
+
+\begin{document}
+\maketitle
+\tableofcontents
+
+\raggedbottom
+
+\include{pgfplotstest.file}
+\include{pgfplotstest.function}
+\include{pgfplotstest.expr}
+\include{pgfplotstest.axispath}%
+\include{pgfplotstest.axislines}
+\include{pgfplotstest.scaling}
+\include{pgfplotstest.ticks}
+\include{pgfplotstest.enlargelimits}
+\include{pgfplotstest.logplotenv}
+\include{pgfplotstest.hansmeine_app}
+\include{pgfplotstest.legend}
+\include{pgfplotstest.misc}
+\include{pgfplotstest.align}
+\include{pgfplotstest.gridtick}
+\include{pgfplotstest.styles}
+\include{pgfplotstest.errorbars}%
+\include{pgfplotstest.plottypes}
+
+\end{document}
diff --git a/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.ticks.tex b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.ticks.tex
new file mode 100644
index 00000000000..e687e1055e2
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/pgfplotstest.ticks.tex
@@ -0,0 +1,296 @@
+\testfile{pgfplotstest.ticks.tex}
+\testsection{Minor ticks}
+\begin{tikzpicture}
+\begin{axis}[minor tick num=3]
+\smallplotstest
+\end{axis}
+\end{tikzpicture}
+%\endinput
+\begin{tikzpicture}
+\begin{axis}[minor tick num=1]
+\smallplotstest
+\end{axis}
+\end{tikzpicture}
+
+\begin{tikzpicture}
+\begin{axis}[minor tick num=5]
+\smallplotstest
+\end{axis}
+\end{tikzpicture}
+
+\begin{tikzpicture}
+%\tracingmacros=2\tracingcommands=2
+\begin{axis}[minor tick num=5,xtick={0.5,1,2,2.5,3}]
+\smallplotstest
+\end{axis}
+%\tracingmacros=0\tracingcommands=0
+\end{tikzpicture}
+
+\testsection{Tick placement}
+\begin{tikzpicture}
+\begin{axis}[
+ xtick={-1.5,-1,...,1.5},
+ ytick={-0.5,0,...,1.5},
+ ]
+\smallplotstest
+\end{axis}
+\end{tikzpicture}
+
+\begin{tikzpicture}
+\begin{axis}[
+ xmin=0,xmax=1,
+ xtick={-1.5,-1.25,...,1.5}]
+\smallplotstest
+\end{axis}
+\end{tikzpicture}
+
+\testsubsection{xtick=data}
+\begin{tikzpicture}
+\begin{axis}[xtick=data,xmajorgrids]
+\addplot coordinates {(0,0) (0.4,1) (1,2) (1.2,3) (4,5)};
+\end{axis}
+\end{tikzpicture}
+
+\begin{tikzpicture}
+\begin{axis}[xtick=data,xmajorgrids]
+\addplot coordinates {(0,0) (0.4,1) (1,2) (1.2,3) (4,5)};
+\addplot coordinates {(0.1,1) (0.5,2) (1.2,3)};
+\end{axis}
+\end{tikzpicture}
+
+\begin{tikzpicture}
+\begin{loglogaxis}[xtick=data,xmajorgrids]
+\loglogtestplot
+\end{loglogaxis}
+\end{tikzpicture}
+
+\testsubsubsection{ytick=data}
+\begin{tikzpicture}
+\begin{axis}[ytick=data,ymajorgrids]
+\addplot coordinates {(0,0) (0.4,1) (1,2) (1.2,3) (4,5)};
+\addplot coordinates {(0.1,1) (0.5,2) (1.2,3)};
+\end{axis}
+\end{tikzpicture}
+
+\begin{tikzpicture}
+\begin{loglogaxis}[ytick=data,ymajorgrids]
+\loglogtestplot
+\end{loglogaxis}
+\end{tikzpicture}
+
+\testsubsection{ticks on axis rectangle}
+First plot: default tick style; second plot: red, third: 'help lines'
+
+{\pgfplotsset{every axis/.append style={
+ enlargelimits=false,
+ xmin=-40,xmax=40,ymin=-40,ymax=40,
+ xtick={-40,0,40},
+ ytick={-40,0,40}
+}}%
+\begin{tikzpicture}
+\begin{axis}[
+]
+\addplot coordinates {(-40,-40) (40,40)};
+\end{axis}
+\end{tikzpicture}
+\begin{tikzpicture}
+\begin{axis}[
+ tick style={red,line width=5pt,major tick length=20pt},
+]
+\addplot coordinates {(-40,-40) (40,40)};
+\end{axis}
+\end{tikzpicture}
+\begin{tikzpicture}
+\begin{axis}[
+ tick style={help lines},
+]
+\addplot coordinates {(-40,-40) (40,40)};
+\end{axis}
+\end{tikzpicture}
+}
+
+\testsubsection{modified labels}
+
+{
+\pgfplotsset{every axis label/.style={}}
+\pgfplotsset{every axis x label/.style={
+ at={(0.5,1)},
+ above,
+ yshift=+15pt}}
+\pgfplotsset{every axis y label/.style={
+ at={(1,0.5)},
+ xshift=+35pt,
+ rotate=90}}
+
+\begin{tikzpicture}
+\begin{axis}[
+ xlabel=$x$ axis,
+ ylabel=$y$ axis,
+ xmin=0,xmax=1,
+ tickpos=right,
+ xtick={-1.5,-1.25,...,1.5}]
+\smallplotstest
+\end{axis}
+\end{tikzpicture}
+}
+
+\begin{tikzpicture}
+\begin{axis}[
+ xlabel=$x$ axis,
+ ylabel=$y$ axis,
+ xmin=0,xmax=1,
+ tickpos=both,
+ xtick={-1.5,-1.25,...,1.5}]
+\smallplotstest
+\end{axis}
+\end{tikzpicture}
+
+\testsection{Tick label assigment tests}
+\testsubsection{Using xticklabel and xtick}
+\begin{tikzpicture}
+\begin{axis}[
+ xtick={-1.5,-1,...,1.5},
+ xticklabel={%
+ \ifcase\ticknum $-1\frac12$%
+ \or $-1$%
+ \or $-\frac12$%
+ \or $0$%
+ \or $\frac12$%
+ \or $1$%
+ \or $1\frac12$%
+ \else $\tick$%
+ \fi
+ }
+]
+\smallplotstest
+\end{axis}
+\end{tikzpicture}
+
+\testsubsection{Using xticklabels}%
+\begin{tikzpicture}
+\begin{axis}[
+ xtick={-1.5,-1,...,1.5},
+ xticklabels={%
+ $-1\frac 12$,
+ $-1$,
+ $-\frac 12$,
+ $0$,
+ $\frac 12$,
+ $1$}
+]
+\smallplotstest
+\end{axis}
+\end{tikzpicture}
+
+\testsubsection{With xtick labels and commas by hand}
+\begin{tikzpicture}
+\begin{axis}[
+ xtick={-1.5,-1,...,1.5},
+ xticklabels={%
+ {-1,5},
+ -1,
+ {-0,5},
+ 0,
+ {0,5},
+ 1,
+ {1,5}}
+]
+\smallplotstest
+\end{axis}
+\end{tikzpicture}
+
+{
+\testsubsection{Only with auto number formatting options; different for x and y}
+%\tracingmacros=2\tracingcommands=2
+\begin{tikzpicture}
+\begin{axis}[
+ xtick={-1.5,-1,...,1.5},
+ x tick label style={/pgf/number format/use comma},
+ y tick label style={/pgf/number format/.cd,use comma,fixed zerofill,precision=3},
+]
+\smallplotstest
+\end{axis}
+\end{tikzpicture}
+}
+
+\testsubsection{Using yticklabels in logplot}%
+{
+\def\tickformat#1{1e#1}%
+\begin{tikzpicture}
+\begin{loglogaxis}[
+ ytick={1e-8,1e-7,1e-6,1e-5,1e-4,1e-3,1e-2,1e-1,1e0,1e1},
+ yticklabels={%
+ \tickformat{-8},
+ \tickformat{-7},
+ \tickformat{-6},
+ \tickformat{-5},
+ \tickformat{-4},
+ \tickformat{-3},
+ \tickformat{-2},
+ \tickformat{-1},
+ \tickformat{-0}}
+]
+\loglogtestplot
+\end{loglogaxis}
+\end{tikzpicture}
+}
+
+\testsection{Tick/Tick-Label placement log plots}
+\testsubsection{ytickten}
+\begin{tikzpicture}
+\begin{loglogaxis}[
+ %xmin=0.99e2,xmax=1e4,
+ ytickten={-5,-4,-3.6,-3,-2,-1,0},
+ yticklabel={
+ \ifnum\ticknum=2
+ $\rightarrow$
+ \else
+ \axisdefaultticklabellog
+ \fi
+ }
+]
+\loglogtestplot
+\end{loglogaxis}
+\end{tikzpicture}
+
+\testsubsection{ytick}
+\begin{tikzpicture}
+\begin{loglogaxis}[
+ ytick={1e-5,1e-4,0.000251188643,1e-3,1e-2,1e-1,1e0},
+]
+\loglogtestplot
+\end{loglogaxis}
+\end{tikzpicture}
+
+\testsubsection{extra y ticks}
+\begin{tikzpicture}
+\begin{loglogaxis}[
+ extra y ticks={0.000251188643,5e-2},
+]
+\loglogtestplot
+\end{loglogaxis}
+\end{tikzpicture}
+
+\testsubsection{extra y ticks and formatted label}
+\begin{tikzpicture}
+\begin{loglogaxis}[
+ extra y ticks={0.000251188643,5e-2},
+]
+\loglogtestplot
+\end{loglogaxis}
+\end{tikzpicture}
+
+\testsubsection{extra x and y ticks, linear plot}
+\begin{tikzpicture}
+\begin{axis}[
+ xmin=0,xmax=3,ymin=0,ymax=15,
+ extra y ticks={2.71828},
+ extra y tick labels={$e$},
+ extra x ticks={2.2},
+ extra x tick style={grid=major,/pgfplots/tick label style={rotate=90,anchor=east}},
+ extra x tick labels={Cut}
+]
+ \addplot (\x,{exp(\x)});
+ \addlegendentry{$e^x$}
+\end{axis}
+\end{tikzpicture}
diff --git a/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/plotdata/pgfplotstest_plot b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/plotdata/pgfplotstest_plot
new file mode 100644
index 00000000000..8d428466c93
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/plotdata/pgfplotstest_plot
@@ -0,0 +1,11 @@
+G Basis dof L2 L2_abserror A Lmax Lmax_relerror cgiter cgiter_err maxlevel eps
+$flags int int int sci:8 sci:8 sci:8 sci:8 sci:8 int sci:8 int std:8
+5 5 5 8.31160034e-02 1e-2 0.00000000e+00 1.80007647e-01 0 2 1 2 -1
+17 17 17 2.54685628e-02 0 0.00000000e+00 3.75580565e-02 0.7 5 1 3 -1
+49 49 49 7.40715288e-03 5e-3 0.00000000e+00 1.49212716e-02 0.5 11 2 4 -1
+129 129 129 2.10192154e-03 1e-1 0.00000000e+00 4.23330523e-03 0.9 26 3 5 -1
+321 321 321 5.87352989e-04 0 0.00000000e+00 1.30668515e-03 0.2 43 3 6 -1
+769 769 769 1.62269942e-04 1e-4 0.00000000e+00 3.88658098e-04 0.25 49 2 7 -1
+1793 1793 1793 4.44248889e-05 1e-5 0.00000000e+00 1.12651668e-04 0.4 52 0 8 -1
+4097 4097 4097 1.20714122e-05 0.5e-5 0.00000000e+00 3.20339285e-05 0.3 56 4 9 -1
+9217 9217 9217 3.26101452e-06 0.7e-6 0.00000000e+00 8.97617707e-06 0.5 59 3 10 -1
diff --git a/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/plotdata/pgfplotstest_plot2.gnuplot b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/plotdata/pgfplotstest_plot2.gnuplot
new file mode 100644
index 00000000000..d3f7299e19e
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/plotdata/pgfplotstest_plot2.gnuplot
@@ -0,0 +1,22 @@
+#Curve 0 of 1, 20 points
+#x y type
+0.00000 0.00000 i
+0.52632 0.50235 i
+1.05263 0.86873 i
+1.57895 0.99997 i
+2.10526 0.86054 i
+2.63158 0.48819 i
+3.15789 -0.01630 i
+3.68421 -0.51638 i
+4.21053 -0.87669 i
+4.73684 -0.99970 i
+5.26316 -0.85212 i
+5.78947 -0.47390 i
+6.31579 0.03260 i
+6.84211 0.53027 i
+7.36842 0.88441 i
+7.89474 0.99917 i
+8.42105 0.84348 i
+8.94737 0.45948 i
+9.47368 -0.04889 i
+10.00000 -0.54402 i
diff --git a/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/plotdata/pgfplotstest_plot3 b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/plotdata/pgfplotstest_plot3
new file mode 100644
index 00000000000..831bfd75ae7
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/plotdata/pgfplotstest_plot3
@@ -0,0 +1,11 @@
+G Basis dof L2 A Lmax cgiter maxlevel eps
+$flags int int int sci:8 sci:8 sci:8 int int std:8
+7 7 7 8.47178381e-02 0.00000000e+00 2.40709867e-01 2 2 -1
+31 31 31 3.04409349e-02 0.00000000e+00 7.83790314e-02 5 3 -1
+111 111 111 1.02214539e-02 0.00000000e+00 3.08129583e-02 12 4 -1
+351 351 351 3.30346265e-03 0.00000000e+00 1.04183980e-02 29 5 -1
+1023 1023 1023 1.03886535e-03 0.00000000e+00 3.27014492e-03 46 6 -1
+2815 2815 2815 3.19646457e-04 0.00000000e+00 9.82705632e-04 53 7 -1
+7423 7423 7423 9.65789766e-05 0.00000000e+00 2.98443097e-04 57 8 -1
+18943 18943 18943 2.87339125e-05 0.00000000e+00 8.86501125e-05 62 9 -1
+47103 47103 47103 8.43749881e-06 0.00000000e+00 2.62313540e-05 66 10 -1
diff --git a/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/plotdata/pgfplotstest_plot4 b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/plotdata/pgfplotstest_plot4
new file mode 100644
index 00000000000..89ba1a0e1fe
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/plotdata/pgfplotstest_plot4
@@ -0,0 +1,25 @@
+#Curve 0 of 1, 20 points
+# .5*x**3 - 4*x**2 -16*x**1
+#x y type
+-40.00000 -37760.00000 i
+-35.78947 -27472.03966 i
+-31.57895 -19229.39204 i
+-27.36842 -12808.11780 i
+-23.15789 -7984.27759 i
+-18.94737 -4533.93206 i
+-14.73684 -2233.14186 i
+-10.52632 -857.96763 i
+-6.31579 -184.47004 i
+-2.10526 11.29028 i
+2.10526 -46.74734 i
+6.31579 -134.64353 i
+10.52632 -28.45896 i
+14.73684 495.74574 i
+18.94737 1661.90990 i
+23.15789 3693.97288 i
+27.36842 6815.87403 i
+31.57895 11251.55270 i
+35.78947 17224.94824 i
+40.00000 24960.00000 i
+
+
diff --git a/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/plotdata/pgfplotstest_plot5 b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/plotdata/pgfplotstest_plot5
new file mode 100644
index 00000000000..762342c8d1a
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/plotdata/pgfplotstest_plot5
@@ -0,0 +1,24 @@
+
+#Curve 0 of 1, 20 points
+#x y type
+0.00000 0.00000 i
+0.52632 0.50235 i
+1.05263 0.86873 i
+1.57895 0.99997 i
+2.10526 0.86054 i
+2.63158 0.48819 i
+3.15789 -0.01630 i
+3.68421 -0.51638 i
+4.21053 -0.87669 i
+4.73684 -0.99970 i
+5.26316 -0.85212 i
+5.78947 -0.47390 i
+6.31579 0.03260 i
+6.84211 0.53027 i
+7.36842 0.88441 i
+7.89474 0.99917 i
+8.42105 0.84348 i
+8.94737 0.45948 i
+9.47368 -0.04889 i
+10.00000 -0.54402 i
+
diff --git a/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/plotdata/pgfplotstest_plotnocolnames b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/plotdata/pgfplotstest_plotnocolnames
new file mode 100644
index 00000000000..8a2ada39896
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/plotdata/pgfplotstest_plotnocolnames
@@ -0,0 +1,9 @@
+5 5 5 8.31160034e-02 0.00000000e+00 1.80007647e-01 2 2 -1
+17 17 17 2.54685628e-02 0.00000000e+00 3.75580565e-02 5 3 -1
+49 49 49 7.40715288e-03 0.00000000e+00 1.49212716e-02 11 4 -1
+129 129 129 2.10192154e-03 0.00000000e+00 4.23330523e-03 26 5 -1
+321 321 321 5.87352989e-04 0.00000000e+00 1.30668515e-03 43 6 -1
+769 769 769 1.62269942e-04 0.00000000e+00 3.88658098e-04 49 7 -1
+1793 1793 1793 4.44248889e-05 0.00000000e+00 1.12651668e-04 52 8 -1
+4097 4097 4097 1.20714122e-05 0.00000000e+00 3.20339285e-05 56 9 -1
+9217 9217 9217 3.26101452e-06 0.00000000e+00 8.97617707e-06 59 10 -1
diff --git a/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/valueplot-flowlines_1.dat b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/valueplot-flowlines_1.dat
new file mode 100644
index 00000000000..f2e39d6f697
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/valueplot-flowlines_1.dat
@@ -0,0 +1,92 @@
+-6.84792 2.41861
+-6.76786 2.41852
+-6.68805 2.41824
+-6.60996 2.41777
+-6.51075 2.41679
+-6.40551 2.41505
+-6.25340 2.41075
+-6.03965 2.40070
+-5.72466 2.37734
+-5.25092 2.32533
+-4.91777 2.27973
+-4.41289 2.20389
+-4.00792 2.14396
+-3.66562 2.09832
+-3.37459 2.06512
+-3.12640 2.04160
+-2.91205 2.02498
+-2.72515 2.01318
+-2.56036 2.00469
+-2.41403 1.99851
+-2.28241 1.99390
+-2.16229 1.99036
+-2.05106 1.98758
+-1.94645 1.98531
+-1.84609 1.98339
+-1.74791 1.98171
+-1.64947 1.98017
+-1.54841 1.97871
+-1.44122 1.97723
+-1.32126 1.97565
+-1.16446 1.97363
+-0.90552 1.97038
+-0.64659 1.96739
+-0.46271 1.96559
+-0.30000 1.96437
+-0.10000 1.96349
+0.00000 1.96337
+0.10000 1.96350
+0.30000 1.96457
+0.56334 1.96786
+0.72469 1.97106
+0.90410 1.97577
+1.10014 1.98238
+1.31256 1.99137
+1.54222 2.00335
+1.78995 2.01902
+2.05698 2.03926
+2.34428 2.06507
+2.65132 2.09742
+2.97466 2.13693
+3.30793 2.18352
+3.64762 2.23692
+3.99685 2.29747
+4.35942 2.36533
+4.73307 2.43910
+5.10177 2.51426
+5.44872 2.58624
+5.77085 2.65390
+6.07726 2.71933
+6.37863 2.78542
+6.68862 2.85637
+7.03375 2.94064
+7.49098 3.06389
+8.03953 3.23189
+8.57260 3.41315
+9.29853 3.66690
+9.73987 3.80614
+10.03601 3.88485
+10.26232 3.93412
+10.44394 3.96577
+10.59550 3.98653
+10.73385 4.00111
+10.85513 4.01094
+10.93401 4.01619
+10.99168 4.01963
+11.04379 4.02251
+11.09194 4.02503
+11.18684 4.02965
+11.23618 4.03190
+11.28800 4.03416
+11.34303 4.03643
+11.40199 4.03872
+11.46561 4.04104
+11.53478 4.04335
+11.60991 4.04562
+11.69157 4.04779
+11.77873 4.04976
+11.86931 4.05140
+11.95829 4.05260
+12.04019 4.05335
+12.10972 4.05369
+12.16727 4.05379
diff --git a/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/valueplot-flowlines_2.dat b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/valueplot-flowlines_2.dat
new file mode 100644
index 00000000000..8549ce86ded
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/valueplot-flowlines_2.dat
@@ -0,0 +1,221 @@
+-3.86974 23.44724
+-3.78200 23.44695
+-3.74029 23.44663
+-3.67390 23.44586
+-3.61311 23.44490
+-3.56300 23.44393
+-3.49804 23.44243
+-3.46070 23.44145
+-3.39129 23.43940
+-3.32822 23.43728
+-3.28614 23.43574
+-3.23754 23.43383
+-3.14637 23.42987
+-3.05967 23.42567
+-3.00068 23.42257
+-2.93380 23.41883
+-2.87416 23.41531
+-2.80061 23.41071
+-2.76154 23.40816
+-2.62857 23.39898
+-2.54938 23.39318
+-2.49931 23.38941
+-2.43883 23.38476
+-2.27413 23.37174
+-2.15644 23.36230
+-2.08196 23.35636
+-2.03330 23.35251
+-1.94825 23.34590
+-1.72954 23.32990
+-1.62996 23.32327
+-1.57585 23.31985
+-1.50329 23.31551
+-1.37105 23.30830
+-1.29944 23.30478
+-1.23051 23.30165
+-1.14894 23.29825
+-1.06702 23.29516
+-0.97382 23.29203
+-0.89070 23.28955
+-0.84927 23.28843
+-0.80129 23.28721
+-0.74637 23.28592
+-0.70115 23.28493
+-0.63219 23.28358
+-0.55855 23.28230
+-0.48244 23.28116
+-0.42153 23.28038
+-0.36284 23.27973
+-0.29690 23.27911
+-0.23978 23.27868
+-0.18064 23.27834
+-0.12275 23.27808
+-0.10000 23.27801
+0.00000 23.27787
+0.10000 23.27802
+0.17601 23.27832
+0.26681 23.27891
+0.36110 23.27978
+0.45399 23.28091
+0.54198 23.28223
+0.60081 23.28326
+0.65328 23.28427
+0.71782 23.28563
+0.75871 23.28657
+0.83657 23.28849
+0.88295 23.28974
+0.95394 23.29177
+1.04949 23.29476
+1.06854 23.29539
+1.15761 23.29848
+1.21224 23.30049
+1.27408 23.30286
+1.34949 23.30589
+1.41818 23.30877
+1.47749 23.31135
+1.54391 23.31433
+1.59761 23.31680
+1.67152 23.32030
+1.72174 23.32272
+1.78683 23.32592
+1.85135 23.32914
+1.94539 23.33393
+1.99220 23.33636
+2.05071 23.33942
+2.11378 23.34276
+2.17209 23.34589
+2.22331 23.34867
+2.27362 23.35143
+2.32883 23.35450
+2.38828 23.35785
+2.44699 23.36122
+2.50335 23.36450
+2.55867 23.36780
+2.61561 23.37126
+2.67485 23.37495
+2.73543 23.37882
+2.79585 23.38280
+2.85675 23.38694
+2.91953 23.39134
+2.98437 23.39604
+3.05018 23.40099
+3.11683 23.40618
+3.18460 23.41165
+3.25451 23.41750
+3.32648 23.42374
+3.39957 23.43030
+3.47365 23.43717
+3.54867 23.44436
+3.62416 23.45181
+3.70056 23.45956
+3.77760 23.46758
+3.85468 23.47580
+3.93184 23.48421
+4.00882 23.49279
+4.08576 23.50154
+4.16266 23.51047
+4.23974 23.51959
+4.31715 23.52894
+4.39513 23.53857
+4.47441 23.54856
+4.55443 23.55888
+4.63544 23.56957
+4.71782 23.58073
+4.80189 23.59242
+4.88799 23.60474
+4.97646 23.61781
+5.06730 23.63169
+5.16080 23.64652
+5.25672 23.66236
+5.35528 23.67937
+5.45634 23.69766
+5.55938 23.71731
+5.66425 23.73845
+5.77131 23.76132
+5.88009 23.78602
+5.99098 23.81280
+6.10325 23.84165
+6.21760 23.87290
+6.33432 23.90677
+6.45406 23.94363
+6.57738 23.98385
+6.70482 24.02785
+6.83717 24.07624
+6.97526 24.12974
+7.11979 24.18923
+7.27205 24.25606
+7.43441 24.33248
+7.60924 24.42131
+7.79952 24.52650
+8.00836 24.65314
+8.24148 24.80958
+8.50710 25.00889
+8.81106 25.26703
+9.15007 25.59714
+9.58649 26.09883
+10.03522 26.72731
+10.30807 27.17870
+10.55277 27.63495
+10.80256 28.15483
+11.06477 28.76174
+11.34948 29.49245
+11.67047 30.40424
+12.05016 31.59520
+12.55258 33.31831
+13.32664 36.04860
+13.52630 36.71383
+13.73415 37.37658
+13.91722 37.93327
+14.08297 38.41524
+14.23800 38.84736
+14.38085 39.22980
+14.51486 39.57508
+14.64229 39.89128
+14.76436 40.18308
+14.88202 40.45398
+14.99625 40.70715
+15.10802 40.94540
+15.21824 41.17117
+15.32790 41.38667
+15.43783 41.59355
+15.54893 41.79333
+15.66206 41.98717
+15.77814 42.17606
+15.89810 42.36076
+16.02295 42.54179
+16.15372 42.71942
+16.29138 42.89353
+16.43689 43.06372
+16.59101 43.22914
+16.75414 43.38846
+16.92662 43.54044
+17.10801 43.68337
+17.29742 43.81578
+17.49106 43.93517
+17.68192 44.03878
+17.85844 44.12362
+18.01107 44.18940
+18.14056 44.24023
+18.25635 44.28212
+18.36640 44.31902
+18.47116 44.35166
+18.56833 44.37986
+18.65731 44.40398
+18.74002 44.42498
+18.81841 44.44364
+18.89328 44.46033
+18.96445 44.47519
+19.03176 44.48832
+19.09514 44.49987
+19.15495 44.51004
+19.21152 44.51899
+19.26506 44.52686
+19.36346 44.53976
+19.40769 44.54489
+19.48677 44.55300
+19.55524 44.55890
+19.61276 44.56302
+19.68112 44.56692
+19.74673 44.56961
+19.78347 44.57064
+19.87685 44.57176
diff --git a/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/valueplot-flowlines_3.dat b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/valueplot-flowlines_3.dat
new file mode 100644
index 00000000000..21d48fb2828
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/valueplot-flowlines_3.dat
@@ -0,0 +1,39 @@
+-1.25451 10.36685
+-1.17964 10.36621
+-1.12056 10.36481
+-1.06257 10.36271
+-1.00533 10.35997
+-0.94858 10.35665
+-0.89205 10.35281
+-0.83561 10.34850
+-0.77917 10.34380
+-0.72272 10.33880
+-0.66633 10.33358
+-0.60992 10.32825
+-0.55352 10.32290
+-0.49747 10.31767
+-0.44169 10.31266
+-0.38682 10.30800
+-0.33402 10.30388
+-0.28313 10.30031
+-0.22560 10.29684
+-0.13525 10.29280
+-0.10000 10.29174
+0.00000 10.29044
+0.10000 10.29175
+0.18114 10.29471
+0.24449 10.29811
+0.34379 10.30512
+0.43029 10.31253
+0.49874 10.31897
+0.56221 10.32520
+0.62320 10.33125
+0.68138 10.33692
+0.73700 10.34216
+0.79028 10.34690
+0.84149 10.35114
+0.93860 10.35813
+1.02980 10.36322
+1.11498 10.36658
+1.19044 10.36838
+1.27969 10.36912
diff --git a/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/valueplot-flowlines_4.dat b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/valueplot-flowlines_4.dat
new file mode 100644
index 00000000000..52a790c19f7
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgfplots/test/pgfplotstest/valueplot-flowlines_4.dat
@@ -0,0 +1,34 @@
+-3.24098 15.46859
+-3.15005 15.46793
+-3.13205 15.46764
+-3.03375 15.46514
+-2.94266 15.46145
+-2.86309 15.45344
+-2.78022 15.42299
+-2.71653 15.38079
+-2.53041 15.16335
+-2.31648 14.74227
+-1.93556 13.53895
+-1.64884 12.22611
+-1.36239 10.54200
+-0.93897 7.52613
+-0.30000 3.62234
+-0.10000 3.13037
+-0.00000 3.06780
+0.10000 3.12986
+0.30000 3.60861
+0.71954 5.76144
+1.11229 8.25063
+1.39830 9.82046
+1.61955 10.77871
+1.81907 11.45069
+2.03743 12.00227
+2.41547 12.56801
+2.44747 12.59468
+2.57448 12.66844
+2.65913 12.68968
+2.72919 12.69491
+2.80099 12.69776
+2.87321 12.69961
+2.90861 12.70015
+2.97604 12.70055
diff --git a/Master/texmf-dist/doc/latex/pgfplots/ChangeLog b/Master/texmf-dist/doc/latex/pgfplots/ChangeLog
new file mode 100644
index 00000000000..32846b08963
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/ChangeLog
@@ -0,0 +1,219 @@
+2008-06-11 Christian Feuersaenger <ludewich@users.sourceforge.net>
+
+ - added boolean |row predicate| to select table entries.
+ - added macro |\coordindex| inside of \addplot to allow index based
+ coordinate filters.
+ - added style keys |/pgfplots/skip coords between index| and
+ |/pgfplots/table/skip rows between index|
+ - added style |dec sep align| for table typesetting.
+
+2008-06-10 Christian Feuersaenger <ludewich@users.sourceforge.net>
+
+ - Fixed several warnings in manual
+ - reimplemented |minor tick num| as style which sets the [xy] variants
+
+2008-06-09 Christian Feuersaenger <ludewich@users.sourceforge.net>
+
+ - Replaced |xfilter| and |yfilter| by code keys |x filter/.code={...}| and
+ |y filter|. Backwards compatibility is checked. Added docs.
+
+2008-06-09 Pascal Wolkotte <wolkottept@users.sourceforge.net>
+
+ - Added |minor x tick num| and |minor y tick num| option
+ - Adjusted section title format in documentation
+ - Filtered x and y tick's if axis x/y line is middle or center
+
+2008-06-07 Christian Feuersaenger <ludewich@users.sourceforge.net>
+
+ - Wrote more documentation, added |every axis plot post| style.
+ - Added |col sep=<space|comma|colon|semicolon|braces>| option for table
+ input.
+
+2008-06-06 Christian Feuersaenger <ludewich@users.sourceforge.net>
+
+ - Added |minor tick num| option
+
+2008-06-05 Pascal Wolkotte <wolkottept@users.sourceforge.net>
+
+ - Added options to choose the drawing of the axis lines
+ - Added options to include a discontinuity decoration on the axis lines
+ - Added options to align ticks with the axis lines
+
+2008-06-03 Christian Feuersaenger <ludewich@users.sourceforge.net>
+
+ - Added options |before end axis/.code| and |after end axis/.code| and
+ |extra description/.code|.
+
+2008-06-02 Christian Feuersaenger <ludewich@users.sourceforge.net>
+
+ - I have replaced all /tikz/ options with /pgfplots/ ones. The
+ documentation is updated to reflect this change.
+ Backwardscompatibility with \tikzstyle and the old /tikz/every... styles
+ is provided.
+
+2008-05-31 Christian Feuersaenger <ludewich@users.sourceforge.net>
+
+ - added \pgfnumtabletypeset feature. It is quite sophisticated by now and
+ allows to typeset (selected parts of) numeric tables; rounds each number
+ to desired accuracy and provides number format styles.
+
+2008-05-26 Christian Feuersaenger <ludewich@users.sourceforge.net>
+
+ - added special values 'xtick=data' and 'ytick=data' to collect the first plot's
+ coordinates as tick data.
+
+2008-05-24 Christian Feuersaenger <ludewich@users.sourceforge.net>
+
+ - First version of manual with pgfmanual styles is ready. It is not quite
+ final, but should be enough to communicate with Pascal.
+ - fixed plot expression to work properly.
+
+2008-05-21 Christian Feuersaenger <ludewich@users.sourceforge.net>
+
+ - added useful styles for all bar options.
+
+2008-05-20 Christian Feuersaenger <ludewich@users.sourceforge.net>
+
+ - fixed some issues with stacked plots
+ - added public macros \plotnum and \numplots inside of an axis
+ - added options '[xy] tick label as interval=true|false'
+ - added support for 'ybar interval' plot handler (which I added to PGF
+ recently).
+
+2008-05-19 Christian Feuersaenger <ludewich@users.sourceforge.net>
+
+ - added \closedcycle command for use after \addplot. It connects the
+ current plot with the x-axis to provide fillable plots easily.
+ - added named coordinates 'current plot begin' and 'current plot end'
+
+2008-05-18 Christian Feuersaenger <ludewich@users.sourceforge.net>
+
+ - added support for stacked plots:
+ - stack plots=x|y|false
+ - reverse stacked plots=true|false
+ - stack dir=plus|minus
+ - rewrote some internals
+
+2008-05-12 Christian Feuersaenger <ludewich@users.sourceforge.net>
+ - added 'current plot style' key to \addplot
+ - Added error bar support with fixed absolute/relative errors or explicit
+ absolute/relative errors for each coordinate.
+ - added plot types for piecewise constant plots
+ - added plot types 'ybar' and 'xbar' with option '/pgf/bar width'
+ - added option 'legend image code'
+ - fixed data scaling trafo: contained possiblity for cancellation of significant
+ digits
+ - added limited support for \addlegendentry[]{}
+ - removed clipping region for tick line placement
+ - added options
+ 'every axis plot no 1,2,3,4,...'
+ 'every [xy] tick'
+ 'every minor [xy] tick'
+ 'every major [xy] tick'
+ and the same for s/tick/grid/
+ and the corresponding '[xy] tick style', 'minor [xy] tick style' ...
+
+2008-04-23 Christian Feuersaenger <ludewich@users.sourceforge.net>
+ Released version 0.98 beta
+ Changes since version 0.92.4:
+ - enlargelimits now works properly for logarithmic axes
+ - added support for plot function (gnuplot interface)
+ - added extra ticks which are drawn on top of the normal ticks
+ - providing x limits will now automatically clip y and vice-versa
+ - added option 'log identify minor tick positions'
+ - added option 'log plot exponent style'
+ - added option 'log number format code' and 'log base 10 number format code'
+ - improved automatic tick placement for log plots
+ they are now scale dependend as for linear plots.
+ - added 'at' option
+ - cycle list and \legend now accept comma separated lists
+ - added support for plot expression
+ - re-implemented the internal plot representation as pgf node. This improves
+ the PGF integration:
+ - you can access various axis anchor from outside,
+ - you can easily clip parts of the axis out of the bounding box (useful for
+ alignment),
+ - you can access named axis descriptions (legends, titles, labels,...)
+
+ - the complete floating point number support has been integrated into PGF 2.0.
+ That means: there are options
+ /pgf/number format/sci
+ /pgf/number format/fixed
+ /pgf/number format/....
+ BUT
+ numbers are now printed with
+ \pgfmathprintnumber
+ NOT
+ \prettyprintnumber [ INCOMPATIBLE ]
+
+ - added option 'scaled ticks'
+ and associated styles
+ 'every x tick scale label'
+ 'every y tick scale label'
+ and options
+ 'x tick scale label style'
+ 'y tick scale label style'
+ and parameters
+ 'scale ticks [below,above] exponent'
+
+ - legends have been improved (was \edef, is now better)
+
+ - Any styles can now contain axis options, for example
+ \tikzstyle{every axis legend}+=[legend columns=2]
+ - added option "cycle list"
+ - added option "cycle list name"
+ - added '\addplot plot file {filename}'
+ - added '\addplot plot table[x=colnameA,y=colnameB] {filename}'
+ and '\addplot plot table[xindex=numberA,yindex=numberB] {filename}'
+ and '\addplot plot table[...] from {\macroname}' in conjunction with
+ '\numtableread{FILE} to \macroname'
+
+ - eliminated several scopes such that node names for labels, titles and legends
+ will be known outside of an axis,
+ - added
+ \tikzstyle{every semilogx axis}=[]
+ \tikzstyle{every semilogy axis}=[]
+ \tikzstyle{every loglog axis}=[]
+ \tikzstyle{every linear axis}=[]
+ - added option 'legend style'
+ - added option 'label style'
+ added option 'x label style'
+ added option 'y label style'
+ added option 'grid style'
+ added option 'tick style'
+ and the same for all 'every ...' styles.
+ added option 'style=' option
+
+
+2008-02-01 Christian Feuersaenger <ludewich@users.sourceforge.net>
+ Released version 0.92.4
+ Changes since version 0.92:
+ ** UPGRADE INCOMPATIBILITIES **
+ - Warning: I have greatly improved the legend placement.
+ If you have overwritten
+ \tikzstyle{every axis legend}
+ you will need to update the legend!
+ - renamed 'manual.pdf' to 'pgfplots.pdf' to allow
+ 'texdoc pgfplots'
+ - any \axispath commands need to use the 'axis cs' coordinate system.
+
+ Improvements:
+ - introduced a data scale transformation:
+ know, pgfplots is no longer restricted to numbers within
+ TeX's limited precision.
+ It can produce plots with numbers of order O(10^10) or O(10^-10) (now even for non-logarithmic plots)
+ - fixed a bug which did not allow scientific notation for normal plots,
+ - improved default tick placement for normal plots,
+ - enlargelimits option is now relative and has a better user interface,
+ - legends are now TikZ matrizes, which fixes some bugs and improves their
+ flexibility.
+ - Added the 'legend columns' option.
+ - Added the 'legend plot pos' option.
+ - Added the 'hide axis' option
+ - Added the 'scale only axis' option
+ - Added the 'xticklabels=LIST' and 'yticklabels=LIST' options
+ - Added anchors to axes to allow horizontal/vertical alignment
+ - rounded tick labels to \prettyprintnumberprecision digits
+ - Added 'grid=major|minor|both|none' option for grid lines
+ - Added '[xy]minorgrids', '[xy]majorgrids' options and corresponding styles
+ - Added '[xy]majorticks', 'ticks=major|minor|both|none' options ticks
diff --git a/Master/texmf-dist/doc/latex/pgfplots/Makefile b/Master/texmf-dist/doc/latex/pgfplots/Makefile
new file mode 100644
index 00000000000..8751da9863b
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/Makefile
@@ -0,0 +1,17 @@
+
+PDFLATEX=pdflatex -shell-escape
+
+all: pgfplots.pdf pgfplotstable.pdf
+ @echo "$^ have been compiled successfully. I did NOT check for references, so you may need to rerun make several times."
+
+pgfplots: pgfplots.pdf
+pgfplotstable: pgfplotstable.pdf
+
+%.pdf: FORCE
+ @$(PDFLATEX) $(@:.pdf=.tex)
+ @bibtex $(@:.pdf=) || exit 0
+ @makeindex $(@:.pdf=) || exit 0
+ @echo ""
+ @echo "$@ compiled successfully. You may need to re-run make several times to get all cross-references right."
+
+FORCE:
diff --git a/Master/texmf-dist/doc/latex/pgfplots/changelog.txt b/Master/texmf-dist/doc/latex/pgfplots/changelog.txt
deleted file mode 100644
index a225e8a6d98..00000000000
--- a/Master/texmf-dist/doc/latex/pgfplots/changelog.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-Changes since version 0.92:
-** UPGRADE INCOMPATIBILITIES **
-- Warning: I have greatly improved the legend placement.
- If you have overwritten
- \tikzstyle{every axis legend}
- you will need to update the legend!
-- renamed 'manual.pdf' to 'pgfplots.pdf' to allow
- 'texdoc pgfplots'
-- any \axispath commands need to use the 'axis cs' coordinate system.
-
-Improvements:
-- introduced a data scale transformation:
- know, pgfplots is no longer restricted to numbers within
- TeX's limited precision.
- It can produce plots with numbers of order O(10^10) or O(10^-10).
- [now even for non-logarithmic plots]
-- fixed a bug which did not allow scientific notation for normal plots,
-- improved default tick placement for normal plots,
-- enlargelimits option is now relative and has a better user interface,
-- legends are now TikZ matrizes, which fixes some bugs and improves their
- flexibility.
-- Added the 'legend columns' option.
-- Added the 'legend plot pos' option.
-- Added the 'hide axis' option
-- Added the 'scale only axis' option
-- Added the 'xticklabels=LIST' and 'yticklabels=LIST' options
-- Added anchors to axes to allow horizontal/vertical alignment
-- rounded tick labels to \prettyprintnumberprecision digits
-- Added 'grid=major|minor|both|none' option for grid lines
-- Added '[xy]minorgrids', '[xy]majorgrids' options and corresponding styles
-- Added '[xy]majorticks', 'ticks=major|minor|both|none' options ticks
diff --git a/Master/texmf-dist/doc/latex/pgfplots/example.pdf b/Master/texmf-dist/doc/latex/pgfplots/example.pdf
deleted file mode 100644
index edb9a5798c8..00000000000
--- a/Master/texmf-dist/doc/latex/pgfplots/example.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_cubic.gnuplot b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_cubic.gnuplot
new file mode 100644
index 00000000000..3e74472d8f1
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_cubic.gnuplot
@@ -0,0 +1,2 @@
+set terminal table; set output "gnuplot/pgfplots_cubic.table"; set format "%.5f"
+set format "\%.7e"; set samples 8; plot [x=-5:0] 0.7*x**3 + 50
diff --git a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_cubic.table b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_cubic.table
new file mode 100644
index 00000000000..baba41efbf3
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_cubic.table
@@ -0,0 +1,12 @@
+
+#Curve 0 of 1, 8 points
+#x y type
+-5.0000000e+00 -3.7500000e+01 i
+-4.2857143e+00 -5.1020408e+00 i
+-3.5714286e+00 1.8112245e+01 i
+-2.8571429e+00 3.3673469e+01 i
+-2.1428571e+00 4.3112245e+01 i
+-1.4285714e+00 4.7959184e+01 i
+-7.1428571e-01 4.9744898e+01 i
+0.0000000e+00 5.0000000e+01 i
+
diff --git a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_exp.gnuplot b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_exp.gnuplot
new file mode 100644
index 00000000000..be341cc7f9d
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_exp.gnuplot
@@ -0,0 +1,2 @@
+set terminal table; set output "gnuplot/pgfplots_exp.table"; set format "%.5f"
+set format "\%.7e"; set samples 25; plot [x=0:10] exp(x)
diff --git a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_exp.table b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_exp.table
new file mode 100644
index 00000000000..e85583c1952
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_exp.table
@@ -0,0 +1,29 @@
+
+#Curve 0 of 1, 25 points
+#x y type
+0.0000000e+00 1.0000000e+00 i
+4.1666667e-01 1.5168968e+00 i
+8.3333333e-01 2.3009759e+00 i
+1.2500000e+00 3.4903430e+00 i
+1.6666667e+00 5.2944901e+00 i
+2.0833333e+00 8.0311950e+00 i
+2.5000000e+00 1.2182494e+01 i
+2.9166667e+00 1.8479586e+01 i
+3.3333333e+00 2.8031625e+01 i
+3.7500000e+00 4.2521082e+01 i
+4.1666667e+00 6.4500093e+01 i
+4.5833333e+00 9.7839985e+01 i
+5.0000000e+00 1.4841316e+02 i
+5.4166667e+00 2.2512745e+02 i
+5.8333333e+00 3.4149510e+02 i
+6.2500000e+00 5.1801282e+02 i
+6.6666667e+00 7.8577199e+02 i
+7.0833333e+00 1.1919350e+03 i
+7.5000000e+00 1.8080424e+03 i
+7.9166667e+00 2.7426137e+03 i
+8.3333333e+00 4.1602620e+03 i
+8.7500000e+00 6.3106881e+03 i
+9.1666667e+00 9.5726626e+03 i
+9.5833333e+00 1.4520741e+04 i
+1.0000000e+01 2.2026466e+04 i
+
diff --git a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_filesuffix.gnuplot b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_filesuffix.gnuplot
new file mode 100644
index 00000000000..33184d75b83
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_filesuffix.gnuplot
@@ -0,0 +1,2 @@
+set terminal table; set output "gnuplot/pgfplots_filesuffix.table"; set format "%.5f"
+set format "\%.7e"; set samples 25; plot [x=-5:5] (-x**5 - 242)
diff --git a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_filesuffix.table b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_filesuffix.table
new file mode 100644
index 00000000000..13b7b7a4299
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_filesuffix.table
@@ -0,0 +1,29 @@
+
+#Curve 0 of 1, 25 points
+#x y type
+-5.0000000e+00 2.8830000e+03 i
+-4.5833333e+00 1.7805870e+03 i
+-4.1666667e+00 1.0138674e+03 i
+-3.7500000e+00 4.9957715e+02 i
+-3.3333333e+00 1.6952263e+02 i
+-2.9166667e+00 -3.0926364e+01 i
+-2.5000000e+00 -1.4434375e+02 i
+-2.0833333e+00 -2.0275414e+02 i
+-1.6666667e+00 -2.2913992e+02 i
+-1.2500000e+00 -2.3894824e+02 i
+-8.3333333e-01 -2.4159812e+02 i
+-4.1666667e-01 -2.4198744e+02 i
+0.0000000e+00 -2.4200000e+02 i
+4.1666667e-01 -2.4201256e+02 i
+8.3333333e-01 -2.4240188e+02 i
+1.2500000e+00 -2.4505176e+02 i
+1.6666667e+00 -2.5486008e+02 i
+2.0833333e+00 -2.8124586e+02 i
+2.5000000e+00 -3.3965625e+02 i
+2.9166667e+00 -4.5307364e+02 i
+3.3333333e+00 -6.5352263e+02 i
+3.7500000e+00 -9.8357715e+02 i
+4.1666667e+00 -1.4978674e+03 i
+4.5833333e+00 -2.2645870e+03 i
+5.0000000e+00 -3.3670000e+03 i
+
diff --git a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_filesuffix1.gnuplot b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_filesuffix1.gnuplot
new file mode 100644
index 00000000000..97353b62591
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_filesuffix1.gnuplot
@@ -0,0 +1,2 @@
+set terminal table; set output "gnuplot/pgfplots_filesuffix1.table"; set format "%.5f"
+set samples 25; plot [x=-5:5] (40*x**2 - 5*x +3)
diff --git a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_filesuffix1.table b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_filesuffix1.table
new file mode 100644
index 00000000000..8bf1fff7241
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_filesuffix1.table
@@ -0,0 +1,29 @@
+
+#Curve 0 of 1, 25 points
+#x y type
+-5.00000 1028.00000 i
+-4.58333 866.19444 i
+-4.16667 718.27778 i
+-3.75000 584.25000 i
+-3.33333 464.11111 i
+-2.91667 357.86111 i
+-2.50000 265.50000 i
+-2.08333 187.02778 i
+-1.66667 122.44444 i
+-1.25000 71.75000 i
+-0.83333 34.94444 i
+-0.41667 12.02778 i
+0.00000 3.00000 i
+0.41667 7.86111 i
+0.83333 26.61111 i
+1.25000 59.25000 i
+1.66667 105.77778 i
+2.08333 166.19444 i
+2.50000 240.50000 i
+2.91667 328.69444 i
+3.33333 430.77778 i
+3.75000 546.75000 i
+4.16667 676.61111 i
+4.58333 820.36111 i
+5.00000 978.00000 i
+
diff --git a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_filesuffix2.gnuplot b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_filesuffix2.gnuplot
new file mode 100644
index 00000000000..41fe261aa7e
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_filesuffix2.gnuplot
@@ -0,0 +1,2 @@
+set terminal table; set output "gnuplot/pgfplots_filesuffix2.table"; set format "%.5f"
+set samples 10; plot [x=-5:5] (-x**5 - 242 + 50*rand(0))
diff --git a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_filesuffix2.table b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_filesuffix2.table
new file mode 100644
index 00000000000..63225c0eae6
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_filesuffix2.table
@@ -0,0 +1,14 @@
+
+#Curve 0 of 1, 10 points
+#x y type
+-5.00000 2894.12287 i
+-3.88889 654.12997 i
+-2.77778 -49.81883 i
+-1.66667 -187.85451 i
+-0.55556 -238.04659 i
+0.55556 -192.99785 i
+1.66667 -226.47249 i
+2.77778 -381.58225 i
+3.88889 -1119.61214 i
+5.00000 -3333.88065 i
+
diff --git a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_filesuffix_noise.gnuplot b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_filesuffix_noise.gnuplot
new file mode 100644
index 00000000000..e9e821b1e69
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_filesuffix_noise.gnuplot
@@ -0,0 +1,2 @@
+set terminal table; set output "gnuplot/pgfplots_filesuffix_noise.table"; set format "%.5f"
+set samples 10; plot [x=-6:5] (-x**5 - 242 + (-300 + 600*rand(0)))
diff --git a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_filesuffix_noise.table b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_filesuffix_noise.table
new file mode 100644
index 00000000000..a2aa3943eaa
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_filesuffix_noise.table
@@ -0,0 +1,14 @@
+
+#Curve 0 of 1, 10 points
+#x y type
+-6.00000 7367.47446 i
+-4.77778 2027.60977 i
+-3.55556 347.84069 i
+-2.33333 22.58953 i
+-1.11111 -493.50066 i
+0.11111 46.66082 i
+1.33333 -205.56286 i
+2.55556 -341.40638 i
+3.77778 -1169.24780 i
+5.00000 -3269.56775 i
+
diff --git a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_gnuplot_exp.gnuplot b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_gnuplot_exp.gnuplot
new file mode 100644
index 00000000000..39cf8e5343d
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_gnuplot_exp.gnuplot
@@ -0,0 +1,2 @@
+set terminal table; set output "gnuplot/pgfplots_gnuplot_exp.table"; set format "%.5f"
+set format "\%.7e"; set samples 15; plot [x=-5:10] exp(x)
diff --git a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_gnuplot_exp.table b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_gnuplot_exp.table
new file mode 100644
index 00000000000..edd0fa85a34
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_gnuplot_exp.table
@@ -0,0 +1,19 @@
+
+#Curve 0 of 1, 15 points
+#x y type
+-5.0000000e+00 6.7379470e-03 i
+-3.9285714e+00 1.9671755e-02 i
+-2.8571429e+00 5.7432619e-02 i
+-1.7857143e+00 1.6767725e-01 i
+-7.1428571e-01 4.8954166e-01 i
+3.5714286e-01 1.4292400e+00 i
+1.4285714e+00 4.1727339e+00 i
+2.5000000e+00 1.2182494e+01 i
+3.5714286e+00 3.5567367e+01 i
+4.6428571e+00 1.0384061e+02 i
+5.7142857e+00 3.0316758e+02 i
+6.7857143e+00 8.8511208e+02 i
+7.8571429e+00 2.5841266e+03 i
+8.9285714e+00 7.5444798e+03 i
+1.0000000e+01 2.2026466e+04 i
+
diff --git a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_gnuplot_expv.gnuplot b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_gnuplot_expv.gnuplot
new file mode 100644
index 00000000000..863dc53c9e1
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_gnuplot_expv.gnuplot
@@ -0,0 +1,2 @@
+set terminal table; set output "gnuplot/pgfplots_gnuplot_expv.table"; set format "%.5f"
+set format "\%.7e"; set samples 15; plot [x=-5:10] exp(2*x)
diff --git a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_gnuplot_expv.table b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_gnuplot_expv.table
new file mode 100644
index 00000000000..ad3ec95b515
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_gnuplot_expv.table
@@ -0,0 +1,19 @@
+
+#Curve 0 of 1, 15 points
+#x y type
+-5.0000000e+00 4.5399930e-05 i
+-3.9285714e+00 3.8697794e-04 i
+-2.8571429e+00 3.2985058e-03 i
+-1.7857143e+00 2.8115660e-02 i
+-7.1428571e-01 2.3965104e-01 i
+3.5714286e-01 2.0427271e+00 i
+1.4285714e+00 1.7411708e+01 i
+2.5000000e+00 1.4841316e+02 i
+3.5714286e+00 1.2650376e+03 i
+4.6428571e+00 1.0782873e+04 i
+5.7142857e+00 9.1910580e+04 i
+6.7857143e+00 7.8342340e+05 i
+7.8571429e+00 6.6777103e+06 i
+8.9285714e+00 5.6919176e+07 i
+1.0000000e+01 4.8516520e+08 i
+
diff --git a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_gnuplot_ppp.gnuplot b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_gnuplot_ppp.gnuplot
new file mode 100644
index 00000000000..166ff692202
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_gnuplot_ppp.gnuplot
@@ -0,0 +1,2 @@
+set terminal table; set output "gnuplot/pgfplots_gnuplot_ppp.table"; set format "%.5f"
+set format "\%.7e"; set samples 120; plot [x=-40:40] 10000*sin(x/3)
diff --git a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_gnuplot_ppp.table b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_gnuplot_ppp.table
new file mode 100644
index 00000000000..fa803afffdc
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_gnuplot_ppp.table
@@ -0,0 +1,124 @@
+
+#Curve 0 of 1, 120 points
+#x y type
+-4.0000000e+01 -6.9395153e+03 i
+-3.9327731e+01 -5.1659813e+03 i
+-3.8655462e+01 -3.1341153e+03 i
+-3.7983193e+01 -9.4552356e+02 i
+-3.7310924e+01 1.2903504e+03 i
+-3.6638655e+01 3.4616986e+03 i
+-3.5966387e+01 5.4599399e+03 i
+-3.5294118e+01 7.1851493e+03 i
+-3.4621849e+01 8.5510554e+03 i
+-3.3949580e+01 9.4893542e+03 i
+-3.3277311e+01 9.9531248e+03 i
+-3.2605042e+01 9.9191756e+03 i
+-3.1932773e+01 9.3892044e+03 i
+-3.1260504e+01 8.3897132e+03 i
+-3.0588235e+01 6.9706827e+03 i
+-2.9915966e+01 5.2030737e+03 i
+-2.9243697e+01 3.1752778e+03 i
+-2.8571429e+01 9.8869771e+02 i
+-2.7899160e+01 -1.2473235e+03 i
+-2.7226891e+01 -3.4209706e+03 i
+-2.6554622e+01 -5.4235474e+03 i
+-2.5882353e+01 -7.1549122e+03 i
+-2.5210084e+01 -8.5284858e+03 i
+-2.4537815e+01 -9.4755806e+03 i
+-2.3865546e+01 -9.9488360e+03 i
+-2.3193277e+01 -9.9245862e+03 i
+-2.2521008e+01 -9.4040438e+03 i
+-2.1848739e+01 -8.4132391e+03 i
+-2.1176471e+01 -7.0017189e+03 i
+-2.0504202e+01 -5.2400681e+03 i
+-1.9831933e+01 -3.2163804e+03 i
+-1.9159664e+01 -1.0318533e+03 i
+-1.8487395e+01 1.2042732e+03 i
+-1.7815126e+01 3.3801783e+03 i
+-1.7142857e+01 5.3870529e+03 i
+-1.6470588e+01 7.1245405e+03 i
+-1.5798319e+01 8.5057557e+03 i
+-1.5126050e+01 9.4616288e+03 i
+-1.4453782e+01 9.9443601e+03 i
+-1.3781513e+01 9.9298100e+03 i
+-1.3109244e+01 9.4187061e+03 i
+-1.2436975e+01 8.4366068e+03 i
+-1.1764706e+01 7.0326234e+03 i
+-1.1092437e+01 5.2769639e+03 i
+-1.0420168e+01 3.2574226e+03 i
+-9.7478992e+00 1.0749894e+03 i
+-9.0756303e+00 -1.1612002e+03 i
+-8.4033613e+00 -3.3393223e+03 i
+-7.7310924e+00 -5.3504570e+03 i
+-7.0588235e+00 -7.0940348e+03 i
+-6.3865546e+00 -8.4828655e+03 i
+-5.7142857e+00 -9.4474989e+03 i
+-5.0420168e+00 -9.9396971e+03 i
+-4.3697479e+00 -9.9348470e+03 i
+-3.6974790e+00 -9.4331913e+03 i
+-3.0252101e+00 -8.4598158e+03 i
+-2.3529412e+00 -7.0633955e+03 i
+-1.6806723e+00 -5.3137605e+03 i
+-1.0084034e+00 -3.2984035e+03 i
+-3.3613445e-01 -1.1181053e+03 i
+3.3613445e-01 1.1181053e+03 i
+1.0084034e+00 3.2984035e+03 i
+1.6806723e+00 5.3137605e+03 i
+2.3529412e+00 7.0633955e+03 i
+3.0252101e+00 8.4598158e+03 i
+3.6974790e+00 9.4331913e+03 i
+4.3697479e+00 9.9348470e+03 i
+5.0420168e+00 9.9396971e+03 i
+5.7142857e+00 9.4474989e+03 i
+6.3865546e+00 8.4828655e+03 i
+7.0588235e+00 7.0940348e+03 i
+7.7310924e+00 5.3504570e+03 i
+8.4033613e+00 3.3393223e+03 i
+9.0756303e+00 1.1612002e+03 i
+9.7478992e+00 -1.0749894e+03 i
+1.0420168e+01 -3.2574226e+03 i
+1.1092437e+01 -5.2769639e+03 i
+1.1764706e+01 -7.0326234e+03 i
+1.2436975e+01 -8.4366068e+03 i
+1.3109244e+01 -9.4187061e+03 i
+1.3781513e+01 -9.9298100e+03 i
+1.4453782e+01 -9.9443601e+03 i
+1.5126050e+01 -9.4616288e+03 i
+1.5798319e+01 -8.5057557e+03 i
+1.6470588e+01 -7.1245405e+03 i
+1.7142857e+01 -5.3870529e+03 i
+1.7815126e+01 -3.3801783e+03 i
+1.8487395e+01 -1.2042732e+03 i
+1.9159664e+01 1.0318533e+03 i
+1.9831933e+01 3.2163804e+03 i
+2.0504202e+01 5.2400681e+03 i
+2.1176471e+01 7.0017189e+03 i
+2.1848739e+01 8.4132391e+03 i
+2.2521008e+01 9.4040438e+03 i
+2.3193277e+01 9.9245862e+03 i
+2.3865546e+01 9.9488360e+03 i
+2.4537815e+01 9.4755806e+03 i
+2.5210084e+01 8.5284858e+03 i
+2.5882353e+01 7.1549122e+03 i
+2.6554622e+01 5.4235474e+03 i
+2.7226891e+01 3.4209706e+03 i
+2.7899160e+01 1.2473235e+03 i
+2.8571429e+01 -9.8869771e+02 i
+2.9243697e+01 -3.1752778e+03 i
+2.9915966e+01 -5.2030737e+03 i
+3.0588235e+01 -6.9706827e+03 i
+3.1260504e+01 -8.3897132e+03 i
+3.1932773e+01 -9.3892044e+03 i
+3.2605042e+01 -9.9191756e+03 i
+3.3277311e+01 -9.9531248e+03 i
+3.3949580e+01 -9.4893542e+03 i
+3.4621849e+01 -8.5510554e+03 i
+3.5294118e+01 -7.1851493e+03 i
+3.5966387e+01 -5.4599399e+03 i
+3.6638655e+01 -3.4616986e+03 i
+3.7310924e+01 -1.2903504e+03 i
+3.7983193e+01 9.4552356e+02 i
+3.8655462e+01 3.1341153e+03 i
+3.9327731e+01 5.1659813e+03 i
+4.0000000e+01 6.9395153e+03 i
+
diff --git a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_parable.gnuplot b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_parable.gnuplot
new file mode 100644
index 00000000000..51693f78c60
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_parable.gnuplot
@@ -0,0 +1,2 @@
+set terminal table; set output "gnuplot/pgfplots_parable.table"; set format "%.5f"
+set format "\%.7e"; set samples 25; plot [x=-5:5] 4*x**2 - 5
diff --git a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_parable.table b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_parable.table
new file mode 100644
index 00000000000..e014e557a37
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_parable.table
@@ -0,0 +1,29 @@
+
+#Curve 0 of 1, 25 points
+#x y type
+-5.0000000e+00 9.5000000e+01 i
+-4.5833333e+00 7.9027778e+01 i
+-4.1666667e+00 6.4444444e+01 i
+-3.7500000e+00 5.1250000e+01 i
+-3.3333333e+00 3.9444444e+01 i
+-2.9166667e+00 2.9027778e+01 i
+-2.5000000e+00 2.0000000e+01 i
+-2.0833333e+00 1.2361111e+01 i
+-1.6666667e+00 6.1111111e+00 i
+-1.2500000e+00 1.2500000e+00 i
+-8.3333333e-01 -2.2222222e+00 i
+-4.1666667e-01 -4.3055556e+00 i
+0.0000000e+00 -5.0000000e+00 i
+4.1666667e-01 -4.3055556e+00 i
+8.3333333e-01 -2.2222222e+00 i
+1.2500000e+00 1.2500000e+00 i
+1.6666667e+00 6.1111111e+00 i
+2.0833333e+00 1.2361111e+01 i
+2.5000000e+00 2.0000000e+01 i
+2.9166667e+00 2.9027778e+01 i
+3.3333333e+00 3.9444444e+01 i
+3.7500000e+00 5.1250000e+01 i
+4.1666667e+00 6.4444444e+01 i
+4.5833333e+00 7.9027778e+01 i
+5.0000000e+00 9.5000000e+01 i
+
diff --git a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_parablex.gnuplot b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_parablex.gnuplot
new file mode 100644
index 00000000000..a32cd893de5
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_parablex.gnuplot
@@ -0,0 +1,2 @@
+set terminal table; set output "gnuplot/pgfplots_parablex.table"; set format "%.5f"
+set format "\%.7e"; set samples 8; plot [x=-5:0] 4*x**2 - 5
diff --git a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_parablex.table b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_parablex.table
new file mode 100644
index 00000000000..f0a24fce15a
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_parablex.table
@@ -0,0 +1,12 @@
+
+#Curve 0 of 1, 8 points
+#x y type
+-5.0000000e+00 9.5000000e+01 i
+-4.2857143e+00 6.8469388e+01 i
+-3.5714286e+00 4.6020408e+01 i
+-2.8571429e+00 2.7653061e+01 i
+-2.1428571e+00 1.3367347e+01 i
+-1.4285714e+00 3.1632653e+00 i
+-7.1428571e-01 -2.9591837e+00 i
+0.0000000e+00 -5.0000000e+00 i
+
diff --git a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_pgf-plot.gnuplot b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_pgf-plot.gnuplot
new file mode 100644
index 00000000000..03cb9c0494b
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_pgf-plot.gnuplot
@@ -0,0 +1,2 @@
+set terminal table; set output "gnuplot/pgfplots_pgf-plot.table"; set format "%.5f"
+set samples 25; plot [x=0:10] 2**(-1.5*x -3)
diff --git a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_pgf-plot.table b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_pgf-plot.table
new file mode 100644
index 00000000000..c8b21067744
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_pgf-plot.table
@@ -0,0 +1,29 @@
+
+#Curve 0 of 1, 25 points
+#x y type
+0.00000 0.12500 i
+0.41667 0.08105 i
+0.83333 0.05256 i
+1.25000 0.03408 i
+1.66667 0.02210 i
+2.08333 0.01433 i
+2.50000 0.00929 i
+2.91667 0.00602 i
+3.33333 0.00391 i
+3.75000 0.00253 i
+4.16667 0.00164 i
+4.58333 0.00106 i
+5.00000 0.00069 i
+5.41667 0.00045 i
+5.83333 0.00029 i
+6.25000 0.00019 i
+6.66667 0.00012 i
+7.08333 0.00008 i
+7.50000 0.00005 i
+7.91667 0.00003 i
+8.33333 0.00002 i
+8.75000 0.00001 i
+9.16667 0.00001 i
+9.58333 0.00001 i
+10.00000 0.00000 i
+
diff --git a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_pow1.gnuplot b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_pow1.gnuplot
new file mode 100644
index 00000000000..c0c5c3891ca
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_pow1.gnuplot
@@ -0,0 +1,2 @@
+set terminal table; set output "gnuplot/pgfplots_pow1.table"; set format "%.5f"
+set format "\%.7e"; set samples 8; plot [x=0:10] 2**(-2*x + 6)
diff --git a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_pow1.table b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_pow1.table
new file mode 100644
index 00000000000..ee222507116
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_pow1.table
@@ -0,0 +1,12 @@
+
+#Curve 0 of 1, 8 points
+#x y type
+0.0000000e+00 6.4000000e+01 i
+1.4285714e+00 8.8327161e+00 i
+2.8571429e+00 1.2190137e+00 i
+4.2857143e+00 1.6823752e-01 i
+5.7142857e+00 2.3218661e-02 i
+7.1428571e+00 3.2044350e-03 i
+8.5714286e+00 4.4224788e-04 i
+1.0000000e+01 6.1035156e-05 i
+
diff --git a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_pow2.gnuplot b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_pow2.gnuplot
new file mode 100644
index 00000000000..0e9aa76475d
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_pow2.gnuplot
@@ -0,0 +1,2 @@
+set terminal table; set output "gnuplot/pgfplots_pow2.table"; set format "%.5f"
+set format "\%.7e"; set samples 8; plot [x=0:10] 2**(-1.5*x -3)
diff --git a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_pow2.table b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_pow2.table
new file mode 100644
index 00000000000..50bf268abe4
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_pow2.table
@@ -0,0 +1,12 @@
+
+#Curve 0 of 1, 8 points
+#x y type
+0.0000000e+00 1.2500000e-01 i
+1.4285714e+00 2.8303865e-02 i
+2.8571429e+00 6.4088700e-03 i
+4.2857143e+00 1.4511663e-03 i
+5.7142857e+00 3.2858891e-04 i
+7.1428571e+00 7.4402689e-05 i
+8.5714286e+00 1.6847069e-05 i
+1.0000000e+01 3.8146973e-06 i
+
diff --git a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_sin.gnuplot b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_sin.gnuplot
new file mode 100644
index 00000000000..0d406650d1c
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_sin.gnuplot
@@ -0,0 +1,2 @@
+set terminal table; set output "gnuplot/pgfplots_sin.table"; set format "%.5f"
+set format "\%.7e"; set samples 25; plot [x=-5:5] sin(x)
diff --git a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_sin.table b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_sin.table
new file mode 100644
index 00000000000..ed5cd95f8f6
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_sin.table
@@ -0,0 +1,29 @@
+
+#Curve 0 of 1, 25 points
+#x y type
+-5.0000000e+00 9.5892427e-01 i
+-4.5833333e+00 9.9168387e-01 i
+-4.1666667e+00 8.5475261e-01 i
+-3.7500000e+00 5.7156132e-01 i
+-3.3333333e+00 1.9056796e-01 i
+-2.9166667e+00 -2.2303421e-01 i
+-2.5000000e+00 -5.9847214e-01 i
+-2.0833333e+00 -8.7150319e-01 i
+-1.6666667e+00 -9.9540796e-01 i
+-1.2500000e+00 -9.4898462e-01 i
+-8.3333333e-01 -7.4017685e-01 i
+-4.1666667e-01 -4.0471456e-01 i
+0.0000000e+00 0.0000000e+00 i
+4.1666667e-01 4.0471456e-01 i
+8.3333333e-01 7.4017685e-01 i
+1.2500000e+00 9.4898462e-01 i
+1.6666667e+00 9.9540796e-01 i
+2.0833333e+00 8.7150319e-01 i
+2.5000000e+00 5.9847214e-01 i
+2.9166667e+00 2.2303421e-01 i
+3.3333333e+00 -1.9056796e-01 i
+3.7500000e+00 -5.7156132e-01 i
+4.1666667e+00 -8.5475261e-01 i
+4.5833333e+00 -9.9168387e-01 i
+5.0000000e+00 -9.5892427e-01 i
+
diff --git a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_sinneg.gnuplot b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_sinneg.gnuplot
new file mode 100644
index 00000000000..0678ea0bc79
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_sinneg.gnuplot
@@ -0,0 +1,2 @@
+set terminal table; set output "gnuplot/pgfplots_sinneg.table"; set format "%.5f"
+set format "\%.7e"; set samples 40; plot [x=-10:0] sin(x)
diff --git a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_sinneg.table b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_sinneg.table
new file mode 100644
index 00000000000..1b6fcffaf5c
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_sinneg.table
@@ -0,0 +1,44 @@
+
+#Curve 0 of 1, 40 points
+#x y type
+-1.0000000e+01 5.4402111e-01 i
+-9.7435897e+00 3.1343844e-01 i
+-9.4871795e+00 6.2361036e-02 i
+-9.2307692e+00 -1.9279396e-01 i
+-8.9743590e+00 -4.3534277e-01 i
+-8.7179487e+00 -6.4942592e-01 i
+-8.4615385e+00 -8.2104518e-01 i
+-8.2051282e+00 -9.3897894e-01 i
+-7.9487179e+00 -9.9551587e-01 i
+-7.6923077e+00 -9.8695921e-01 i
+-7.4358974e+00 -9.1386845e-01 i
+-7.1794872e+00 -7.8102277e-01 i
+-6.9230769e+00 -5.9710850e-01 i
+-6.6666667e+00 -3.7415123e-01 i
+-6.4102564e+00 -1.2672941e-01 i
+-6.1538462e+00 1.2897884e-01 i
+-5.8974359e+00 3.7625358e-01 i
+-5.6410256e+00 5.9892631e-01 i
+-5.3846154e+00 7.8243716e-01 i
+-5.1282051e+00 9.1478695e-01 i
+-4.8717949e+00 9.8732176e-01 i
+-4.6153846e+00 9.9529876e-01 i
+-4.3589744e+00 9.3819637e-01 i
+-4.1025641e+00 8.1974833e-01 i
+-3.8461538e+00 6.4769957e-01 i
+-3.5897436e+00 4.3329981e-01 i
+-3.3333333e+00 1.9056796e-01 i
+-3.0769231e+00 -6.4624510e-02 i
+-2.8205128e+00 -3.1559139e-01 i
+-2.5641026e+00 -5.4592277e-01 i
+-2.3076923e+00 -7.4055800e-01 i
+-2.0512821e+00 -8.8677052e-01 i
+-1.7948718e+00 -9.7499996e-01 i
+-1.5384615e+00 -9.9947728e-01 i
+-1.2820513e+00 -9.5860198e-01 i
+-1.0256410e+00 -8.5504677e-01 i
+-7.6923077e-01 -6.9558279e-01 i
+-5.1282051e-01 -4.9063689e-01 i
+-2.5641026e-01 -2.5360981e-01 i
+0.0000000e+00 0.0000000e+00 i
+
diff --git a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_square.gnuplot b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_square.gnuplot
new file mode 100644
index 00000000000..2f77a168932
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_square.gnuplot
@@ -0,0 +1,2 @@
+set terminal table; set output "gnuplot/pgfplots_square.table"; set format "%.5f"
+set format "\%.7e"; set samples 20; plot [x=-4:4] x*x+x+104
diff --git a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_square.table b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_square.table
new file mode 100644
index 00000000000..e3200d03764
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_square.table
@@ -0,0 +1,24 @@
+
+#Curve 0 of 1, 20 points
+#x y type
+-4.0000000e+00 1.1600000e+02 i
+-3.5789474e+00 1.1322992e+02 i
+-3.1578947e+00 1.1081440e+02 i
+-2.7368421e+00 1.0875346e+02 i
+-2.3157895e+00 1.0704709e+02 i
+-1.8947368e+00 1.0569529e+02 i
+-1.4736842e+00 1.0469806e+02 i
+-1.0526316e+00 1.0405540e+02 i
+-6.3157895e-01 1.0376731e+02 i
+-2.1052632e-01 1.0383380e+02 i
+2.1052632e-01 1.0425485e+02 i
+6.3157895e-01 1.0503047e+02 i
+1.0526316e+00 1.0616066e+02 i
+1.4736842e+00 1.0764543e+02 i
+1.8947368e+00 1.0948476e+02 i
+2.3157895e+00 1.1167867e+02 i
+2.7368421e+00 1.1422715e+02 i
+3.1578947e+00 1.1713019e+02 i
+3.5789474e+00 1.2038781e+02 i
+4.0000000e+00 1.2400000e+02 i
+
diff --git a/Master/texmf-dist/doc/latex/pgfplots/liststructuretest.tex b/Master/texmf-dist/doc/latex/pgfplots/liststructuretest.tex
deleted file mode 100644
index a04801eaabd..00000000000
--- a/Master/texmf-dist/doc/latex/pgfplots/liststructuretest.tex
+++ /dev/null
@@ -1,193 +0,0 @@
-\documentclass[a4paper]{article}
-\usepackage{german}
-\usepackage[utf8]{inputenc} % erlaubt direkte Nutzung von Umlauten
-
-% \usepackage[a4paper,noheadfoot,pdftex,left=0.8cm,right=1cm,top=0.8cm,bottom=0.8cm]{geometry}
-% \usepackage{color}
-% \usepackage{colortbl}
-% \usepackage{longtable}
-% \usepackage[a4paper,colorlinks=true]{hyperref} % Querverweise etc. option pdftex,dvipdfm?
-% \usepackage{graphicx}
-% \usepackage[draft]{graphicx}
-% \usepackage{listings} % fuer codefragmente jeder art
-\usepackage[intlimits]{amsmath}
-\usepackage{amssymb}
-\usepackage{amsfonts}
-% \usepackage{amsthm}
-\usepackage{bibgerm}
-%\usepackage{simplelist}
-\usepackage{liststructure}
-
-
-% fuer endvironment 'sidewaysfigure' bspw
-% \usepackage{rotating}
-
-%\pdfinfo {
-% /Author (Christian Feuersaenger)
-%}
-
-%%
-% My user defined commands ...
-%
-\usepackage{mymath}
-\usepackage{myext}
-
-% von Alex: A4-Groesse, symmetrische Seitenraender.
-% \usepackage{mya4sym}
-
-
-% figure einstellungen:
-%\renewcommand{\topfraction}{0.85}
-%\renewcommand{\textfraction}{0.06}
-%\renewcommand{\floatpagefraction}{0.8}
-
-
-
-\author{Christian Feuersänger}
-%\title{}
-
-\begin{document}
-%\maketitle
-{
-\tracingcommands=1
-%--------------------------------------------------
-% \message{TEST toks0:}%
-% \toks0={{a}{b}{c}{d}}%
-% Der Inhalt davon ist \the\toks0
-%
-% \message{TEST 2 toks0:}%
-% \def\probe{{a}{b}{c}{d}}%
-% \toks0={\probe}%
-% Der Inhalt davon ist \the\toks0
-%
-% ENDE
-%
-% \message{TEST create:}%
-% \listcreate{\probe}{{a}{b}{c}{d}}%
-%
-% %\show\listcreate
-%
-% \message{Nutze probe:}%
-% Inhalt: \probe
-%
-% \count0=0
-% \loop
-% \ifnum\count0<5
-% \listpopfront\erstes\probe
-% Das Erste: \erstes
-%
-% Inhalt: \probe
-% \vskip2cm
-% \advance\count0 by1
-% \repeat
-%
-% \tracingmacros=2
-% \message{Pushback-Test}%
-% Inhalt vorher: \probe
-%
-% \listpushback\probe{a}%
-% Inhalt jetzt: \probe
-%
-% \listpushback\probe{[eins]}%
-% Inhalt jetzt: \probe
-%
-% \listpushback\probe{zwei}%
-% Inhalt jetzt: \probe
-%
-% \message{lese wieder alles aus:}%
-% lese wieder alles aus:%
-% \count0=0
-% \loop
-% \ifnum\count0<5
-% \listpopfront\erstes\probe
-% Das Erste: \erstes
-%
-% Inhalt: \probe
-% \vskip2cm
-% \advance\count0 by1
-% \repeat
-%
-%
-% \vskip3cm
-% \message{Das hat NICHT geklappt}%
-% \listcreate{\probe}{{eins}{drei}}%
-% Inhalt: \probe
-%
-% \listpopfront\erstes\probe
-% Erstes: \erstes
-%
-% Inhalt: \probe
-%
-% \listpopfront\erstes\probe
-% Erstes: \erstes
-%
-% Inhalt: \probe
-%
-%--------------------------------------------------
-
-
-\tracingmacros=2
-\message{HIER GEHTS LOS}%
-\let\probe=\empty
-\listpushback eins\to\probe
-\listpushback [probe]\to\probe
-\listpushback [probe2]\to\probe
-\listpushback [probe3]\to\probe
-
-Groesse: \listsize\probe\to{\count0}\the\count0
-
-Inhalt:
-
-\listforeach\probe\as\curlistelem{\curlistelem \par}
-
-\listnew\foolist{Eins\\Zwei\\Drei\\}%
-\listforeach\foolist\as\foo{Element \foo\par}%
-
-\tracingcommands=2
-\message{SELECT TEST:}%
-\count1=1
-Element \the\count1: \listselect\count1\of\probe\to\elem\elem
-
-Element 3: \listselect3\of\probe\to\elem\elem
-
-Jetzt ist count1=\the\count1
-\vskip1cm
-
-\listpopfront\probe\to\first
-Erstes: \first
-
-verbleibedne Größe: \listsize\probe\to{\count0}\the\count0
-
-\listpopfront\probe\to\first
-Erstes: \first
-
-verbleibedne Größe: \listsize\probe\to{\count0}\the\count0
-
-
-\message{NEUE LISTE:}%
-NEUE LISTE:
-\listnew\foolist{First Element\\Second Element\\Third Element\\}
-\listnew\foolistX{Eins\\Zwei\\}
-{\def\\#1{#1\par}
-Inhalt:
-
-\foolist
-}
-
-\listconcat\third=\foolist&\foolistX
-
-{\def\\#1{#1\par}
-Ergebnis von concat:
-
-\third
-}
-\message{ENDE}%
-}
-
-
-
-\bibliographystyle{gerabbrv} %gerapali} %gerabbrv} %gerunsrt.bst} %gerabbrv}% gerplain}
-% \bibliography{literatur.bib}
-\end{document}
-
-
diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfmanual-en-macros.tex b/Master/texmf-dist/doc/latex/pgfplots/pgfmanual-en-macros.tex
new file mode 100644
index 00000000000..e4efc70dcfa
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/pgfmanual-en-macros.tex
@@ -0,0 +1,943 @@
+% Copyright 2006 by Till Tantau
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Free Documentation License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+
+% $Header: /cvsroot/pgfplots/pgfplots/doc/latex/pgfplots/pgfmanual-en-macros.tex,v 1.1 2008/05/24 12:09:27 ludewich Exp $
+
+
+\providecommand\href[2]{\texttt{#1}}
+
+
+\colorlet{examplefill}{yellow!80!black}
+\definecolor{graphicbackground}{rgb}{0.96,0.96,0.8}
+\definecolor{codebackground}{rgb}{0.8,0.8,1}
+
+\newenvironment{pgfmanualentry}{\list{}{\leftmargin=2em\itemindent-\leftmargin\def\makelabel##1{\hss##1}}}{\endlist}
+\newcommand\pgfmanualentryheadline[1]{\itemsep=0pt\parskip=0pt\item\strut{#1}\par\topsep=0pt}
+\newcommand\pgfmanualbody{\parskip3pt}
+
+
+
+\newenvironment{pgflayout}[1]{
+ \begin{pgfmanualentry}
+ \pgfmanualentryheadline{\texttt{\string\pgfpagesuselayout\char`\{\declare{#1}\char`\}}\oarg{options}}
+ \index{#1@\protect\texttt{#1} layout}%
+ \index{Page layouts!#1@\protect\texttt{#1}}%
+ \pgfmanualbody
+}
+{
+ \end{pgfmanualentry}
+}
+
+
+\newenvironment{command}[1]{
+ \begin{pgfmanualentry}
+ \extractcommand#1\@@
+ \pgfmanualbody
+}
+{
+ \end{pgfmanualentry}
+}
+
+%% MW: START MATH MACROS
+\def\mvar#1{{\rmfamily\textit{#1}}}
+
+\makeatletter
+
+\def\extractmathfunctionname#1{\extractmathfunctionname@#1(,)\tmpa\tmpb}
+\def\extractmathfunctionname@#1(#2)#3\tmpb{\def\mathname{#1}}
+
+\def\extractmathoperatorname{\begingroup\def\mvar##1{}\def\ {}\extractmathoperatorname@}
+\def\extractmathoperatorname@#1{\xdef\mathname{#1}\endgroup}
+
+\makeatother
+
+\newenvironment{math-function}[1]{
+ \begin{pgfmanualentry}
+ \extractmathfunctionname{#1}
+ \pgfmanualentryheadline{\texttt{#1}}%
+ \index{\mathname @\protect\texttt{\mathname} math function}%
+ \index{Math functions!\mathname @\protect\texttt{\mathname}}
+ \pgfmanualbody
+}
+{
+ \end{pgfmanualentry}
+}
+
+\newenvironment{math-operator}[1]{
+ \begin{pgfmanualentry}
+ \extractmathoperatorname{#1}
+ \pgfmanualentryheadline{\texttt{#1}}%
+ \index{\mathname @\protect\texttt{\mathname} math operator}%
+ \index{Math operators!\mathname @\protect\texttt{\mathname}}
+ \pgfmanualbody
+}
+{%
+ \end{pgfmanualentry}
+}
+
+\newenvironment{math-constant}[1]{
+ \begin{pgfmanualentry}
+ \pgfmanualentryheadline{\texttt{#1}}%
+ \index{#1@\protect\texttt{#1} math constant}%
+ \index{Math constants!#1@\protect\texttt{#1}}
+ \pgfmanualbody
+}
+{
+ \end{pgfmanualentry}
+}
+\def\calcname{\textsc{calc}}
+%% MW: END MATH MACROS
+
+
+\def\extractcommand#1#2\@@{%
+ \pgfmanualentryheadline{\declare{\texttt{\string#1}}#2}%
+ \removeats{#1}%
+ \index{\strippedat @\protect\myprintocmmand{\strippedat}}}
+
+
+% \begin{environment}{{name}\marg{arguments}}
+\renewenvironment{environment}[1]{
+ \begin{pgfmanualentry}
+ \extractenvironement#1\@@
+ \pgfmanualbody
+}
+{
+ \end{pgfmanualentry}
+}
+
+\def\extractenvironement#1#2\@@{%
+ \pgfmanualentryheadline{{\ttfamily\char`\\begin\char`\{\declare{#1}\char`\}}#2}%
+ \pgfmanualentryheadline{{\ttfamily\ \ }\meta{environment contents}}%
+ \pgfmanualentryheadline{{\ttfamily\char`\\end\char`\{\declare{#1}\char`\}}}%
+ \index{#1@\protect\texttt{#1} environment}%
+ \index{Environments!#1@\protect\texttt{#1}}}
+
+
+\newenvironment{plainenvironment}[1]{
+ \begin{pgfmanualentry}
+ \extractplainenvironement#1\@@
+ \pgfmanualbody
+}
+{
+ \end{pgfmanualentry}
+}
+
+\def\extractplainenvironement#1#2\@@{%
+ \pgfmanualentryheadline{{\ttfamily\declare{\char`\\#1}}#2}%
+ \pgfmanualentryheadline{{\ttfamily\ \ }\meta{environment contents}}%
+ \pgfmanualentryheadline{{\ttfamily\declare{\char`\\end#1}}}%
+ \index{#1@\protect\texttt{#1} environment}%
+ \index{Environments!#1@\protect\texttt{#1}}}
+
+
+\newenvironment{contextenvironment}[1]{
+ \begin{pgfmanualentry}
+ \extractcontextenvironement#1\@@
+ \pgfmanualbody
+}
+{
+ \end{pgfmanualentry}
+}
+
+\def\extractcontextenvironement#1#2\@@{%
+ \pgfmanualentryheadline{{\ttfamily\declare{\char`\\start#1}}#2}%
+ \pgfmanualentryheadline{{\ttfamily\ \ }\meta{environment contents}}%
+ \pgfmanualentryheadline{{\ttfamily\declare{\char`\\stop#1}}}%
+ \index{#1@\protect\texttt{#1} environment}%
+ \index{Environments!#1@\protect\texttt{#1}}}
+
+
+\newenvironment{shape}[1]{
+ \begin{pgfmanualentry}
+ \pgfmanualentryheadline{Shape {\ttfamily\declare{#1}}}%
+ \index{#1@\protect\texttt{#1} shape}%
+ \index{Shapes!#1@\protect\texttt{#1}}
+ \pgfmanualbody
+}
+{
+ \end{pgfmanualentry}
+}
+
+
+\newenvironment{handler}[1]{
+ \begin{pgfmanualentry}
+ \extracthandler#1\@nil%
+ \pgfmanualbody
+}
+{
+ \end{pgfmanualentry}
+}
+
+\def\gobble#1{}
+\def\extracthandler#1#2\@nil{%
+ \pgfmanualentryheadline{Key handler \meta{key}{\ttfamily/\declare{#1}}#2}%
+ \index{\gobble#1@\protect\texttt{#1} handler}%
+ \index{Key handlers!#1@\protect\texttt{#1}}
+}
+
+
+\makeatletter
+
+
+\newenvironment{stylekey}[1]{
+ \begin{pgfmanualentry}
+ \def\extrakeytext{style, }
+ \extractkey#1\@nil%
+ \pgfmanualbody
+}
+{
+ \end{pgfmanualentry}
+}
+
+
+% \begin{key}{/path/x=value}
+% \begin{key}{/path/x=value (initially XXX)}
+% \begin{key}{/path/x=value (default XXX)}
+\newenvironment{key}[1]{
+ \begin{pgfmanualentry}
+ \def\extrakeytext{}
+ %\def\altpath{\emph{\color{gray}or}}%
+ \extractkey#1\@nil%
+ \pgfmanualbody
+}
+{
+ \end{pgfmanualentry}
+}
+
+\def\extractkey#1\@nil{%
+ \pgfutil@in@={#1}%
+ \ifpgfutil@in@%
+ \extractkeyequal#1\@nil
+ \else%
+ \pgfutil@in@{(initial}{#1}%
+ \ifpgfutil@in@%
+ \extractequalinitial#1\@nil%
+ \else
+ \pgfmanualentryheadline{{\ttfamily\declare{#1}}\hfill(\extrakeytext no value)}%
+ \def\mykey{#1}%
+ \def\mypath{}%
+ \def\myname{}%
+ \firsttimetrue%
+ \decompose#1/\nil%
+ \fi
+ \fi%
+}
+
+\def\extractkeyequal#1=#2\@nil{%
+ \pgfutil@in@{(default}{#2}%
+ \ifpgfutil@in@%
+ \extractdefault{#1}#2\@nil%
+ \else%
+ \pgfutil@in@{(initial}{#2}%
+ \ifpgfutil@in@%
+ \extractinitial{#1}#2\@nil%
+ \else
+ \pgfmanualentryheadline{{\ttfamily\declare{#1}=}#2\hfill(\extrakeytext no default)}%
+ \fi%
+ \fi%
+ \def\mykey{#1}%
+ \def\mypath{}%
+ \def\myname{}%
+ \firsttimetrue%
+ \decompose#1/\nil%
+}
+
+\def\extractdefault#1#2(default #3)\@nil{%
+ \pgfmanualentryheadline{{\ttfamily\declare{#1}\opt{=}}\opt{#2}\hfill (\extrakeytext default {\ttfamily#3})}%
+}
+
+\def\extractinitial#1#2(initially #3)\@nil{%
+ \pgfmanualentryheadline{{\ttfamily\declare{#1}=}#2\hfill (\extrakeytext no default, initially {\ttfamily#3})}%
+}
+
+\def\extractequalinitial#1 (initially #2)\@nil{%
+ \pgfmanualentryheadline{{\ttfamily\declare{#1}}\hfill (\extrakeytext initially {\ttfamily#2})}%
+ \def\mykey{#1}%
+ \def\mypath{}%
+ \def\myname{}%
+ \firsttimetrue%
+ \decompose#1/\nil%
+}
+
+% Introduces a key alias '/#1/<name of current key>'
+% to be used inside of \begin{key} ... \end{key}
+\def\keyalias#1{\vspace{-3pt}\item{\small alias {\ttfamily/#1/\myname}}\vspace{-2pt}\par}
+
+\newif\iffirsttime
+
+\makeatother
+
+\def\decompose/#1/#2\nil{%
+ \def\test{#2}%
+ \ifx\test\empty%
+ % aha.
+ \index{#1@\protect\texttt{#1} key}%
+ \index{\mypath#1@\protect\texttt{#1}}%
+ \def\myname{#1}%
+ \else%
+ \iffirsttime
+ \def\mypath{#1@\protect\texttt{/#1/}!}%
+ \firsttimefalse
+ \else
+ \expandafter\def\expandafter\mypath\expandafter{\mypath#1@\protect\texttt{#1/}!}%
+ \fi
+ \def\firsttime{}
+ \decompose/#2\nil%
+ \fi%
+}
+
+\newenvironment{predefinedmethod}[1]{
+ \begin{pgfmanualentry}
+ \extractpredefinedmethod#1\@nil
+ \pgfmanualbody
+}
+{
+ \end{pgfmanualentry}
+}
+\def\extractpredefinedmethod#1(#2)\@nil{%
+ \pgfmanualentryheadline{Method \declare{\ttfamily #1}\texttt(#2\texttt) \hfill(predefined for all classes)}
+ \index{#1@\protect\texttt{#1} method}%
+ \index{Methods!#1@\protect\texttt{#1}}
+}
+
+
+\newenvironment{ooclass}[1]{
+ \begin{pgfmanualentry}
+ \def\currentclass{#1}
+ \pgfmanualentryheadline{Class \declare{\texttt{#1}}}
+ \index{#1@\protect\texttt{#1} class}%
+ \index{Class #1@Class \protect\texttt{#1}}%
+ \index{Classes!#1@\protect\texttt{#1}}
+ \pgfmanualbody
+}
+{
+ \end{pgfmanualentry}
+}
+
+\newenvironment{method}[1]{
+ \begin{pgfmanualentry}
+ \extractmethod#1\@nil
+ \pgfmanualbody
+}
+{
+ \end{pgfmanualentry}
+}
+\def\extractmethod#1(#2)\@nil{%
+ \def\test{#1}
+ \ifx\test\currentclass
+ \pgfmanualentryheadline{Constructor \declare{\ttfamily #1}\texttt(#2\texttt)}
+ \else
+ \pgfmanualentryheadline{Method \declare{\ttfamily #1}\texttt(#2\texttt)}
+ \fi
+ \index{#1@\protect\texttt{#1} method}%
+ \index{Methods!#1@\protect\texttt{#1}}
+ \index{Class \currentclass!#1@\protect\texttt{#1}}%
+}
+
+\newenvironment{attribute}[1]{
+ \begin{pgfmanualentry}
+ \extractattribute#1\@nil
+ \pgfmanualbody
+}
+{
+ \end{pgfmanualentry}
+}
+\def\extractattribute#1=#2;\@nil{%
+ \def\test{#2}%
+ \ifx\test\@empty
+ \pgfmanualentryheadline{Private attribute \declare{\ttfamily #1} \hfill (initially empty)}
+ \else
+ \pgfmanualentryheadline{Private attribute \declare{\ttfamily #1} \hfill (initially {\ttfamily #2})}
+ \fi
+ \index{#1@\protect\texttt{#1} attribute}%
+ \index{Attributes!#1@\protect\texttt{#1}}
+ \index{Class \currentclass!#1@\protect\texttt{#1}}%
+}
+
+
+
+\newenvironment{predefinednode}[1]{
+ \begin{pgfmanualentry}
+ \pgfmanualentryheadline{Predefined node {\ttfamily\declare{#1}}}%
+ \index{#1@\protect\texttt{#1} node}%
+ \index{Predefined node!#1@\protect\texttt{#1}}
+ \pgfmanualbody
+}
+{
+ \end{pgfmanualentry}
+}
+
+\newenvironment{coordinatesystem}[1]{
+ \begin{pgfmanualentry}
+ \pgfmanualentryheadline{Coordinate system {\ttfamily\declare{#1}}}%
+ \index{#1@\protect\texttt{#1} coordinate system}%
+ \index{Coordinate systems!#1@\protect\texttt{#1}}
+ \pgfmanualbody
+}
+{
+ \end{pgfmanualentry}
+}
+
+\newenvironment{snake}[1]{
+ \begin{pgfmanualentry}
+ \pgfmanualentryheadline{Snake {\ttfamily\declare{#1}}}%
+ \index{#1@\protect\texttt{#1} snake}%
+ \index{Snakes!#1@\protect\texttt{#1}}
+ \pgfmanualbody
+}
+{
+ \end{pgfmanualentry}
+}
+
+\newenvironment{decoration}[1]{
+ \begin{pgfmanualentry}
+ \pgfmanualentryheadline{Decoration {\ttfamily\declare{#1}}}%
+ \index{#1@\protect\texttt{#1} decoration}%
+ \index{Decorations!#1@\protect\texttt{#1}}
+ \pgfmanualbody
+}
+{
+ \end{pgfmanualentry}
+}
+
+
+\def\pgfmanualbar{\char`\|}
+\makeatletter
+\newenvironment{pathoperation}[3][]{
+ \begin{pgfmanualentry}
+ \pgfmanualentryheadline{\textcolor{gray}{{\ttfamily\char`\\path}\
+ \ \dots}
+ \declare{\texttt{#2}}#3\ \textcolor{gray}{\dots\texttt{;}}}%
+ \def\pgfmanualtest{#1}%
+ \ifx\pgfmanualtest\@empty%
+ \index{#2@\protect\texttt{#2} path operation}%
+ \index{Path operations!#2@\protect\texttt{#2}}%
+ \fi%
+ \pgfmanualbody
+}
+{
+ \end{pgfmanualentry}
+}
+\makeatother
+
+\def\extractcommand#1#2\@@{%
+ \pgfmanualentryheadline{\declare{\texttt{\string#1}}#2}%
+ \removeats{#1}%
+ \index{\strippedat @\protect\myprintocmmand{\strippedat}}}
+
+\def\doublebs{\texttt{\char`\\\char`\\}}
+
+
+\newenvironment{package}[1]{
+ \begin{pgfmanualentry}
+ \pgfmanualentryheadline{{\ttfamily\char`\\usepackage\char`\{\declare{#1}\char`\}\space\space \char`\%\space\space \LaTeX}}
+ \index{#1@\protect\texttt{#1} package}%
+ \index{Packages and files!#1@\protect\texttt{#1}}%
+ \pgfmanualentryheadline{{\ttfamily\char`\\input \declare{#1}.tex\space\space\space \char`\%\space\space plain \TeX}}
+ \pgfmanualentryheadline{{\ttfamily\char`\\usemodule[\declare{#1}]\space\space \char`\%\space\space Con\TeX t}}
+ \pgfmanualbody
+}
+{
+ \end{pgfmanualentry}
+}
+
+
+\newenvironment{pgfmodule}[1]{
+ \begin{pgfmanualentry}
+ \pgfmanualentryheadline{{\ttfamily\char`\\usepgfmodule\char`\{\declare{#1}\char`\}\space\space\space
+ \char`\%\space\space \LaTeX\space and plain \TeX\space and pure pgf}}
+ \index{#1@\protect\texttt{#1} module}%
+ \index{Modules!#1@\protect\texttt{#1}}%
+ \pgfmanualentryheadline{{\ttfamily\char`\\usepgfmodule[\declare{#1}]\space\space \char`\%\space\space Con\TeX t\space and pure pgf}}
+ \pgfmanualbody
+}
+{
+ \end{pgfmanualentry}
+}
+
+\newenvironment{pgflibrary}[1]{
+ \begin{pgfmanualentry}
+ \pgfmanualentryheadline{{\ttfamily\char`\\usepgflibrary\char`\{\declare{#1}\char`\}\space\space\space
+ \char`\%\space\space \LaTeX\space and plain \TeX\space and pure pgf}}
+ \index{#1@\protect\texttt{#1} library}%
+ \index{Libraries!#1@\protect\texttt{#1}}%
+ \pgfmanualentryheadline{{\ttfamily\char`\\usepgflibrary[\declare{#1}]\space\space \char`\%\space\space Con\TeX t\space and pure pgf}}
+ \pgfmanualentryheadline{{\ttfamily\char`\\usetikzlibrary\char`\{\declare{#1}\char`\}\space\space
+ \char`\%\space\space \LaTeX\space and plain \TeX\space when using \tikzname}}
+ \pgfmanualentryheadline{{\ttfamily\char`\\usetikzlibrary[\declare{#1}]\space
+ \char`\%\space\space Con\TeX t\space when using \tikzname}}
+ \pgfmanualbody
+}
+{
+ \end{pgfmanualentry}
+}
+
+\newenvironment{tikzlibrary}[1]{
+ \begin{pgfmanualentry}
+ \pgfmanualentryheadline{{\ttfamily\char`\\usetikzlibrary\char`\{\declare{#1}\char`\}\space\space \char`\%\space\space \LaTeX\space and plain \TeX}}
+ \index{#1@\protect\texttt{#1} library}%
+ \index{Libraries!#1@\protect\texttt{#1}}%
+ \pgfmanualentryheadline{{\ttfamily\char`\\usetikzlibrary[\declare{#1}]\space \char`\%\space\space Con\TeX t}}
+ \pgfmanualbody
+}
+{
+ \end{pgfmanualentry}
+}
+
+
+
+\newenvironment{filedescription}[1]{
+ \begin{pgfmanualentry}
+ \pgfmanualentryheadline{File {\ttfamily\declare{#1}}}%
+ \index{#1@\protect\texttt{#1} file}%
+ \index{Packages and files!#1@\protect\texttt{#1}}%
+ \pgfmanualbody
+}
+{
+ \end{pgfmanualentry}
+}
+
+
+\newenvironment{packageoption}[1]{
+ \begin{pgfmanualentry}
+ \pgfmanualentryheadline{{\ttfamily\char`\\usepackage[\declare{#1}]\char`\{pgf\char`\}}}
+ \index{#1@\protect\texttt{#1} package option}%
+ \index{Package options for \textsc{pgf}!#1@\protect\texttt{#1}}%
+ \pgfmanualbody
+}
+{
+ \end{pgfmanualentry}
+}
+
+
+
+\newcommand\opt[1]{{\color{black!50!green}#1}}
+\newcommand\ooarg[1]{{\ttfamily[}\meta{#1}{\ttfamily]}}
+
+\def\opt{\afterassignment\pgfmanualopt\let\next=}
+\def\pgfmanualopt{\ifx\next\bgroup\bgroup\color{black!50!green}\else{\color{black!50!green}\next}\fi}
+
+
+
+\def\beamer{\textsc{beamer}}
+\def\pdf{\textsc{pdf}}
+\def\pgfname{\textsc{pgf}}
+\def\tikzname{Ti\emph{k}Z}
+\def\pstricks{\textsc{pstricks}}
+\def\prosper{\textsc{prosper}}
+\def\seminar{\textsc{seminar}}
+\def\texpower{\textsc{texpower}}
+\def\foils{\textsc{foils}}
+
+{
+ \makeatletter
+ \global\let\myempty=\@empty
+ \global\let\mygobble=\@gobble
+ \catcode`\@=12
+ \gdef\getridofats#1@#2\relax{%
+ \def\getridtest{#2}%
+ \ifx\getridtest\myempty%
+ \expandafter\def\expandafter\strippedat\expandafter{\strippedat#1}
+ \else%
+ \expandafter\def\expandafter\strippedat\expandafter{\strippedat#1\protect\printanat}
+ \getridofats#2\relax%
+ \fi%
+ }
+
+ \gdef\removeats#1{%
+ \let\strippedat\myempty%
+ \edef\strippedtext{\stripcommand#1}%
+ \expandafter\getridofats\strippedtext @\relax%
+ }
+
+ \gdef\stripcommand#1{\expandafter\mygobble\string#1}
+}
+
+\def\printanat{\char`\@}
+
+\def\declare{\afterassignment\pgfmanualdeclare\let\next=}
+\def\pgfmanualdeclare{\ifx\next\bgroup\bgroup\color{red!75!black}\else{\color{red!75!black}\next}\fi}
+
+
+\let\textoken=\command
+\let\endtextoken=\endcommand
+
+\def\myprintocmmand#1{\texttt{\char`\\#1}}
+
+\def\example{\par\smallskip\noindent\textit{Example: }}
+\def\themeauthor{\par\smallskip\noindent\textit{Theme author: }}
+
+
+\def\indexoption#1{%
+ \index{#1@\protect\texttt{#1} option}%
+ \index{Graphic options and styles!#1@\protect\texttt{#1}}%
+}
+
+\def\itemcalendaroption#1{\item \declare{\texttt{#1}}%
+ \index{#1@\protect\texttt{#1} date test}%
+ \index{Date tests!#1@\protect\texttt{#1}}%
+}
+
+
+
+\def\class#1{\list{}{\leftmargin=2em\itemindent-\leftmargin\def\makelabel##1{\hss##1}}%
+\extractclass#1@\par\topsep=0pt}
+\def\endclass{\endlist}
+\def\extractclass#1#2@{%
+\item{{{\ttfamily\char`\\documentclass}#2{\ttfamily\char`\{\declare{#1}\char`\}}}}%
+ \index{#1@\protect\texttt{#1} class}%
+ \index{Classes!#1@\protect\texttt{#1}}}
+
+\def\partname{Part}
+
+\makeatletter
+\def\index@prologue{\section*{Index}\addcontentsline{toc}{section}{Index}
+ This index only contains automatically generated entries. A good
+ index should also contain carefully selected keywords. This index is
+ not a good index.
+ \bigskip
+}
+\c@IndexColumns=2
+ \def\theindex{\@restonecoltrue
+ \columnseprule \z@ \columnsep 29\p@
+ \twocolumn[\index@prologue]%
+ \parindent -30pt
+ \columnsep 15pt
+ \parskip 0pt plus 1pt
+ \leftskip 30pt
+ \rightskip 0pt plus 2cm
+ \small
+ \def\@idxitem{\par}%
+ \let\item\@idxitem \ignorespaces}
+ \def\endtheindex{\onecolumn}
+\def\noindexing{\let\index=\@gobble}
+
+
+
+\newcommand\symarrow[1]{
+ \index{#1@\protect\texttt{#1} arrow tip}%
+ \index{Arrow tips!#1@\protect\texttt{#1}}
+ \texttt{#1}& yields thick
+ \begin{tikzpicture}[arrows={#1-#1},thick,baseline]
+ \useasboundingbox (0pt,-0.5ex) rectangle (1cm,2ex);
+ \draw (0pt,.5ex) -- (1cm,.5ex);
+ \end{tikzpicture} and thin
+ \begin{tikzpicture}[arrows={#1-#1},thin,baseline]
+ \useasboundingbox (0pt,-0.5ex) rectangle (1cm,2ex);
+ \draw (0pt,.5ex) -- (1cm,.5ex);
+ \end{tikzpicture}
+}
+\newcommand\symarrowdouble[1]{
+ \index{#1@\protect\texttt{#1} arrow tip}%
+ \index{Arrow tips!#1@\protect\texttt{#1}}
+ \texttt{#1}& yields thick
+ \begin{tikzpicture}[arrows={#1-#1},thick,baseline]
+ \useasboundingbox (0pt,-0.5ex) rectangle (1cm,2ex);
+ \draw (0pt,.5ex) -- (1cm,.5ex);
+ \end{tikzpicture}
+ and thin
+ \begin{tikzpicture}[arrows={#1-#1},thin,baseline]
+ \useasboundingbox (0pt,-0.5ex) rectangle (1cm,2ex);
+ \draw (0pt,.5ex) -- (1cm,.5ex);
+ \end{tikzpicture}, double
+ \begin{tikzpicture}[arrows={#1-#1},thick,baseline]
+ \useasboundingbox (0pt,-0.5ex) rectangle (1cm,2ex);
+ \draw[double,double equal sign distance] (0pt,.5ex) -- (1cm,.5ex);
+ \end{tikzpicture} and
+ \begin{tikzpicture}[arrows={#1-#1},thin,baseline]
+ \useasboundingbox (0pt,-0.5ex) rectangle (1cm,2ex);
+ \draw[double,double equal sign distance] (0pt,.5ex) -- (1cm,.5ex);
+ \end{tikzpicture}
+}
+
+\newcommand\sarrow[2]{
+ \index{#1@\protect\texttt{#1} arrow tip}%
+ \index{Arrow tips!#1@\protect\texttt{#1}}
+ \index{#2@\protect\texttt{#2} arrow tip}%
+ \index{Arrow tips!#2@\protect\texttt{#2}}
+ \texttt{#1-#2}& yields thick
+ \begin{tikzpicture}[arrows={#1-#2},thick,baseline]
+ \useasboundingbox (0pt,-0.5ex) rectangle (1cm,2ex);
+ \draw (0pt,.5ex) -- (1cm,.5ex);
+ \end{tikzpicture} and thin
+ \begin{tikzpicture}[arrows={#1-#2},thin,baseline]
+ \useasboundingbox (0pt,-0.5ex) rectangle (1cm,2ex);
+ \draw (0pt,.5ex) -- (1cm,.5ex);
+ \end{tikzpicture}
+}
+
+\newcommand\sarrowdouble[2]{
+ \index{#1@\protect\texttt{#1} arrow tip}%
+ \index{Arrow tips!#1@\protect\texttt{#1}}
+ \index{#2@\protect\texttt{#2} arrow tip}%
+ \index{Arrow tips!#2@\protect\texttt{#2}}
+ \texttt{#1-#2}& yields thick
+ \begin{tikzpicture}[arrows={#1-#2},thick,baseline]
+ \useasboundingbox (0pt,-0.5ex) rectangle (1cm,2ex);
+ \draw (0pt,.5ex) -- (1cm,.5ex);
+ \end{tikzpicture} and thin
+ \begin{tikzpicture}[arrows={#1-#2},thin,baseline]
+ \useasboundingbox (0pt,-0.5ex) rectangle (1cm,2ex);
+ \draw (0pt,.5ex) -- (1cm,.5ex);
+ \end{tikzpicture}, double
+ \begin{tikzpicture}[arrows={#1-#2},thick,baseline]
+ \useasboundingbox (0pt,-0.5ex) rectangle (1cm,2ex);
+ \draw[double,double equal sign distance] (0pt,.5ex) -- (1cm,.5ex);
+ \end{tikzpicture} and
+ \begin{tikzpicture}[arrows={#1-#2},thin,baseline]
+ \useasboundingbox (0pt,-0.5ex) rectangle (1cm,2ex);
+ \draw[double,double equal sign distance] (0pt,.5ex) -- (1cm,.5ex);
+ \end{tikzpicture}
+}
+
+\newcommand\carrow[1]{
+ \index{#1@\protect\texttt{#1} arrow tip}%
+ \index{Arrow tips!#1@\protect\texttt{#1}}
+ \texttt{#1}& yields for line width 1ex
+ \begin{tikzpicture}[arrows={#1-#1},line width=1ex,baseline]
+ \useasboundingbox (0pt,-0.5ex) rectangle (1.5cm,2ex);
+ \draw (0pt,.5ex) -- (1.5cm,.5ex);
+ \end{tikzpicture}
+}
+\def\myvbar{\char`\|}
+\newcommand\plotmarkentry[1]{%
+ \index{#1@\protect\texttt{#1} plot mark}%
+ \index{Plot marks!#1@\protect\texttt{#1}}
+ \texttt{\char`\\pgfuseplotmark\char`\{\declare{#1}\char`\}} &
+ \tikz\draw[color=black!25] plot[mark=#1,mark options={fill=examplefill,draw=black}] coordinates{(0,0) (.5,0.2) (1,0) (1.5,0.2)};\\
+}
+\newcommand\plotmarkentrytikz[1]{%
+ \index{#1@\protect\texttt{#1} plot mark}%
+ \index{Plot marks!#1@\protect\texttt{#1}}
+ \texttt{mark=\declare{#1}} & \tikz\draw[color=black!25]
+ plot[mark=#1,mark options={fill=examplefill,draw=black}]
+ coordinates {(0,0) (.5,0.2) (1,0) (1.5,0.2)};\\
+}
+
+
+
+\ifx\scantokens\@undefined
+ \PackageError{pgfmanual-macros}{You need to use extended latex
+ (elatex) or (pdfelatex) to process this document}{}
+\fi
+
+% Define \find@example such that it doesn't destroy catcodes:
+\begingroup
+\catcode`|=0
+\catcode`[= 1
+\catcode`]=2
+\catcode`\{=12
+\catcode `\}=12
+\catcode`\\=12 |gdef|find@example#1\end{codeexample}[|endofcodeexample[#1]]
+|endgroup
+
+% define \returntospace.
+%
+% It should define NEWLINE as {}, spaces and tabs as \space.
+\begingroup
+\catcode`\^=7
+\catcode`\^^M=13
+\catcode`\^^I=13
+\catcode`\ =13%
+\gdef\returntospace{\catcode`\ =13\def {\space}\catcode`\^^I=13\def^^I{\space}\catcode`\^^M=13\def^^M{}}%
+\endgroup
+
+\begingroup
+\catcode`\%=13
+\catcode`\^^M=13
+\gdef\commenthandler{\catcode`\%=13\def%{\@gobble@till@return}}
+\gdef\@gobble@till@return#1^^M{}
+\gdef\@gobble@till@return@ignore#1^^M{\ignorespaces}
+\gdef\typesetcomment{\catcode`\%=13\def%{\@typeset@till@return}}
+\gdef\@typeset@till@return#1^^M{{\def%{\char`\%}\textsl{\char`\%#1}}\par}
+\endgroup
+
+% Define tab-implementation functions
+% \codeexample@tabinit@replacementchars@
+% and
+% \codeexample@tabinit@catcode@
+%
+% They should ONLY be used in case that tab replacement is active.
+%
+% This here is merely a preparation step.
+%
+% Idea:
+% \codeexample@tabinit@catcode@ will make TAB active
+% and
+% \codeexample@tabinit@replacementchars@ will insert as many spaces as
+% /codeexample/tabsize contains.
+{
+\catcode`\^^I=13
+% ATTENTION: do NOT use tabs in these definitions!!
+\gdef\codeexample@tabinit@replacementchars@{%
+ \begingroup
+ \count0=\pgfkeysvalueof{/codeexample/tabsize}\relax
+ \toks0={}%
+ \loop
+ \ifnum\count0>0
+ \advance\count0 by-1
+ \toks0=\expandafter{\the\toks0\ }%
+ \repeat
+ \xdef\codeexample@tabinit@replacementchars@@{\the\toks0}%
+ \endgroup
+ \let^^I=\codeexample@tabinit@replacementchars@@
+}%
+\gdef\codeexample@tabinit@catcode@{\catcode`\^^I=13}%
+}%
+
+% Called after any options have been set. It assigns
+% \codeexample@tabinit@catcode
+% and
+% \codeexample@tabinit@replacementchars
+% which are used inside of
+%\begin{codeexample}
+% ...
+%\end{codeexample}
+%
+% \codeexample@tabinit@catcode is either \relax or it makes tab
+% active.
+%
+% \codeexample@tabinit@replacementchars is either \relax or it inserts
+% a proper replacement sequence for tabs (as many spaces as
+% configured)
+\def\codeexample@tabinit{%
+ \ifnum\pgfkeysvalueof{/codeexample/tabsize}=0\relax
+ \let\codeexample@tabinit@replacementchars=\relax
+ \let\codeexample@tabinit@catcode=\relax
+ \else
+ \let\codeexample@tabinit@catcode=\codeexample@tabinit@catcode@
+ \let\codeexample@tabinit@replacementchars=\codeexample@tabinit@replacementchars@
+ \fi
+}
+
+\pgfqkeys{/codeexample}{%
+ width/.code= {\setlength\codeexamplewidth{#1}},
+ graphic/.code= {\colorlet{graphicbackground}{#1}},
+ code/.code= {\colorlet{codebackground}{#1}},
+ execute code/.is if=code@execute,
+ code only/.code= {\code@executefalse},
+ pre/.code= {\def\code@pre{#1}},
+ post/.code= {\def\code@post{#1}},
+ vbox/.code= {\def\code@pre{\vbox\bgroup\setlength{\hsize}{\linewidth-6pt}}\def\code@post{\egroup}},
+ ignorespaces/.code= {\let\@gobble@till@return=\@gobble@till@return@ignore},
+ leave comments/.code= {\def\code@catcode@hook{\catcode`\%=12}\let\commenthandler=\relax\let\typesetcomment=\relax},
+ tabsize/.initial=0,
+ every codeexample/.style={width=4cm+7pt},
+}
+
+\def\code@pre{}
+\def\code@post{}
+\def\code@catcode@hook{}
+
+\newdimen\codeexamplewidth
+\newif\ifcode@execute
+\newbox\codeexamplebox
+\def\codeexample[#1]{%
+ \begingroup%
+ \code@executetrue
+ \pgfqkeys{/codeexample}{every codeexample,#1}%
+ \codeexample@tabinit% assigns \codeexample@tabinit@[catcode,replacementchars]
+ \parindent0pt
+ \begingroup%
+ \par%
+ \medskip%
+ \let\do\@makeother%
+ \dospecials%
+ \obeylines%
+ \@vobeyspaces%
+ \catcode`\%=13%
+ \catcode`\^^M=13%
+ \code@catcode@hook%
+ \codeexample@tabinit@catcode
+ \relax%
+ \find@example}
+\def\endofcodeexample#1{%
+ \endgroup%
+ \ifcode@execute%
+ \setbox\codeexamplebox=\hbox{%
+ {%
+ {%
+ \returntospace%
+ \commenthandler%
+ \xdef\code@temp{#1}% removes returns and comments
+ }%
+ \colorbox{graphicbackground}{\color{black}\ignorespaces%
+ \code@pre\expandafter\scantokens\expandafter{\code@temp\ignorespaces}\code@post\ignorespaces}%
+ }%
+ }%
+ \ifdim\wd\codeexamplebox>\codeexamplewidth%
+ \def\code@start{\par}%
+ \def\code@flushstart{}\def\code@flushend{}%
+ \def\code@mid{\parskip2pt\par\noindent}%
+ \def\code@width{\linewidth-6pt}%
+ \def\code@end{}%
+ \else%
+ \def\code@start{%
+ \linewidth=\textwidth%
+ \parshape \@ne 0pt \linewidth
+ \leavevmode%
+ \hbox\bgroup}%
+ \def\code@flushstart{\hfill}%
+ \def\code@flushend{\hbox{}}%
+ \def\code@mid{\hskip6pt}%
+ \def\code@width{\linewidth-12pt-\codeexamplewidth}%
+ \def\code@end{\egroup}%
+ \fi%
+ \code@start%
+ \noindent%
+ \begin{minipage}[t]{\codeexamplewidth}\raggedright
+ \hrule width0pt%
+ \footnotesize\vskip-1em%
+ \code@flushstart\box\codeexamplebox\code@flushend%
+ \vskip-1ex
+ \leavevmode%
+ \end{minipage}%
+ \else%
+ \def\code@mid{\par}
+ \def\code@width{\linewidth-6pt}
+ \def\code@end{}
+ \fi%
+ \code@mid%
+ \colorbox{codebackground}{%
+ \begin{minipage}[t]{\code@width}%
+ {%
+ \let\do\@makeother
+ \dospecials
+ \frenchspacing\@vobeyspaces
+ \normalfont\ttfamily\footnotesize
+ \typesetcomment%
+ \codeexample@tabinit@replacementchars
+ \@tempswafalse
+ \def\par{%
+ \if@tempswa
+ \leavevmode \null \@@par\penalty\interlinepenalty
+ \else
+ \@tempswatrue
+ \ifhmode\@@par\penalty\interlinepenalty\fi
+ \fi}%
+ \obeylines
+ \everypar \expandafter{\the\everypar \unpenalty}%
+ #1}
+ \end{minipage}}%
+ \code@end%
+ \par%
+ \medskip
+ \end{codeexample}
+}
+
+\def\endcodeexample{\endgroup}
+
+
+\makeatother
+
+
+%%% Local Variables:
+%%% mode: latex
+%%% TeX-master: "beameruserguide"
+%%% End:
diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots-macros.tex b/Master/texmf-dist/doc/latex/pgfplots/pgfplots-macros.tex
new file mode 100644
index 00000000000..5c0e4fa1215
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots-macros.tex
@@ -0,0 +1,251 @@
+
+\input pgfmanual-en-macros.tex
+
+\def\pgfmanualbar{\char`\|}
+\makeatletter
+\newenvironment{addplotoperation}[3][]{
+ \begin{pgfmanualentry}
+ \pgfmanualentryheadline{\textcolor{gray}{{\ttfamily\char`\\addplot\ }}%
+ \declare{\texttt{#2}} \texttt{#3;}}%
+ \unskip
+ \nobreak
+ \pgfmanualentryheadline{\textcolor{gray}{{\ttfamily\char`\\addplot[\meta{style options}] {\small plot[\meta{behavior options}]}}\ }%
+ \declare{\texttt{#2}} \texttt{#3}\ \textcolor{gray}{\meta{trailing path commands}\texttt{;}}}%
+ \def\pgfmanualtest{#1}%
+ \ifx\pgfmanualtest\@empty%
+ \index{#2@\protect\texttt{#2} path operation}%
+ \index{Path operations!#2@\protect\texttt{#2}}%
+ \fi%
+ \pgfmanualbody
+}
+{
+ \end{pgfmanualentry}
+}
+
+\newenvironment{codekey}[1]{%
+ \begin{pgfmanualentry}
+ \pgfmanualentryheadline{{\ttfamily\declare{#1}\textcolor{gray}{/.code}=\marg{...}}\hfill}%
+ \def\mykey{#1}%
+ \def\mypath{}%
+ \def\myname{}%
+ \firsttimetrue%
+ \decompose#1/\nil%
+ \pgfmanualbody
+}
+{
+ \end{pgfmanualentry}
+}
+
+\newenvironment{pgfplotscodekey}[1]{%
+ \begin{codekey}{/pgfplots/#1}%
+}
+{
+ \end{codekey}
+}
+\newenvironment{pgfplotscodetwokey}[1]{%
+ \begin{pgfmanualentry}
+ \pgfmanualentryheadline{{\ttfamily\declare{/pgfplots/#1}\textcolor{gray}{/.code 2 args}=\marg{...}}\hfill}%
+ \def\mykey{/pgfplots/#1}%
+ \def\mypath{}%
+ \def\myname{}%
+ \firsttimetrue%
+ \decompose/pgfplots/#1/\nil%
+ \pgfmanualbody
+}
+{
+ \end{pgfmanualentry}
+}
+
+\newenvironment{pgfplotskey}[1]{%
+ \begin{key}{/pgfplots/#1}%
+}
+{
+ \end{key}
+}
+
+\def\choicesep{$\vert$}%
+\def\choicearg#1{\texttt{#1}}
+
+\newif\iffirstchoice
+\newcommand\mchoice[1]{%
+ \begingroup
+ \firstchoicetrue
+ \foreach \mchoice@ in {#1} {%
+ \iffirstchoice
+ \global\firstchoicefalse
+ \else
+ \choicesep
+ \fi
+ \choicearg{\mchoice@}%
+ }%
+ \endgroup
+}%
+
+% \begin{xykey}{/path/\x label=value}
+% \end{xykey}
+%
+% has same features with 'default', 'initially' etc as key environment
+\newenvironment{xykey}[2][]{%
+ \begin{pgfmanualentry}
+ \def\extrakeytext{}
+ \insertpathifneeded{#2}{#1}%
+ \expandafter\pgfutil@in@\expandafter=\expandafter{\mykey}%
+ \ifpgfutil@in@%
+ \expandafter\xykey@eq\mykey\@nil
+ \else
+ \expandafter\xykey@noeq\mykey\@nil
+ \fi
+ \pgfmanualbody
+}{%
+ \end{pgfmanualentry}
+}%
+
+% \insertpathifneeded{a key}{/pgfplots} -> assign mykey={/pgfplots/a key}
+% \insertpathifneeded{/tikz/a key}{/pgfplots} -> assign mykey={/tikz/a key}
+%
+% #1: the key
+% #2: a default path (or empty)
+\def\insertpathifneeded#1#2{%
+ \def\insertpathifneeded@@{#2}%
+ \ifx\insertpathifneeded@@\empty
+ \def\mykey{#1}%
+ \else
+ \insertpathifneeded@#2\@nil
+ \ifpgfutil@in@
+ \def\mykey{#2/#1}%
+ \else
+ \def\mykey{#1}%
+ \fi
+ \fi
+}%
+\def\insertpathifneeded@#1#2\@nil{%
+ \def\insertpathifneeded@@{#1}%
+ \def\insertpathifneeded@@@{/}%
+ \ifx\insertpathifneeded@@\insertpathifneeded@@@
+ \pgfutil@in@true
+ \else
+ \pgfutil@in@false
+ \fi
+}%
+
+% \begin{keylist}[default path]
+% {/path/option 1=value,/path/option 2=value2}
+% \end{keylist}
+\newenvironment{keylist}[2][]{%
+ \begin{pgfmanualentry}
+ \def\extrakeytext{}%
+ \foreach \xx in {#2} {%
+ \expandafter\insertpathifneeded\expandafter{\xx}{#1}%
+ \expandafter\extractkey\mykey\@nil%
+ }%
+ \pgfmanualbody
+}{%
+ \end{pgfmanualentry}
+}%
+
+\newenvironment{pgfplotskeylist}[1]{%
+ \begin{keylist}[/pgfplots]{#1}%
+}{%
+ \end{keylist}%
+}
+
+% \begin{xykeylist}[default path]
+% {/path/option \x1=value,/path/option \x2=value2,/path/option \x3=value}
+% \end{xykeylist}
+\newenvironment{xykeylist}[2][]{%
+ \begin{pgfmanualentry}
+ \def\extrakeytext{}
+ \foreach \xx in {#2} {%
+ \expandafter\insertpathifneeded\expandafter{\xx}{#1}%
+ \expandafter\pgfutil@in@\expandafter=\expandafter{\mykey}%
+ \ifpgfutil@in@%
+ \expandafter\xykey@eq\mykey\@nil
+ \else
+ \expandafter\xykey@noeq\mykey\@nil
+ \fi
+ }%
+ \pgfmanualbody
+}{%
+ \end{pgfmanualentry}
+}%
+
+\newif\ifxykeyfound
+
+\def\xykey@eq#1=#2\@nil{%
+ \def\x{x}%
+ \xdef\mykey{#1}%
+ \def\xykey@@{#1}%
+ \ifx\xykey@@\mykey
+ \xykeyfoundfalse
+ \else
+ \xykeyfoundtrue
+ \fi
+ \expandafter\extractkey\mykey=#2\@nil%
+ \ifxykeyfound
+ \def\x{y}%
+ \xdef\mykey{#1}%
+ \expandafter\extractkey\mykey=#2\@nil%
+ \fi
+}
+\def\xykey@noeq#1\@nil{%
+ \def\x{x}%
+ \xdef\mykey{#1}%
+ \def\xykey@@{#1}%
+ \ifx\xykey@@\mykey
+ \xykeyfoundfalse
+ \else
+ \xykeyfoundtrue
+ \fi
+ \expandafter\extractkey\mykey\@nil%
+ \ifxykeyfound
+ \def\x{y}%
+ \xdef\mykey{#1}%
+ \expandafter\extractkey\mykey\@nil%
+ \fi
+}
+
+% \begin{pgfplotsxykey}{\x label=value}
+% \end{pgfplotsxykey}
+%
+% It introduces the path /pgfplots/ automatically.
+%
+% has same features with 'default', 'initially' etc as key environment
+\newenvironment{pgfplotsxykey}[1]{%
+ \begin{xykey}[/pgfplots]{#1}%
+}{%
+ \end{xykey}%
+}
+
+
+\newenvironment{pgfplotsxykeylist}[1]{%
+ \begin{xykeylist}[/pgfplots]{#1}%
+}{%
+ \end{xykeylist}%
+}
+
+
+\newenvironment{plottype}[1]{%
+ \begin{key}{/tikz/#1}%
+ \end{key}
+ \begin{pgfmanualentry}
+ \pgfmanualentryheadline{\textcolor{gray}{{\ttfamily\char`\\addplot+[\declare{#1}]}}}%
+ \pgfmanualbody
+}
+{
+ \end{pgfmanualentry}
+}
+
+\def\index@prologue{\section*{Index}\addcontentsline{toc}{section}{Index}
+}
+
+\newenvironment{pgfplotstablecolumnkey}{%
+ \begin{pgfmanualentry}
+ \pgfmanualentryheadline{{\ttfamily\textcolor{gray}{/pgfplots/table/}\declare{columns/\meta{column name}}\textcolor{gray}{/.style}=\marg{key-value-list}}\hfill}%
+ \pgfmanualbody
+}
+{
+ \end{pgfmanualentry}
+}
+\makeatother
+
+
diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.bib b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.bib
index 4eb003d9fe0..43aa22c2596 100644
--- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.bib
+++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.bib
@@ -2,8 +2,8 @@
@misc{tikz,
author = {Till Tantau},
title = {{\Tikz\ and \PGF\ manual}},
- howpublished = {\url{http://tug.ctan.org/cgi-bin/ctanPackageInformation.py?id=pgf}},
- note = {v. $\ge$ 1.18}
+ howpublished = {\url{http://sourceforge.net/projects/pgf}},
+ note = {$v.\ge 2.00$}
}
diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.examples.tex b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.examples.tex
deleted file mode 100644
index fb3e8706368..00000000000
--- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.examples.tex
+++ /dev/null
@@ -1,899 +0,0 @@
-% main=manual.tex
-
-
-\section{More examples}
-This section contains a catalogue of different \PGFPlots\ features by example.
-\label{sec:examples}%
-\begingroup
-\subsection{Legend position and appearance}
-\subsubsection{Legend in the lower left corner}
-\begin{lstlisting}
-\tikzstyle{every axis legend}+=
- [at={(0.03,0.03)},anchor=south west]%
-\begin{tikzpicture}
- \begin{loglogaxis}[
- xlabel={\textsc{Dof}},
- ylabel={$L_2$ Error}
- ]
- \addplot plot coordinates {
- (5, 8.312e-02)
- (17, 2.547e-02)
- (49, 7.407e-03)
- (129, 2.102e-03)
- (321, 5.874e-04)
- (769, 1.623e-04)
- (1793, 4.442e-05)
- (4097, 1.207e-05)
- (9217, 3.261e-06)
- };
-
- ....
-
- \legend{$d=2$\\$d=3$\\$d=4$\\$d=5$\\$d=6$\\}
- \end{loglogaxis}
-\end{tikzpicture}
-\end{lstlisting}
-\def\plots{%
- \addplot plot coordinates {
- (5, 8.312e-02)
- (17, 2.547e-02)
- (49, 7.407e-03)
- (129, 2.102e-03)
- (321, 5.874e-04)
- (769, 1.623e-04)
- (1793, 4.442e-05)
- (4097, 1.207e-05)
- (9217, 3.261e-06)
- };
-
- \addplot plot coordinates {
- (7, 8.472e-02)
- (31, 3.044e-02)
- (111, 1.022e-02)
- (351, 3.303e-03)
- (1023, 1.039e-03)
- (2815, 3.196e-04)
- (7423, 9.658e-05)
- (18943, 2.873e-05)
- (47103, 8.437e-06)
- };
-
- \addplot plot coordinates {
- (9, 7.881e-02)
- (49, 3.243e-02)
- (209, 1.232e-02)
- (769, 4.454e-03)
- (2561, 1.551e-03)
- (7937, 5.236e-04)
- (23297, 1.723e-04)
- (65537, 5.545e-05)
- (178177, 1.751e-05)
- };
-
- \addplot plot coordinates {
- (11, 6.887e-02)
- (71, 3.177e-02)
- (351, 1.341e-02)
- (1471, 5.334e-03)
- (5503, 2.027e-03)
- (18943, 7.415e-04)
- (61183, 2.628e-04)
- (187903, 9.063e-05)
- (553983, 3.053e-05)
- };
-
- \addplot plot coordinates {
- (13, 5.755e-02)
- (97, 2.925e-02)
- (545, 1.351e-02)
- (2561, 5.842e-03)
- (10625, 2.397e-03)
- (40193, 9.414e-04)
- (141569, 3.564e-04)
- (471041, 1.308e-04)
- (1496065, 4.670e-05)
- };
- \legend{$d=2$\\$d=3$\\$d=4$\\$d=5$\\$d=6$\\}
-}%
-{%
-\tikzstyle{every axis legend}+=
- [at={(0.03,0.03)},anchor=south west]%
-\begin{center}
-\begin{tikzpicture}
- \begin{loglogaxis}[
- xlabel={\textsc{Dof}},
- ylabel={$L_2$ Error}
- ]
- \plots
- \end{loglogaxis}
-\end{tikzpicture}
-\end{center}
-}
-
-\subsubsection{Horizontal Legends}
-\begin{lstlisting}
-\tikzstyle{every axis legend}+=
- [at={(0.5,0.98)},anchor=north]%
-\begin{tikzpicture}
- \begin{loglogaxis}[
- legend columns=2,
- xlabel={\textsc{Dof}},
- ylabel={$L_2$ Error}
- ]
- \addplot plot coordinates {
- (5, 8.312e-02)
- (17, 2.547e-02)
- (49, 7.407e-03)
- (129, 2.102e-03)
- (321, 5.874e-04)
- (769, 1.623e-04)
- (1793, 4.442e-05)
- (4097, 1.207e-05)
- (9217, 3.261e-06)
- };
-
- ....
-
- \legend{$d=2$\\$d=3$\\$d=4$\\$d=5$\\$d=6$\\}
- \end{loglogaxis}
-\end{tikzpicture}
-\end{lstlisting}
-{%
-\tikzstyle{every axis legend}+=
- [at={(0.5,0.98)},anchor=north]%
-\begin{center}
-\begin{tikzpicture}
- \begin{loglogaxis}[
- legend columns=2,
- xlabel={\textsc{Dof}},
- ylabel={$L_2$ Error}
- ]
- \plots
- \end{loglogaxis}
-\end{tikzpicture}
-\end{center}
-}
-
-\subsubsection{Horizontal Legends (2)}
-\begin{lstlisting}
-\tikzstyle{every axis legend}+=
- [at={(0.5,-0.2)},anchor=north]%
-\begin{tikzpicture}
- \begin{loglogaxis}[
- legend columns=-1,
- xlabel={\textsc{Dof}},
- ylabel={$L_2$ Error}
- ]
- \addplot plot coordinates {
- (5, 8.312e-02)
- (17, 2.547e-02)
- (49, 7.407e-03)
- (129, 2.102e-03)
- (321, 5.874e-04)
- (769, 1.623e-04)
- (1793, 4.442e-05)
- (4097, 1.207e-05)
- (9217, 3.261e-06)
- };
-
- ....
-
- \legend{$d=2$\\$d=3$\\$d=4$\\$d=5$\\$d=6$\\}
- \end{loglogaxis}
-\end{tikzpicture}
-\end{lstlisting}
-{%
-\tikzstyle{every axis legend}+=
- [at={(0.5,-0.2)},anchor=north]%
-\begin{center}
-\begin{tikzpicture}
- \begin{loglogaxis}[
- legend columns=-1,
- xlabel={\textsc{Dof}},
- ylabel={$L_2$ Error}
- ]
- \plots
- \end{loglogaxis}
-\end{tikzpicture}
-\end{center}
-}
-
-\subsubsection{Modifying legend spacing}
-\label{sec:legendexamples:cols}%
-\begin{lstlisting}
-\tikzstyle{every axis legend}+=
- [at={(0.5,1.02)},anchor=south,inner sep=0pt]%
-\begin{tikzpicture}
- \begin{loglogaxis}[
- legend columns=-1,
- xlabel={\textsc{Dof}},
- ylabel={$L_2$ Error}
- ]
- \addplot plot coordinates {
- (5, 8.312e-02)
- (17, 2.547e-02)
- (49, 7.407e-03)
- (129, 2.102e-03)
- (321, 5.874e-04)
- (769, 1.623e-04)
- (1793, 4.442e-05)
- (4097, 1.207e-05)
- (9217, 3.261e-06)
- };
-
- ....
-
- \legend{$d=2$\\$d=3$\\$d=4$\\$d=5$\\$d=6$\\}
- \end{loglogaxis}
-\end{tikzpicture}
-\end{lstlisting}
-{%
-\tikzstyle{every axis legend}+=
- [at={(0.5,0.98)},anchor=north,inner sep=0pt]%
-\begin{center}
-\begin{tikzpicture}
- \begin{loglogaxis}[
- legend columns=-1,
- xlabel={\textsc{Dof}},
- ylabel={$L_2$ Error}
- ]
- \plots
- \end{loglogaxis}
-\end{tikzpicture}
-\end{center}
-}
-
-\subsubsection{Modifying legend's small plots}
-\label{sec:legendexamples:plotpos}%
-\begin{lstlisting}
-\begin{tikzpicture}
- \begin{loglogaxis}[
- legend plot pos=right,
- xlabel={\textsc{Dof}},
- ylabel={$L_2$ Error}
- ]
- \addplot plot coordinates {
- (5, 8.312e-02)
- (17, 2.547e-02)
- (49, 7.407e-03)
- (129, 2.102e-03)
- (321, 5.874e-04)
- (769, 1.623e-04)
- (1793, 4.442e-05)
- (4097, 1.207e-05)
- (9217, 3.261e-06)
- };
-
- ....
-
- \legend{$d=2$\\$d=3$\\$d=4$\\$d=5$\\$d=6$\\}
- \end{loglogaxis}
-\end{tikzpicture}
-\end{lstlisting}
-{%
-\begin{center}
-\begin{tikzpicture}
- \begin{loglogaxis}[
- legend plot pos=right,
- xlabel={\textsc{Dof}},
- ylabel={$L_2$ Error}
- ]
- \plots
- \end{loglogaxis}
-\end{tikzpicture}
-\end{center}
-}
-
-\subsection{Font size and line width}
-\begin{lstlisting}
-\tikzstyle{every axis legend}+=%
- [at={(0.03,0.03)},anchor=south west]%
-\tikzstyle{every tick}+=[line width=0.6pt]%
-\begin{tikzpicture}[font=\large,line width=1pt]
- \begin{loglogaxis}[
- xlabel={\textsc{Dof}},
- ylabel={$L_2$ Error}
- ]
- \addplot ....
- ...
- \end{loglogaxis}
-\end{tikzpicture}
-\end{lstlisting}
-
-{%
-\tikzstyle{every axis legend}+=
- [at={(0.03,0.03)},anchor=south west]%
-\tikzstyle{every tick}+=[line width=0.6pt]
-\begin{center}
-\begin{tikzpicture}[font=\large,line width=1pt]
- \begin{loglogaxis}[
- xlabel={\textsc{Dof}},
- ylabel={$L_2$ Error}
- ]
- \plots
- \end{loglogaxis}
-\end{tikzpicture}
-\end{center}
-}%
-
-\subsection{Changing line specifications}
-\subsubsection{Using another, predefined list}
-{%
-\begin{lstlisting}
-\listcopy\blackwhiteplotspeclist\to\autoplotspeclist%
-\begin{tikzpicture}
- \begin{loglogaxis}[
- xlabel={\textsc{Dof}},
- ylabel={$L_2$ Error}
- ]
- ...
- \end{loglogaxis}
-\end{tikzpicture}
-\end{lstlisting}
-
-\listcopy\blackwhiteplotspeclist\to\autoplotspeclist%
-\begin{center}
-\begin{tikzpicture}
- \begin{loglogaxis}[
- xlabel={\textsc{Dof}},
- ylabel={$L_2$ Error}
- ]
- \plots
- \end{loglogaxis}
-\end{tikzpicture}
-\end{center}
-
-\subsubsection{Defining new lists}
-\begin{lstlisting}
-% will cycle through these three elements:
-\listnew{\autoplotspeclist}{%
- red,dotted,mark=-,mark options={solid}\\%
- black,dashed,mark=pentagon,mark options={solid}\\%
- mark options={fill=blue!40},mark=diamond*,blue\\%
-}%
-\tikzstyle{every axis legend}+=%
- [at={(1.03,1)},anchor=north west]%
-\begin{tikzpicture}
- \begin{loglogaxis}[
- xlabel={\textsc{Dof}},
- ylabel={$L_2$ Error}
- ]
- ...
- \end{loglogaxis}
-\end{tikzpicture}
-\end{lstlisting}
-
-\listnew{\autoplotspeclist}{%
- red,dotted,mark=-,mark options={solid}\\%
- black,dashed,mark=pentagon,mark options={solid}\\%
- mark options={fill=blue!40},mark=diamond*,blue\\%
-}%
-\tikzstyle{every axis legend}+=%
- [at={(1.03,1)},anchor=north west]%
-\begin{center}
-\begin{tikzpicture}
- \begin{loglogaxis}[
- xlabel={\textsc{Dof}},
- ylabel={$L_2$ Error}
- ]
- \plots
- \end{loglogaxis}
-\end{tikzpicture}
-\end{center}
-}%
-
-\subsection{Changing the ticks}
-\subsubsection{Placing ticks at $10^i$}
-\begin{lstlisting}
-\begin{tikzpicture}
- \begin{loglogaxis}[
- xtickten={0,2,3,4,6,...,10},% place tickmarks at 10^0, 10^2,...
- ytickten={-6,-4,...,2},
- xlabel={\textsc{Dof}},
- ylabel={$L_2$ Error}
- ]
- ....
- \end{loglogaxis}
-\end{tikzpicture}
-\end{lstlisting}
-
-\begin{center}
-\begin{tikzpicture}
- \begin{loglogaxis}[
- xtickten={0,2,3,4,6,...,10},
- ytickten={-6,-4,...,2},
- xlabel={\textsc{Dof}},
- ylabel={$L_2$ Error}
- ]
- \plots
- \end{loglogaxis}
-\end{tikzpicture}
-\end{center}
-
-\subsubsection{Placing ticks anywhere}
-\begin{lstlisting}
-\begin{tikzpicture}
- \begin{loglogaxis}[
- xtick={12,9897,1468864}
- xlabel={\textsc{Dof}},
- ylabel={$L_2$ Error}
- ]
- ....
- \end{loglogaxis}
-\end{tikzpicture}
-\end{lstlisting}
-
-\begin{center}
-\begin{tikzpicture}
- \begin{loglogaxis}[
- xtick={12,9897,1468864},%2.5,9.2,14.2},
- xlabel={\textsc{Dof}},
- ylabel={$L_2$ Error}
- ]
- \plots
- \end{loglogaxis}
-\end{tikzpicture}
-\end{center}
-
-\subsection{Annotating plots}
-\label{sec:annot:plot}%
-\subsubsection{Example: Placing Data Cursors}
-\begin{lstlisting}
-\tikzstyle{every pin}=[fill=white,draw=black,font=\footnotesize]
-\begin{tikzpicture}
- \begin{loglogaxis}[
- xlabel={\textsc{Dof}},
- ylabel={$L_2$ Error}
- ]
-
- ....
-
- \addplot plot coordinates {
- (11, 6.887e-02)
- (71, 3.177e-02)
- (351, 1.341e-02)
- (1471, 5.334e-03)
- (5503, 2.027e-03)
- (18943, 7.415e-04)
- (61183, 2.628e-04)
- (187903, 9.063e-05)
- (553983, 3.053e-05)
- };
- ...
-
- \axispath\node[coordinate,pin=above:Bad!]
- at (axis cs:5503,2.027e-03) {};
- \axispath\node[coordinate,pin=above right:Good!]
- at (axis cs:187903,9.063e-05) {};
- \end{loglogaxis}
-\end{tikzpicture}
-\end{lstlisting}
-\begin{center}
-{
-\tikzstyle{every pin}=[fill=white,draw=black,font=\footnotesize]
-\begin{tikzpicture}
- \begin{loglogaxis}[
- xlabel={\textsc{Dof}},
- ylabel={$L_2$ Error}
- ]
- \plots
-
- \axispath\node[coordinate,pin=above:Bad!]
- at (axis cs:5503,2.027e-03) {};
- \axispath\node[coordinate,pin=above right:Good!]
- at (axis cs:187903,9.063e-05) {};
- \end{loglogaxis}
-\end{tikzpicture}
-}
-\end{center}
-
-One remark: the \lstinline!\axispath! prefix is necessary because neither axis nor plots will be drawn until the $x$- and $y$-limits have been determined. All drawing commands are postponed until \lstinline!\end{axis}! (unless you explicitly provide the options \lstinline!xmin!, \lstinline!xmax!, \lstinline!ymin! and \lstinline!ymax!).
-
-\subsubsection{Example: Slopes of line segments}
-\begin{lstlisting}
-\begin{tikzpicture}
- \begin{loglogaxis}[
- xlabel=\textsc{Dof},
- ylabel=$L_2$ Error
- ]
- \axispath\draw
- (axis cs:1793,4.442e-05)
- |- (axis cs:4097,1.207e-05)
- node[near start,left] {$\frac{dy}{dx} = -1.58$};
-
- \addplot plot coordinates {
- (5, 8.312e-02)
- (17, 2.547e-02)
- (49, 7.407e-03)
- (129, 2.102e-03)
- (321, 5.874e-04)
- (769, 1.623e-04)
- (1793, 4.442e-05)
- (4097, 1.207e-05)
- (9217, 3.261e-06)
- };
- ...
- \end{loglogaxis}
-\end{tikzpicture}
-\end{lstlisting}
-\begin{center}
-\begin{tikzpicture}
- \begin{loglogaxis}[
- xlabel=\textsc{Dof},
- ylabel=$L_2$ Error
- ]
- \axispath\draw
- (axis cs:1793,4.442e-05)
- |- (axis cs:4097,1.207e-05)
- node[near start,left] {$\frac{dy}{dx} = -1.58$};
- \plots
-
- \end{loglogaxis}
-\end{tikzpicture}
-\end{center}
-
-\subsection{Vertical alignment with the \texttt{baseline} option}
-\label{sec:align}%
-The default axis anchor is \texttt{south west}, which means that the picture coordinate $(0,0)$ is the lower left corner of the axis. As a consequence, the \Tikz\ option ``\texttt{baseline}'' allows vertical alignment of adjacent plots, see figure~\ref{fig:baseline:example} for an example.
-\begin{figure}
- \centering
- \noindent
- \lstinline!\begin{tikzpicture}...\end{tikzpicture}!:\par
- \noindent
- \begin{tikzpicture}%
- \begin{axis}[width=0.4\linewidth,xlabel=A normal sized $x$ label]
- \addplot[smooth,blue,mark=*] plot coordinates {
- (-1, 1)
- (-0.75, 0.5625)
- (-0.5, 0.25)
- (-0.25, 0.0625)
- (0, 0)
- (0.25, 0.0625)
- (0.5, 0.25)
- (0.75, 0.5625)
- (1, 1)
- };
- \end{axis}
- \end{tikzpicture}%
- \hspace{0.15cm}
- \begin{tikzpicture}%
- \begin{axis}[width=0.4\linewidth,xlabel={xlabel: $\displaystyle \sum_{i=0}^N n_i $ }]
- \addplot[smooth,blue,mark=*] plot coordinates {
- (-1, 1)
- (-0.75, 0.5625)
- (-0.5, 0.25)
- (-0.25, 0.0625)
- (0, 0)
- (0.25, 0.0625)
- (0.5, 0.25)
- (0.75, 0.5625)
- (1, 1)
- };
- \end{axis}
- \end{tikzpicture}
- \hfill
- \vskip 0.3cm%
- \noindent
- \lstinline!\begin{tikzpicture}[baseline]...\end{tikzpicture}!:\par
- \noindent
- \begin{tikzpicture}[baseline]%
- \begin{axis}[width=0.4\linewidth,xlabel=A normal sized $x$ label]
- \addplot[smooth,blue,mark=*] plot coordinates {
- (-1, 1)
- (-0.75, 0.5625)
- (-0.5, 0.25)
- (-0.25, 0.0625)
- (0, 0)
- (0.25, 0.0625)
- (0.5, 0.25)
- (0.75, 0.5625)
- (1, 1)
- };
- \end{axis}
- \end{tikzpicture}%
- \hspace{0.15cm}
- \begin{tikzpicture}[baseline]%
- \begin{axis}[width=0.4\linewidth,xlabel={xlabel: $\displaystyle \sum_{i=0}^N n_i $ }]
- \addplot[smooth,blue,mark=*] plot coordinates {
- (-1, 1)
- (-0.75, 0.5625)
- (-0.5, 0.25)
- (-0.25, 0.0625)
- (0, 0)
- (0.25, 0.0625)
- (0.5, 0.25)
- (0.75, 0.5625)
- (1, 1)
- };
- \end{axis}
- \end{tikzpicture}
- \hfill
-
- \caption{An example of the \Tikz-``\texttt{baseline}'' option for vertical alignment. Top row: without ``\texttt{baseline}'', bottom row: with ``\texttt{baseline}''.}
- \label{fig:baseline:example}
-\end{figure}
-
-\subsection{Horizontal Alignment}
-{%
-\label{sec:halign}%
-The last subsection used the \texttt{baseline}-option to allow \emph{vertical} alignment of plots. You can also apply \emph{horizontal} alignment, if you place multiple \texttt{axes} into a single \texttt{tikzpicture} and use the `\texttt{anchor}'-option:
-\def\plots{
-\addplot[red,only marks,mark options={fill=red,scale=0.8},mark=*] plot coordinates {
- (0.190600, 0.860900)
- (0.194400, 0.908000)
- (0.179900, 0.140700)
- (0.212400, 0.294200)
- (0.218900, 0.779100)
- (0.201700, 0.388400)
- (0.209100, 0.679900)
- (0.196200, 0.470800)
- (0.199900, 0.812700)
- (0.199300, 0.850500)
- (0.204300, 0.980300)
- (0.209500, 0.953000)
- (0.176200, 0.145300)
- (0.207400, 0.351900)
- (0.199000, 0.304500)
- (0.202200, 0.256300)
- (0.197000, 0.744300)
- (0.181100, 0.998900)
- (0.193400, 0.554900)
- (0.218300, 0.506500)
- (0.193800, 0.201000)
- (0.208100, 0.531900)
- (0.204100, 0.635500)
- (0.217000, 0.069800)
- (0.196100, 0.710300)
- (0.198900, 0.440900)
- (0.213000, 0.591900)
- (0.206000, 0.030700)
- (0.186000, 0.395900)
- (0.206500, 0.082500)
- (0.195500, 0.672000)
- (0.221400, -0.013500)
- (0.202300, 0.222300)
- (0.193300, 0.959700)
-};
-\addplot[black,only marks,mark options={fill=black,scale=0.8},mark=square*] plot coordinates {
- (0.005300, 0.369500)
- (-0.016100, 0.610000)
- (-0.007400, 0.252100)
- (0.002900, 0.699600)
- (0.010900, 0.232000)
- (-0.014100, 0.152400)
- (-0.008000, -0.003100)
- (-0.009100, 0.639900)
- (-0.008700, 0.125800)
- (-0.003700, 0.897400)
- (0.009600, 0.432200)
- (-0.009100, 0.770800)
- (-0.030300, 0.974200)
- (-0.004000, 0.675900)
- (-0.002100, 0.089500)
- (0.003300, 0.319700)
- (0.006100, 0.863300)
- (0.000600, 0.263700)
- (-0.008900, 0.471500)
- (0.016000, 0.505700)
- (0.000000, 0.602600)
- (-0.012300, 0.404400)
- (-0.007000, 0.911900)
- (0.006700, 0.747200)
- (0.009000, 0.825300)
- (-0.001500, 0.534400)
- (-0.020600, 0.336300)
- (0.012600, 0.039800)
- (0.011600, 0.944100)
- (-0.003600, 0.068000)
- (-0.022400, 0.575400)
- (-0.002900, 0.184500)
-};
-\addplot[blue] plot coordinates {
- (0.093947, -0.011481)
- (0.101957, 0.494273)
- (0.109967, 1.000027)
-};
-}%
-\begin{lstlisting}
-\begin{tikzpicture}
- \begin{axis}[width=4cm,scale only axis]
- \addplot[red,only marks,mark options={fill=red,scale=0.8},mark=*] plot coordinates {
- (0.190600, 0.860900)
- (0.194400, 0.908000)
- (0.179900, 0.140700)
- (0.212400, 0.294200)
- ....
- (0.202300, 0.222300)
- (0.193300, 0.959700)
- };
- \addplot[black,only marks,mark options={fill=black,scale=0.8},mark=square*] plot coordinates {
- (0.005300, 0.369500)
- (-0.016100, 0.610000)
- (-0.007400, 0.252100)
- (0.002900, 0.699600)
- (0.010900, 0.232000)
- ....
- (-0.003600, 0.068000)
- (-0.022400, 0.575400)
- (-0.002900, 0.184500)
- };
- \addplot[blue] plot coordinates {
- (0.093947, -0.011481)
- (0.101957, 0.494273)
- (0.109967, 1.000027)
- };
- \end{axis}
-
- \draw[thick,gray,->]
- (0,0) -- (0cm,-0.6cm)
- node[black,midway,left] {0.6cm$\to$};
-
- \begin{scope}[yshift=-0.6cm]
- \begin{axis}[%
- anchor=north west,
- width=4cm,scale only axis,
- height=0.8cm,
- ytick=\empty
- ]
-
- \addplot[red,only marks,mark options={fill=red,scale=0.8},mark=*] plot coordinates {
- (0.968555, 0)
- (0.030884, 0)
- ...
- (0.468750, 0)
- (0, 0)
- };
- \addplot[black,only marks,mark options={fill=black,scale=0.8},mark=square*] plot coordinates {
- (0.367188, 0)
- (0.312500, 0)
- ...
- (0.125000, 0)
- (0.156250, 0)
- };
- \end{axis}
- \end{scope}
-\end{tikzpicture}
-\end{lstlisting}
-The result of this alignment is shown in figure~\ref{fig:halign}.
-
-\begin{figure}
-{\centering
-\begin{minipage}[t]{4.4cm}%
-\vspace{0pt}%
-\centering
-\begin{tikzpicture}
- \begin{axis}[width=4cm,scale only axis]
- \plots
- \end{axis}
-\end{tikzpicture}
-
-\begin{tikzpicture}
- \begin{axis}[%
- width=4cm,scale only axis,
- height=0.8cm,
- ytick=\empty
- ]
-
- \addplot[red,only marks,mark options={fill=red,scale=0.8},mark=*] plot coordinates {
- (0.968555, 0)
- (0.030884, 0)
- (0.750000, 0)
- (0.468750, 0)
- (1.000000, 0)
- (0.030176, 0)
- (0.750000, 0)
- (0.468750, 0)
- (0, 0)
- };
- \addplot[black,only marks,mark options={fill=black,scale=0.8},mark=square*] plot coordinates {
- (0.367188, 0)
- (0.312500, 0)
- (0.136719, 0)
- (0.828125, 0)
- (0.656250, 0)
- (0.343750, 0)
- (0.125000, 0)
- (0.156250, 0)
- };
- \end{axis}
-\end{tikzpicture}
-\end{minipage}
-\hspace{1cm}
-\begin{minipage}[t]{4.4cm}%
-\vspace{0pt}%
-\centering
-\begin{tikzpicture}
- \begin{axis}[width=4cm,scale only axis]
- \plots
- \end{axis}
-
- \draw[thick,gray,->]
- (0,0) -- (0cm,-0.6cm)
- node[black,midway,left] {0.6cm$\to$};
-
- \begin{scope}[yshift=-0.6cm]
- \begin{axis}[%
- anchor=north west,
- width=4cm,scale only axis,
- height=0.8cm,
- ytick=\empty
- ]
-
- \addplot[red,only marks,mark options={fill=red,scale=0.8},mark=*] plot coordinates {
- (0.968555, 0)
- (0.030884, 0)
- (0.750000, 0)
- (0.468750, 0)
- (1.000000, 0)
- (0.030176, 0)
- (0.750000, 0)
- (0.468750, 0)
- (0, 0)
- };
- \addplot[black,only marks,mark options={fill=black,scale=0.8},mark=square*] plot coordinates {
- (0.367188, 0)
- (0.312500, 0)
- (0.136719, 0)
- (0.828125, 0)
- (0.656250, 0)
- (0.343750, 0)
- (0.125000, 0)
- (0.156250, 0)
- };
- \end{axis}
- \end{scope}
-\end{tikzpicture}
-\end{minipage}
-
-}
- \caption{Demonstration of horizontal alignment with the `\texttt{anchor}' option. Left: two \texttt{tikzpicture}s placed above each other; right: one \texttt{tikzpicture} with horizontal alignment using the `\texttt{anchor}'-option. The source code is in the text.}
- \label{fig:halign}
-\end{figure}
-}
-
-\subsection{Gridlines}
-\label{sec:gridlines}%
-\begin{lstlisting}
-\begin{tikzpicture}
- \begin{loglogaxis}[
- xlabel={\textsc{Dof}},
- ylabel={$L_2$ Error},
- grid=major
- ]
- ...
- \end{loglogaxis}
-\end{tikzpicture}
-
-\begin{tikzpicture}
- \begin{loglogaxis}[
- xlabel={\textsc{Dof}},
- ylabel={$L_2$ Error},
- grid=both
- ]
- ...
- \end{loglogaxis}
-\end{tikzpicture}
-\end{lstlisting}
-\begin{center}
-\begin{tikzpicture}
- \begin{loglogaxis}[
- xlabel={\textsc{Dof}},
- ylabel={$L_2$ Error},
- grid=major
- ]
- \plots
- \end{loglogaxis}
-\end{tikzpicture}
-\hfill
-\begin{tikzpicture}
- \begin{loglogaxis}[
- xlabel={\textsc{Dof}},
- ylabel={$L_2$ Error},
- grid=both
- ]
- \plots
- \end{loglogaxis}
-\end{tikzpicture}
-\end{center}
-
-\endgroup
diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.idx b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.idx
new file mode 100644
index 00000000000..d023926e878
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.idx
@@ -0,0 +1,457 @@
+\indexentry{axis@\texttt {axis} environment|hyperpage}{11}
+\indexentry{Environments!axis@\texttt {axis}|hyperpage}{11}
+\indexentry{semilogxaxis@\texttt {semilogxaxis} environment|hyperpage}{11}
+\indexentry{Environments!semilogxaxis@\texttt {semilogxaxis}|hyperpage}{11}
+\indexentry{semilogyaxis@\texttt {semilogyaxis} environment|hyperpage}{11}
+\indexentry{Environments!semilogyaxis@\texttt {semilogyaxis}|hyperpage}{11}
+\indexentry{loglogaxis@\texttt {loglogaxis} environment|hyperpage}{11}
+\indexentry{Environments!loglogaxis@\texttt {loglogaxis}|hyperpage}{11}
+\indexentry{addplot@\myprintocmmand {addplot}|hyperpage}{12}
+\indexentry{domain@\texttt {domain} key|hyperpage}{16}
+\indexentry{tikz@\texttt {/tikz/}!domain@\texttt {domain}|hyperpage}{16}
+\indexentry{id@\texttt {id} key|hyperpage}{16}
+\indexentry{tikz@\texttt {/tikz/}!id@\texttt {id}|hyperpage}{16}
+\indexentry{prefix@\texttt {prefix} key|hyperpage}{16}
+\indexentry{tikz@\texttt {/tikz/}!prefix@\texttt {prefix}|hyperpage}{16}
+\indexentry{samples@\texttt {samples} key|hyperpage}{16}
+\indexentry{tikz@\texttt {/tikz/}!samples@\texttt {samples}|hyperpage}{16}
+\indexentry{raw gnuplot@\texttt {raw gnuplot} key|hyperpage}{16}
+\indexentry{tikz@\texttt {/tikz/}!raw gnuplot@\texttt {raw gnuplot}|hyperpage}{16}
+\indexentry{addplot@\myprintocmmand {addplot}|hyperpage}{17}
+\indexentry{axis cs@\texttt {axis cs} coordinate system|hyperpage}{18}
+\indexentry{Coordinate systems!axis cs@\texttt {axis cs}|hyperpage}{18}
+\indexentry{current plot begin@\texttt {current plot begin} node|hyperpage}{19}
+\indexentry{Predefined node!current plot begin@\texttt {current plot begin}|hyperpage}{19}
+\indexentry{current plot end@\texttt {current plot end} node|hyperpage}{19}
+\indexentry{Predefined node!current plot end@\texttt {current plot end}|hyperpage}{19}
+\indexentry{addlegendentry@\myprintocmmand {addlegendentry}|hyperpage}{19}
+\indexentry{legend@\myprintocmmand {legend}|hyperpage}{20}
+\indexentry{every axis legend@\texttt {every axis legend} key|hyperpage}{20}
+\indexentry{pgfplots@\texttt {/pgfplots/}!every axis legend@\texttt {every axis legend}|hyperpage}{20}
+\indexentry{autoplotspeclist@\myprintocmmand {autoplotspeclist}|hyperpage}{21}
+\indexentry{pgfmathlogtologten@\myprintocmmand {pgfmathlogtologten}|hyperpage}{21}
+\indexentry{logten@\myprintocmmand {logten}|hyperpage}{21}
+\indexentry{pgfmathprintnumber@\myprintocmmand {pgfmathprintnumber}|hyperpage}{21}
+\indexentry{closedcycle@\myprintocmmand {closedcycle}|hyperpage}{21}
+\indexentry{plotnum@\myprintocmmand {plotnum}|hyperpage}{22}
+\indexentry{numplots@\myprintocmmand {numplots}|hyperpage}{22}
+\indexentry{coordindex@\myprintocmmand {coordindex}|hyperpage}{22}
+\indexentry{pgfplotstableread@\myprintocmmand {pgfplotstableread}|hyperpage}{23}
+\indexentry{pgfplotstabletypeset@\myprintocmmand {pgfplotstabletypeset}|hyperpage}{23}
+\indexentry{pgfplotstabletypesetfile@\myprintocmmand {pgfplotstabletypesetfile}|hyperpage}{23}
+\indexentry{sharp plot@\texttt {sharp plot} key|hyperpage}{24}
+\indexentry{tikz@\texttt {/tikz/}!sharp plot@\texttt {sharp plot}|hyperpage}{24}
+\indexentry{smooth@\texttt {smooth} key|hyperpage}{24}
+\indexentry{tikz@\texttt {/tikz/}!smooth@\texttt {smooth}|hyperpage}{24}
+\indexentry{const plot@\texttt {const plot} key|hyperpage}{24}
+\indexentry{tikz@\texttt {/tikz/}!const plot@\texttt {const plot}|hyperpage}{24}
+\indexentry{const plot mark left@\texttt {const plot mark left} key|hyperpage}{25}
+\indexentry{tikz@\texttt {/tikz/}!const plot mark left@\texttt {const plot mark left}|hyperpage}{25}
+\indexentry{const plot mark right@\texttt {const plot mark right} key|hyperpage}{25}
+\indexentry{tikz@\texttt {/tikz/}!const plot mark right@\texttt {const plot mark right}|hyperpage}{25}
+\indexentry{jump mark left@\texttt {jump mark left} key|hyperpage}{25}
+\indexentry{tikz@\texttt {/tikz/}!jump mark left@\texttt {jump mark left}|hyperpage}{25}
+\indexentry{jump mark right@\texttt {jump mark right} key|hyperpage}{26}
+\indexentry{tikz@\texttt {/tikz/}!jump mark right@\texttt {jump mark right}|hyperpage}{26}
+\indexentry{xbar@\texttt {xbar} key|hyperpage}{26}
+\indexentry{tikz@\texttt {/tikz/}!xbar@\texttt {xbar}|hyperpage}{26}
+\indexentry{xbar@\texttt {xbar} key|hyperpage}{27}
+\indexentry{pgfplots@\texttt {/pgfplots/}!xbar@\texttt {xbar}|hyperpage}{27}
+\indexentry{ybar@\texttt {ybar} key|hyperpage}{27}
+\indexentry{tikz@\texttt {/tikz/}!ybar@\texttt {ybar}|hyperpage}{27}
+\indexentry{ybar@\texttt {ybar} key|hyperpage}{28}
+\indexentry{pgfplots@\texttt {/pgfplots/}!ybar@\texttt {ybar}|hyperpage}{28}
+\indexentry{bar width@\texttt {bar width} key|hyperpage}{28}
+\indexentry{tikz@\texttt {/tikz/}!bar width@\texttt {bar width}|hyperpage}{28}
+\indexentry{bar shift@\texttt {bar shift} key|hyperpage}{28}
+\indexentry{tikz@\texttt {/tikz/}!bar shift@\texttt {bar shift}|hyperpage}{28}
+\indexentry{ybar interval@\texttt {ybar interval} key|hyperpage}{28}
+\indexentry{tikz@\texttt {/tikz/}!ybar interval@\texttt {ybar interval}|hyperpage}{28}
+\indexentry{ybar interval@\texttt {ybar interval} key|hyperpage}{29}
+\indexentry{pgfplots@\texttt {/pgfplots/}!ybar interval@\texttt {ybar interval}|hyperpage}{29}
+\indexentry{xbar interval@\texttt {xbar interval} key|hyperpage}{29}
+\indexentry{tikz@\texttt {/tikz/}!xbar interval@\texttt {xbar interval}|hyperpage}{29}
+\indexentry{xbar interval@\texttt {xbar interval} key|hyperpage}{30}
+\indexentry{pgfplots@\texttt {/pgfplots/}!xbar interval@\texttt {xbar interval}|hyperpage}{30}
+\indexentry{xticklabel interval boundaries@\texttt {xticklabel interval boundaries} key|hyperpage}{30}
+\indexentry{pgfplots@\texttt {/pgfplots/}!xticklabel interval boundaries@\texttt {xticklabel interval boundaries}|hyperpage}{30}
+\indexentry{yticklabel interval boundaries@\texttt {yticklabel interval boundaries} key|hyperpage}{30}
+\indexentry{pgfplots@\texttt {/pgfplots/}!yticklabel interval boundaries@\texttt {yticklabel interval boundaries}|hyperpage}{30}
+\indexentry{xcomb@\texttt {xcomb} key|hyperpage}{30}
+\indexentry{tikz@\texttt {/tikz/}!xcomb@\texttt {xcomb}|hyperpage}{30}
+\indexentry{ycomb@\texttt {ycomb} key|hyperpage}{30}
+\indexentry{tikz@\texttt {/tikz/}!ycomb@\texttt {ycomb}|hyperpage}{30}
+\indexentry{stack plots@\texttt {stack plots} key|hyperpage}{31}
+\indexentry{pgfplots@\texttt {/pgfplots/}!stack plots@\texttt {stack plots}|hyperpage}{31}
+\indexentry{stack dir@\texttt {stack dir} key|hyperpage}{32}
+\indexentry{pgfplots@\texttt {/pgfplots/}!stack dir@\texttt {stack dir}|hyperpage}{32}
+\indexentry{reverse stacked plots@\texttt {reverse stacked plots} key|hyperpage}{32}
+\indexentry{pgfplots@\texttt {/pgfplots/}!reverse stacked plots@\texttt {reverse stacked plots}|hyperpage}{32}
+\indexentry{xbar stacked@\texttt {xbar stacked} key|hyperpage}{32}
+\indexentry{pgfplots@\texttt {/pgfplots/}!xbar stacked@\texttt {xbar stacked}|hyperpage}{32}
+\indexentry{ybar stacked@\texttt {ybar stacked} key|hyperpage}{33}
+\indexentry{pgfplots@\texttt {/pgfplots/}!ybar stacked@\texttt {ybar stacked}|hyperpage}{33}
+\indexentry{xbar interval stacked@\texttt {xbar interval stacked} key|hyperpage}{33}
+\indexentry{pgfplots@\texttt {/pgfplots/}!xbar interval stacked@\texttt {xbar interval stacked}|hyperpage}{33}
+\indexentry{ybar interval stacked@\texttt {ybar interval stacked} key|hyperpage}{33}
+\indexentry{pgfplots@\texttt {/pgfplots/}!ybar interval stacked@\texttt {ybar interval stacked}|hyperpage}{33}
+\indexentry{solid@\texttt {solid} key|hyperpage}{36}
+\indexentry{tikz@\texttt {/tikz/}!solid@\texttt {solid}|hyperpage}{36}
+\indexentry{dotted@\texttt {dotted} key|hyperpage}{36}
+\indexentry{tikz@\texttt {/tikz/}!dotted@\texttt {dotted}|hyperpage}{36}
+\indexentry{densely dotted@\texttt {densely dotted} key|hyperpage}{36}
+\indexentry{tikz@\texttt {/tikz/}!densely dotted@\texttt {densely dotted}|hyperpage}{36}
+\indexentry{loosely dotted@\texttt {loosely dotted} key|hyperpage}{36}
+\indexentry{tikz@\texttt {/tikz/}!loosely dotted@\texttt {loosely dotted}|hyperpage}{36}
+\indexentry{dashed@\texttt {dashed} key|hyperpage}{37}
+\indexentry{tikz@\texttt {/tikz/}!dashed@\texttt {dashed}|hyperpage}{37}
+\indexentry{densely dashed@\texttt {densely dashed} key|hyperpage}{37}
+\indexentry{tikz@\texttt {/tikz/}!densely dashed@\texttt {densely dashed}|hyperpage}{37}
+\indexentry{loosely dashed@\texttt {loosely dashed} key|hyperpage}{37}
+\indexentry{tikz@\texttt {/tikz/}!loosely dashed@\texttt {loosely dashed}|hyperpage}{37}
+\indexentry{font@\texttt {font} key|hyperpage}{37}
+\indexentry{tikz@\texttt {/tikz/}!font@\texttt {font}|hyperpage}{37}
+\indexentry{line width@\texttt {line width} key|hyperpage}{37}
+\indexentry{tikz@\texttt {/tikz/}!line width@\texttt {line width}|hyperpage}{37}
+\indexentry{ultra thin@\texttt {ultra thin} key|hyperpage}{37}
+\indexentry{tikz@\texttt {/tikz/}!ultra thin@\texttt {ultra thin}|hyperpage}{37}
+\indexentry{very thin@\texttt {very thin} key|hyperpage}{37}
+\indexentry{tikz@\texttt {/tikz/}!very thin@\texttt {very thin}|hyperpage}{37}
+\indexentry{semithick@\texttt {semithick} key|hyperpage}{37}
+\indexentry{tikz@\texttt {/tikz/}!semithick@\texttt {semithick}|hyperpage}{37}
+\indexentry{thick@\texttt {thick} key|hyperpage}{37}
+\indexentry{tikz@\texttt {/tikz/}!thick@\texttt {thick}|hyperpage}{37}
+\indexentry{very thick@\texttt {very thick} key|hyperpage}{37}
+\indexentry{tikz@\texttt {/tikz/}!very thick@\texttt {very thick}|hyperpage}{37}
+\indexentry{ultra thick@\texttt {ultra thick} key|hyperpage}{37}
+\indexentry{tikz@\texttt {/tikz/}!ultra thick@\texttt {ultra thick}|hyperpage}{37}
+\indexentry{cycle list@\texttt {cycle list} key|hyperpage}{38}
+\indexentry{pgfplots@\texttt {/pgfplots/}!cycle list@\texttt {cycle list}|hyperpage}{38}
+\indexentry{cycle list name@\texttt {cycle list name} key|hyperpage}{38}
+\indexentry{pgfplots@\texttt {/pgfplots/}!cycle list name@\texttt {cycle list name}|hyperpage}{38}
+\indexentry{xlabel@\texttt {xlabel} key|hyperpage}{40}
+\indexentry{pgfplots@\texttt {/pgfplots/}!xlabel@\texttt {xlabel}|hyperpage}{40}
+\indexentry{ylabel@\texttt {ylabel} key|hyperpage}{40}
+\indexentry{pgfplots@\texttt {/pgfplots/}!ylabel@\texttt {ylabel}|hyperpage}{40}
+\indexentry{title@\texttt {title} key|hyperpage}{40}
+\indexentry{pgfplots@\texttt {/pgfplots/}!title@\texttt {title}|hyperpage}{40}
+\indexentry{legend columns@\texttt {legend columns} key|hyperpage}{41}
+\indexentry{pgfplots@\texttt {/pgfplots/}!legend columns@\texttt {legend columns}|hyperpage}{41}
+\indexentry{legend plot pos@\texttt {legend plot pos} key|hyperpage}{41}
+\indexentry{pgfplots@\texttt {/pgfplots/}!legend plot pos@\texttt {legend plot pos}|hyperpage}{41}
+\indexentry{legend image code@\texttt {legend image code} key|hyperpage}{41}
+\indexentry{pgfplots@\texttt {/pgfplots/}!legend image code@\texttt {legend image code}|hyperpage}{41}
+\indexentry{axis x line@\texttt {axis x line} key|hyperpage}{42}
+\indexentry{pgfplots@\texttt {/pgfplots/}!axis x line@\texttt {axis x line}|hyperpage}{42}
+\indexentry{axis y line@\texttt {axis y line} key|hyperpage}{42}
+\indexentry{pgfplots@\texttt {/pgfplots/}!axis y line@\texttt {axis y line}|hyperpage}{42}
+\indexentry{axis x discontinuity@\texttt {axis x discontinuity} key|hyperpage}{42}
+\indexentry{pgfplots@\texttt {/pgfplots/}!axis x discontinuity@\texttt {axis x discontinuity}|hyperpage}{42}
+\indexentry{axis y discontinuity@\texttt {axis y discontinuity} key|hyperpage}{42}
+\indexentry{pgfplots@\texttt {/pgfplots/}!axis y discontinuity@\texttt {axis y discontinuity}|hyperpage}{42}
+\indexentry{hide axis@\texttt {hide axis} key|hyperpage}{42}
+\indexentry{pgfplots@\texttt {/pgfplots/}!hide axis@\texttt {hide axis}|hyperpage}{42}
+\indexentry{width@\texttt {width} key|hyperpage}{42}
+\indexentry{pgfplots@\texttt {/pgfplots/}!width@\texttt {width}|hyperpage}{42}
+\indexentry{height@\texttt {height} key|hyperpage}{43}
+\indexentry{pgfplots@\texttt {/pgfplots/}!height@\texttt {height}|hyperpage}{43}
+\indexentry{scale only axis@\texttt {scale only axis} key|hyperpage}{43}
+\indexentry{pgfplots@\texttt {/pgfplots/}!scale only axis@\texttt {scale only axis}|hyperpage}{43}
+\indexentry{x@\texttt {x} key|hyperpage}{43}
+\indexentry{pgfplots@\texttt {/pgfplots/}!x@\texttt {x}|hyperpage}{43}
+\indexentry{y@\texttt {y} key|hyperpage}{43}
+\indexentry{pgfplots@\texttt {/pgfplots/}!y@\texttt {y}|hyperpage}{43}
+\indexentry{x\ dir@\texttt {x\ dir} key|hyperpage}{45}
+\indexentry{pgfplots@\texttt {/pgfplots/}!error bars@\texttt {error bars/}!x\ dir@\texttt {x\ dir}|hyperpage}{45}
+\indexentry{y\ dir@\texttt {y\ dir} key|hyperpage}{45}
+\indexentry{pgfplots@\texttt {/pgfplots/}!error bars@\texttt {error bars/}!y\ dir@\texttt {y\ dir}|hyperpage}{45}
+\indexentry{x\ fixed@\texttt {x\ fixed} key|hyperpage}{45}
+\indexentry{pgfplots@\texttt {/pgfplots/}!error bars@\texttt {error bars/}!x\ fixed@\texttt {x\ fixed}|hyperpage}{45}
+\indexentry{y\ fixed@\texttt {y\ fixed} key|hyperpage}{45}
+\indexentry{pgfplots@\texttt {/pgfplots/}!error bars@\texttt {error bars/}!y\ fixed@\texttt {y\ fixed}|hyperpage}{45}
+\indexentry{x\ fixed relative@\texttt {x\ fixed relative} key|hyperpage}{45}
+\indexentry{pgfplots@\texttt {/pgfplots/}!error bars@\texttt {error bars/}!x\ fixed relative@\texttt {x\ fixed relative}|hyperpage}{45}
+\indexentry{y\ fixed relative@\texttt {y\ fixed relative} key|hyperpage}{45}
+\indexentry{pgfplots@\texttt {/pgfplots/}!error bars@\texttt {error bars/}!y\ fixed relative@\texttt {y\ fixed relative}|hyperpage}{45}
+\indexentry{x\ explicit@\texttt {x\ explicit} key|hyperpage}{46}
+\indexentry{pgfplots@\texttt {/pgfplots/}!error bars@\texttt {error bars/}!x\ explicit@\texttt {x\ explicit}|hyperpage}{46}
+\indexentry{y\ explicit@\texttt {y\ explicit} key|hyperpage}{46}
+\indexentry{pgfplots@\texttt {/pgfplots/}!error bars@\texttt {error bars/}!y\ explicit@\texttt {y\ explicit}|hyperpage}{46}
+\indexentry{x\ explicit relative@\texttt {x\ explicit relative} key|hyperpage}{46}
+\indexentry{pgfplots@\texttt {/pgfplots/}!error bars@\texttt {error bars/}!x\ explicit relative@\texttt {x\ explicit relative}|hyperpage}{46}
+\indexentry{y\ explicit relative@\texttt {y\ explicit relative} key|hyperpage}{46}
+\indexentry{pgfplots@\texttt {/pgfplots/}!error bars@\texttt {error bars/}!y\ explicit relative@\texttt {y\ explicit relative}|hyperpage}{46}
+\indexentry{error mark@\texttt {error mark} key|hyperpage}{46}
+\indexentry{pgfplots@\texttt {/pgfplots/}!error bars@\texttt {error bars/}!error mark@\texttt {error mark}|hyperpage}{46}
+\indexentry{error mark options@\texttt {error mark options} key|hyperpage}{46}
+\indexentry{pgfplots@\texttt {/pgfplots/}!error bars@\texttt {error bars/}!error mark options@\texttt {error mark options}|hyperpage}{46}
+\indexentry{error bar style@\texttt {error bar style} key|hyperpage}{46}
+\indexentry{pgfplots@\texttt {/pgfplots/}!error bars@\texttt {error bars/}!error bar style@\texttt {error bar style}|hyperpage}{46}
+\indexentry{draw error bar@\texttt {draw error bar} key|hyperpage}{46}
+\indexentry{pgfplots@\texttt {/pgfplots/}!error bars@\texttt {error bars/}!draw error bar@\texttt {draw error bar}|hyperpage}{46}
+\indexentry{pgfmathprintnumber@\myprintocmmand {pgfmathprintnumber}|hyperpage}{47}
+\indexentry{log identify minor tick positions@\texttt {log identify minor tick positions} key|hyperpage}{47}
+\indexentry{pgfplots@\texttt {/pgfplots/}!log identify minor tick positions@\texttt {log identify minor tick positions}|hyperpage}{47}
+\indexentry{log number format code@\texttt {log number format code} key|hyperpage}{48}
+\indexentry{pgfplots@\texttt {/pgfplots/}!log number format code@\texttt {log number format code}|hyperpage}{48}
+\indexentry{log base 10 number format code@\texttt {log base 10 number format code} key|hyperpage}{48}
+\indexentry{pgfplots@\texttt {/pgfplots/}!log base 10 number format code@\texttt {log base 10 number format code}|hyperpage}{48}
+\indexentry{log plot exponent style@\texttt {log plot exponent style} key|hyperpage}{48}
+\indexentry{pgfplots@\texttt {/pgfplots/}!log plot exponent style@\texttt {log plot exponent style}|hyperpage}{48}
+\indexentry{xmin@\texttt {xmin} key|hyperpage}{49}
+\indexentry{pgfplots@\texttt {/pgfplots/}!xmin@\texttt {xmin}|hyperpage}{49}
+\indexentry{ymin@\texttt {ymin} key|hyperpage}{49}
+\indexentry{pgfplots@\texttt {/pgfplots/}!ymin@\texttt {ymin}|hyperpage}{49}
+\indexentry{xmax@\texttt {xmax} key|hyperpage}{49}
+\indexentry{pgfplots@\texttt {/pgfplots/}!xmax@\texttt {xmax}|hyperpage}{49}
+\indexentry{ymax@\texttt {ymax} key|hyperpage}{49}
+\indexentry{pgfplots@\texttt {/pgfplots/}!ymax@\texttt {ymax}|hyperpage}{49}
+\indexentry{xmode@\texttt {xmode} key|hyperpage}{49}
+\indexentry{pgfplots@\texttt {/pgfplots/}!xmode@\texttt {xmode}|hyperpage}{49}
+\indexentry{ymode@\texttt {ymode} key|hyperpage}{49}
+\indexentry{pgfplots@\texttt {/pgfplots/}!ymode@\texttt {ymode}|hyperpage}{49}
+\indexentry{clip limits@\texttt {clip limits} key|hyperpage}{49}
+\indexentry{pgfplots@\texttt {/pgfplots/}!clip limits@\texttt {clip limits}|hyperpage}{49}
+\indexentry{enlargelimits@\texttt {enlargelimits} key|hyperpage}{49}
+\indexentry{pgfplots@\texttt {/pgfplots/}!enlargelimits@\texttt {enlargelimits}|hyperpage}{49}
+\indexentry{xtick@\texttt {xtick} key|hyperpage}{50}
+\indexentry{pgfplots@\texttt {/pgfplots/}!xtick@\texttt {xtick}|hyperpage}{50}
+\indexentry{ytick@\texttt {ytick} key|hyperpage}{50}
+\indexentry{pgfplots@\texttt {/pgfplots/}!ytick@\texttt {ytick}|hyperpage}{50}
+\indexentry{minor tick num@\texttt {minor tick num} key|hyperpage}{51}
+\indexentry{pgfplots@\texttt {/pgfplots/}!minor tick num@\texttt {minor tick num}|hyperpage}{51}
+\indexentry{minor x\unhbox \voidb@x \penalty \@M \ {}tick num@\texttt {minor x\unhbox \voidb@x \penalty \@M \ {}tick num} key|hyperpage}{51}
+\indexentry{pgfplots@\texttt {/pgfplots/}!minor x\unhbox \voidb@x \penalty \@M \ {}tick num@\texttt {minor x\unhbox \voidb@x \penalty \@M \ {}tick num}|hyperpage}{51}
+\indexentry{minor y\unhbox \voidb@x \penalty \@M \ {}tick num@\texttt {minor y\unhbox \voidb@x \penalty \@M \ {}tick num} key|hyperpage}{52}
+\indexentry{pgfplots@\texttt {/pgfplots/}!minor y\unhbox \voidb@x \penalty \@M \ {}tick num@\texttt {minor y\unhbox \voidb@x \penalty \@M \ {}tick num}|hyperpage}{52}
+\indexentry{extra x\ ticks@\texttt {extra x\ ticks} key|hyperpage}{52}
+\indexentry{pgfplots@\texttt {/pgfplots/}!extra x\ ticks@\texttt {extra x\ ticks}|hyperpage}{52}
+\indexentry{extra y\ ticks@\texttt {extra y\ ticks} key|hyperpage}{52}
+\indexentry{pgfplots@\texttt {/pgfplots/}!extra y\ ticks@\texttt {extra y\ ticks}|hyperpage}{52}
+\indexentry{space between ticks@\texttt {space between ticks} key|hyperpage}{53}
+\indexentry{pgfplots@\texttt {/pgfplots/}!space between ticks@\texttt {space between ticks}|hyperpage}{53}
+\indexentry{try min ticks@\texttt {try min ticks} key|hyperpage}{53}
+\indexentry{pgfplots@\texttt {/pgfplots/}!try min ticks@\texttt {try min ticks}|hyperpage}{53}
+\indexentry{try min ticks log@\texttt {try min ticks log} key|hyperpage}{53}
+\indexentry{pgfplots@\texttt {/pgfplots/}!try min ticks log@\texttt {try min ticks log}|hyperpage}{53}
+\indexentry{tickwidth@\texttt {tickwidth} key|hyperpage}{53}
+\indexentry{pgfplots@\texttt {/pgfplots/}!tickwidth@\texttt {tickwidth}|hyperpage}{53}
+\indexentry{major tick length@\texttt {major tick length} key|hyperpage}{53}
+\indexentry{pgfplots@\texttt {/pgfplots/}!major tick length@\texttt {major tick length}|hyperpage}{53}
+\indexentry{subtickwidth@\texttt {subtickwidth} key|hyperpage}{53}
+\indexentry{pgfplots@\texttt {/pgfplots/}!subtickwidth@\texttt {subtickwidth}|hyperpage}{53}
+\indexentry{minor tick length@\texttt {minor tick length} key|hyperpage}{53}
+\indexentry{pgfplots@\texttt {/pgfplots/}!minor tick length@\texttt {minor tick length}|hyperpage}{53}
+\indexentry{xtickten@\texttt {xtickten} key|hyperpage}{53}
+\indexentry{pgfplots@\texttt {/pgfplots/}!xtickten@\texttt {xtickten}|hyperpage}{53}
+\indexentry{ytickten@\texttt {ytickten} key|hyperpage}{53}
+\indexentry{pgfplots@\texttt {/pgfplots/}!ytickten@\texttt {ytickten}|hyperpage}{53}
+\indexentry{xticklabels@\texttt {xticklabels} key|hyperpage}{54}
+\indexentry{pgfplots@\texttt {/pgfplots/}!xticklabels@\texttt {xticklabels}|hyperpage}{54}
+\indexentry{yticklabels@\texttt {yticklabels} key|hyperpage}{54}
+\indexentry{pgfplots@\texttt {/pgfplots/}!yticklabels@\texttt {yticklabels}|hyperpage}{54}
+\indexentry{xticklabel@\texttt {xticklabel} key|hyperpage}{54}
+\indexentry{pgfplots@\texttt {/pgfplots/}!xticklabel@\texttt {xticklabel}|hyperpage}{54}
+\indexentry{yticklabel@\texttt {yticklabel} key|hyperpage}{54}
+\indexentry{pgfplots@\texttt {/pgfplots/}!yticklabel@\texttt {yticklabel}|hyperpage}{54}
+\indexentry{x\ tick label as interval@\texttt {x\ tick label as interval} key|hyperpage}{55}
+\indexentry{pgfplots@\texttt {/pgfplots/}!x\ tick label as interval@\texttt {x\ tick label as interval}|hyperpage}{55}
+\indexentry{y\ tick label as interval@\texttt {y\ tick label as interval} key|hyperpage}{55}
+\indexentry{pgfplots@\texttt {/pgfplots/}!y\ tick label as interval@\texttt {y\ tick label as interval}|hyperpage}{55}
+\indexentry{scaled ticks@\texttt {scaled ticks} key|hyperpage}{56}
+\indexentry{pgfplots@\texttt {/pgfplots/}!scaled ticks@\texttt {scaled ticks}|hyperpage}{56}
+\indexentry{tick scale label code@\texttt {tick scale label code} key|hyperpage}{57}
+\indexentry{pgfplots@\texttt {/pgfplots/}!tick scale label code@\texttt {tick scale label code}|hyperpage}{57}
+\indexentry{scale ticks below@\texttt {scale ticks below} key|hyperpage}{57}
+\indexentry{pgfplots@\texttt {/pgfplots/}!scale ticks below@\texttt {scale ticks below}|hyperpage}{57}
+\indexentry{scale ticks above@\texttt {scale ticks above} key|hyperpage}{57}
+\indexentry{pgfplots@\texttt {/pgfplots/}!scale ticks above@\texttt {scale ticks above}|hyperpage}{57}
+\indexentry{tickpos@\texttt {tickpos} key|hyperpage}{57}
+\indexentry{pgfplots@\texttt {/pgfplots/}!tickpos@\texttt {tickpos}|hyperpage}{57}
+\indexentry{tick align@\texttt {tick align} key|hyperpage}{57}
+\indexentry{pgfplots@\texttt {/pgfplots/}!tick align@\texttt {tick align}|hyperpage}{57}
+\indexentry{xminorticks@\texttt {xminorticks} key|hyperpage}{57}
+\indexentry{pgfplots@\texttt {/pgfplots/}!xminorticks@\texttt {xminorticks}|hyperpage}{57}
+\indexentry{yminorticks@\texttt {yminorticks} key|hyperpage}{57}
+\indexentry{pgfplots@\texttt {/pgfplots/}!yminorticks@\texttt {yminorticks}|hyperpage}{57}
+\indexentry{xmajorticks@\texttt {xmajorticks} key|hyperpage}{57}
+\indexentry{pgfplots@\texttt {/pgfplots/}!xmajorticks@\texttt {xmajorticks}|hyperpage}{57}
+\indexentry{ymajorticks@\texttt {ymajorticks} key|hyperpage}{57}
+\indexentry{pgfplots@\texttt {/pgfplots/}!ymajorticks@\texttt {ymajorticks}|hyperpage}{57}
+\indexentry{ticks@\texttt {ticks} key|hyperpage}{57}
+\indexentry{pgfplots@\texttt {/pgfplots/}!ticks@\texttt {ticks}|hyperpage}{57}
+\indexentry{xminorgrids@\texttt {xminorgrids} key|hyperpage}{57}
+\indexentry{pgfplots@\texttt {/pgfplots/}!xminorgrids@\texttt {xminorgrids}|hyperpage}{57}
+\indexentry{yminorgrids@\texttt {yminorgrids} key|hyperpage}{57}
+\indexentry{pgfplots@\texttt {/pgfplots/}!yminorgrids@\texttt {yminorgrids}|hyperpage}{57}
+\indexentry{xmajorgrids@\texttt {xmajorgrids} key|hyperpage}{57}
+\indexentry{pgfplots@\texttt {/pgfplots/}!xmajorgrids@\texttt {xmajorgrids}|hyperpage}{57}
+\indexentry{ymajorgrids@\texttt {ymajorgrids} key|hyperpage}{57}
+\indexentry{pgfplots@\texttt {/pgfplots/}!ymajorgrids@\texttt {ymajorgrids}|hyperpage}{57}
+\indexentry{grids@\texttt {grids} key|hyperpage}{58}
+\indexentry{pgfplots@\texttt {/pgfplots/}!grids@\texttt {grids}|hyperpage}{58}
+\indexentry{@\texttt {.} handler|hyperpage}{58}
+\indexentry{Key handlers!.@\texttt {.}|hyperpage}{58}
+\indexentry{@\texttt {.} handler|hyperpage}{58}
+\indexentry{Key handlers!.@\texttt {.}|hyperpage}{58}
+\indexentry{pgfplotsset@\myprintocmmand {pgfplotsset}|hyperpage}{59}
+\indexentry{every axis@\texttt {every axis} key|hyperpage}{59}
+\indexentry{pgfplots@\texttt {/pgfplots/}!every axis@\texttt {every axis}|hyperpage}{59}
+\indexentry{every semilogx axis@\texttt {every semilogx axis} key|hyperpage}{59}
+\indexentry{pgfplots@\texttt {/pgfplots/}!every semilogx axis@\texttt {every semilogx axis}|hyperpage}{59}
+\indexentry{every semilogy axis@\texttt {every semilogy axis} key|hyperpage}{59}
+\indexentry{pgfplots@\texttt {/pgfplots/}!every semilogy axis@\texttt {every semilogy axis}|hyperpage}{59}
+\indexentry{every loglog axis@\texttt {every loglog axis} key|hyperpage}{59}
+\indexentry{pgfplots@\texttt {/pgfplots/}!every loglog axis@\texttt {every loglog axis}|hyperpage}{59}
+\indexentry{every linear axis@\texttt {every linear axis} key|hyperpage}{59}
+\indexentry{pgfplots@\texttt {/pgfplots/}!every linear axis@\texttt {every linear axis}|hyperpage}{59}
+\indexentry{every axis plot@\texttt {every axis plot} key|hyperpage}{59}
+\indexentry{pgfplots@\texttt {/pgfplots/}!every axis plot@\texttt {every axis plot}|hyperpage}{59}
+\indexentry{every axis plot post@\texttt {every axis plot post} key|hyperpage}{59}
+\indexentry{pgfplots@\texttt {/pgfplots/}!every axis plot post@\texttt {every axis plot post}|hyperpage}{59}
+\indexentry{every axis plot no \#@\texttt {every axis plot no \#} key|hyperpage}{59}
+\indexentry{pgfplots@\texttt {/pgfplots/}!every axis plot no \#@\texttt {every axis plot no \#}|hyperpage}{59}
+\indexentry{every axis label@\texttt {every axis label} key|hyperpage}{59}
+\indexentry{pgfplots@\texttt {/pgfplots/}!every axis label@\texttt {every axis label}|hyperpage}{59}
+\indexentry{every axis x label@\texttt {every axis x label} key|hyperpage}{59}
+\indexentry{pgfplots@\texttt {/pgfplots/}!every axis x label@\texttt {every axis x label}|hyperpage}{59}
+\indexentry{every axis y label@\texttt {every axis y label} key|hyperpage}{59}
+\indexentry{pgfplots@\texttt {/pgfplots/}!every axis y label@\texttt {every axis y label}|hyperpage}{59}
+\indexentry{every axis title@\texttt {every axis title} key|hyperpage}{59}
+\indexentry{pgfplots@\texttt {/pgfplots/}!every axis title@\texttt {every axis title}|hyperpage}{59}
+\indexentry{every tick@\texttt {every tick} key|hyperpage}{60}
+\indexentry{pgfplots@\texttt {/pgfplots/}!every tick@\texttt {every tick}|hyperpage}{60}
+\indexentry{every minor tick@\texttt {every minor tick} key|hyperpage}{60}
+\indexentry{pgfplots@\texttt {/pgfplots/}!every minor tick@\texttt {every minor tick}|hyperpage}{60}
+\indexentry{every major tick@\texttt {every major tick} key|hyperpage}{60}
+\indexentry{pgfplots@\texttt {/pgfplots/}!every major tick@\texttt {every major tick}|hyperpage}{60}
+\indexentry{every x tick@\texttt {every x tick} key|hyperpage}{60}
+\indexentry{pgfplots@\texttt {/pgfplots/}!every x tick@\texttt {every x tick}|hyperpage}{60}
+\indexentry{every minor x tick@\texttt {every minor x tick} key|hyperpage}{60}
+\indexentry{pgfplots@\texttt {/pgfplots/}!every minor x tick@\texttt {every minor x tick}|hyperpage}{60}
+\indexentry{every major x tick@\texttt {every major x tick} key|hyperpage}{60}
+\indexentry{pgfplots@\texttt {/pgfplots/}!every major x tick@\texttt {every major x tick}|hyperpage}{60}
+\indexentry{every y tick@\texttt {every y tick} key|hyperpage}{60}
+\indexentry{pgfplots@\texttt {/pgfplots/}!every y tick@\texttt {every y tick}|hyperpage}{60}
+\indexentry{every minor y tick@\texttt {every minor y tick} key|hyperpage}{60}
+\indexentry{pgfplots@\texttt {/pgfplots/}!every minor y tick@\texttt {every minor y tick}|hyperpage}{60}
+\indexentry{every major y tick@\texttt {every major y tick} key|hyperpage}{60}
+\indexentry{pgfplots@\texttt {/pgfplots/}!every major y tick@\texttt {every major y tick}|hyperpage}{60}
+\indexentry{every axis grid@\texttt {every axis grid} key|hyperpage}{60}
+\indexentry{pgfplots@\texttt {/pgfplots/}!every axis grid@\texttt {every axis grid}|hyperpage}{60}
+\indexentry{every minor grid@\texttt {every minor grid} key|hyperpage}{60}
+\indexentry{pgfplots@\texttt {/pgfplots/}!every minor grid@\texttt {every minor grid}|hyperpage}{60}
+\indexentry{every major grid@\texttt {every major grid} key|hyperpage}{60}
+\indexentry{pgfplots@\texttt {/pgfplots/}!every major grid@\texttt {every major grid}|hyperpage}{60}
+\indexentry{every axis x grid@\texttt {every axis x grid} key|hyperpage}{60}
+\indexentry{pgfplots@\texttt {/pgfplots/}!every axis x grid@\texttt {every axis x grid}|hyperpage}{60}
+\indexentry{every minor x grid@\texttt {every minor x grid} key|hyperpage}{60}
+\indexentry{pgfplots@\texttt {/pgfplots/}!every minor x grid@\texttt {every minor x grid}|hyperpage}{60}
+\indexentry{every major x grid@\texttt {every major x grid} key|hyperpage}{60}
+\indexentry{pgfplots@\texttt {/pgfplots/}!every major x grid@\texttt {every major x grid}|hyperpage}{60}
+\indexentry{every axis y grid@\texttt {every axis y grid} key|hyperpage}{60}
+\indexentry{pgfplots@\texttt {/pgfplots/}!every axis y grid@\texttt {every axis y grid}|hyperpage}{60}
+\indexentry{every minor y grid@\texttt {every minor y grid} key|hyperpage}{60}
+\indexentry{pgfplots@\texttt {/pgfplots/}!every minor y grid@\texttt {every minor y grid}|hyperpage}{60}
+\indexentry{every major y grid@\texttt {every major y grid} key|hyperpage}{60}
+\indexentry{pgfplots@\texttt {/pgfplots/}!every major y grid@\texttt {every major y grid}|hyperpage}{60}
+\indexentry{every tick label@\texttt {every tick label} key|hyperpage}{60}
+\indexentry{pgfplots@\texttt {/pgfplots/}!every tick label@\texttt {every tick label}|hyperpage}{60}
+\indexentry{every x tick label@\texttt {every x tick label} key|hyperpage}{60}
+\indexentry{pgfplots@\texttt {/pgfplots/}!every x tick label@\texttt {every x tick label}|hyperpage}{60}
+\indexentry{every y tick label@\texttt {every y tick label} key|hyperpage}{60}
+\indexentry{pgfplots@\texttt {/pgfplots/}!every y tick label@\texttt {every y tick label}|hyperpage}{60}
+\indexentry{every x tick scale label@\texttt {every x tick scale label} key|hyperpage}{60}
+\indexentry{pgfplots@\texttt {/pgfplots/}!every x tick scale label@\texttt {every x tick scale label}|hyperpage}{60}
+\indexentry{every y tick scale label@\texttt {every y tick scale label} key|hyperpage}{60}
+\indexentry{pgfplots@\texttt {/pgfplots/}!every y tick scale label@\texttt {every y tick scale label}|hyperpage}{60}
+\indexentry{every extra x tick@\texttt {every extra x tick} key|hyperpage}{60}
+\indexentry{pgfplots@\texttt {/pgfplots/}!every extra x tick@\texttt {every extra x tick}|hyperpage}{60}
+\indexentry{every error bar@\texttt {every error bar} key|hyperpage}{61}
+\indexentry{pgfplots@\texttt {/pgfplots/}!every error bar@\texttt {every error bar}|hyperpage}{61}
+\indexentry{every extra y tick@\texttt {every extra y tick} key|hyperpage}{61}
+\indexentry{pgfplots@\texttt {/pgfplots/}!every extra y tick@\texttt {every extra y tick}|hyperpage}{61}
+\indexentry{every axis legend@\texttt {every axis legend} key|hyperpage}{61}
+\indexentry{pgfplots@\texttt {/pgfplots/}!every axis legend@\texttt {every axis legend}|hyperpage}{61}
+\indexentry{x\ tick label style@\texttt {x\ tick label style} key|hyperpage}{61}
+\indexentry{pgfplots@\texttt {/pgfplots/}!x\ tick label style@\texttt {x\ tick label style}|hyperpage}{61}
+\indexentry{y\ tick label style@\texttt {y\ tick label style} key|hyperpage}{61}
+\indexentry{pgfplots@\texttt {/pgfplots/}!y\ tick label style@\texttt {y\ tick label style}|hyperpage}{61}
+\indexentry{x\ tick scale label style@\texttt {x\ tick scale label style} key|hyperpage}{61}
+\indexentry{pgfplots@\texttt {/pgfplots/}!x\ tick scale label style@\texttt {x\ tick scale label style}|hyperpage}{61}
+\indexentry{y\ tick scale label style@\texttt {y\ tick scale label style} key|hyperpage}{61}
+\indexentry{pgfplots@\texttt {/pgfplots/}!y\ tick scale label style@\texttt {y\ tick scale label style}|hyperpage}{61}
+\indexentry{label style@\texttt {label style} key|hyperpage}{61}
+\indexentry{pgfplots@\texttt {/pgfplots/}!label style@\texttt {label style}|hyperpage}{61}
+\indexentry{x\ label style@\texttt {x\ label style} key|hyperpage}{61}
+\indexentry{pgfplots@\texttt {/pgfplots/}!x\ label style@\texttt {x\ label style}|hyperpage}{61}
+\indexentry{y\ label style@\texttt {y\ label style} key|hyperpage}{61}
+\indexentry{pgfplots@\texttt {/pgfplots/}!y\ label style@\texttt {y\ label style}|hyperpage}{61}
+\indexentry{title style@\texttt {title style} key|hyperpage}{61}
+\indexentry{pgfplots@\texttt {/pgfplots/}!title style@\texttt {title style}|hyperpage}{61}
+\indexentry{tick style@\texttt {tick style} key|hyperpage}{61}
+\indexentry{pgfplots@\texttt {/pgfplots/}!tick style@\texttt {tick style}|hyperpage}{61}
+\indexentry{minor tick style@\texttt {minor tick style} key|hyperpage}{61}
+\indexentry{pgfplots@\texttt {/pgfplots/}!minor tick style@\texttt {minor tick style}|hyperpage}{61}
+\indexentry{major tick style@\texttt {major tick style} key|hyperpage}{61}
+\indexentry{pgfplots@\texttt {/pgfplots/}!major tick style@\texttt {major tick style}|hyperpage}{61}
+\indexentry{x\ tick style@\texttt {x\ tick style} key|hyperpage}{61}
+\indexentry{pgfplots@\texttt {/pgfplots/}!x\ tick style@\texttt {x\ tick style}|hyperpage}{61}
+\indexentry{y\ tick style@\texttt {y\ tick style} key|hyperpage}{61}
+\indexentry{pgfplots@\texttt {/pgfplots/}!y\ tick style@\texttt {y\ tick style}|hyperpage}{61}
+\indexentry{minor x\ tick style@\texttt {minor x\ tick style} key|hyperpage}{61}
+\indexentry{pgfplots@\texttt {/pgfplots/}!minor x\ tick style@\texttt {minor x\ tick style}|hyperpage}{61}
+\indexentry{minor y\ tick style@\texttt {minor y\ tick style} key|hyperpage}{61}
+\indexentry{pgfplots@\texttt {/pgfplots/}!minor y\ tick style@\texttt {minor y\ tick style}|hyperpage}{61}
+\indexentry{major x\ tick style@\texttt {major x\ tick style} key|hyperpage}{61}
+\indexentry{pgfplots@\texttt {/pgfplots/}!major x\ tick style@\texttt {major x\ tick style}|hyperpage}{61}
+\indexentry{major y\ tick style@\texttt {major y\ tick style} key|hyperpage}{61}
+\indexentry{pgfplots@\texttt {/pgfplots/}!major y\ tick style@\texttt {major y\ tick style}|hyperpage}{61}
+\indexentry{grid style@\texttt {grid style} key|hyperpage}{61}
+\indexentry{pgfplots@\texttt {/pgfplots/}!grid style@\texttt {grid style}|hyperpage}{61}
+\indexentry{minor grid style@\texttt {minor grid style} key|hyperpage}{61}
+\indexentry{pgfplots@\texttt {/pgfplots/}!minor grid style@\texttt {minor grid style}|hyperpage}{61}
+\indexentry{major grid style@\texttt {major grid style} key|hyperpage}{61}
+\indexentry{pgfplots@\texttt {/pgfplots/}!major grid style@\texttt {major grid style}|hyperpage}{61}
+\indexentry{x\ grid style@\texttt {x\ grid style} key|hyperpage}{61}
+\indexentry{pgfplots@\texttt {/pgfplots/}!x\ grid style@\texttt {x\ grid style}|hyperpage}{61}
+\indexentry{y\ grid style@\texttt {y\ grid style} key|hyperpage}{61}
+\indexentry{pgfplots@\texttt {/pgfplots/}!y\ grid style@\texttt {y\ grid style}|hyperpage}{61}
+\indexentry{minor x\ grid style@\texttt {minor x\ grid style} key|hyperpage}{61}
+\indexentry{pgfplots@\texttt {/pgfplots/}!minor x\ grid style@\texttt {minor x\ grid style}|hyperpage}{61}
+\indexentry{minor y\ grid style@\texttt {minor y\ grid style} key|hyperpage}{61}
+\indexentry{pgfplots@\texttt {/pgfplots/}!minor y\ grid style@\texttt {minor y\ grid style}|hyperpage}{61}
+\indexentry{major x\ grid style@\texttt {major x\ grid style} key|hyperpage}{61}
+\indexentry{pgfplots@\texttt {/pgfplots/}!major x\ grid style@\texttt {major x\ grid style}|hyperpage}{61}
+\indexentry{major y\ grid style@\texttt {major y\ grid style} key|hyperpage}{61}
+\indexentry{pgfplots@\texttt {/pgfplots/}!major y\ grid style@\texttt {major y\ grid style}|hyperpage}{61}
+\indexentry{extra x\ tick style@\texttt {extra x\ tick style} key|hyperpage}{61}
+\indexentry{pgfplots@\texttt {/pgfplots/}!extra x\ tick style@\texttt {extra x\ tick style}|hyperpage}{61}
+\indexentry{extra y\ tick style@\texttt {extra y\ tick style} key|hyperpage}{61}
+\indexentry{pgfplots@\texttt {/pgfplots/}!extra y\ tick style@\texttt {extra y\ tick style}|hyperpage}{61}
+\indexentry{anchor@\texttt {anchor} key|hyperpage}{62}
+\indexentry{pgfplots@\texttt {/pgfplots/}!anchor@\texttt {anchor}|hyperpage}{62}
+\indexentry{at@\texttt {at} key|hyperpage}{65}
+\indexentry{pgfplots@\texttt {/pgfplots/}!at@\texttt {at}|hyperpage}{65}
+\indexentry{disablelogfilter@\texttt {disablelogfilter} key|hyperpage}{65}
+\indexentry{pgfplots@\texttt {/pgfplots/}!disablelogfilter@\texttt {disablelogfilter}|hyperpage}{65}
+\indexentry{disabledatascaling@\texttt {disabledatascaling} key|hyperpage}{65}
+\indexentry{pgfplots@\texttt {/pgfplots/}!disabledatascaling@\texttt {disabledatascaling}|hyperpage}{65}
+\indexentry{.code@\texttt {.code} key|hyperpage}{66}
+\indexentry{pgfplots@\texttt {/pgfplots/}!x\ filter@\texttt {x\ filter/}!.code@\texttt {.code}|hyperpage}{66}
+\indexentry{.code@\texttt {.code} key|hyperpage}{66}
+\indexentry{pgfplots@\texttt {/pgfplots/}!y\ filter@\texttt {y\ filter/}!.code@\texttt {.code}|hyperpage}{66}
+\indexentry{skip coords between index@\texttt {skip coords between index} key|hyperpage}{66}
+\indexentry{pgfplots@\texttt {/pgfplots/}!skip coords between index@\texttt {skip coords between index}|hyperpage}{66}
+\indexentry{filter discard warning@\texttt {filter discard warning} key|hyperpage}{67}
+\indexentry{pgfplots@\texttt {/pgfplots/}!filter discard warning@\texttt {filter discard warning}|hyperpage}{67}
+\indexentry{execute at begin plot@\texttt {execute at begin plot} key|hyperpage}{67}
+\indexentry{pgfplots@\texttt {/pgfplots/}!execute at begin plot@\texttt {execute at begin plot}|hyperpage}{67}
+\indexentry{execute at end plot@\texttt {execute at end plot} key|hyperpage}{67}
+\indexentry{pgfplots@\texttt {/pgfplots/}!execute at end plot@\texttt {execute at end plot}|hyperpage}{67}
+\indexentry{before end axis@\texttt {before end axis} key|hyperpage}{67}
+\indexentry{pgfplots@\texttt {/pgfplots/}!before end axis@\texttt {before end axis}|hyperpage}{67}
+\indexentry{after end axis@\texttt {after end axis} key|hyperpage}{67}
+\indexentry{pgfplots@\texttt {/pgfplots/}!after end axis@\texttt {after end axis}|hyperpage}{67}
+\indexentry{extra description@\texttt {extra description} key|hyperpage}{68}
+\indexentry{pgfplots@\texttt {/pgfplots/}!extra description@\texttt {extra description}|hyperpage}{68}
diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.install.tex b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.install.tex
index 0761f12be9c..13bb6c9afdd 100644
--- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.install.tex
+++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.install.tex
@@ -19,33 +19,14 @@ doc/latex/pgfplots/gpl-3.0.txt
You may also visit~\url{http://www.gnu.org/licenses}.
\subsection{Prerequisites}
-\PGFPlots\ requires \PGF\ version $\ge 1.18$ and package \texttt{xkeyval}.
-
-\subsection{Files in the \PGFPlots-Bundle}
-The \PGFPlots\ package consists of the files
-\begin{lstlisting}
-latex/pgfplots/pgfplots.sty
-generic/pgfmathlog/pgfmathlog.sty
-generic/liststructure/liststructure.sty
-generic/sciformat/sciformat.sty
-generic/pgfplotshelpers/pgfplotshelpers.sty
-doc/latex/pgfplots/pgfplots.bib
-doc/latex/pgfplots/pgfplots.*tex
-doc/latex/pgfplots/pgfplots.pdf
-doc/latex/pgfplots/todo.txt
-doc/latex/pgfplots/changelog.txt
-test/liststructuretest/liststructuretest.tex
-test/pgfplotstest/pgfplotstest.tex
-test/pgfmathlogtest/pgfmathlogtest.tex
-ext_scripts/pgf2pdf.sh
-ext_scripts/matlab2pgfplots.m
-ext_scripts/matlab2pgfplots.sh
-\end{lstlisting}
-If is used with
+\PGFPlots\ requires \PGF\ with \textbf{at least version~$2.0$}. It is used with
\begin{lstlisting}
\usepackage{pgfplots}
\end{lstlisting}
-in your preamble. There are several ways how to teach \LaTeX\ where to find the files. Choose the option which fits your needs best.
+in your preamble (see section~\ref{sec:tex:dialects} for information about how to use it with Con{\TeX}t and plain \TeX). There are several ways how to teach \TeX\ where to find the files. Choose the option which fits your needs best.
+
+\subsection{Installation in Windows}
+Windows users often use Mik\TeX\ which downloads the latest stable package versions automatically. As far as I know, you do not need to install anything manually here.
\subsection{Assigning the \texttt{TEXINPUTS} Variable}
You can simply install \PGFPlots\ anywhere on your disc, for example into
@@ -56,10 +37,16 @@ Then, you set the \texttt{TEXINPUTS} variable to
\begin{lstlisting}
TEXINPUTS=/foo/bar/pgfplots//:
\end{lstlisting}
-The trailing~`\texttt{:}' tells \LaTeX\ to check the default search paths after \lstinline!/foo/bar/pgfplots!. The double slash~`\texttt{//}' tells \LaTeX\ to search all subdirectories.
+The trailing~`\texttt{:}' tells \TeX\ to check the default search paths after \lstinline!/foo/bar/pgfplots!. The double slash~`\texttt{//}' tells \TeX\ to search all subdirectories.
If the \texttt{TEXINPUTS} variable already contains something, you can append the line above to the existing \texttt{TEXINPUTS} content.
+Furthermore, you should set |TEXDOCS| as well,
+\begin{lstlisting}
+TEXDOCS=/foo/bar/pgfplots//:
+\end{lstlisting}
+so that the \TeX-documentation system finds the files |pgfplots.pdf| and |pgfplotstable.pdf| (on some systems, it is then enough to use |texdoc pgfplots|).
+
Please refer to your operating systems manual for how to set environment variables.
\subsection{Installation into a local \texttt{texmf}-directory}
@@ -71,13 +58,14 @@ A TDS conforming installation will use the same base directory as in the last se
Do not forget to run \lstinline!texhash!.
\subsection{If everything else fails...}
-If \LaTeX\ still doesn't find your files, you can copy all \lstinline!.sty!-files into your current project's working directory.
+If \TeX\ still doesn't find your files, you can copy all \lstinline!.sty!-files into your current project's working directory.
Please refer to \url{http://www.ctan.org/installationadvice/} for more information about package installation.
\subsection{Restrictions for DVI-Viewers and \texttt{dvipdfm}}
+\label{sec:drivers}%
\PGF\ is compatible with
\begin{itemize}
\item \lstinline!latex!/\lstinline!dvips!,
diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.intro.tex b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.intro.tex
index 0a1d34d2ccf..3cb4be4c2ab 100644
--- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.intro.tex
+++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.intro.tex
@@ -1,38 +1,109 @@
-% main=manual.tex
+% main=pgfplots.tex
\section{Drawing axes and plots}
-\subsection{A first plot}
-Plotting is done using \lstinline|\begin{axis} ... \addplot ...; \end{axis}|:
-
-\begin{figure}
-\centering
+\subsection{\TeX-dialects: \LaTeX, Con{\TeX}t, plain \TeX }
+\label{sec:tex:dialects}%
+\PGFPlots\ is compatible with \LaTeX, Con{\TeX}t and plain \TeX. The only difference is how to specify environments. This affects any \PGF/\Tikz-environments and all \PGFPlots-environments like axis, semilogxaxis, semilogyaxis and loglogaxis:
+\begin{description}
+\def\HEAD{%
+ \small
+ \lstset{boxpos=b,breaklines=false,aboveskip=3pt,belowskip=3pt}%
+ %\hspace{-1cm}%
+ \begin{tabular}{*{2}{p{4cm}}}%
+}%
+\item[\LaTeX:] \lstinline!\usepackage{pgfplots}! and
+
+{\HEAD
+\begin{lstlisting}
\begin{tikzpicture}
- \begin{axis}[
- xlabel=Cost,
- ylabel=Error]
- \addplot[color=red,mark=x] plot coordinates {
- (2,-2.8559703)
- (3,-3.5301677)
- (4,-4.3050655)
- (5,-5.1413136)
- (6,-6.0322865)
- (7,-6.9675052)
- (8,-7.9377747)
- (9,-9.9717663)
- };
- \end{axis}
+\begin{axis}
+...
+\end{axis}
\end{tikzpicture}
+\end{lstlisting}
+&
+\begin{lstlisting}
+\begin{tikzpicture}
+\begin{semilogxaxis}
+...
+\end{semilogxaxis}
+\end{tikzpicture}
+\end{lstlisting}
+\\
+\end{tabular}%
+}
+
+A small \LaTeX--example file can be found in
+\begin{lstlisting}
+doc/latex/pgfplots/pgfplotsexample.tex.
+\end{lstlisting}
-\caption{An example for a normal plot. The coordinates are specified using the \Tikz-syntax ``\texttt{plot coordinates}'', optional labels can be provided with the ``\texttt{xlabel}'' and ``\texttt{ylabel}'' arguments.}
-\label{fig:firstplot}
-\end{figure}
+\item[Con{\TeX}t:] \lstinline!\usemodule[pgfplots]! and
+{\HEAD
\begin{lstlisting}
+\starttikzpicture
+\startaxis
+...
+\stopaxis
+\stoptikzpicture
+\end{lstlisting}
+&
+\begin{lstlisting}
+\starttikzpicture
+\startsemilogxaxis
+...
+\stopsemilogxaxis
+\stoptikzpicture
+\end{lstlisting}
+\\
+\end{tabular}%
+}
+
+A small Con{\TeX}t--example file can be found in
+\begin{lstlisting}
+doc/context/pgfplots/pgfplotsexample.tex.
+\end{lstlisting}
+
+\item[plain \TeX:] \lstinline!\input pgfplots.tex! and
+
+{\HEAD
+\begin{lstlisting}
+\tikzpicture
+\axis
+...
+\endaxis
+\endtikzpicture
+\end{lstlisting}
+&
+\begin{lstlisting}
+\tikzpicture
+\semilogxaxis
+...
+\endsemilogxaxis
+\endtikzpicture
+\end{lstlisting}
+\\
+\end{tabular}%
+}
+
+A small plain--\TeX--example file can be found in
+\begin{lstlisting}
+doc/plain/pgfplots/pgfplotsexample.tex.
+\end{lstlisting}
+\end{description}
+You may need to set low--level drivers if you intend to use |dvipdfm|, see section~\ref{sec:drivers}.
+
+
+\subsection{A first plot}
+Plotting is done using \lstinline|\begin{axis} ... \addplot ...; \end{axis}|, where |\addplot| is an interface to the \Tikz\ |plot| commands.
+\begin{codeexample}[]
\begin{tikzpicture}
\begin{axis}[
xlabel=Cost,
+ name=an axis,
ylabel=Error]
- \addplot[color=red,mark=x] plot coordinates {
+ \addplot[color=red,mark=x] coordinates {
(2,-2.8559703)
(3,-3.5301677)
(4,-4.3050655)
@@ -40,104 +111,62 @@ Plotting is done using \lstinline|\begin{axis} ... \addplot ...; \end{axis}|:
(6,-6.0322865)
(7,-6.9675052)
(8,-7.9377747)
- (9,-9.9717663)
};
\end{axis}
\end{tikzpicture}
-\end{lstlisting}
-The outcome of this listing is shown in figure~\ref{fig:firstplot}. The \lstinline!plot coordinates! command is one of the \Tikz\ ways to create plots, see~\cite[Section~16]{tikz}. All other commands are used to create the axis.
+\end{codeexample}
-\subsection{Two plots in the same axis}
-Figure~\ref{fig:twoplots} shows the result of placing multiple~\lstinline!\addplot!-commands into a single axis:
-\begin{figure}
-\centering
-\begin{tikzpicture}
+\begin{codeexample}[]
+\begin{tikzpicture}%
\begin{axis}[
- xlabel=Cost,
- ylabel=Error]
- \addplot[color=red,mark=x] plot coordinates {
- (2,-2.8559703)
- (3,-3.5301677)
- (4,-4.3050655)
- (5,-5.1413136)
- (6,-6.0322865)
- (7,-6.9675052)
- (8,-7.9377747)
- (9,-9.9717663)
- };
- \addplot[color=blue,mark=*] plot coordinates {
- (2,-2.83)
- (3,-3.5167)
- (4,-4.4050)
- (5,-5.137)
- (6,-6.4)
- (7,-6.6750)
- (8,-6.9377)
- (9,-6.9717)
- };
- \legend{Case 1\\Case 2\\}
+ xlabel=$x$,
+ ylabel=$\sin(x)$,
+ name=an axis,
+ ]
+ \addplot plot[id=sin] function{sin(x)};
\end{axis}
-\end{tikzpicture}
-
-\caption{Two plots in the same axis. A legend can be generated using the \texttt{\textbackslash legend{}}-command.}
-\label{fig:twoplots}
-\end{figure}
+\end{tikzpicture}%
+\end{codeexample}
+The \lstinline!plot coordinates! and \lstinline!plot function! commands are two of the several \Tikz\ ways to create plots, see section~\ref{sec:addplot} for more details\footnote{Please note that you need \lstinline{gnuplot} installed to use \lstinline{plot function}.}. The options `|xlabel|' and `|ylabel|' define axis descriptions.
-\begin{lstlisting}
+\subsection{Two plots in the same axis}
+Multiple \lstinline!\addplot!-commands can be placed into the same axis.
+ % generated with this statement:
+ %\addplot plot[id=filesuffix_noise,domain=-6:5,samples=10] function{(-x**5 - 242 + (-300 + 600*rand(0)))};
+\begin{codeexample}[leave comments]
\begin{tikzpicture}
\begin{axis}[
- xlabel=Cost,
- ylabel=Error]
- \addplot[color=red,mark=x] plot coordinates {
- (2,-2.8559703)
- (3,-3.5301677)
- (4,-4.3050655)
- (5,-5.1413136)
- (6,-6.0322865)
- (7,-6.9675052)
- (8,-7.9377747)
- (9,-9.9717663)
- };
- \addplot[color=blue,mark=*] plot coordinates {
- (2,-2.83)
- (3,-3.5167)
- (4,-4.4050)
- (5,-5.137)
- (6,-6.4)
- (7,-6.6750)
- (8,-6.9377)
- (9,-6.9717)
- };
- \legend{Case 1\\Case 2\\}
+ height=9cm,
+ width=9cm,
+ grid=major,
+ ]
+
+ \addplot plot[id=filesuffix] function{(-x**5 - 242)};
+ \addlegendentry{model}
+
+ \addplot coordinates {
+ (-4.77778,2027.60977)
+ (-3.55556,347.84069)
+ (-2.33333,22.58953)
+ (-1.11111,-493.50066)
+ (0.11111,46.66082)
+ (1.33333,-205.56286)
+ (2.55556,-341.40638)
+ (3.77778,-1169.24780)
+ (5.00000,-3269.56775)
+ };
+ \addlegendentry{estimate}
\end{axis}
\end{tikzpicture}
-\end{lstlisting}
+\end{codeexample}
+A legend entry is generated if there are |\addlegendentry| commands (or one |\legend| command).
\subsection{Logarithmic plots}
-Logarithmic plots show $\log x$ versus $\log y$ (or just one logarithmic axis) as in figure~\ref{fig:firstloglog}. \PGFPlots\ always uses the natural logarithm, i.e. basis $e\approx2.718$. Now, the axis description also contains minor ticks and the labels are placed at $10^i$.
-\begin{figure}
-\centering
- \begin{tikzpicture}
- \begin{loglogaxis}[xlabel=Cost,ylabel=Gain]
- \addplot[color=red,mark=x] plot coordinates {
- (10,100)
- (20,150)
- (40,225)
- (80,340)
- (160,510)
- (320,765)
- (640,1150)
- };
- \end{loglogaxis}
- \end{tikzpicture}
-
-\caption{A double--logarithmic plot.}
-\label{fig:firstloglog}
-\end{figure}
-\begin{lstlisting}
+Logarithmic plots show $\log x$ versus $\log y$ (or just one logarithmic axis). \PGFPlots\ always uses the natural logarithm, i.e. basis $e\approx2.718$. Now, the axis description also contains minor ticks and the labels are placed at $10^i$.
+\begin{codeexample}[]
\begin{tikzpicture}
\begin{loglogaxis}[xlabel=Cost,ylabel=Gain]
-\addplot[color=red,mark=x] plot coordinates {
+\addplot[color=red,mark=x] coordinates {
(10,100)
(20,150)
(40,225)
@@ -148,78 +177,49 @@ Logarithmic plots show $\log x$ versus $\log y$ (or just one logarithmic axis)
};
\end{loglogaxis}
\end{tikzpicture}
-\end{lstlisting}
-A common application is to visualise scientific data. This is often provided in the format $1.42\cdot10^4$, usually written as 1.42e+04. An example is shown in the following listing and in figure~\ref{fig:example:sci:loglog}.
-\begin{figure}
-\centering
+\end{codeexample}
+A common application is to visualise scientific data. This is often provided in the format $1.42\cdot10^4$, usually written as 1.42e+04. Suppose we have a numeric table named |pgfplots.testtable|, containing
+\begin{codeexample}[code only,tabsize=6]
+Level Cost Error
+1 7 8.471e-02
+2 31 3.044e-02
+3 111 1.022e-02
+4 351 3.303e-03
+5 1023 1.038e-03
+6 2815 3.196e-04
+7 7423 9.657e-05
+8 18943 2.873e-05
+9 47103 8.437e-06
+\end{codeexample}
+then we can plot |Cost| versus |Error| using
+\begin{codeexample}[]
\begin{tikzpicture}
- \begin{loglogaxis}[
- xlabel=Cost,
- ylabel=Error]
- \addplot[color=red,mark=x] plot coordinates {
- (5, 8.31160034e-02)
- (17, 2.54685628e-02)
- (49, 7.40715288e-03)
- (129, 2.10192154e-03)
- (321, 5.87352989e-04)
- (769, 1.62269942e-04)
- (1793, 4.44248889e-05)
- (4097, 1.20714122e-05)
- (9217, 3.26101452e-06)
- };
-
- \addplot[color=blue,mark=*] plot coordinates {
- (7, 8.47178381e-02)
- (31, 3.04409349e-02)
- (111, 1.02214539e-02)
- (351, 3.30346265e-03)
- (1023, 1.03886535e-03)
- (2815, 3.19646457e-04)
- (7423, 9.65789766e-05)
- (18943, 2.87339125e-05)
- (47103, 8.43749881e-06)
- };
- \legend{Case 1\\Case 2\\}
- \end{loglogaxis}
-\end{tikzpicture}
-
-\caption{A double--logarithmic plot using scientific notation.}
-\label{fig:example:sci:loglog}
-\end{figure}
+\begin{loglogaxis}[
+ xlabel=Cost,
+ ylabel=Error]
+\addplot[color=red,mark=x] coordinates {
+ (5, 8.31160034e-02)
+ (17, 2.54685628e-02)
+ (49, 7.40715288e-03)
+ (129, 2.10192154e-03)
+ (321, 5.87352989e-04)
+ (769, 1.62269942e-04)
+ (1793, 4.44248889e-05)
+ (4097, 1.20714122e-05)
+ (9217, 3.26101452e-06)
+};
-\begin{lstlisting}
-\begin{tikzpicture}
- \begin{loglogaxis}[
- xlabel=Cost,
- ylabel=Error]
- \addplot[color=red,mark=x] plot coordinates {
- (5, 8.31160034e-02)
- (17, 2.54685628e-02)
- (49, 7.40715288e-03)
- (129, 2.10192154e-03)
- (321, 5.87352989e-04)
- (769, 1.62269942e-04)
- (1793, 4.44248889e-05)
- (4097, 1.20714122e-05)
- (9217, 3.26101452e-06)
- };
+\addplot[color=blue,mark=*]
+ table[x=Cost,y=Error] {pgfplots.testtable};
- \addplot[color=blue,mark=*] plot coordinates {
- (7, 8.47178381e-02)
- (31, 3.04409349e-02)
- (111, 1.02214539e-02)
- (351, 3.30346265e-03)
- (1023, 1.03886535e-03)
- (2815, 3.19646457e-04)
- (7423, 9.65789766e-05)
- (18943, 2.87339125e-05)
- (47103, 8.43749881e-06)
- };
- \legend{Case 1\\Case 2\\}
- \end{loglogaxis}
+\legend{Case 1,Case 2}
+\end{loglogaxis}
\end{tikzpicture}
-\end{lstlisting}
-Besided the environment ``\texttt{loglogaxis}'' you can use
+\end{codeexample}
+The first plot employs inline coordinates; the second one reads numerical data from file and plots column `|Cost|' versus `|Error|'.
+
+\noindent
+Besided the environment ``|loglogaxis|'' you can use
\begin{itemize}
\item \lstinline!\begin{axis}...\end{axis}! for normal plots,
\item \lstinline!\begin{semilogxaxis}...\end{semilogxaxis}! for plots which have a normal~$y$ axis and a logarithmic~$x$ axis,
@@ -228,32 +228,17 @@ Besided the environment ``\texttt{loglogaxis}'' you can use
\end{itemize}
You can also use
\begin{lstlisting}
- \begin{axis}[xmode=normal,ymode=log]
- ...
- \end{axis}
-\end{lstlisting}
-which is the same as \lstinline!\begin{semilogyaxis}...\end{semilogyaxis}!. Example:
-\begin{lstlisting}
-\begin{tikzpicture}
- \begin{semilogyaxis}[xlabel=Index,ylabel=Value]
- \addplot[color=blue,mark=*] plot coordinates {
- (1,8)
- (2,16)
- (3,32)
- (4,64)
- (5,128)
- (6,256)
- (7,512)
- };
- \end{semilogyaxis}
-\end{tikzpicture}
+\begin{axis}[xmode=normal,ymode=log]
+...
+\end{axis}
\end{lstlisting}
-see figure~\ref{fig:semilogy}.
-\begin{figure}
-\centering
+which is the same as \lstinline!\begin{semilogyaxis}...\end{semilogyaxis}!.
+\begin{codeexample}[]
\begin{tikzpicture}
- \begin{semilogyaxis}[xlabel=Index,ylabel=Value]
- \addplot[color=blue,mark=*] plot coordinates {
+ \begin{semilogyaxis}[
+ xlabel=Index,ylabel=Value]
+
+ \addplot[color=blue,mark=*] coordinates {
(1,8)
(2,16)
(3,32)
@@ -262,412 +247,100 @@ see figure~\ref{fig:semilogy}.
(6,256)
(7,512)
};
- \end{semilogyaxis}
-\end{tikzpicture}
-
-\caption{A semi--logarithmic plot.}
-\label{fig:semilogy}
-\end{figure}
+ \end{semilogyaxis}%
+\end{tikzpicture}%
+\end{codeexample}
\subsection{Cycling line styles}
-You can skip the style arguments for \lstinline!\addplot[...]! or \lstinline!\addplot[...]! to determine plot specifications from a predefined list:
-\begin{figure}
-\centering
+You can skip the style arguments for \lstinline!\addplot[...]! to determine plot specifications from a predefined list:
+\label{page:plotcoords:src}%
+\begin{codeexample}[width=4cm]
\begin{tikzpicture}
- \begin{loglogaxis}[
- xlabel={Degrees of freedom},
- ylabel={$L_2$ Error}
- ]
- \addplot plot coordinates {
- (5, 8.312e-02)
- (17, 2.547e-02)
- (49, 7.407e-03)
- (129, 2.102e-03)
- (321, 5.874e-04)
- (769, 1.623e-04)
- (1793, 4.442e-05)
- (4097, 1.207e-05)
- (9217, 3.261e-06)
- };
+\begin{loglogaxis}[
+ xlabel={Degrees of freedom},
+ ylabel={$L_2$ Error}
+]
+\addplot coordinates {
+ (5,8.312e-02) (17,2.547e-02) (49,7.407e-03)
+ (129,2.102e-03) (321,5.874e-04) (769,1.623e-04)
+ (1793,4.442e-05) (4097,1.207e-05) (9217,3.261e-06)
+};
- \addplot plot coordinates {
- (7, 8.472e-02)
- (31, 3.044e-02)
- (111, 1.022e-02)
- (351, 3.303e-03)
- (1023, 1.039e-03)
- (2815, 3.196e-04)
- (7423, 9.658e-05)
- (18943, 2.873e-05)
- (47103, 8.437e-06)
- };
+\addplot coordinates{
+ (7,8.472e-02) (31,3.044e-02) (111,1.022e-02)
+ (351,3.303e-03) (1023,1.039e-03) (2815,3.196e-04)
+ (7423,9.658e-05) (18943,2.873e-05) (47103,8.437e-06)
+};
- \addplot plot coordinates {
- (9, 7.881e-02)
- (49, 3.243e-02)
- (209, 1.232e-02)
- (769, 4.454e-03)
- (2561, 1.551e-03)
- (7937, 5.236e-04)
- (23297, 1.723e-04)
- (65537, 5.545e-05)
- (178177, 1.751e-05)
- };
+\addplot coordinates{
+ (9,7.881e-02) (49,3.243e-02) (209,1.232e-02)
+ (769,4.454e-03) (2561,1.551e-03) (7937,5.236e-04)
+ (23297,1.723e-04) (65537,5.545e-05) (178177,1.751e-05)
+};
- \addplot plot coordinates {
- (11, 6.887e-02)
- (71, 3.177e-02)
- (351, 1.341e-02)
- (1471, 5.334e-03)
- (5503, 2.027e-03)
- (18943, 7.415e-04)
- (61183, 2.628e-04)
- (187903, 9.063e-05)
- (553983, 3.053e-05)
- };
+\addplot coordinates{
+ (11,6.887e-02) (71,3.177e-02) (351,1.341e-02)
+ (1471,5.334e-03) (5503,2.027e-03) (18943,7.415e-04)
+ (61183,2.628e-04) (187903,9.063e-05) (553983,3.053e-05)
+};
- \addplot plot coordinates {
- (13, 5.755e-02)
- (97, 2.925e-02)
- (545, 1.351e-02)
- (2561, 5.842e-03)
- (10625, 2.397e-03)
- (40193, 9.414e-04)
- (141569, 3.564e-04)
- (471041, 1.308e-04)
- (1496065, 4.670e-05)
- };
- \legend{$d=2$\\$d=3$\\$d=4$\\$d=5$\\$d=6$\\}
- \end{loglogaxis}
+\addplot coordinates{
+ (13,5.755e-02) (97,2.925e-02) (545,1.351e-02)
+ (2561,5.842e-03) (10625,2.397e-03) (40193,9.414e-04)
+ (141569,3.564e-04) (471041,1.308e-04) (1496065,4.670e-05)
+};
+\legend{$d=2$,$d=3$,$d=4$,$d=5$,$d=6$}
+\end{loglogaxis}
\end{tikzpicture}
+\end{codeexample}
+\noindent
+The cycle list can be modified, see the reference below.
-\caption{Predefined line/marker combinations.}
-\label{fig:predefined:plotspec}
-\end{figure}
-
-\begin{lstlisting}
-\begin{tikzpicture}
+\subsection{Scaling plots}
+You can use any of the \Tikz\ options to modify the appearance. For example, the ``|scale|'' transformation takes the picture as such and scales it.
+{%
+\begin{codeexample}[]
+\begin{tikzpicture}[scale=0.5]
\begin{loglogaxis}[
xlabel={Degrees of freedom},
ylabel={$L_2$ Error}
]
- \addplot plot coordinates {
- (5, 8.312e-02)
- (17, 2.547e-02)
- (49, 7.407e-03)
- (129, 2.102e-03)
- (321, 5.874e-04)
- (769, 1.623e-04)
- (1793, 4.442e-05)
- (4097, 1.207e-05)
- (9217, 3.261e-06)
- };
-
- \addplot plot coordinates {
- (7, 8.472e-02)
- (31, 3.044e-02)
- (111, 1.022e-02)
- (351, 3.303e-03)
- (1023, 1.039e-03)
- (2815, 3.196e-04)
- (7423, 9.658e-05)
- (18943, 2.873e-05)
- (47103, 8.437e-06)
- };
-
- \addplot plot coordinates {
- (9, 7.881e-02)
- (49, 3.243e-02)
- (209, 1.232e-02)
- (769, 4.454e-03)
- (2561, 1.551e-03)
- (7937, 5.236e-04)
- (23297, 1.723e-04)
- (65537, 5.545e-05)
- (178177, 1.751e-05)
- };
-
- \addplot plot coordinates {
- (11, 6.887e-02)
- (71, 3.177e-02)
- (351, 1.341e-02)
- (1471, 5.334e-03)
- (5503, 2.027e-03)
- (18943, 7.415e-04)
- (61183, 2.628e-04)
- (187903, 9.063e-05)
- (553983, 3.053e-05)
- };
-
- \addplot plot coordinates {
- (13, 5.755e-02)
- (97, 2.925e-02)
- (545, 1.351e-02)
- (2561, 5.842e-03)
- (10625, 2.397e-03)
- (40193, 9.414e-04)
- (141569, 3.564e-04)
- (471041, 1.308e-04)
- (1496065, 4.670e-05)
- };
- \legend{$d=2$\\$d=3$\\$d=4$\\$d=5$\\$d=6$\\}
+ \plotcoords
+ \legend{$d=2$,$d=3$,$d=4$,$d=5$,$d=6$}
\end{loglogaxis}
\end{tikzpicture}
-\end{lstlisting}
-
-The result is shown in figure~\ref{fig:predefined:plotspec}. You can modify the list, see the reference below.
-
-\subsection{Scaling plots}
-You can use any of the \Tikz\ options to modify the appearance. For example the effect of the ``\texttt{scale}'' transformation is shown in figures \ref{fig:scale1}~and~\ref{fig:scale2}.
-\begin{figure}
-\begin{minipage}[c]{7.1cm}%
-\begin{tikzpicture}[scale=0.8]
+\begin{tikzpicture}[scale=1.1]
\begin{loglogaxis}[
xlabel={Degrees of freedom},
ylabel={$L_2$ Error}
]
- \addplot plot coordinates {
- (5, 8.312e-02)
- (17, 2.547e-02)
- (49, 7.407e-03)
- (129, 2.102e-03)
- (321, 5.874e-04)
- (769, 1.623e-04)
- (1793, 4.442e-05)
- (4097, 1.207e-05)
- (9217, 3.261e-06)
- };
-
- \addplot plot coordinates {
- (7, 8.472e-02)
- (31, 3.044e-02)
- (111, 1.022e-02)
- (351, 3.303e-03)
- (1023, 1.039e-03)
- (2815, 3.196e-04)
- (7423, 9.658e-05)
- (18943, 2.873e-05)
- (47103, 8.437e-06)
- };
-
- \addplot plot coordinates {
- (9, 7.881e-02)
- (49, 3.243e-02)
- (209, 1.232e-02)
- (769, 4.454e-03)
- (2561, 1.551e-03)
- (7937, 5.236e-04)
- (23297, 1.723e-04)
- (65537, 5.545e-05)
- (178177, 1.751e-05)
- };
-
- \addplot plot coordinates {
- (11, 6.887e-02)
- (71, 3.177e-02)
- (351, 1.341e-02)
- (1471, 5.334e-03)
- (5503, 2.027e-03)
- (18943, 7.415e-04)
- (61183, 2.628e-04)
- (187903, 9.063e-05)
- (553983, 3.053e-05)
- };
-
- \addplot plot coordinates {
- (13, 5.755e-02)
- (97, 2.925e-02)
- (545, 1.351e-02)
- (2561, 5.842e-03)
- (10625, 2.397e-03)
- (40193, 9.414e-04)
- (141569, 3.564e-04)
- (471041, 1.308e-04)
- (1496065, 4.670e-05)
- };
- \legend{$d=2$\\$d=3$\\$d=4$\\$d=5$\\$d=6$\\}
+ \plotcoords
+ \legend{$d=2$,$d=3$,$d=4$,$d=5$,$d=6$}
\end{loglogaxis}
\end{tikzpicture}
-\end{minipage}%
-\hfill
-\begin{minipage}[c]{8cm}%
-\begin{lstlisting}
-\begin{tikzpicture}[scale=0.8]
-\begin{loglogaxis}
-...
-\end{loglogaxis}
-\end{tikzpicture}
-\end{lstlisting}
-\end{minipage}
-\caption{An example of a scaled plot.}
-\label{fig:scale1}
-\end{figure}
-
-\begin{figure}
-\centering
-\begin{tikzpicture}[scale=1.3]
+\end{codeexample}
+However, you can also scale plots by assigning a |width=5cm| and/or |height=3cm| argument. This only affects the distance of point coordinates, no font sizes or axis descriptions:
+\begin{codeexample}[]
+\begin{tikzpicture}
\begin{loglogaxis}[
+ width=6cm,
xlabel={Degrees of freedom},
ylabel={$L_2$ Error}
]
- \addplot plot coordinates {
- (5, 8.312e-02)
- (17, 2.547e-02)
- (49, 7.407e-03)
- (129, 2.102e-03)
- (321, 5.874e-04)
- (769, 1.623e-04)
- (1793, 4.442e-05)
- (4097, 1.207e-05)
- (9217, 3.261e-06)
- };
-
- \addplot plot coordinates {
- (7, 8.472e-02)
- (31, 3.044e-02)
- (111, 1.022e-02)
- (351, 3.303e-03)
- (1023, 1.039e-03)
- (2815, 3.196e-04)
- (7423, 9.658e-05)
- (18943, 2.873e-05)
- (47103, 8.437e-06)
- };
-
- \addplot plot coordinates {
- (9, 7.881e-02)
- (49, 3.243e-02)
- (209, 1.232e-02)
- (769, 4.454e-03)
- (2561, 1.551e-03)
- (7937, 5.236e-04)
- (23297, 1.723e-04)
- (65537, 5.545e-05)
- (178177, 1.751e-05)
- };
-
- \addplot plot coordinates {
- (11, 6.887e-02)
- (71, 3.177e-02)
- (351, 1.341e-02)
- (1471, 5.334e-03)
- (5503, 2.027e-03)
- (18943, 7.415e-04)
- (61183, 2.628e-04)
- (187903, 9.063e-05)
- (553983, 3.053e-05)
- };
-
- \addplot plot coordinates {
- (13, 5.755e-02)
- (97, 2.925e-02)
- (545, 1.351e-02)
- (2561, 5.842e-03)
- (10625, 2.397e-03)
- (40193, 9.414e-04)
- (141569, 3.564e-04)
- (471041, 1.308e-04)
- (1496065, 4.670e-05)
- };
- \legend{$d=2$\\$d=3$\\$d=4$\\$d=5$\\$d=6$\\}
+ \plotcoords
+ \legend{$d=2$,$d=3$,$d=4$,$d=5$,$d=6$}
\end{loglogaxis}
\end{tikzpicture}
-\begin{lstlisting}
- \begin{tikzpicture}[scale=1.3]
- \begin{loglogaxis}
- ...
- \end{loglogaxis}
- \end{tikzpicture}
-\end{lstlisting}
-\caption{The effect of a ``\texttt{scale}'' transformation by~$30\%$.}
-\label{fig:scale2}
-\end{figure}
-
-You can scale plots either using the \texttt{width=5cm} and/or \texttt{height=3cm} options or by setting the dimension for each unit coordinate as is shown in figure~\ref{fig:scale:units}.
-
-More examples can be found in section~\ref{sec:examples}.
-
-\begin{figure}
-\centering
\begin{tikzpicture}
- \begin{loglogaxis}[%
- x=0.4cm,y=0.7cm,
+ \begin{loglogaxis}[
+ width=8cm,
xlabel={Degrees of freedom},
ylabel={$L_2$ Error}
]
- \addplot plot coordinates {
- (5, 8.312e-02)
- (17, 2.547e-02)
- (49, 7.407e-03)
- (129, 2.102e-03)
- (321, 5.874e-04)
- (769, 1.623e-04)
- (1793, 4.442e-05)
- (4097, 1.207e-05)
- (9217, 3.261e-06)
- };
-
- \addplot plot coordinates {
- (7, 8.472e-02)
- (31, 3.044e-02)
- (111, 1.022e-02)
- (351, 3.303e-03)
- (1023, 1.039e-03)
- (2815, 3.196e-04)
- (7423, 9.658e-05)
- (18943, 2.873e-05)
- (47103, 8.437e-06)
- };
-
- \addplot plot coordinates {
- (9, 7.881e-02)
- (49, 3.243e-02)
- (209, 1.232e-02)
- (769, 4.454e-03)
- (2561, 1.551e-03)
- (7937, 5.236e-04)
- (23297, 1.723e-04)
- (65537, 5.545e-05)
- (178177, 1.751e-05)
- };
-
- \addplot plot coordinates {
- (11, 6.887e-02)
- (71, 3.177e-02)
- (351, 1.341e-02)
- (1471, 5.334e-03)
- (5503, 2.027e-03)
- (18943, 7.415e-04)
- (61183, 2.628e-04)
- (187903, 9.063e-05)
- (553983, 3.053e-05)
- };
-
- \addplot plot coordinates {
- (13, 5.755e-02)
- (97, 2.925e-02)
- (545, 1.351e-02)
- (2561, 5.842e-03)
- (10625, 2.397e-03)
- (40193, 9.414e-04)
- (141569, 3.564e-04)
- (471041, 1.308e-04)
- (1496065, 4.670e-05)
- };
- \legend{$d=2$\\$d=3$\\$d=4$\\$d=5$\\$d=6$\\}
+ \plotcoords
+ \legend{$d=2$,$d=3$,$d=4$,$d=5$,$d=6$}
\end{loglogaxis}
-\end{tikzpicture}%
-
-\begin{lstlisting}
- \begin{tikzpicture}
- \begin{loglogaxis}[x=0.4cm,y=0.7cm,...]
- ...
- \end{loglogaxis}
- \end{tikzpicture}
-\end{lstlisting}
-\caption{The result of setting the unit vector for~$x$ to~0.4cm and for~$y$ to~0.7cm.}
-\label{fig:scale:units}
-\end{figure}
-
+\end{tikzpicture}
+\end{codeexample}
diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.pdf b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.pdf
index 824dd8fa874..8b25c545254 100644
--- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.pdf
+++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.preamble.tex b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.preamble.tex
new file mode 100644
index 00000000000..087d13237be
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.preamble.tex
@@ -0,0 +1,114 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Package pgfplots.sty documentation.
+%
+% Copyright 2007/2008 by Christian Feuersaenger.
+%
+% This program is free software: you can redistribute it and/or modify
+% it under the terms of the GNU General Public License as published by
+% the Free Software Foundation, either version 3 of the License, or
+% (at your option) any later version.
+%
+% This program is distributed in the hope that it will be useful,
+% but WITHOUT ANY WARRANTY; without even the implied warranty of
+% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+% GNU General Public License for more details.
+%
+% You should have received a copy of the GNU General Public License
+% along with this program. If not, see <http://www.gnu.org/licenses/>.
+%
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\documentclass[a4paper]{ltxdoc}
+
+\usepackage{ifpdf}
+\ifpdf
+ \usepackage[pdftex]{hyperref}
+\else
+ \usepackage[dvipdfm]{hyperref}
+\fi
+\hypersetup{pdfborder={0 0 0}}
+
+\newcommand{\R}{\mathbb{R}}
+\newcommand{\N}{\mathbb{N}}
+\newcommand{\Z}{\mathbb{Z}}
+
+\usepackage{calc}
+\usepackage[formats]{listings}
+\usepackage{courier}
+%--------------------------------------------------
+% \usepackage{array}
+%--------------------------------------------------
+\lstset{%
+ basicstyle=\ttfamily,
+ language=[LaTeX]tex, % Seems as if \lstset{language=tex} must be invoked BEFORE loading tikz!?
+ tabsize=4,
+ breaklines=true,
+ breakindent=0pt
+}
+
+\ifpdf
+ \pdfinfo {
+ /Author (Christian Feuersaenger)
+ }
+
+\else
+ \def\pgfsysdriver{pgfsys-dvipdfm.def}
+\fi
+%\def\pgfsysdriver{pgfsys-pdftex.def}
+\usepackage{pgfplots}
+
+\usepackage[a4paper,left=2.25cm,right=2.25cm,top=2.5cm,bottom=2.5cm,nohead]{geometry}
+\usepackage{amsmath,amssymb}
+\usepackage{xxcolor}
+\usepackage{pifont}
+\usepackage{makeidx}
+\usepackage[latin1]{inputenc}
+\usepackage{amsmath}
+\input{pgfplots-macros}
+
+\pgfqkeys{/codeexample}{%
+ every codeexample/.style={
+ width=8cm,
+ /pgfplots/every axis/.append style={legend style={fill=graphicbackground}}
+ },
+ tabsize=4,
+}
+\pgfplotsset{every axis/.append style={width=7cm}}
+
+\usetikzlibrary{backgrounds,patterns}
+% Global styles:
+\tikzset{
+ shape example/.style={
+ color=black!30,
+ draw,
+ fill=yellow!30,
+ line width=.5cm,
+ inner xsep=2.5cm,
+ inner ysep=0.5cm}
+}
+
+\newcommand{\FIXME}[1]{\textcolor{red}{(FIXME: #1)}}
+
+% fuer endvironment 'sidewaysfigure' bspw
+% \usepackage{rotating}
+
+\newcommand\Tikz{Ti\textit kZ}
+\newcommand\PGF{\textsc{pgf}}
+\newcommand\PGFPlots{\textsc{pgfplots}}
+\def\PGFPlotstable{\textsc{PgfplotsTable}}
+
+
+\makeindex
+
+% Fix overful hboxes automatically:
+\tolerance=2000
+\emergencystretch=10pt
+
+\tikzset{prefix=gnuplot/pgfplots_} % prefix for 'plot function'
+
+\author{%
+ Christian Feuers\"anger\footnote{\url{http://wissrech.ins.uni-bonn.de/people/feuersaenger}}\\%
+ Institut f\"ur Numerische Simulation\\
+ Universit\"at Bonn, Germany}
+
diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.tex b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.tex
index e1afbddbef4..e2dd98148f5 100644
--- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.tex
+++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.tex
@@ -1,50 +1,1291 @@
% main=manual.tex
-\section{Reference}
-\subsection{The axis--environments}
-There are four axis environments,
-\begin{enumerate}
-\item The axis environment for normal plots,
-\begin{lstlisting}
-\begin{axis}
+\section{Command Reference}
+\subsection{The Axis-environments}
+There is an axis environment for linear scaling, two for semi-logarithmic scaling and one for double-logarithmic scaling.
+\begin{environment}{{axis}\marg{options}}
+ The axis environment for normal plots with linear axis scaling.
+
+ The `|every linear axis|' style key can be modified with
+\begin{codeexample}[code only]
+\pgfplotsset{every linear axis/.append style={...}}
+\end{codeexample}
+to install styles specifically for linear axes. These styles can contain both \Tikz- and \PGFPlots\ options.
+\end{environment}
+
+\begin{environment}{{semilogxaxis}\marg{options}}
+The axis environment for logarithmic scaling of~$x$ and normal scaling of~$y$.
+Use
+\begin{codeexample}[code only]
+\pgfplotsset{every semilogx axis/.append style={...}}
+\end{codeexample}
+to install styles specifically for the case with |xmode=log|, |ymode=normal|.
+\end{environment}
+
+\begin{environment}{{semilogyaxis}\marg{options}}
+The axis environment for normal scaling of~$x$ and logarithmic scaling of~$y$,
+
+The style `|every semilogy axis|' will be installed for each such plot.
+\end{environment}
+
+\begin{environment}{{loglogaxis}\marg{options}}
+The axis environment for logarithmic scaling of both, $x$~and~$y$ axes,
+As for the other axis possibilities, there is a style `|every loglog axis|' which is installed at the environment's beginning.
+\end{environment}
+
+\noindent
+They are all equivalent to
+\begin{codeexample}[code only]
+\begin{axis}[
+ xmode=log|normal,
+ ymode=log|normal]
...
\end{axis}
-\end{lstlisting}
+\end{codeexample}
+\noindent
+with properly set variables `|xmode|' and `|ymode|' (see below).
+
+\subsection{The Plot Command}
+\label{sec:addplot}%
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{axis}[ymin=0,ymax=1,enlargelimits=false]
+\addplot
+ [blue!80!black,fill=blue,fill opacity=0.5]
+coordinates
+{(0,0.1) (0.1,0.15) (0.2,0.5) (0.3,0.62)
+ (0.4,0.56) (0.5,0.58) (0.6,0.65) (0.7,0.6)
+ (0.8,0.58) (0.9,0.55) (1,0.52)}
+|- (axis cs:0,0) -- cycle;
+
+\addplot
+ [red,fill=red!90!black,opacity=0.5]
+coordinates
+{(0,0.25) (0.1,0.27) (0.2,0.24) (0.3,0.24)
+ (0.4,0.26) (0.5,0.3) (0.6,0.23) (0.7,0.2)
+ (0.8,0.15) (0.9,0.1) (1,0.1)}
+|- (axis cs:0,0) -- cycle;
+
+\addplot[green!20!black] coordinates
+ {(0,0.4) (0.2,0.75) (1,0.75)};
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
+
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{axis}
+\addplot plot
+ [id=parable,domain=-5:5]
+ function{4*x**2 - 5}
+ node[pin=180:{$4x^2-5$}]{};
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
+
+\begin{command}{\addplot[\meta{style options}] \textcolor{gray}{plot[\meta{behavior options}]} \meta{input data} \meta{trailing path commands};}
+This is the main plotting command, available within each axis environment.
+
+It reads point coordinates from one of the available input sources specified by \meta{input data}, updates limits, remembers \meta{style options} for use in a legend (if any) and applies any necessary coordinate transformations (or logarithms).
+
+The \meta{style options} can be omitted in which case the next entry from the |cycle list| will be inserted as \meta{style options}. These keys characterize the plot's type like linear interpolation, smooth plot, constant interpolation or bar plot and define colors, markers and line specifications.
+
+The optional \meta{behavior options} can be used to modify plot variants, for example to add error bars. They are described when needed.
+
+The \meta{input data} is one of several coordinate input tools which are described in more detail below. Finally, if |\addplot| successfully processed all coordinates from \meta{input data}, it generates \Tikz-drawing commands (for example |plot coordinate {...}|). If \meta{trailing path commands} is not empty, these arguments are appended to the final drawing command.
+
+\noindent
+Some more details:
+\begin{itemize}
+ \item The style |/pgfplots/every axis plot| will be installed at the beginning of \meta{style options}. That means you can use
+\begin{codeexample}[code only]
+\pgfplotsset{every axis plot/.append style={...}}
+\end{codeexample}
+ to add options to all your plots - maybe to set line widths to |thick|. Furthermore, if you have more than one plot inside of an axis, you can also use
+\begin{codeexample}[code only]
+\pgfplotsset{every axis plot no 3/.append style={...}}
+\end{codeexample}
+ to modify options for the plot with number~$3$ only. The first plot has number~$0$.
+ \item The \meta{style options} are remembered for the legend. Furthermore, they are available as `|current plot style|' as long as the path is not yet finished or in associated error bars.
+ \item See subsection~\ref{sec:markers} for a list of available markers and line styles.
+ \item For log plots, \PGFPlots\ will compute the natural logarithm $\log(\cdot)$ numerically. This works with normal fixed point numbers or in scientific notation. For example, the following numbers are valid input to \lstinline!\addplot!.
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{loglogaxis}
+\addplot coordinates {
+ (769, 1.6227e-04)
+ (1793, 4.4425e-05)
+ (4097, 1.2071e-05)
+ (9217, 3.2610e-06)
+ (2.2e5, 2.1E-6)
+ (1e6, 0.00003341)
+ (2.3e7, 0.00131415)
+};
+\end{loglogaxis}
+\end{tikzpicture}
+\end{codeexample}
+ You can represent arbitrarily small or very large numbers as long as its logarithm can be represented as a \TeX-length (up to about~$16384$). Of course, any coordinate~$x\le 0$ is not possible since the logarithm of a non-positive number is not defined. Such coordinates will be skipped automatically.
+
+ \item For normal plots, \PGFPlots\ applies floating point arithmetics to support large or small numbers like 0.00000001234 or $1.234\cdot 10^{24}$. Its number range is much larger than \TeX's native support for numbers. The relative precision is at least~$5$ significant decimal digits for the mantisse. As soon as the axes limits are completely known, \PGFPlots\ applies a transformation which maps these floating point numbers into \TeX-precision using transformations
+ \[ T_x(x) = 10^{s_x} \cdot x - a_x \text{ and } T_y(y) = 10^{s_y} \cdot y - a_y \]
+ with properly chosen integers $s_x, s_y \in \Z$ and shifts $a_x,a_y\in \R$. Section~\ref{sec:disabledatascaling} contains a description of |disabledatascaling| and provides more details about the transformation.
+
+ \item As a consequence of the coordinate parsing routines, you can't use the mathematical expression parsing method of \PGF\ as coordinates (that means: you will need to provide coordinates without suffixes like ``cm'' or ``pt'' and you can't invoke mathematical functions).
+
+ \item If you did not specify axis limits for $x$ and $y$ manually, \lstinline!\addplot! will compute them automatically.
+ The automatic computation of axis limits works as follows:
+ \begin{enumerate}
+ \item Every coordinate will be checked. Care has been taken to avoid \TeX's limited numerical capabilities.
+ \item Since more than one \lstinline!\addplot! command may be used inside an \lstinline!\begin{axis}...\end{axis}!, all drawing commands will be postponed until \lstinline!\end{axis}!.
+ \end{enumerate}
+\end{itemize}
+\end{command}
+
+\subsubsection{Providing Input Coordinates}
+
+\begin{addplotoperation}[noindex]{coordinates}{\marg{coordinate list}}
+The `|plot coordinates|' command is provided by \Tikz\ and reads its input data from a sequence of point coordinates.
+\begin{codeexample}[code only]
+\addplot plot coordinates {
+ (0,0)
+ (0.5,1)
+ (1,2)
+};
+\end{codeexample}
-\item The axis environment for logarithmic scaling of~$x$ and normal scaling of~$y$,
-\begin{lstlisting}
-\begin{semilogxaxis}
+You can also supply error coordinates (reliability bounds) if you are interested in error bars. Simply append the error coordinates with `|+- (|\marg{ex}|,|\marg{ey}|)|' to the associated coordinate:
+\begin{codeexample}[code only]
+\addplot plot coordinates {
+ (0,0) +- (0.1,0)
+ (0.5,1) +- (0.4,0.2)
+ (1,2)
+ (2,5) +- (1,0.1)
+};
+\end{codeexample}
+or
+\begin{codeexample}[code only]
+\addplot plot coordinates {
+ (1300,1e-6) +- (0.1,0.2)
+ (2600,5e-7) +- (0.2,0.5)
+ (4000,1e-7) +- (0.1,0.01)
+};
+\end{codeexample}
+These error coordinates are only used in case of error bars, see section~\ref{sec:errorbars}. You will also need to configure whether these values denote absolute or relative errors.
+
+The coordinates as such can be numbers as |+5|, |-1.2345e3|, |35.0e2|, |0.00000123| or |1e2345e-8|. They are not limited to \TeX's precision.
+\end{addplotoperation}
+
+
+\begin{addplotoperation}[noindex]{file}{\marg{name}}
+\PGFPlots\ supports two ways to read plot coordinates of external files, and one of them is the \Tikz-command `|plot file|'. It is to be used like
+\begin{codeexample}[code only]
+\addplot plot file {datafile.dat};
+\end{codeexample}
+where \marg{name} is a text file with at least two columns which will be used as $x$ and $y$ coordinates. Such files are often generated by \textsc{gnuplot}:
+\begin{codeexample}[code only]
+#Curve 0, 20 points
+#x y type
+0.00000 0.00000 i
+0.52632 0.50235 i
+1.05263 0.86873 i
+1.57895 0.99997 i
...
-\end{semilogxaxis}
-\end{lstlisting}
+9.47368 -0.04889 i
+10.00000 -0.54402 i
+\end{codeexample}
+This listing has been copied from~\cite[section~16.4]{tikz}. The mentioned section also contains some more details about using |plot file|.
+\end{addplotoperation}
+
+\begin{addplotoperation}[noindex]{table}{[\meta{column selection}]\marg{file}}
+\PGFPlots\ comes with a new plotting command, the `|plot table|' macro. It's usage is similar in spirit to `|plot file|', but its flexibility is higher. Given a data file like
+\begin{codeexample}[code only]
+dof L2 Lmax maxlevel
+5 8.31160034e-02 1.80007647e-01 2
+17 2.54685628e-02 3.75580565e-02 3
+49 7.40715288e-03 1.49212716e-02 4
+129 2.10192154e-03 4.23330523e-03 5
+321 5.87352989e-04 1.30668515e-03 6
+769 1.62269942e-04 3.88658098e-04 7
+1793 4.44248889e-05 1.12651668e-04 8
+4097 1.20714122e-05 3.20339285e-05 9
+9217 3.26101452e-06 8.97617707e-06 10
+\end{codeexample}
+one may want to plot `|dof|' versus `|L2|' or `|dof|' versus `|Lmax|'. This can be done by
+\begin{codeexample}[code only]
+\begin{tikzpicture}
+\begin{loglogaxis}[
+ xlabel=Dof,
+ ylabel=$L_2$ error$]
+\addplot table[x=dof,y=L2] {datafile.dat};
+\end{loglogaxis}
+\end{tikzpicture}
+\end{codeexample}
+or
+\begin{codeexample}[code only]
+\begin{tikzpicture}
+\begin{loglogaxis}[
+ xlabel=Dof,
+ ylabel=$L_infty$ error$]
+\addplot table[x=dof,y=Lmax] {datafile.dat};
+\end{loglogaxis}
+\end{tikzpicture}
+\end{codeexample}
+Alternatively, you can load the table \emph{once} and use it \emph{multiple} times:
+\begin{codeexample}[code only]
+\pgfplotstableread{datafile.dat}\table
+...
+\addplot table[x=dof,y=L2] from \table;
+...
+\addplot table[x=dof,y=Lmax] from \table;
+...
+\end{codeexample}
+I am not really sure how much time can be saved, but it works anyway.
+
+If you do prefer to access columns by column indices instead of column names (or your tables do not have column names), you can also use
+\begin{codeexample}[code only]
+\addplot table[x index=2,y index=3] {datafile.dat};
+\addplot table[x=dof,y index=2] {datafile.dat};
+\end{codeexample}
-\item The axis environment for normal scaling of~$x$ and logarithmic scaling of~$y$,
-\begin{lstlisting}
+Summary and remarks:
+\begin{itemize}
+ \item Use |plot table[x=|\marg{column name}|,y=|\marg{column name}|]}| to access column names. Those names are case sensitive and need to exist.
+ \item Use |plot table[x index=|\marg{column index}|,y index=|\marg{column index}|]}| to access column indices. Indexing starts with~$0$. You may also use an index for~$x$ and a column name for~$y$.
+ \item Use |plot table[header=false] |\marg{file name} if your input file has no column names. Otherwise, the first non-comment line is checked for column names: if all entries are numbers, they are treated as numerical data; if one of them is not a number, all are treated as column names.
+ \item It is possible to read error coordinates from tables as well. Simply add options `|x error|', `|y error|' or `|x error index|'/`|y error index|' to \marg{source columns}. See section~\ref{sec:errorbars} for details about error bars.
+ \item Use |plot table[|\meta{source columns}|] from |\marg{\textbackslash macro} to use a pre--read table. Tables can be read using
+\begin{codeexample}[code only]
+\pgfplotstableread{datafile.dat}\macroname.
+\end{codeexample}
+ \item The accepted input format of those tables is as follows:
+ \begin{itemize}
+ \item Columns are usually separated by white spaces (at least one tab or space).
+
+ If you need other column separation characters, you can use the
+
+ \declare{col sep}|=|\mchoice{space,comma,colon,semicolon,braces}
+
+ option which is documented in all detail in the manual for \PGFPlotstable\ which is part of \PGFPlots.
+ \item Any line starting with `\#' or `\%' is ignored.
+ \item The first line will be checked if it contains numerical data. If there is a column in the first line which is \emph{no} number, the complete line is considered to be a header which contains column names. Otherwise it belongs to the numerical data and you need to access column indices instead of names.
+
+ \item There is future support for a second header line which must start with `|$flags |'. Currently, such a line is ignored. It may be used to provide number formatting hints like precision and number format if those tables shall be typeset using |\pgfplotstabletypeset| (see the manual for \PGFPlotstable).
+ \item The accepted number format is the same as for `|plot coordinates|', see above.
+ \item If you omit column selectors, the default is to plot the first column against the second. That means |plot table| does exactly the same job as |plot file| for this case.
+ \end{itemize}
+\end{itemize}
+\end{addplotoperation}
+
+\begin{addplotoperation}[noindex]{function}{\marg{gnuplot code}}
+The plot function command uses the external program |gnuplot| to compute coordinates. The resulting coordinates are written to a text file which will be plotted with |plot file|. \PGF\ checks whether coordinates need to be re-generated and calls |gnuplot| whenever necessary (this is usually the case if you change the number of samples, the argument to |plot function| or the plotted domain\footnote{Please note that \PGFPlots\ produces slightly different files than \Tikz\ when used with |plot function| (it configures high precision output). You should use different ids to avoid conflicts in such a case.}).
+
+Since system calls are a potential danger, they need to be enabled explicitly using command line options, for example
+\begin{codeexample}[code only]
+pdflatex -shell-escape filename.tex.
+\end{codeexample}
+Sometimes it is called |shell-escape| or |enable-write18|.
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{axis}
+\addplot plot[id=sin]
+ function{sin(x)};
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
+
+\begin{codeexample}[]
+\begin{tikzpicture}
\begin{semilogyaxis}
-...
+\addplot plot[id=exp,domain=0:10]
+ function{exp(x)};
\end{semilogyaxis}
-\end{lstlisting}
+\end{tikzpicture}
+\end{codeexample}
-\item The axis environment for logarithmic scaling of both, $x$~and~$y$ axes,
-\begin{lstlisting}
-\begin{loglogaxis}
-...
+The \meta{style options} determine the appearance of the plotted function; these parameters also affect the legend. The \meta{behavior options} are specific to the gnuplot interface. These options are described in all detail in \cite[section~18.6]{tikz}. A short summary is shown below.
+\end{addplotoperation}
+
+\begin{key}{/tikz/domain=[\meta{start}:\meta{end}] (initially [-5:5])}
+ Determines the plotted range. This is not necessarily the same as the axis limits (which are configured with the |xmin|/|xmax| options).
+
+ This option is also used for plot expression, see below.
+\end{key}
+
+\begin{key}{/tikz/id=\marg{unique string identifier}}
+ A unique identifier for the current plot. It is used to generate temporary filenames for |gnuplot| output.
+\end{key}
+
+\begin{key}{/tikz/prefix=\marg{file name prefix}}
+ A common path prefix for temporary filenames (see \cite[section~18.6]{tikz} for details).
+\end{key}
+
+\begin{key}{/tikz/samples=\marg{number}}
+ Sets the number of sample points.
+\end{key}
+
+\begin{key}{/tikz/raw gnuplot}
+ Disables the use of |samples| and |domain|.
+\end{key}
+
+\noindent
+Please refer to \cite[section~18.6]{tikz} for more details about |plot function| and the |gnuplot| interaction.
+
+\begin{addplotoperation}[noindex]{(\meta{$x$ expression},\meta{$y$ expression})}{}
+ Similar to |plot function|, this input method allows to provide expressions which will be sampled. But unlike |plot function|, the expressions are evaluated using the math parser of \PGF, no external program is required.
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{axis}
+ \addplot (\x,\x^2 + 4);
+ \addplot (\x,-5*\x^3 - \x^2);
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
+The number of points and the sampled range is configured as for |plot function|, that means using |samples| and |domain|.
+
+Please note that \PGF's math parser uses degrees for trigonometric functions:
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{axis}
+ \addplot plot[domain=0:360]
+ (\x,{sin(\x)});
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
+the braces are necessary to delimit the $y$ argument here. If you want to use radians, use
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{axis}
+ \addplot plot[domain=-3.14159:3.14159]
+ (\x,{sin(\x r)});
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
+to convert the radians to degrees. The \Tikz\ plot expression parser also accepts some more options like |samples at=|\marg{coordinate list} or |variable=\t| which are described in the \Tikz\ manual.
+\end{addplotoperation}
+
+\begin{command}{\addplot+[\meta{style options}] \textcolor{gray}{\dots};}
+Does the same like |\addplot[|\meta{style options}|] ...;| except that \meta{style options} is \emph{appended} to the arguments which would have been taken for \lstinline!\addplot ...! (the element of the default list).
+
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{axis}
+\addplot (\x,{sin(\x r)});
+\end{axis}
+\end{tikzpicture}
+
+\begin{tikzpicture}
+\begin{axis}
+\addplot+[only marks] (\x,{sin(\x r)});
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
+\end{command}
+
+\subsection{Accessing Axis Coordinates for Annotations}
+\label{sec:axis:coords}%
+\begin{coordinatesystem}{axis cs}
+\PGFPlots\ provides a new coordinate system for use inside of an axis, the ``axis coordinate system'', |axis cs|.
+
+It can be used to draw any \Tikz-graphics at axis coordinates. It is used like
+\begin{codeexample}[code only]
+\draw
+ (axis cs:18943,2.873391e-05)
+|- (axis cs:47103,8.437499e-06);
+\end{codeexample}
+\begin{codeexample}[]
+\tikzstyle{every pin}=[fill=white,
+ draw=black,
+ font=\footnotesize]
+\begin{tikzpicture}
+ \begin{loglogaxis}[
+ xlabel={\textsc{Dof}},
+ ylabel={$L_2$ Error}]
+
+ \addplot coordinates {
+ (11, 6.887e-02)
+ (71, 3.177e-02)
+ (351, 1.341e-02)
+ (1471, 5.334e-03)
+ (5503, 2.027e-03)
+ (18943, 7.415e-04)
+ (61183, 2.628e-04)
+ (187903, 9.063e-05)
+ (553983, 3.053e-05)
+ };
+
+ \node[coordinate,pin=above:Bad!]
+ at (axis cs:5503,2.027e-03) {};
+ \node[coordinate,pin=left:Good!]
+ at (axis cs:187903,9.063e-05) {};
+ \end{loglogaxis}
+\end{tikzpicture}
+\end{codeexample}
+
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{loglogaxis}[
+ xlabel=\textsc{Dof},
+ ylabel=$L_2$ Error
+]
+\draw
+ (axis cs:1793,4.442e-05)
+ |- (axis cs:4097,1.207e-05)
+ node[near start,left]
+ {$\frac{dy}{dx} = -1.58$};
+
+\addplot coordinates {
+ (5, 8.312e-02)
+ (17, 2.547e-02)
+ (49, 7.407e-03)
+ (129, 2.102e-03)
+ (321, 5.874e-04)
+ (769, 1.623e-04)
+ (1793, 4.442e-05)
+ (4097, 1.207e-05)
+ (9217, 3.261e-06)
+};
\end{loglogaxis}
-\end{lstlisting}
-\end{enumerate}
-They are all equivalent to
-\begin{lstlisting}
+\end{tikzpicture}
+\end{codeexample}
+
+\paragraph{Attention:} Whenever you draw additional graphics, consider using |axis cs|! It applies any logarithms, data scaling transformations or whatever \PGFPlots\ usually does!
+\end{coordinatesystem}
+
+\begin{predefinednode}{current plot begin}
+ This coordinate will be defined for every plot and can be used is \meta{trailing path commands} or after a plot. It is the first coordinate of the current plot.
+\end{predefinednode}
+
+\begin{predefinednode}{current plot end}
+ This coordinate will be defined for every plot. It is the last coordinate of the current plot.
+\end{predefinednode}
+
+\subsection{Legend Commands}
+
+\begin{command}{\addlegendentry\marg{name}}
+Adds a single legend entry to the legend list. This will also enable legend drawing.
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{axis}
+\addplot[smooth,mark=*,blue] coordinates {
+ (0,2)
+ (2,3)
+ (3,1)
+};
+\addlegendentry{Case 1}
+
+\addplot[smooth,color=red,mark=x]
+ coordinates {
+ (0,0)
+ (1,1)
+ (2,1)
+ (3,2)
+ };
+\addlegendentry{Case 2}
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
+It does not matter where |\addlegendentry| commands are placed, only the sequence matters. You will need one |\addlegendentry| for every |\addplot| command.
+
+
+Optional argument are accepted with|\addlegendentry|[\meta{key-value-list}]|{...}|. This does mainly affect some keys affecting the legend layout, support is very limited.
+\end{command}
+
+
+
+\label{sec:legenddef}%
+\begin{command}{\legend\marg{list}}
+You can use |\legend|\marg{list} to assign a complete legend.
+\begin{codeexample}[code only]
+\legend{$d=2$,$d=3$,$d=4$,$d=5$,$d=6$}
+\end{codeexample}
+The argument of |\legend| is a comma--separated list of entries, one for each plot. It is processed using the \PGF-foreach command\footnote{Older versions of \PGFPlots\ used \texttt{\textbackslash legend\{first\textbackslash\textbackslash second\textbackslash\textbackslash third\textbackslash\textbackslash\}} instead of comma--separated lists. This syntax is still accepted.}.
+The short marker/line combination shown in legends is acquired from the \marg{style options} argument of |\addplot|.
+\end{command}
+
+\subsubsection{Legend Appearance}
+{%
+\pgfplotsset{every axis/.append style={width=3cm,scale only axis,legend style={font=\footnotesize}}}%
+\begin{stylekey}{/pgfplots/every axis legend}
+The style ``|every axis legend|'' determines the legend's position and outer appearance:
+\begin{codeexample}[code only]
+\pgfplotsset{every axis legend/.append style={
+ at={(0,0)},
+ anchor=south west}}
+\end{codeexample}
+will draw it at the lower left corner of the axis while
+\begin{codeexample}[code only]
+\pgfplotsset{every axis legend/.append style={
+ at={(1,1)},
+ anchor=north east}}
+\end{codeexample}
+means the upper right corner. The `|anchor|' option determines which point \emph{of the legend} will be placed at $(0,0)$ or $(1,1)$.
+
+The legend is a \Tikz-matrix, so you can use any \Tikz\ option which affects
+nodes and matrizes (see~\cite[section 13~and~14]{tikz}). The matrix is created by something like
+\begin{codeexample}[code only]
+\matrix[style=every axis legend] {
+ draw plot specification 1 & \node{legend 1}\\
+ draw plot specification 2 & \node{legend 2}\\
+ ...
+};
+\end{codeexample}
+
+\begin{codeexample}[]
+\pgfplotsset{every axis legend/.append style={
+ at={(1.02,1)},
+ anchor=north west}}
+\begin{tikzpicture}
+\begin{axis}
+\addplot coordinates {(0,0) (1,1)};
+\addplot coordinates {(0,1) (1,2)};
+\addplot coordinates {(0,2) (1,3)};
+\legend{$l_1$,$l_2$,$l_3$}
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
+
+Use |legend columns=|\marg{number} to configure the number of horizontal legend entries.
+\begin{codeexample}[]
+\begin{tikzpicture}
+\pgfplotsset{every axis legend/.append style={
+ at={(0.5,1.03)},
+ anchor=south}}
+\begin{axis}[legend columns=4]
+\addplot coordinates {(0,0) (1,1)};
+\addplot coordinates {(0,1) (1,2)};
+\addplot coordinates {(0,2) (1,3)};
+\legend{$l_1$,$l_2$,$l_3$}
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
+\noindent
+Instead of the |.append style|, you can also use |legend style| as in the following example. It has the same effect.
+
+\begin{codeexample}[]
+\begin{tikzpicture}
\begin{axis}[
- xmode=log|normal,
- ymode=log|normal]
+ legend style={
+ at={(1,0.5)},
+ anchor=east}]
+\addplot coordinates {(0,0) (1,1)};
+\addplot coordinates {(0,1) (1,2)};
+\addplot coordinates {(0,2) (1,3)};
+\legend{$l_1$,$l_2$,$l_3$}
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
+
+\noindent
+The default |every axis legend| style is
+\begin{codeexample}[code only]
+\pgfplotsset{every axis legend/.style={%
+ cells={anchor=center},
+ inner xsep=3pt,inner ysep=2pt,nodes={inner sep=2pt,text depth=0.15em},
+ anchor=north east,%
+ shape=rectangle,%
+ fill=white,%
+ draw=black,
+ at={(0.98,0.98)}
+}}
+\end{codeexample}
+\paragraph{Attention:} you should \emph{not reset} the default style to stay compatible with future versions. If possible, use
+\begin{codeexample}[code only]
+\pgfplotsset{every axis legend/.append style={...}}
+\end{codeexample}
+\end{stylekey}
+
+}
+
+
+\begin{command}{\autoplotspeclist}
+This command should no longer be used, although it will be kept as technical implementation detail. Please use the `|cycle list|' option, section~\ref{sec:cycle:list}.
+\end{command}
+
+\begin{command}{\pgfmathlogtologten\meta{number}}
+Assigns the result of $\meta{number}/\log(10)$ to \lstinline!\pgfmathresult!.
+\end{command}
+
+\begin{command}{\logten}
+Expands to the constant $\log(10)$. Useful for logplots because $\log(10^i) = i\log(10)$. This command is only available inside of an \Tikz-picture.
+\end{command}
+
+\begin{command}{\pgfmathprintnumber\marg{number}}
+Generates pretty--printed output\footnote{This method was previously \texttt{\textbackslash prettyprintnumber}. It's functionality has been included into \PGF\ and the old command is now deprecated.} for \marg{number}. This method is used for every tick label.
+
+The number is printed using the current number printing options, see section~\ref{sec:number:printing} for the different number styles, rounding precision and rounding methods.
+\end{command}
+
+\subsection{Closing Plots}
+\begin{command}{\closedcycle}
+ Provide |\closedcycle| as \meta{trailing path commands} after |\addplot| to draw a closed line from the last plot coordinate to the first one.
+
+ Use |\closedcycle| whenevery you intend to fill the area under a plot.
+
+\begin{codeexample}[]
+\begin{tikzpicture}
+ \begin{axis}
+ \addplot (\x,\x^2+2) \closedcycle;
+ \end{axis}
+\end{tikzpicture}
+\end{codeexample}
+
+\begin{codeexample}[]
+\begin{tikzpicture}
+ \begin{axis}
+ \addplot+[fill] (\x,\x^2+2) \closedcycle;
+ \end{axis}
+\end{tikzpicture}
+\end{codeexample}
+ In case of stacked plots, |\closedcycle| connects the current plot with the previous plot instead of connecting with the $x$~axis\footnote{The implementation for stacked plots requires some additional logic to determine the filled area: \lstinline{\\closedcycle} will produce a \lstinline!plot coordinates! command with \emph{reversed} coordinates of the previous plot. This is usually irrelevant for end users, but it assumes that the plot's type is symmetric. Since constant plots are inherently unsymmetric, \lstinline{\\closedcycle} will use \texttt{const plot mark right} as reversed sequence for \texttt{const plot mark left}.}.
+\begin{codeexample}[]
+\begin{tikzpicture}
+ \begin{axis}[stack plots=y]
+ \addplot+[fill] coordinates
+ {(0,1) (1,1) (2,2) (3,2)} \closedcycle;
+ \addplot+[fill] coordinates
+ {(0,1) (1,1) (2,2) (3,2)} \closedcycle;
+ \end{axis}
+\end{tikzpicture}
+\end{codeexample}
+\end{command}
+
+\subsection{Other Commands}
+\begin{command}{\plotnum}
+ Inside of |\addplot| or any associated style, option or command, |\plotnum| expands to the current plot's number, starting with~$0$.
+\end{command}
+
+\begin{command}{\numplots}
+ Inside of any of the axis environments, associated style, option or command, |\numplots| expands to the total number of plots.
+\end{command}
+
+\begin{command}{\coordindex}
+ Inside of an |\addplot| command, this macro expands to the number of the actual coordinate (starting with~$0$).
+
+ It is useful together with |x filter| or |y filter| to (de-)select coordinates.
+\end{command}
+
+\begin{command}{\pgfplotstableread\marg{file}}
+ Please refer to the manual of \PGFPlotstable, |pgfplotstable.pdf|, which is part of the \PGFPlots-bundle.
+\end{command}
+\begin{command}{\pgfplotstabletypeset\marg{\textbackslash macro}}
+ Please refer to the manual of \PGFPlotstable, |pgfplotstable.pdf|, which is part of the \PGFPlots-bundle.
+\end{command}
+\begin{command}{\pgfplotstabletypesetfile\marg{file}}
+ Please refer to the manual of \PGFPlotstable, |pgfplotstable.pdf|, which is part of the \PGFPlots-bundle.
+\end{command}
+
+\section{Option Reference}
+There are several required and even more optional arguments to modify axes. They are used like
+\begin{codeexample}[code only]
+\begin{tikzpicture}
+\begin{axis}[key=value,key2=value2]
...
\end{axis}
-\end{lstlisting}
-with properly set variables `\texttt{xmode}' and `\texttt{ymode}' (see below).
+\end{tikzpicture}
+\end{codeexample}
+\noindent
+The overall appeareance can be changed with
+\begin{codeexample}[code only]
+\pgfplotsset{every axis/.append style={line width=1pt}}
+\end{codeexample}
+\noindent
+for example. There are several other styles predefined to modify the appearance, see section~\ref{sec:styles}.
+
+\subsection{Pgfplots Options and \Tikz\ Options}
+This section is more or less technical and can be skipped unless one really wants to know more about this topic.
+
+\Tikz\ options and \PGFPlots\ options can be mixed inside of the axis arguments and in any of the associated styles. For example,
+\begin{codeexample}[code only]
+\pgfplotsset{every axis legend/.append style={
+ legend columns=3,font=\Large}}
+\end{codeexample}
+\noindent
+assigns the `|legend columns|' option (a pgfplots option) and uses `|font|' for drawing the legend (a \Tikz\ option).
-\subsection{Available markers}
+The axis environments will process any known pgfplots options, and all `|every|'--styles will be parsed for pgfplots options. Every unknown option is supposed to be a \Tikz\ option and will be forward to the associated \Tikz\ drawing commands. For example, the `\lstinline{font=\Large}' above will be used as argument to the legend matrix, and the `\lstinline{font=\Large}' argument in
+\begin{codeexample}[code only]
+\pgfplotsset{every axis label/.append style={
+ ylabel=Error,xlabel=Dof,font=\Large}}
+\end{codeexample}
+will be used in the nodes for axis labels (but not the axis title, for example).
+
+It is an error if you assign incompatible options to axis labels, for example `|xmin|' and `|xmax|' can't be set inside of `|every axis label|'.
+
+
+\subsection{Plot Types}
+\PGFPlots\ supports several two-dimensional line-plots like piecewise linear line plots, piecewise constant plots, smoothed plots, bar plots and comb plots. Most of them use the \PGF\ plot handler library directly, see \cite[section 18.8]{tikz}.
+
+Plot types are part of the plot style, so they are set with options. The following list contains a short summary of the \PGF\ plot library, \cite[section 18.8]{tikz}.
+
+
+\subsubsection{Linear Plots}
+\begin{plottype}{sharp plot}
+Linear (`sharp') plots are the default. Point coordinates are simply connected by straight lines.
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{axis}
+ \addplot+[sharp plot] coordinates
+ {(0,0) (1,2) (2,3)};
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
+
+The `|+|' here means to use the normal plot cycle list and append `|sharp plot|' to its option list.
+\end{plottype}
+
+\subsubsection{Smooth Plots}
+\begin{plottype}{smooth}
+Smooth plots interpolate smoothly between successive points.
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{axis}
+ \addplot+[smooth] coordinates
+ {(0,0) (1,2) (2,3)};
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
+\end{plottype}
+
+\subsubsection{Constant Plots}
+Constant plots draw lines parallel to the $x$-axis to connect coordinates. The discontinuos edges may be drawn or not, and marks may be placed on left or right ends.
+
+\begin{plottype}{const plot}
+Connects all points with horizontal and vertical lines. Marks are placed left-handed on horizontal line segments, causing the plot to be right-sided continuous at all data points.
+
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{axis}
+\addplot+[const plot]
+coordinates
+{(0,0.1) (0.1,0.15) (0.2,0.5) (0.3,0.62)
+ (0.4,0.56) (0.5,0.58) (0.6,0.65) (0.7,0.6)
+ (0.8,0.58) (0.9,0.55) (1,0.52)};
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
+
+
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{axis}[ymin=0,ymax=1,enlargelimits=false]
+\addplot
+ [const plot,fill=blue,draw=black]
+coordinates
+{(0,0.1) (0.1,0.15) (0.2,0.5) (0.3,0.62)
+ (0.4,0.56) (0.5,0.58) (0.6,0.65) (0.7,0.6)
+ (0.8,0.58) (0.9,0.55) (1,0.52)}
+ \closedcycle;
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
+\end{plottype}
+
+\begin{plottype}{const plot mark left}
+An alias for `|const plot|'.
+\end{plottype}
+
+\begin{plottype}{const plot mark right}
+ A variant which places marks on the right of each line segment, causing plots to be left-sided continuous at coordinates.
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{axis}
+\addplot+[const plot mark right]
+coordinates
+{(0,0.1) (0.1,0.15) (0.2,0.5) (0.3,0.62)
+ (0.4,0.56) (0.5,0.58) (0.6,0.65) (0.7,0.6)
+ (0.8,0.58) (0.9,0.55) (1,0.52)};
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
+\end{plottype}
+
+\begin{plottype}{jump mark left}
+A variant of `|const plot mark left|' which does not draw vertical lines.
+\begin{codeexample}[]
+\begin{tikzpicture}[samples=8]
+\begin{axis}
+\addplot+[jump mark left]
+ plot[id=parablex,domain=-5:0]
+ function{4*x**2 - 5};
+
+\addplot+[jump mark right]
+ plot[id=cubic,domain=-5:0]
+ function{0.7*x**3 + 50};
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
+\end{plottype}
+
+\begin{plottype}{jump mark right}
+A variant of `|const plot mark right|' which does not draw vertical lines.
+\end{plottype}
+
+\subsubsection{Bar Plots}
+Bar plots place horizontal or vertical bars at coordinates. Multiple bar plots in one axis can be stacked on top of each other or aligned next to each other.
+
+\begin{plottype}{xbar}
+ Places horizontal bars between the $(y=0)$ line and each coordinate.
+
+ This option is used on a per-plot basis and configures only the visualization of coordinates. The figure-wide style |/pgfplots/xbar| also sets reasonable options for ticks, legends and multiple plots.
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{axis}
+\addplot+[xbar] coordinates
+ {(4,0) (1,1) (2,2)
+ (5,3) (6,4) (1,5)};
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
+ Bars are centered at plot coordinates with width |bar width|. Using bar plots usually means more than just a different way of how to connect coordinates, for example to draw ticks outside of the axis, change the legend's appearance or introduce shifts if multiple |\addplot| commands appear.
+
+ There is a preconfigured style for |xbar| which is installed automatically if you provide |xbar| as argument to the axis environment which provides this functionality.
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{axis}[xbar,enlargelimits=0.15]
+\addplot
+[draw=blue,pattern=horizontal lines light blue]
+coordinates
+ {(10,5) (15,10) (5,15) (24,20) (30,25)};
+
+\addplot
+[draw=black,pattern=horizontal lines dark blue]
+coordinates
+ {(3,5) (5,10) (15,15) (20,20) (35,25)};
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
+Here |xbar| yields |/pgfplots/xbar| because it is an argument to the axis, not to a single plot.
+
+ Besides line-, fill- and colorstyles, bars can be configured with |bar width| and |bar shift|, see below.
+\end{plottype}
+
+\begin{stylekey}{/pgfplots/xbar=\marg{shift for multiple plots} (default 2pt)}
+ This style sets |/tikz/xbar| \emph{and} some commonly used options concerning horizontal bars for the complete axis. This is automatically done if you provide |xbar| as argument to an axis argument, see above.
+
+The |xbar| style defines shifts if multiple plots are placed into one axis. If draws bars adjacent to each other, separated by \marg{shift for multiple plots}. Furthermore, it sets the style |bar cycle list| and sets tick and legend appearance options.
+
+The style is defined as follows.
+\begin{codeexample}[code only]
+/pgfplots/xbar/.style={
+ bar cycle list,
+ tick align=outside,
+ /pgfplots/legend image code/.code=
+ {\draw[##1,bar width=3pt,yshift=-0.2em,bar shift=0pt]
+ plot coordinates {(0cm,0.8em) (2*\pgfplotbarwidth,0.6em)};},
+ /pgf/bar shift={%
+ -0.5*(\numplots*\pgfplotbarwidth + (\numplots-1)*#1) +
+ (.5+\plotnum)*\pgfplotbarwidth + \plotnum*#1},
+ /tikz/xbar},
+\end{codeexample}
+The formular for |bar shift| assigns shifts dependend on the total number of plots and the current plot's number. It is designed to fill a total width of $n \cdot $|bar width|$ + (n-1) \cdot $\marg{shift for multiple plots}. The $0.5$ compensates for centering.
+\end{stylekey}
+
+\begin{plottype}{ybar}
+ Like |xbar|, this option generates bar plots. It draws vertical bars between the ($x=0$) line and each input coordinate.
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{axis}
+\addplot+[ybar] plot coordinates
+ {(0,3) (1,2) (2,4) (3,1) (4,2)};
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
+ The example above simply changes how input coordinates shall be visualized. As mentioned for |xbar|, one usually needs modified legends and shifts for multiple bars in the same axis.
+
+ There is a predefined style which installs these customizations when provided to the axis-environment:
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{axis}[
+ x tick label style={
+ /pgf/number format/1000 sep=},
+ ylabel=Population,
+ enlargelimits=0.15,
+ legend style={at={(0.5,-0.15)},
+ anchor=north,legend columns=-1},
+ ybar,
+ bar width=7pt,
+]
+\addplot
+ coordinates {(1930,50e6) (1940,33e6)
+ (1950,40e6) (1960,50e6) (1970,70e6)};
+
+\addplot
+ coordinates {(1930,38e6) (1940,42e6)
+ (1950,43e6) (1960,45e6) (1970,65e6)};
+
+\addplot
+ coordinates {(1930,15e6) (1940,12e6)
+ (1950,13e6) (1960,25e6) (1970,35e6)};
+\legend{Far,Near,Here}
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
+Here |ybar| yields |/pgfplots/ybar| because it is an argument to the axis, not to a single plot.
+
+ As for |xbar|, the bar width and shift can be configured with |bar width| and |bar shift|.
+\end{plottype}
+
+\begin{stylekey}{/pgfplots/ybar=\marg{shift for multiple plots} (default 2pt)}
+ As |/pgfplots/xbar|, this style sets the |/tikz/ybar| option to draw vertical bars, but it also provides commonly used options for vertical bars.
+
+ If you supply |ybar| to an axis environment, |/pgfplots/ybar| will be chosen instead of |/tikz/ybar|.
+
+ It changes the legend, draws ticks outside of the axis lines and draws multiple |\addplot| arguments adjacent to each other; block--centered at the $x$ coordinate and separated by \marg{shift for multiple plots}. Furthermore, it installs the style |bar cycle list|. It is defined similarly to |/pgfplots/xbar|.
+\end{stylekey}
+
+\begin{key}{/tikz/bar width=\marg{dimension} (initially 10pt)}
+ Configures the width used by |xbar| and |ybar|. It is accepted to provide mathematical expressions.
+\end{key}
+
+\begin{key}{/tikz/bar shift=\marg{dimension} (initially 0pt)}
+ Configures a shift for |xbar| and |ybar|. Use |bar shift| together with |bar width| to draw multiple bar plots into the same axis. It is accepted to provide mathematical expressions.
+\end{key}
+
+
+\begin{plottype}{ybar interval}
+ This plot type produces vertical bars with width (and shift) relatively to intervals of coordinates.
+
+ It is installed on a per-plot basis and configures \emph{only} the visualization of coordinates. See the style |/pgfplots/ybar interval| which configures the appearance of the complete figure.
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{axis}
+\addplot+[ybar interval] plot coordinates
+ {(0,2) (0.1,1) (0.3,0.5) (0.35,4) (0.5,3)
+ (0.6,2) (0.7,1.5) (1,1.5)};
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
+
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{axis}[ybar interval,
+ xtick=data,
+ xticklabel interval boundaries,
+ x tick label style=
+ {rotate=90,anchor=east}
+ ]
+\addplot coordinates
+ {(0,2) (0.1,1) (0.3,0.5) (0.35,4) (0.5,3)
+ (0.6,2) (0.7,1.5) (1,1.5)};
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
+
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{axis}[
+ x tick label style={
+ /pgf/number format/1000 sep=},
+ ylabel=Population,
+ enlargelimits=0.05,
+ legend style={at={(0.5,-0.1)},
+ anchor=north,legend columns=-1},
+ ybar interval=0.7,
+]
+\addplot
+ coordinates {(1930,50e6) (1940,33e6)
+ (1950,40e6) (1960,50e6) (1970,70e6)};
+
+\addplot
+ coordinates {(1930,38e6) (1940,42e6)
+ (1950,43e6) (1960,45e6) (1970,65e6)};
+
+\addplot
+ coordinates {(1930,15e6) (1940,12e6)
+ (1950,13e6) (1960,25e6) (1970,35e6)};
+\legend{Far,Near,Here}
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
+\end{plottype}
+
+\begin{stylekey}{/pgfplots/ybar interval=\marg{relative width} (default 1)}
+ A style which is intended to install options for |ybar interval| for a complete figure. This includes tick and legend appearance, management of multiple bar plots in one figure and a more adequate |cycle list| using the style |bar cycle list|.
+\end{stylekey}
+
+\begin{plottype}{xbar interval}
+ As |ybar interval|, just for horizontal bars.
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{axis}[
+ xmin=0,xmax=53,
+ ylabel=Age,
+ xlabel=Quantity,
+ y label style={yshift=0.7cm},
+ enlargelimits=false,
+ ytick=data,
+ yticklabel interval boundaries,
+ xbar interval,
+]
+\addplot
+ coordinates {(10,5) (10.5,10) (15,13)
+ (24,18) (50,21) (23,25) (10,30)
+ (3,50) (3,70)};
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
+\end{plottype}
+
+\begin{stylekey}{/pgfplots/xbar interval=\marg{relative width} (default 1)}
+ A style which is intended to install options for |xbar interval| for a complete figure, see the style |/pgfplots/ybar interval| for details.
+\end{stylekey}
+
+\begin{pgfplotsxykey}{\x ticklabel interval boundaries}
+ These are style keys which set |x tick label as interval| and configure the tick appearance to be \marg{start} -- \marg{end} for each tick interval.
+\end{pgfplotsxykey}
+
+\subsubsection{Comb Plots}
+Comb plots are very similar to bar plots except that they emplot single horizontal/vertical lines instead of rectangles.
+
+\begin{plottype}{xcomb}
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{axis}
+\addplot+[xcomb] coordinates
+ {(4,0) (1,1) (2,2)
+ (5,3) (6,4) (1,5)};
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
+\end{plottype}
+
+\begin{plottype}{ycomb}
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{axis}
+\addplot+[ycomb] plot coordinates
+ {(0,3) (1,2) (2,4) (3,1) (4,2)};
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
+\end{plottype}
+
+\subsubsection{Stacked Plots}
+\begin{pgfplotskey}{stack plots=\mchoice{x,y,false} (initially false)}
+ Allows stacking of plots in either $x$ or $y$ direction. Stacking means add either $x$- or $y$ coordinates of successive |\addplot| commands on top of each other.
+\begin{codeexample}[]
+\begin{tikzpicture}
+ \begin{axis}[stack plots=y]
+ \addplot coordinates
+ {(0,1) (1,1) (2,2) (3,2)};
+ \addplot coordinates
+ {(0,1) (1,1) (2,2) (3,2)};
+ \addplot coordinates
+ {(0,1) (1,1) (2,2) (3,2)};
+ \end{axis}
+\end{tikzpicture}
+\end{codeexample}
+
+|stack plots| is particularly useful for bar plots. The following examples demonstrate its functionality. Normally, it is advisable to use the styles |ybar stacked| and |xbar stacked| which also set some other options.
+\begin{codeexample}[]
+\begin{tikzpicture}
+ \begin{axis}[stack plots=y,/tikz/ybar]
+ \addplot coordinates
+ {(0,1) (1,1) (2,3) (3,2) (4,1.5)};
+ \addplot coordinates
+ {(0,1) (1,1) (2,3) (3,2) (4,1.5)};
+ \addplot coordinates
+ {(0,1) (1,1) (2,3) (3,2) (4,1.5)};
+ \end{axis}
+\end{tikzpicture}
+\end{codeexample}
+
+\begin{codeexample}[]
+\begin{tikzpicture}
+ \begin{axis}[ybar stacked]
+ \addplot coordinates
+ {(0,1) (1,1) (2,3) (3,2) (4,1.5)};
+ \addplot coordinates
+ {(0,1) (1,1) (2,3) (3,2) (4,1.5)};
+ \addplot coordinates
+ {(0,1) (1,1) (2,3) (3,2) (4,1.5)};
+ \end{axis}
+\end{tikzpicture}
+\end{codeexample}
+
+\begin{codeexample}[]
+\begin{tikzpicture}
+ \begin{axis}[stack plots=x,/tikz/xbar]
+ \addplot coordinates
+ {(1,0) (2,1) (2,2) (3,3)};
+ \addplot coordinates
+ {(1,0) (2,1) (2,2) (3,3)};
+ \addplot coordinates
+ {(1,0) (2,1) (2,2) (3,3)};
+ \end{axis}
+\end{tikzpicture}
+\end{codeexample}
+\begin{codeexample}[]
+
+\begin{tikzpicture}
+ \begin{axis}[xbar stacked]
+ \addplot coordinates
+ {(1,0) (2,1) (2,2) (3,3)};
+ \addplot coordinates
+ {(1,0) (2,1) (2,2) (3,3)};
+ \addplot coordinates
+ {(1,0) (2,1) (2,2) (3,3)};
+ \end{axis}
+\end{tikzpicture}
+\end{codeexample}
+\end{pgfplotskey}
+
+\begin{pgfplotskey}{stack dir=\mchoice{plus,minus} (initially plus)}
+ Configures the direction of |stack plots|. The value |plus| will adds coordinates of successive plots while |minus| subtracts them.
+\end{pgfplotskey}
+
+\begin{pgfplotskey}{reverse stacked plots=\mchoice{true,false} (initially true, default true)}
+ Configures the sequence in which stacked plots are drawn. This is more or less a technical detail which should not be changed in any normal case.
+
+ The motivation is as follows: suppose multiple |\addplot| commands are stacked on top of each other and they are processed in the order of appearance. Than, the second plot could easily draw its lines (or fill area) on top of the first one - hiding its marker or line completely. Therefor, \PGFPlots\ reverses the sequence of drawing commands.
+
+ This has the side-effect that any normal \Tikz-paths inside of an axis will also be processed in reverse sequence.
+\end{pgfplotskey}
+
+\begin{stylekey}{/pgfplots/xbar stacked=\mchoice{plus,minus} (default plus)}
+ A figure-wide style which enables stacked horizontal bars (i.e. |xbar| and |stack plots=x|). It also adjusts the legend and tick appearance and assigns a useful |cycle list|.
+\end{stylekey}
+\begin{stylekey}{/pgfplots/ybar stacked=\mchoice{plus,minus} (default plus)}
+ A figure-wide style which enables stacked vertical bars (i.e. |ybar| and |stack plots=y|). It also adjusts the legend and tick appearance and assigns a useful |cycle list|.
+\end{stylekey}
+
+\begin{stylekey}{/pgfplots/xbar interval stacked=\mchoice{plus,minus} (default plus)}
+ A sttyle similar to |/pgfplots/xbar stacked| for the interval based bar plot variant.
+\end{stylekey}
+\begin{stylekey}{/pgfplots/ybar interval stacked=\mchoice{plus,minus} (default plus)}
+ A sttyle similar to |/pgfplots/ybar stacked| for the interval based bar plot variant.
+\end{stylekey}
+
+\subsubsection{Area Plots}
+Area plots are a combination of |\closedcycle| and |stack plots|. They can be combined with any other plot type.
+
+\begin{codeexample}[]
+\begin{tikzpicture}
+ \begin{axis}[
+ stack plots=y,
+ area cycle list]
+ \addplot coordinates
+ {(0,1) (1,1) (2,2) (3,2)}
+ \closedcycle;
+ \addplot coordinates
+ {(0,1) (1,1) (2,2) (3,2)}
+ \closedcycle;
+ \addplot coordinates
+ {(0,1) (1,1) (2,2) (3,2)}
+ \closedcycle;
+ \end{axis}
+\end{tikzpicture}
+\end{codeexample}
+
+\begin{codeexample}[]
+\begin{tikzpicture}
+ \begin{axis}[
+ const plot,
+ stack plots=y,
+ area cycle list]
+ \addplot coordinates
+ {(0,1) (1,1) (2,2) (3,2)}
+ \closedcycle;
+ \addplot coordinates
+ {(0,1) (1,1) (2,2) (3,2)}
+ \closedcycle;
+ \addplot coordinates
+ {(0,1) (1,1) (2,2) (3,2)}
+ \closedcycle;
+ \end{axis}
+\end{tikzpicture}
+\end{codeexample}
+
+\begin{codeexample}[]
+\begin{tikzpicture}
+ \begin{axis}[
+ smooth,
+ stack plots=y,
+ area cycle list]
+ \addplot coordinates
+ {(0,1) (1,1) (2,2) (3,2)}
+ \closedcycle;
+ \addplot coordinates
+ {(0,1) (1,1) (2,2) (3,2)}
+ \closedcycle;
+ \addplot coordinates
+ {(0,1) (1,1) (2,2) (3,2)}
+ \closedcycle;
+ \end{axis}
+\end{tikzpicture}
+\end{codeexample}
+
+\begin{codeexample}[]
+\pgfplotstableread{pgfplots.timeseries.dat}\table
+\pgfplotstabletypeset\table
+\end{codeexample}
+\begin{codeexample}[]
+\pgfplotstableread
+ {pgfplots.timeseries.dat}
+ {\table}
+
+\begin{tikzpicture}
+ \begin{axis}[
+ ymin=0,ymax=210,
+ minor tick num=4,
+ enlargelimits=false,
+ tick align=outside,
+ every axis plot post/.append style=
+ {mark=none},
+ const plot,
+ legend style={
+ at={(0.5,-0.15)},
+ anchor=north,
+ legend columns=-1}]
+
+ \addplot[draw=blue,fill=blue!30!white]
+ table[x=time,y=1minload] from \table
+ \closedcycle;
+ \addplot table[x=time,y=nodes] from \table;
+ \addplot table[x=time,y=cpus] from \table;
+ \addplot table[x=time,y=processes]
+ from \table;
+ \legend{1min load,nodes,cpus,processes}
+ \end{axis}
+\end{tikzpicture}
+\end{codeexample}
+
+\begin{codeexample}[width=4cm]
+\pgfplotstableread{pgfplots.timeseries.dat}\table
+
+\begin{tikzpicture}
+ \begin{axis}[
+ ymin=0,ymax=160,
+ minor tick num=4,
+ enlargelimits=false,
+ tick align=outside,
+ const plot,
+ stack plots=y,
+ cycle list={%
+ {blue!70!black,fill=blue},%
+ {green,fill=green!50!black},%
+ {green!30!white,fill=green!80!white},%
+ {red,thick}%
+ },
+ ylabel={Mem [GB]},
+ legend style={
+ at={(0.5,-0.15)},
+ anchor=north,
+ legend columns=2}]
+
+ \addplot table[x=time,y=memused] from \table \closedcycle;
+ \addplot table[x=time,y=memcached] from \table \closedcycle;
+ \addplot table[x=time,y=membuf] from \table \closedcycle;
+ \addplot plot[/pgfplots/stack plots=false]
+ table[x=time,y=memtotal] from \table;
+ \legend{Memory used,Memory cached,Memory buffered,Total memory}
+ \end{axis}
+\end{tikzpicture}
+\end{codeexample}
+
+\subsection{Markers and Linestyles}
\label{sec:markers}%
-The following options of \Tikz\ may be useful for plots.
+The following options of \Tikz\ are available to plots.
\subsubsection{Markers}
This list is copied from~\cite[section~29]{tikz}:
\begingroup
@@ -70,12 +1311,12 @@ This list is copied from~\cite[section~29]{tikz}:
\item[mark=*] \showit{mark=*}
\item[mark=x] \showit{mark=x}
\item[mark=+] \showit{mark=+}
- \item[mark=ball] \showit{mark=ball}
+% \item[mark=ball] \showit{mark=ball}
\end{longdescription}
And with \lstinline!\usetikzlibrary{plotmarks}!:
\begin{longdescription}
\item[mark=$-$] \showit{mark=-}
- \item[mark=$|$] \showit{mark=|}
+ \item[mark=$\vert$] \showit{mark=|}
\item[mark=o] \showit{mark=o}
\item[mark=asterisk] \showit{mark=asterisk}
\item[mark=star] \showit{mark=star}
@@ -93,7 +1334,7 @@ And with \lstinline!\usetikzlibrary{plotmarks}!:
\item[mark=pentagon*] \showit{mark=pentagon*}
\end{longdescription}
All these options have been drawn with the additional options
-\begin{lstlisting}
+\begin{codeexample}[code only]
\draw[
gray,
thin,
@@ -101,9 +1342,9 @@ All these options have been drawn with the additional options
scale=2,fill=yellow!80!black,draw=black
}
]
-\end{lstlisting}
+\end{codeexample}
-\subsubsection{Line styles}
+\subsubsection{Line Styles}
\def\showit#1{%
\tikz\draw[%
black,
@@ -111,563 +1352,1090 @@ All these options have been drawn with the additional options
#1]
plot coordinates {(0,0) (1,1) (2,0) (3,1)};%
}%
-The following line styles are predefined in \Tikz:
-\begin{longdescription}
- \item[style=solid] \showit{style=solid}
- \item[style=dotted] \showit{style=dotted}
- \item[style=densely dotted] \showit{style=densely dotted}
- \item[style=loosely dotted] \showit{style=loosely dotted}
- \item[style=dashed] \showit{style=dashed}
- \item[style=densely dashed] \showit{style=densely dashed}
- \item[style=loosely dashed] \showit{style=loosely dashed}
-\end{longdescription}
-You may need the option \lstinline!mark options={solid}! to avoid dotted or dashed marker boundaries. The string ``\texttt{style=}'' can be omitted.
+The following line styles are predefined in \Tikz.
+\begin{stylekey}{/tikz/solid}
+ \showit{style=solid}
+\end{stylekey}
+
+\begin{stylekey}{/tikz/dotted}
+ \showit{style=dotted}
+\end{stylekey}
+
+\begin{stylekey}{/tikz/densely dotted}
+ \showit{style=densely dotted}
+\end{stylekey}
+
+\begin{stylekey}{/tikz/loosely dotted}
+ \showit{style=loosely dotted}
+\end{stylekey}
+
+\begin{stylekey}{/tikz/dashed}
+ \showit{style=dashed}
+\end{stylekey}
+
+\begin{stylekey}{/tikz/densely dashed}
+ \showit{style=densely dashed}
+\end{stylekey}
+
+\begin{stylekey}{/tikz/loosely dashed}
+ \showit{style=loosely dashed}
+\end{stylekey}
+You may need the option \lstinline!mark options={solid}! to avoid dotted or dashed marker boundaries.
\endgroup
-\subsection{\texttt{\textbackslash addplot[OPTIONS] PATH}}
-This is the main plotting command. It is used as
-\begin{lstlisting}
-\addplot
- plot coordinates {
- (0,0)
- (1,1)
- };
-\end{lstlisting}
-or
-\begin{lstlisting}
-\addplot[color=blue,mark=*]
- plot coordinates {
- (0,0)
- (1,1)
- };
-\end{lstlisting}
-The first syntax chooses the next unused plot specification of the list \lstinline!\autoplotspeclist! (see below) and the second syntax specifies a plot specification explicitly. This specification will be used inside of the legend (if any).
+\subsubsection{Font Size and Line Width}
+Often, one wants to change line width and font sizes for plots. This can be done using the following options of \Tikz.
+
+\begin{key}{/tikz/font=\marg{font name} (initially \textbackslash normalfont)}
+ Sets the font which is to be used for text in nodes (like tick labels, legends or descriptions).
+\end{key}
+
+\begin{key}{/tikz/line width=\marg{dimension} (initially 0.4pt)}
+ Sets the line width. Please note that line widths for tick lines and grid lines are predefined, so you may need to override the styles |every tick| and |every axis grid|.
+
+ The |line width| key is changed quite often in \Tikz. You should use
+\begin{codeexample}[code only]
+\pgfplotsset{every axis/.append style={line width=1pt}}
+\end{codeexample}
+ or
+\begin{codeexample}[code only]
+\pgfplotsset{every axis/.append style={thick}}
+\end{codeexample}
+ to change the overall line width. To also adjust ticks and grid lines, you can use
+\begin{codeexample}[code only]
+\pgfplotsset{every axis/.append style={
+ line width=1pt,
+ tick style={line width=0.6pt}}}
+\end{codeexample}
+ or styles like
+\begin{codeexample}[code only]
+\pgfplotsset{every axis/.append style={
+ thick,
+ tick style={semithick}}}
+\end{codeexample}
+ The `|every axis plot|' style can be used to change line widths for plots only.
+\end{key}
+
+\begin{keylist}[/tikz]{ultra thin,very thin,semithick,thick,very thick,ultra thick}
+ These \Tikz\ styles provide different predefined line widths.
+\end{keylist}
+
+This example shows the same plots as on page~\pageref{page:plotcoords:src} (using |\plotcoords| as place holder for the commands on page~\pageref{page:plotcoords:src}), with different line width and font size.
+\begin{codeexample}[]
+\pgfplotsset{every axis/.append style={
+ font=\large,
+ line width=1pt,
+ tick style={line width=0.8pt}}}
+\begin{tikzpicture}
+ \begin{loglogaxis}[
+ legend style={at={(0.03,0.03)},
+ anchor=south west},
+ xlabel=\textsc{Dof},
+ ylabel=$L_2$ Error
+ ]
+ \plotcoords
+ \legend{$d=2$,$d=3$,$d=4$,$d=5$,$d=6$}
+ \end{loglogaxis}
+\end{tikzpicture}
+\end{codeexample}
-\noindent
-Some more details:
-\begin{itemize}
- \item You can modify \texttt{OPTIONS} with
- \begin{lstlisting}[gobble=1]
- \tikzstyle{every axis plot}=[...]
- \end{lstlisting}
- or, even better, with
- \begin{lstlisting}[gobble=1]
- \tikzstyle{every axis plot}+=[...]
- \end{lstlisting}
- \item The \texttt{OPTIONS} are remembered for the legend.
- \item See subsection~\ref{sec:markers} for a list of available markers and line styles.
- \item For log plots, \PGFPlots\ will compute the natural logarithm $\log(\cdot)$ numerically. This works with normal fixed point numbers or in scientific notation. For example, the following numbers are valid input to \lstinline!\addplot!.
-\begin{lstlisting}
+\begin{codeexample}[]
+\pgfplotsset{every axis/.append style={
+ font=\footnotesize,
+ thin,
+ tick style={ultra thin}}}
\begin{tikzpicture}
-\begin{loglogaxis}
-\addplot plot coordinate {
- (769, 1.6227e-04)
- (1793, 4.4425e-05)
- (4097, 1.2071e-05)
- (9217, 3.2610e-06)
- (1e6, 0.00003341)
- (2.3e7, 0.00131415)
-;
-\end{loglogaxis}
+ \begin{loglogaxis}[
+ xlabel=\textsc{Dof},
+ ylabel=$L_2$ Error
+ ]
+ \plotcoords
+ \legend{$d=2$,$d=3$,$d=4$,$d=5$,$d=6$}
+ \end{loglogaxis}
\end{tikzpicture}
-\end{lstlisting}
- You can represent arbirtrarily small or very large numbers as long as its logarithm can be represented as a \TeX-length (up to about~$16384$). Of course, any coordinate~$x\le 0$ is not possible since the logarithm of a non-positive number is not defined. Such coordinates will be skipped automatically.
+\end{codeexample}
- \item For normal plots, \PGFPlots\ understands arbirtrarily large or small numbers like 0.00000001234 or $1.234\cdot 10^{24}$. \PGFPlots\ has its own number parsing tools which are complete text based and do not rely on \TeX's limited numerical number representation. Before the plots are actually drawn, any input coordinate is transformed into \TeX-precision using transformations
- \[ T_x(x) = 10^{s_x} \cdot x \text{ and } T_y(y) = 10^{s_y} \cdot y \]
- with properly chosen integers $s_x, s_y \in \Z$. This ensures invariance of axis ranges. See section~\ref{sec:disabledatascaling} for more details.
+\subsubsection{Options Controlling Linestyles}
- \item As a consequence of the coordinate parsing routines, you can't use the mathematical expression parsing method of \PGF\ as coordinates (that means: you will need to provide coordinates without suffixes like ``cm'' or ``pt'' and you can't invoke mathematical functions).
-
- \item If you did not specify axis limits for $x$ and $y$ manually, \lstinline!\addplot! will compute them automatically.
+\label{sec:cycle:list}%
+\begin{pgfplotskeylist}{cycle list=\marg{list},cycle list name=\marg{\textbackslash macro}}
+Allows to specify a list of plot specifications which will be used for each \hbox{\lstinline!\addplot!}-command without explicit plot specification.
- The automatic computation of axis limits works as follows:
- \begin{enumerate}
- \item In case of \lstinline!\addplot plot coordinates {...};!, every coordinate will be checked.
- Any other \Tikz-plot mode is not (yet) supported (had no time yet).
- \item Since more than one \lstinline!\addplot! command may be used inside an \lstinline!\begin{axis}...\end{axis}!, all drawing commands will be postponed until \lstinline!\end{axis}!.
+There are several possiblities to change it:
+\begin{enumerate}
+ \item Use one of the predefined lists,
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{loglogaxis}[
+ cycle list name=\coloredplotspeclist]
+\plotcoords
+\legend{$d=2$,$d=3$,$d=4$,$d=5$,$d=6$}
+\end{loglogaxis}
+\end{tikzpicture}
+\end{codeexample}
+These examples employs the same coords as in the example on page~\pageref{page:plotcoords:src}.
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{loglogaxis}[
+ cycle list name=\blackwhiteplotspeclist]
+\plotcoords
+\legend{$d=2$,$d=3$,$d=4$,$d=5$,$d=6$}
+\end{loglogaxis}
+\end{tikzpicture}
+\end{codeexample}
+ \item Provide the list explicitly,
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{loglogaxis}[cycle list={%
+ {blue,mark=*},
+ {red,mark=square},
+ {dashed,mark=o},
+ {loosely dotted,mark=+},
+ {brown!60!black,
+ mark options={fill=brown!40},
+ mark=otimes*}}
+]
+\plotcoords
+\legend{$d=2$,$d=3$,$d=4$,$d=5$,$d=6$}
+\end{loglogaxis}
+\end{tikzpicture}
+\end{codeexample}
+ (This example list requires \lstinline!\usetikzlibrary{plotmarks}!).
+ \item Define macro names and use them with `|cycle list name|':
+\begin{codeexample}[code only]
+\pgfcreateplotcyclelist{\mylist}{%
+ {blue,mark=*},
+ {red,mark=square},
+ {dashed,mark=o},
+ {loosely dotted,mark=+},
+ {brown!60!black,mark options={fill=brown!40},mark=otimes*}}
+}
+...
+\begin{axis}[cycle list name=\mylist]
+ ...
+\end{axis}
+\end{codeexample}
+\end{enumerate}
- See the \lstinline!\axispath!-command for more information about automatic axis limits and the postponed drawing.
- \end{enumerate}
-\end{itemize}
+\paragraph{Remark:} You can also terminate single entries with `\lstinline!\\!' as in
+\begin{codeexample}[code only]
+\begin{axis}[cycle list={%
+ blue,mark=*\\%
+ red,mark=square\\%
+ dashed,mark=o\\%
+ loosely dotted,mark=+\\%
+ brown!60!black,
+ mark options={fill=brown!40},
+ mark=otimes*\\}
+]
+...
+\end{axis}
+\end{codeexample}
+In this case, the \emph{last} entry also needs a terminating `\lstinline!\\!', but you can omit braces around the single entries.
+\end{pgfplotskeylist}
-\subsection{\texttt{\textbackslash addplot+[OPTIONS] ...}}
-Does the same like \lstinline!\addplot[OPTIONS] ...! except that \texttt{OPTIONS} is \emph{appended} to the arguments which would have been taken for \lstinline!\addplot ...! (the element of the default list).
-
-Example:
-\begin{lstlisting}
-\addplot+[only marks] plot coordinates {...};
-\end{lstlisting}
-will use the same line style, markers, colors as
-\begin{lstlisting}
-\addplot plot coordinates {...};
-\end{lstlisting}
-but it will only draw markers, no lines.
-
-\subsection{\texttt{\textbackslash axispath...;}}
-\label{sec:axispath}%
-This command allows to draw custom content into an axis. The argument to \lstinline!\axispath! may be any \Tikz-command like
-\begin{lstlisting}
-\axispath\node at (axis cs:12.14368,-9.30872) {};
-\end{lstlisting}
-or
-\begin{lstlisting}
-\axispath\draw
- (axis cs:12.14368,-9.30872)
- -- (axis cs:0,1);
-\end{lstlisting}
-A useful example is presented in section~\ref{sec:annot:plot} where annotations are placed near some data points.
-The \lstinline!\axispath! command is necessary to communicate drawing commands to \PGFPlots. If \PGFPlots\ needs to determine the $x$~and/or~$y$ limits automatically, any plotting commands (including those with \lstinline!\axispath!) will be postponed until \lstinline!\end{axis}!.
-A missing \lstinline!\axispath! may corrupt your graphics because the clipping area may not yet be known.
-The ``\texttt{axis cs}'' coordinate system allows you to access axis coordinates. You can use the same numbers as in \lstinline!\addplot! all required transformations like logarithms or data scaling transformations will be applied. All \lstinline!\axispath! commands should use these coordinate systems. See section~\ref{sec:axis:coords} for more information and section~\ref{sec:annot:plot} for examples.
+\subsection{Axis Descriptions}
-\subsection{Accessing axis coordinates with \texttt{axis cs}}
-\label{sec:axis:coords}%
-\PGFPlots\ provides a new coordinate system for use inside of an axis, the ``axis coordinate system'', \texttt{axis cs}.
+\subsubsection{Labels}
-Its can be used in conjunction with \lstinline!\axispath! to draw any \Tikz-graphics at axis coordinates. It is used like
-\begin{lstlisting}
- \axispath\draw
- (axis cs:18943,2.873391e-05)
- |- (axis cs:47103,8.437499e-06);
-\end{lstlisting}
-see section~\ref{sec:annot:plot} for example graphics.
+\begin{pgfplotsxykey}{\x label=\marg{text}}
+The options |xlabel| and |ylabel| change axis labels to \marg{text} which is any \TeX\ text. Use |xlabel={, = characters}| if you need to include `|=|' or `|,|' literally.
-\paragraph{Attention:} Whenever you draw additional graphics, consider using \texttt{axis cs}! It applies any logarithms, data scaling transformations or whatever \PGFPlots\ usually does!
+Labels are \Tikz-Nodes which are placed with
+\begin{codeexample}[code only]
+\node
+ [style=every axis label,
+ style=every axis x label]
+\node
+ [style=every axis label,
+ style=every axis y label]
+\end{codeexample}
+so their position and appearance can be customized. As for legends, the coordinate \lstinline!(0,0)! denotes the lower left axis corner and \lstinline!(1,1)! the upper right.
-\subsection{\texttt{\textbackslash addlegendentry\{name\}}}
-Adds a single legend entry to the legend list. Example:
-\begin{lstlisting}
+The default styles are
+\begin{codeexample}[code only]
+\pgfplotsset{every axis label/.style={}}
+\pgfplotsset{every axis x label/.style={
+ at={(0.5,0)},
+ below,
+ yshift=-15pt}}
+\pgfplotsset{every axis y label/.style={
+ at={(0,0.5)},
+ xshift=-35pt,
+ rotate=90}}
+\end{codeexample}
+Please add options using |.append style| instead of overwriting the default styles to ensure compatibility with future versions.
+\begin{codeexample}[code only]
+\pgfplotsset{every axis label/.append style={...}}
+\pgfplotsset{every axis x label/.append style={...}}
+\pgfplotsset{every axis y label/.append style={...}}
+\end{codeexample}
+\end{pgfplotsxykey}
+
+\begin{pgfplotskey}{title=\marg{text}}
+Adds a caption to the plot. This will place a \Tikz-Node with
+\begin{codeexample}[code only]
+\node[style=every axis title] {text};
+\end{codeexample}
+to the current axis.
+\begin{codeexample}[]
\begin{tikzpicture}
-\begin{axis}
-\addplot[smooth,mark=*,blue] plot coordinates {
- (0,2)
- (2,3)
- (3,1)
-};
-\addlegendentry{Case 1}
-
-\addplot[smooth,color=red,mark=x]
- plot coordinates {
- (0,0)
- (1,1)
- (2,1)
- (3,2)
+\begin{loglogaxis}[
+ xlabel=Dof,ylabel=Error,
+ title={$\mu=0.1$, $\sigma=0.2$}]
+
+ \addplot coordinates {
+ (5, 8.312e-02)
+ (17, 2.547e-02)
+ (49, 7.407e-03)
+ (129, 2.102e-03)
+ (321, 5.874e-04)
+ (769, 1.623e-04)
+ (1793, 4.442e-05)
+ (4097, 1.207e-05)
+ (9217, 3.261e-06)
};
-\addlegendentry{Case 2}
-\end{axis}
-\end{tikzpicture}
-\end{lstlisting}
-The outcome of this listing is shown in figure~\ref{fig:addlegendentry}.
-\begin{figure}
- \centering
- \begin{tikzpicture}
- \begin{axis}
- \addplot[smooth,mark=*,blue] plot coordinates {
- (0,2)
- (2,3)
- (3,1)
- };
- \addlegendentry{Case 1}
+\end{loglogaxis}
+\end{tikzpicture}%
+\end{codeexample}
+%--------------------------------------------------
+% \hfill
+% \begin{tikzpicture}
+% \begin{loglogaxis}[
+% width=0.48\linewidth,
+% xlabel=Dof,ylabel=Error,
+% title={$\mu=1$, $\sigma=\frac{1}{2}$}]
+%
+% \addplot[color=red,mark=*] coordinates {
+% (7, 8.472e-02)
+% (31, 3.044e-02)
+% (111, 1.022e-02)
+% (351, 3.303e-03)
+% (1023, 1.039e-03)
+% (2815, 3.196e-04)
+% (7423, 9.658e-05)
+% (18943, 2.873e-05)
+% (47103, 8.437e-06)
+% };
+% \end{loglogaxis}
+% \end{tikzpicture}
+%--------------------------------------------------
+ The title is placed in the middle of the axis (the placing does not incorporate any axis descriptions). You can reconfigure the appearance and/or placing of the title for example with
+\begin{codeexample}[code only]
+\pgfplotsset{every axis title/.append style={at={(0.75,1)}}}
+\end{codeexample}
+This will place the title at~75\% of the $x$-axis. The coordinate~$(0,0)$ is the lower left corner and~$(1,1)$ the upper right one.
+\end{pgfplotskey}
+
+\subsubsection{Legend}
+
+\begin{pgfplotskey}{legend columns=\marg{number} (default 1)}
+Allows to configure the maximum number of adjacent legend entries. The default value~|1| places legend entries vertically below each other.
+
+Use |legend columns=-1| to draw all entries horizontally.
+\end{pgfplotskey}
+
+\begin{pgfplotskey}{legend plot pos=\mchoice{left,right,none} (initially left)}
+Configures where the small line specifications will be drawn: left of the description, right of the description or not at all.
+\end{pgfplotskey}
- \addplot[smooth,color=red,mark=x]
+\begin{pgfplotscodekey}{legend image code}
+\label{opt:legend:image:code}
+Allows to replace the default images which are drawn inside of legends. The first argument to this option is the plot specification, a key-value list which has been determined by \lstinline!\addplot!.
+
+The default is
+\begin{codeexample}[code only]
+/pgfplots/legend image code/.code={%
+ \draw[#1,mark repeat=2,mark phase=2]
plot coordinates {
- (0,0)
- (1,1)
- (2,1)
- (3,2)
- };
- \addlegendentry{Case 2}
- \end{axis}
- \end{tikzpicture}
+ (0cm,0cm)
+ (0.3cm,0cm)
+ (0.6cm,0cm)%
+ };%
+}
+\end{codeexample}
+\end{pgfplotscodekey}
- \caption{An example for the \texttt{\textbackslash addlegendentry} command}%
- \label{fig:addlegendentry}%
-\end{figure}%
-It does not matter where \lstinline[breaklines=false]!\addlegendentry! commands are placed, only the sequence matters. You will need one \lstinline[breaklines=false]!\addlegendentry! for every \lstinline!\addplot! command.
+\subsubsection{Axis Lines}
+By default the axis lines are drawn as a |box|, but it is possible to change the appearance of the $x$~and~$y$ axis lines.
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{axis}[
+ axis x line=middle,
+ axis y line=right,
+ tick align=center,
+ ymax=1.1, ymin=-1.1,
+ enlargelimits=false
+]
+ \addplot[blue,mark=none]
+ plot[id=sinneg,domain=-10:0,samples=40]
+ function{sin(x)};
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
-\subsection{\texttt{\textbackslash legend[OPTIONS]\{LIST\}}}
-\label{sec:legenddef}%
-You can use
-\begin{lstlisting}
+\begin{codeexample}[]
\begin{tikzpicture}
-\begin{axis}
-...
-\legend{$d=2$\\$d=3$\\$d=4$\\$d=5$\\$d=6$\\}
-...
+\begin{axis}[
+ enlargelimits=false,
+ minor tick num=3,
+ axis y line=center,
+ axis x line=middle
+ ]
+ \addplot[blue,mark=none]
+ plot[domain=-5:5,samples=40]
+ (\x,{sin(\x r)});
\end{axis}
\end{tikzpicture}
-\end{lstlisting}
-to assign a complete legend. \textbf{Attention:} the final \lstinline!\\! is necessary! The \lstinline[breaklines=false]!\legend! command takes the following arguments:
-\begin{lstlisting}
-\legend[OPTIONS]{TEXT1\\TEXT2\\TEXT3\\...\\}
-\end{lstlisting}
-where each legend element needs to be terminated by \lstinline[breaklines=false]!\\!. The short marker/line combination shown in legends is acquired from the argument to \lstinline[breaklines=false]!\addplot[...]!.
-
-\subsubsection{Legend appearance}
-The style ``\texttt{every axis legend}'' determines the legend's position and outer appearance:
-\begin{lstlisting}
-\tikzstyle{every axis legend}+=[
- at={(0,0)},
- anchor=south west]
-\end{lstlisting}
-will draw it at the lower left corner of the axis while
-\begin{lstlisting}
-\tikzstyle{every axis legend}+=[
- at={(1,1)},
- anchor=north east]
-\end{lstlisting}
-means the upper right corner. The `\texttt{anchor}' option determines which point \emph{of the legend} will be placed at $(0,0)$ or $(1,1)$ (see below for more examples).
+\end{codeexample}
-The legend is a \Tikz-matrix, so you can use any \Tikz\ option which affects
-nodes and matrizes (see~\cite[section 13~and~14]{tikz}). The matrix is created by something like
-\begin{lstlisting}
-\matrix[style=every axis legend] {
- draw plot specification 1 & \node{legend 1}\\
- draw plot specification 2 & \node{legend 2}\\
- ...
-};
-\end{lstlisting}
-You can configure the number of horizontal legend entries with the axis-option ``\texttt{legend columns=NUMBER}''. For example,
-\begin{lstlisting}
+In case the range of either of the axis do not include the zero value, it is possible to visualize this with a discontinuity decoration on the corresponding axis line.
+
+\begin{codeexample}[]
\begin{tikzpicture}
-\begin{axis}[legend columns=4]
-...
-\legend{legend 1\\legend 2\\legend 3\\}
+\begin{axis}[
+ axis x line=bottom,
+ axis x discontinuity=parallel,
+ axis y line=left,
+ xmin=360, xmax=600,
+ ymin=0, ymax=7,
+ enlargelimits=false
+]
+ \addplot coordinates {
+ (420,2)
+ (500,6)
+ (590,4)
+ };
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
+
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{axis}[
+ axis x line=bottom,
+ axis y line=center,
+ tick align=outside,
+ axis y discontinuity=crunch,
+ ymin=95, enlargelimits=false
+]
+ \addplot[blue,mark=none]
+ plot[id=square,domain=-4:4,samples=20]
+ function{x*x+x+104};
\end{axis}
\end{tikzpicture}
-\end{lstlisting}
-would use (up to)~$4$ adjacent legend entries.
+\end{codeexample}
+
+\begin{pgfplotskey}{axis x line=\mchoice{box,top,middle,bottom,none} (initially box)}
+Allows to choose the location of the $x$ axis line(s).
+The labels and ticks are placed accordingly.
+Bottom will draw only a line at y=ymin, middle will draw a line at y=0, and top will draw only a line at y=ymax.
+Box is a combination of options top and bottom.
+\end{pgfplotskey}
+
+\begin{pgfplotskey}{axis y line=\mchoice{box,left,center,right,none} (initially box)}
+Allows to choose the location of the $y$ axis line(s).
+The labels and ticks are placed accordingly.
+Left will draw only a line at x=xmin, center will draw a line at x=0, and right will draw only a line at x=xmax.
+Box is a combination of options left and right.
+\end{pgfplotskey}
+
+\begin{pgfplotskey}{axis x discontinuity=\mchoice{crunch,parallel,none} (initially none)}
+Insert a discontinuity decoration on the $x$ axis.
+This is to visualize that the $y$ axis does cross the $x$ axis at its 0 value, because the minimum $x$ axis value is positive or the maximum value is negative.
+\end{pgfplotskey}
+
+\begin{pgfplotskey}{axis y discontinuity=\mchoice{crunch,parallel,none} (initially none)}
+Similar to |axis x discontinuity|, but now for the $y$ axis.
+\end{pgfplotskey}
+
+\begin{pgfplotskey}{hide axis=\mchoice{true,false} (initially false)}
+Allows to hide the axis. No outer rectangle, no tick marks and no labels will be drawn. Only titles and legends will be processed as usual.
+
+Axis scaling and clipping will be done as if you did not use |hide axis|.
+\end{pgfplotskey}
+
-Examples:
+\subsection{Scaling Options}
+
+\begin{pgfplotskey}{width=\marg{dimen}}
+Sets the width of the final picture to \marg{dimen}. If no |height| is specified, scaling will respect aspect ratios.
+
+\noindent\underline{Remarks:}
\begin{itemize}
-\item
-\begin{lstlisting}
-\tikzstyle{every axis legend}+=[
- at={(1.02,1)},
- anchor=north west]
-\end{lstlisting}
-draws the legend OUTSIDE TOP RIGHT.
+ \item The scaling only affects the width of one unit in $x$-direction or the height for one unit in $y$-direction. Axis labels and tick labels won't be resized, but their size is used to determine the axis scaling.
-\item
-\begin{lstlisting}
-\tikzstyle{every axis legend}+=[
- at={(1,0.5)},
- anchor=east,outer sep=0.5cm]
-\end{lstlisting}
-draws the legend INSIDE MIDDLE RIGHT, separated by 0.5cm from the axis.
-\end{itemize}
+ \item You can use the |scale=|\marg{number} option,
+\begin{codeexample}[code only]
+\begin{tikzpicture}[scale=2]
+\begin{axis}
+...
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
+ to scale the complete picture.
-\noindent
-The default is
-\begin{lstlisting}
-\tikzstyle{every axis legend}=[%
- cells={anchor=center},
- inner xsep=3pt,inner ysep=2pt,nodes={inner sep=2pt,text depth=0.15em},
- anchor=north east,%
- shape=rectangle,%
- fill=white,%
- draw=black,
- at={(0.98,0.98)}
- ]
-\end{lstlisting}
-\paragraph{Attention:} you should \emph{not reset} the default style to stay compatible with future versions. If possible, use
-\begin{lstlisting}
-\tikzstyle{every axis legend}+=[...]
-\end{lstlisting}
+ \item The \Tikz-options \lstinline!x! and \lstinline!y! which set the unit dimensions in $x$ and $y$ directions can be specified as arguments to \lstinline!\begin{axis}[x=1.5cm,y=2cm]! if needed (see below). These settings override the \lstinline!width! and \lstinline!height! options.
+ \item You can also force a fixed width/height of the axis (without looking at labels) with
+ \begin{codeexample}[code only]
+\begin{tikzpicture}
+\begin{axis}[width=5cm,scale only axis]
+ ...
+\end{axis}
+\end{tikzpicture}
+ \end{codeexample}
-\subsection{\texttt{\textbackslash autoplotspeclist}}
-Allows to specify a list of plot specifications which will be used for each \lstinline!\addplot!-command without explicit plot specification.
+ \item Please note that up to the writing of this manual, \PGFPlots\ only estimates the size needed for axis- and tick labels. It does not include legends which have been placed outside of the axis\footnote{I.e. the `|width|' option will not work as expected, but the bounding box is still ok.}. This may be fixed in future versions.
-There are several possiblities to change it:
-\begin{enumerate}
- \item Use one of the predefined lists,
-\begin{lstlisting}
-\listcopy\coloredplotspeclist\to\autoplotspeclist%
-\listcopy\blackwhiteplotspeclist\to\autoplotspeclist%
-\end{lstlisting}
- \item Define your own one,
-\begin{lstlisting}
-\listnew{\autoplotspeclist}{%
- blue,mark=*\\%
- red,mark=square\\%
- dashed,mark=o\\%
- loosely dotted,mark=+\\%
- brown!60!black,mark options={fill=brown!40},mark=otimes*\\%
-}
-\end{lstlisting}
- (This example list requires \lstinline!\usetikzlibrary{plotmarks}!).
-\end{enumerate}
-Please note that the `\lstinline!\\!' is required to separate each element. Please note that comment characters~`\%' are necessary if the elements are on different lines.
+ Use the |x=|\marg{dimension}, |y=|\marg{dimension} and |scale only axis| options if the scaling happens to be wrong.
+\end{itemize}
+\end{pgfplotskey}
-\subsection{\texttt{\textbackslash logtologten\{ARG\}}}
-Expands to the result of $\texttt{ARG}/\log(10)$. You can also use
-\begin{lstlisting}
-\logtologtentomacro{9.5}{\result}
-\end{lstlisting}
-and \lstinline!\result! will be filled with the result.
+\begin{pgfplotskey}{height=\marg{dimen}}
+ See |width|.
+\end{pgfplotskey}
-\subsection{\texttt{\textbackslash logten}}
-Expands to the constant $\log(10)$. Useful for logplots because $\log(10^i) = i\log(10)$.
+\begin{pgfplotskey}{scale only axis=\mchoice{true,false} (initially false)}
+If |scale only axis| is enabled, label, tick and legend dimensions won't influence the size of the axis rectangle, that means |width| and |height| apply only to the axis rectangle
-\subsection{\texttt{\textbackslash prettyprintnumber\{NUM\}}}
-Allows to generate pretty--printed output for the number \texttt{NUM}. Examples:
-\begin{lstlisting}
-\prettyprintnumber{1.0}
+If |scale only axis=false| (the default), \PGFPlots\ will try to produce the desired width \emph{including} labels, titles and ticks.
+\end{pgfplotskey}
-\prettyprintnumber{151.015341}
+\begin{pgfplotsxykey}{\x=\marg{dimen}}
+Sets the unit size for one $x$ (or $y$) coordinate to \marg{dimen}.
-\prettyprintnumber{90.99999}
-\end{lstlisting}
-results in
+ Setting $x$ explicitly overrides the \lstinline!width! option. Setting $y$ explicitly overrides the \lstinline!height! option.
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{axis}[x=1cm,y=1cm]
+\addplot plot[domain=0:3] (\x,2*\x);
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
+ Setting |x| and/or |y| for logarithmic axis will set the dimension used for $1 \cdot e \approx 2.71828$.
-\prettyprintnumber{1.0},
+ Please note that it is \emph{not} possible to specify \lstinline!x! as argument to \lstinline!tikzpicture!. The option
+\begin{codeexample}[code only]
+\begin{tikzpicture}[x=1.5cm]
+\begin{axis}
+ ...
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
+ won't have any effect because an axis rescales its coordinates (see the \lstinline!width! option).
+\end{pgfplotsxykey}
-\prettyprintnumber{151.015341},
+\subsection{Error Bars}
+\label{sec:errorbars}
+{%
+\def\pgfplotserror#1{\ensuremath{\epsilon_{#1}}}%
+\PGFPlots\ supports error bars for normal and logarithmic plots.
-\prettyprintnumber{90.99999}.
+Error bars are enabled for each plot separately, using \meta{behavior options} after \lstinline!\addplot!:
+\begin{codeexample}[code only]
+\addplot plot[/pgfplots/error bars/.cd,x dir=both,y dir=both] ...
+\end{codeexample}
+Error bars inherit all drawing options of the associated plot, but they use their own marker and style arguments additionally.
-It is used to display axis ticks. The default rounding precision is defined by
-\begin{lstlisting}
-\def\prettyprintnumberprecision{2}
-\end{lstlisting}
-and can be reconfigured if needed (the highest precision is~$5$ due to \TeX's restricted numerical capabilities).
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{axis}
+\addplot plot[/pgfplots/error bars/.cd,
+ y dir=plus,y explicit]
+coordinates {
+ (0,0) +- (0.5,0.1)
+ (0.1,0.1) +- (0.05,0.2)
+ (0.2,0.2) +- (0,0.05)
+ (0.5,0.5) +- (0.1,0.2)
+ (1,1) +- (0.3,0.1)};
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
-\subsection{\texttt{\textbackslash axispreset\{key=value,key=value\}}}
-Allows to define default options for any axis. For example,
-\begin{lstlisting}
-...
-\axispreset{width=\textwidth}%
-...
+\begin{codeexample}[]
\begin{tikzpicture}
\begin{axis}
-...
+\addplot plot[/pgfplots/error bars/.cd,
+ y dir=both,y explicit,
+ x dir=both,x fixed=0.05,
+ error mark=diamond*]
+coordinates {
+ (0,0) +- (0.5,0.1)
+ (0.1,0.1) +- (0.05,0.2)
+ (0.2,0.2) +- (0,0.05)
+ (0.5,0.5) +- (0.1,0.2)
+ (1,1) +- (0.3,0.1)};
\end{axis}
\end{tikzpicture}
-\end{lstlisting}
-will produce a width of \lstinline!\textwidth! for any following axis. You can preset any of the \texttt{axis}-options described below.
+\end{codeexample}
+
+\begin{codeexample}[]
+\pgfplotstabletypesetfile{pgfplots.testtable2.dat}
-\subsection{Axis options}
-There are several required and even more optional arguments to modify axes. They are used like
-\begin{lstlisting}
\begin{tikzpicture}
-\begin{axis}[key=value,key2=value2]
-...
+\begin{loglogaxis}
+\addplot plot[/pgfplots/error bars/.cd,
+ x dir=both,x fixed relative=0.5,
+ y dir=both,y explicit relative,
+ error mark=triangle*]
+ table[x=x,y=y,y error=errory]
+ {pgfplots.testtable2.dat};
+\end{loglogaxis}
+\end{tikzpicture}
+\end{codeexample}
+%--------------------------------------------------
+% coordinates {
+% (32,32)
+% (64,64)
+% (128,128) +- (0,0.3)
+% (1024,1024) +- (0,0.2)
+% (32068,32068) +- (0,0.6)
+% (64000,64000) +- (0,0.6)
+% (128000,128000) +- (0,0.6)
+% };
+%--------------------------------------------------
+
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{axis}[enlargelimits=false]
+\addplot[red,mark=*]
+ plot[/pgfplots/error bars/.cd,
+ y dir=minus,y fixed relative=1,
+ x dir=minus,x fixed relative=1,
+ error mark=none,
+ error bar style={dotted}]
+coordinates
+ {(0,0) (0.1,0.1) (0.2,0.2)
+ (0.5,0.5) (1,1)};
\end{axis}
\end{tikzpicture}
-\end{lstlisting}
-The overall appeareance can be changed with
-\begin{lstlisting}
-\tikzstyle{every axis}+=[line width=1pt]
-\end{lstlisting}
-for example.
+\end{codeexample}
-\subsubsection{\texttt{[xy]min=COORD}, \texttt{[xy]max=COORD}}
-The options \texttt{xmin}, \texttt{xmax} and \texttt{ymin}, \texttt{ymax} allow to define the axis limits, i.e. the lower left and the upper right corner. Some remarks:
-\begin{itemize}
- \item The axis limits determine the plotted range. Everything else will be clipped away.
- \item The width of every unit $x$-coordinate will be scaled such that the plot has width \lstinline!\axisdefaultwidth! (including the tick- and axis labels). The height of every unit $y$-coordinate will be scaled such that the plot has height \lstinline!\axisdefaultheight!.
+\begin{pgfplotsxykey}{error bars/\x\ dir=\mchoice{none,plus,minus,both} (initially none)}
+Draws either no error bars at all, only marks at $x+\pgfplotserror x$, only marks at $x-\pgfplotserror x$ or marks at both, $x+\pgfplotserror x$ and $x-\pgfplotserror x$. The $x$-error $\pgfplotserror x$ is acquired using one of the following options.
+
+The same holds for the |y dir| option.
+\end{pgfplotsxykey}
+
+\begin{pgfplotsxykey}{error bars/\x\ fixed=\marg{value} (initially 0)}
+Provides a common, absolute error $\pgfplotserror x=\text{\meta{value}}$ for all input coordinates.
- You can override this default behavior with the options \lstinline!width=DIMEN!, \lstinline!height=DIMEN!, \lstinline!x=DIMEN! and \lstinline!y=DIMEN!, see below.
- \item If one of \lstinline!xmin! or \lstinline!xmax! is missing, the $x$-interval will be determined automatically (see \lstinline!\addplot!). The same holds true if one of \lstinline!ymin! or \lstinline!ymax! is missing: in this case, the $y$-interval will be determined automatically.
+For linear $x$~axes, the error mark is drawn at $x \pm \pgfplotserror x$ while for logarithmic $x$~axes, it is drawn at $\log( x \pm \pgfplotserror x)$. Computations are performed in \PGF's floating point arithmetics.
+\end{pgfplotsxykey}
- \item The option \lstinline!enlargelimits! will automatically increase the plotted range.
+\begin{pgfplotsxykey}{error bars/\x\ fixed relative=\marg{percent} (initially 0)}
+Provides a common, relative error $\pgfplotserror x = \text{\meta{percent}} \cdot x$ for all input coordinates. The argument \meta{percent} is thus given relatively to input $x$ coordinates such that $\text{\meta{percent}} = 1$ means $100\%$.
+
+Error marks are thus placed at $x \cdot (1 \pm \pgfplotserror x)$ for linear axes and at $\log(x \cdot (1 \pm \pgfplotserror x))$ for logarithmic axes. Computations are performed in floating point for linear axis and using the identity $\log(x \cdot (1 \pm \pgfplotserror x)) = \log(x) + \log( 1 \pm \pgfplotserror x)$ for logarithmic scales.
+\end{pgfplotsxykey}
+
+\begin{pgfplotsxykey}{error bars/\x\ explicit}
+Configures the error bar algorithm to draw $x$-error bars at any input coordinate for which user-specified errors are available.
+ Each error is interpreted as absolute error, see |x fixed| for details.
+
+The different input formats of errors are described in section~\ref{sec:errorbar:input}.
+\end{pgfplotsxykey}
+
+\begin{pgfplotsxykey}{error bars/\x\ explicit relative}
+Configures the error bar algorithm to draw $x$-error bars at any input coordinate for which user-specified errors are available.
+ Each error is interpreted as relative error, that means error marks are placed at $x (1 \pm \text{\meta{value}}(x))$ (works as for |error bars/x fixed relative|).
+\end{pgfplotsxykey}
+
+
+\begin{pgfplotskey}{error bars/error mark=\meta{marker}}
+Sets an error marker for any error bar. \marg{marker} is expected to be a valid plot mark, see section~\ref{sec:markers}.
+\end{pgfplotskey}
+
+\begin{pgfplotskey}{error bars/error mark options=\marg{key-value-list}}
+Sets a key-value list of options for any error mark. This option works similary to the \Tikz\ `|mark options|' key.
+\end{pgfplotskey}
+
+\begin{pgfplotskey}{error bars/error bar style=\marg{key-value-list}}
+Appends the argument to `|/pgfplots/every error bar|' which is installed at the beginning of every error bar.
+\end{pgfplotskey}
+
+\begin{pgfplotscodetwokey}{error bars/draw error bar}
+Allows to change the default drawing commands for error bars. The two arguments are
+\begin{itemize}
+\item the source point, $(x,y)$ and
+\item the target point, $(\tilde x,\tilde y)$.
\end{itemize}
+Both are determined by \PGFPlots\ according to the options described above. The default code is
+\begin{codeexample}[code only][basicstyle=\footnotesize\ttfamily]
+/pgfplots/error bars/draw error bar/.code 2 args={%
+ \pgfkeysgetvalue{/pgfplots/error bars/error mark}%
+ {\pgfplotserrorbarsmark}%
+ \pgfkeysgetvalue{/pgfplots/error bars/error mark options}%
+ {\pgfplotserrorbarsmarkopts}%
+ \draw #1 -- #2 node[pos=1,sloped,allow upside down] {%
+ \expandafter\tikz\expandafter[\pgfplotserrorbarsmarkopts]{%
+ \expandafter\pgfuseplotmark\expandafter{\pgfplotserrorbarsmark}%
+ \pgfusepath{stroke}}%
+ };
+}
+\end{codeexample}
+\end{pgfplotscodetwokey}
+
+\subsubsection{Input Formats of Error Coordinates}
+\label{sec:errorbar:input}%
+Error bars with explicit error estimations for single data points require some sort of input format. This applies to `|error bars/|\meta{[xy]}| explizit|' and `|error bars/|\meta{[xy]}| explizit relative|'.
+
+Error bar coordinates can be read from `|plot coordinates|' or from `|plot table|'. The inline plot coordinates format is
+\begin{codeexample}[code only]
+\addplot coordinates {
+ (1,2) +- (0.4,0.2)
+ (2,4) +- (1,0)
+ (3,5)
+ (4,6) +- (0.3,0.001)
+}
+\end{codeexample}
+where $(1,2) \pm (0.4,0.2)$ is the first coordinate, $(2,4) \pm (1,0)$ the second and so forth. The point $(3,5)$ has no error coordinate.
-\subsubsection{\texttt{[xy]label=TEXT}}
-The options \texttt{xlabel} and \texttt{ylabel} change axis labels to `\texttt{TEXT}' which is any \LaTeX\ text. Use `\lstinline!{TEXT}!' if you need grouping.
+The `|plot table|' format is
+\begin{codeexample}[code only]
+\addplot table[x error=COLNAME,y error=COLNAME]
+\end{codeexample}
+or
+\begin{codeexample}[code only]
+\addplot table[x error index=COLINDEX,y error index=COLINDEX]
+\end{codeexample}
+These options are used as the `|x|' and `|x index|' options.
-Labels are \Tikz-Nodes which are placed with
-\begin{lstlisting}
-\node
- [style=every axis label,
- style=every axis x label]
-\node
- [style=every axis label,
- style=every axis y label]
-\end{lstlisting}
-so you can reconfigure their position and appearance. As for legends, the coordinate \lstinline!(0,0)! denotes the lower left axis corner and \lstinline!(1,1)! the upper right.
+You can supply error coordinates even if they are not used at all; they will be ignored silently in this case.
-The default styles are
-\begin{lstlisting}
-\tikzstyle{every axis label}=[]
-\tikzstyle{every axis x label}=[
- at={(0.5,0)},
- below,
- yshift=-15pt]
-\tikzstyle{every axis y label}=[
- at={(0,0.5)},
- xshift=-35pt,
- rotate=90]
-\end{lstlisting}
-You should use
-\begin{lstlisting}
-\tikzstyle{every axis label}+=[...]
-\tikzstyle{every axis x label}+=[...]
-\tikzstyle{every axis y label}+=[...]
-\end{lstlisting}
-to modify options to ensure compatibility with future versions.
-
-\subsubsection{\texttt{title=TEXT}}
-Adds a caption to the plot. This will place a \Tikz-Node with
-\begin{lstlisting}
-\node[style=every axis title] {TEXT};
-\end{lstlisting}
-to the current axis. An example is shown in figure~\ref{fig:titleexample}. The title is placed in the middle of the axis (the placing does not incorporate any axis descriptions). You can reconfigure the appearance and/or placing of the title for example with
-\begin{lstlisting}
-\tikzstyle{every axis title}+=[at={(0.75,1)}]
-\end{lstlisting}
-This will place the title at~75\% of the $x$-axis. The coordinate~$(0,0)$ is the lower left corner and~$(1,1)$ the upper right one.
+}%
-Please note that using the \LaTeX\ floating figures together with \lstinline!\caption{TEXT}! may be more appropriate in many situation. However, `\texttt{title}' allows access to the axis' size without any axis descriptions which is useful if more than one plot needs a caption.
-\begin{figure}
- \centering
- \begin{tikzpicture}
+\subsection{Number Formatting Options}
+\label{sec:number:printing}%
+\PGFPlots\ typeset tick labels rounded to given precision and in configurable number formats. The command to do so is |\pgfmathprintnumber|; it uses the current set of number formatting options.
+
+These options are described in all detail in the manual for \PGFPlotstable, which comes with \PGFPlots. Please refer to that manual.
+
+\begin{command}{\pgfmathprintnumber\marg{x}}
+Generates pretty-printed output for the (real) number \marg{x}. The input number \marg{x} is parsed using |\pgfmathfloatparsenumber| which allows arbitrary precision.
+
+Numbers are typeset in math mode using the current set of number printing options, see below. Optional arguments can also be provided using |\pgfmathprintnumber[|\meta{options}|]|\marg{x}.
+
+Please refer to the manual of \PGFPlotstable\ (shipped with this package) for details about the number options.
+\end{command}
+
+\label{sec:identify:minor:log}%
+\begin{pgfplotskey}{log identify minor tick positions=\mchoice{true,false} (initially true)}
+Set this to |true| if you want to identify log--plot tick labels at positions
+\[ i \cdot 10^j \]
+with $i \in \{2,3,4,5,6,7,8,9\},\, j \in \Z$. This may be valueable in conjunction with the `|extra x ticks|' and `|extra y ticks|' options. An example is shown below: The axis range is so small that only one tick label $10^j$ is inside of it. Extra tick labels can be placed on top of the normal ticks, and placing ticks at $i \cdot 10^j $ may be appropriate.
+\begin{codeexample}[]
+\pgfplotsset{every axis/.append style={%
+ width=6cm,
+ xmin=7e-3,xmax=7e-2,
+ extra x ticks={3e-2,6e-2},
+ extra x tick style={major tick length=0pt,font=\footnotesize}
+}}%
+\begin{tikzpicture}%
\begin{loglogaxis}[
- width=0.48\textwidth,
- xlabel=Dof,ylabel=Error,
- title={$\mu=0.1$, $\sigma=0.2$}]
-
- \addplot plot coordinates {
- (5, 8.312e-02)
- (17, 2.547e-02)
- (49, 7.407e-03)
- (129, 2.102e-03)
- (321, 5.874e-04)
- (769, 1.623e-04)
- (1793, 4.442e-05)
- (4097, 1.207e-05)
- (9217, 3.261e-06)
- };
- \end{loglogaxis}
- \end{tikzpicture}%
- \hfill
- \begin{tikzpicture}
- \begin{loglogaxis}[
- width=0.48\textwidth,
- xlabel=Dof,ylabel=Error,
- title={$\mu=1$, $\sigma=\frac{1}{2}$}]
-
- \addplot[color=red,mark=*] plot coordinates {
- (7, 8.472e-02)
- (31, 3.044e-02)
- (111, 1.022e-02)
- (351, 3.303e-03)
- (1023, 1.039e-03)
- (2815, 3.196e-04)
- (7423, 9.658e-05)
- (18943, 2.873e-05)
- (47103, 8.437e-06)
- };
+ title=with minor tick identification]
+ \addplot coordinates {
+ (1e-2,10)
+ (3e-2,100)
+ (6e-2,200)
+ };
\end{loglogaxis}
- \end{tikzpicture}
+\end{tikzpicture}%
- \begin{lstlisting}
- \begin{tikzpicture}
- \begin{loglogaxis}[
- width=0.48\textwidth,
- xlabel=Dof,ylabel=Error,
- title={$\mu=0.1$, $\sigma=0.2$}]
-
- \addplot plot coordinates {
- (5, 8.312e-02)
- (17, 2.547e-02)
- ...
- (4097, 1.207e-05)
- (9217, 3.261e-06)
- };
- \end{loglogaxis}
- \end{tikzpicture}%
- \hfill
- \begin{tikzpicture}
+\begin{tikzpicture}%
\begin{loglogaxis}[
- width=0.48\textwidth,
- xlabel=Dof,ylabel=Error,
- title={$\mu=1$, $\sigma=\frac{1}{2}$}]
-
- \addplot[color=red,mark=*] plot coordinates {
- (7, 8.472e-02)
- (31, 3.044e-02)
- ...
- (18943, 2.873e-05)
- (47103, 8.437e-06)
- };
- \end{loglogaxis}
- \end{tikzpicture}
- \end{lstlisting}
- \caption{An example for the `\texttt{title}' option. Some data points have not been listed, the `\texttt{...}' is not part of the plot.}
- \label{fig:titleexample}
-\end{figure}
+ title=without minor tick identification,
+ log identify minor tick positions=false]
+ \addplot coordinates {
+ (1e-2,10)
+ (3e-2,100)
+ (6e-2,200)
+ };
+ \end{loglogaxis}%
+\end{tikzpicture}%
+\end{codeexample}
+\end{pgfplotskey}
+
+\begin{pgfplotscodekey}{log number format code}
+Provides \TeX-code to generate log plot tick labels. Argument `|#1|' is the (natural) logarithm of the tick position.
+The default implementation invokes |log base 10 number format code| after it changed the log basis to~$10$. It also checks the other log plot options.
+\end{pgfplotscodekey}
+
+
+\begin{pgfplotscodekey}{log base 10 number format code}
+Allows to change the overall appearance of base 10 log plot tick labels. The default is
+\begin{codeexample}[code only]
+log base 10 number format code/.code={%
+ $10^{\pgfmathprintnumber{#1}}$}
+\end{codeexample}
+where the `|log plot exponent style|' allows to change number formatting options.
+\end{pgfplotscodekey}
+
+\begin{pgfplotskey}{log plot exponent style=\marg{key-value-list}}
+Allows to configure the number format of log plot exponents. This style is installed just before `|log base 10 number format code|' will be invoked. Please note that this style will be installed within the default code for `|log number format code|'.
+\begin{codeexample}[]
+\tikzset{samples=15}
+\pgfplotsset{every axis/.append style={
+ width=7cm,
+ xlabel=$x$,
+ ylabel=$f(x)$,
+ extra y ticks={45},
+ legend style={at={(0.03,0.97)},
+ anchor=north west}}}
+
+\begin{tikzpicture}
+\begin{semilogyaxis}[
+ log plot exponent style/.style={
+ /pgf/number format/fixed zerofill,
+ /pgf/number format/precision=1}]
+ \addplot plot[id=gnuplot_exp,domain=-5:10]
+ function{exp(x)};
+ \addplot plot[id=gnuplot_expv,domain=-5:10]
+ function{exp(2*x)};
-\subsubsection{\texttt{[xy]mode=normal$|$log}}
-Allows to choose between normal plots or logplots for each $x,y$-combination. Default is \lstinline!xmode=normal!, \lstinline!ymode=normal!.
+ \legend{$e^x$,$e^{2x}$}
+\end{semilogyaxis}
+\end{tikzpicture}
+\end{codeexample}
+
+\begin{codeexample}[]
+\tikzset{samples=15}
+\pgfplotsset{every axis/.append style={
+ width=7cm,
+ xlabel=$x$,
+ ylabel=$f(x)$,
+ extra y ticks={45},
+ legend style={at={(0.03,0.97)},
+ anchor=north west}}}
+
+\begin{tikzpicture}
+\begin{semilogyaxis}[
+ log plot exponent style/.style={
+ /pgf/number format/fixed,
+ /pgf/number format/use comma,
+ /pgf/number format/precision=2}]
+
+ \addplot plot[id=gnuplot_exp,domain=-5:10]
+ function{exp(x)};
+ \addplot plot[id=gnuplot_expv,domain=-5:10]
+ function{exp(2*x)};
+
+ \legend{$e^x$,$e^{2x}$}
+\end{semilogyaxis}
+\end{tikzpicture}
+\end{codeexample}
+\end{pgfplotskey}
+
+%--------------------------------------------------
+% \subsubsection{Defining Own Display Styles}
+% You can define own display styles, although this may require some insight into \TeX-programming. Here are two examples:
+% \begin{enumerate}
+% \item A new fixed point display style: The following code defines a new style named `\texttt{my own fixed point style}' which uses $1{\cdot}00$ instead of $1.00$.
+% \begin{lstlisting}
+% \def\myfixedpointstyleimpl#1.#2\relax{%
+% #1{\cdot}#2%
+% }%
+% \def\myfixedpointstyle#1{%
+% \pgfutilensuremath{%
+% \ifpgfmathfloatroundhasperiod
+% \expandafter\myfixedpointstyleimpl#1\relax
+% \else
+% #1%
+% \fi
+% }%
+% }
+% \pgfkeys{/my own fixed point style/.code={%
+% \let\pgfmathprintnumber@fixed@style=\myfixedpointstyle}
+% }%
+% \end{codeexample}
+% You only need to overwrite the macro \lstinline!\pgfmathprintnumber@fixed@style!. This macro takes one argument (the result of any numerical computations). The \TeX-boolean \lstinline!\ifpgfmathfloatroundhasperiod! is true if and only if the input number contains a period.
+%
+% \item An example for a new scientific display style:
+% \begin{lstlisting}
+% % #1:
+% % 0 == '0' (the number is +- 0.0),
+% % 1 == '+',
+% % 2 == '-',
+% % 3 == 'not a number'
+% % 4 == '+ infinity'
+% % 5 == '- infinity'
+% % #2: the mantisse
+% % #3: the exponent
+% \def\myscistyle#1#2e#3\relax{%
+% ...
+% }
+% \pgfkeys{/my own sci style/.code={%
+% \let\pgfmathfloatrounddisplaystyle=\myscistyle},
+% }%
+% \end{codeexample}
+% \end{enumerate}
+%--------------------------------------------------
+
+
+
+
+\subsection{Specifying the Plotted Range}
+
+\begin{pgfplotsxykeylist}{\x min=\marg{coord},\x max=\marg{coord}}
+The options |xmin|, |xmax| and |ymin|, |ymax| allow to define the axis limits, i.e. the lower left and the upper right corner. Everything outside of the axis limits will be clipped away.
+
+If one of \lstinline!xmin! or \lstinline!xmax! is missing, the $x$-interval will be determined automatically. The same holds true if one of \lstinline!ymin! or \lstinline!ymax! is missing: in this case, the $y$-interval will be determined automatically.
+
+If $x$-limits have been specified explicitly and $y$-limits are computed automatically, the automatic computation of $y$-limits will only considers points which fall into the specified $x$-range (and vice--versa). This can be disable using |clip limits=false|.
+
+Axis limits can be increased automatically using the |enlargelimits| option.
+\end{pgfplotsxykeylist}
+
+\begin{pgfplotsxykey}{\x mode=\mchoice{normal,linear,log} (initially normal)}
+Allows to choose between linear (=normal) or logarithmic axis scaling or logplots for each $x,y$-combination.
+\end{pgfplotsxykey}
+
+\begin{pgfplotskey}{clip limits=\mchoice{true,false} (initially true)}
+ Configures what to do if some, but not all axis limits have been specified explicitly. In case |clip limits=true|, the automatic limit computation will \emph{only} consider points which do not contradict the explicitly set limits.
+
+ This option has nothing to do with path clipping, it only affects how the axis limits are computed.
+\end{pgfplotskey}
+
+\begin{pgfplotskey}{enlargelimits=\mchoice{true,false,auto,\marg{val}}}
+Enlarges the axis size somewhat if enabled.
-\subsubsection{\texttt{[xy]tick=\{LIST\}}}
-The options \texttt{xtick} and \texttt{ytick} assigns a list of \emph{Positions} where ticks shall be placed. The argument \texttt{LIST} will be used inside of a \lstinline!\foreach \x in {LIST}! statement, and \texttt{LIST} contains one of the following formats:
+You can set |xmin|, |xmax| and |ymin|, |ymax| to the minimum/maximum values of your data and |enlargelimits| will enlarge the canvas such that the axis doesn't touch the plots.
+
+\begin{itemize}
+ \item The value |true| enlarges all axes.
+ \item The value |false| uses tight axis limits as specified by the user (or read from input coordinates).
+ \item The value |auto| will enlarge limits only for axis for which axis limits have been determined automatically.
+ \item All other values like `|enlargelimits=0.1|' will enlarge all axis limits relatively (in this example, 10\% of the axis limits will be added at all sides).
+\end{itemize}
+A small value of |enlargelimits| may avoid problems with large markers near the boundary.
+\end{pgfplotskey}
+
+
+\subsection{Tick and Grid Options}
+
+\begin{pgfplotsxykey}{\x tick=\mchoice{\textbackslash empty,data,\marg{coordinate list}} (initially \marg{})}
+The options |xtick| and |ytick| assigns a list of \emph{Positions} where ticks shall be placed. The argument is either the command |\empty|, |data| or a list of coordinates. The choice |\empty| will result in no tick at all. The special value |data| will produce tick marks at every coordinate of the first plot. Otherwise, tick marks will be placed at every coordinate in \marg{coordinate list}. If this list is empty, \PGFPlots\ will compute a default list.
+
+\marg{coordinate list} will be used inside of a \lstinline!\foreach \x in !\marg{coordinate list} statement. The format is as follows:
\begin{itemize}
- \item \lstinline!{0,1,2,5,8}! (a series of coordinates),
+ \item \lstinline!{0,1,2,5,8,1e1,1.5e1}! (a series of coordinates),
\item \lstinline!{0,...,5}! (the same as \lstinline!{0,1,2,3,4,5}!),
\item \lstinline!{0,2,...,10}! (the same as \lstinline!{0,2,4,6,8,10}!),
\item \lstinline!{9,...,3.5}! (the same as \lstinline!{9, 8, 7, 6, 5, 4}!),
\item See \cite[Section~34]{tikz} for a more detailed definition of the options.
- \item Use `\texttt{xtick=}' to use the default tick placement rules.
- \item Use `\lstinline!xtick=\empty!' to disable any ticks.
\end{itemize}
-For logplots, \PGFPlots\ will apply $\log(\cdot)$ to each element in `\texttt{LIST}'.
+For logplots, \PGFPlots\ will apply $\log(\cdot)$ to each element in `\marg{coordinate list}'.
+\begin{codeexample}[]
+\begin{tikzpicture}
+ \begin{loglogaxis}[xtick={12,9897,1468864}]
+ \plotcoords
+ \end{loglogaxis}
+\end{tikzpicture}
+\end{codeexample}
-\paragraph{Attention:} You can't use the `\texttt{...}' syntax if the elements are too large for \TeX! For example, `\texttt{xtick=1.5e5,2e7,3e8}' will work (because the elements are interpreted as strings, not as numbers), but `\texttt{xtick=1.5,3e5,...,1e10}' will fail because it involves real number arithmetics beyond \TeX's capacities.
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{axis}[
+ xtick=\empty,
+ ytick={-2,0.3,3,3.7,4.5}]
+\addplot+[smooth] coordinates {
+ (-2,3) (-1.5,2) (-0.3,-0.2)
+ (1,1.2) (2,2) (3,5)};
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
+
+\paragraph{Attention:} You can't use the `|...|' syntax if the elements are too large for \TeX! For example, `|xtick=1.5e5,2e7,3e8|' will work (because the elements are interpreted as strings, not as numbers), but `|xtick=1.5,3e5,...,1e10|' will fail because it involves real number arithmetics beyond \TeX's capacities.
\vspace*{0.3cm}
\noindent
-The default choice for tick \emph{positions} in normal plots is to place a tick at each coordinate~$i\cdot h$. The step size~$h$ depends on the axis scaling and the axis limits. It is chosen from a list a ``feasable'' step sizes such that neither too much nor too few ticks will be generated. The default for logplots it to place ticks at each $10^i$ in the axis' range. The default tick positions can be reconfigured with
+The default choice for tick \emph{positions} in normal plots is to place a tick at each coordinate~$i\cdot h$. The step size~$h$ depends on the axis scaling and the axis limits. It is chosen from a list a ``feasable'' step sizes such that neither too much nor too few ticks will be generated. The default for logplots is to place ticks at positions $10^i$ in the axis' range. Which positions depends on the axis scaling and the dimensions of the picture. The default tick positions can be reconfigured with
\begin{itemize}
- \item \lstinline!\renewcommand{\axisdefaulttickwidth}{35}! where the integer argument denotes the maximum space between adjacent ticks in full points. The suffix ``\texttt{pt}'' has to be omitted and fractional numbers are not supported.
- \item \lstinline!\renewcommand{\axisdefaulttryminticks}{4}! configures a loose lower bound on the number of ticks. It should be considered as a suggestion, not a tight limit.
+ \item `\lstinline!max space between ticks=!\marg{number}' where the integer argument denotes the maximum space between adjacent ticks in full points. The suffix ``|pt|'' has to be omitted and fractional numbers are not supported. The default is~\axisdefaulttickwidth.
+ \item `\lstinline!try min ticks=!\marg{number}' configures a loose lower bound on the number of ticks. It should be considered as a suggestion, not a tight limit. The default is~\axisdefaulttryminticks. This number will increase the number of ticks if `|max space between ticks|' produces too few of them.
+ \item `\lstinline!try min ticks log=!\marg{number}' The same for logarithmic axis.
\end{itemize}
+The total number of ticks may still vary because not all fractional numbers in the axis' range are valid tick positions.
\noindent
The tick \emph{appearance} can be (re-)configured with
-\begin{lstlisting}
-\tikzstyle{every tick}=[very thin,gray]
-\tikzstyle{every minor tick}=[]
-\end{lstlisting}
+\begin{codeexample}[code only]
+\pgfplotsset{every tick/.style={very thin,gray}}
+\pgfplotsset{every minor tick/.style={}}
+\end{codeexample}
or
-\begin{lstlisting}
-\tikzstyle{every tick}+=[very thin,gray]
-\tikzstyle{every minor tick}+=[black]
-\end{lstlisting}
-Please prefer the `\texttt{+=}' versions to ensure compatibility with future versions.
+\begin{codeexample}[code only]
+\pgfplotsset{every tick/.append style={very thin,gray}}
+\pgfplotsset{every minor tick/.append style={black}}
+\end{codeexample}
+Please prefer the `|.append style|' versions to ensure compatibility with future versions.
+
+This style commands can be used at any time. The tick line width can be configured with `|major tick length|' and `|minor tick length|'.
+\end{pgfplotsxykey}
+
+\begin{pgfplotskey}{minor tick num=\marg{number}}
+ Sets both, |minor x tick num| and |minor y tick num| to \marg{number}.
+
+ Minor ticks will be disabled if the major ticks don't have the same distance.
+\begin{codeexample}[]
+\begin{tikzpicture}
+ \begin{axis}[minor tick num=1]
+ \addplot (\x,\x^3);
+ \addplot (\x,-20*\x);
+ \end{axis}
+\end{tikzpicture}
+\end{codeexample}
+
+\begin{codeexample}[]
+\begin{tikzpicture}
+ \begin{axis}[minor tick num=3]
+ \addplot (\x,\x^3);
+ \addplot (\x,-20*\x);
+ \end{axis}
+\end{tikzpicture}
+\end{codeexample}
+
+\end{pgfplotskey}
+
+\begin{pgfplotsxykey}{minor \x~tick num=\marg{number} (initially 0)}
+ Sets the number of minor tick lines used for linear $x$~or~$y$ axis separately.
+
+ Minor ticks will be disabled if the major ticks don't have the same distance.
+\begin{codeexample}[]
+\begin{tikzpicture}
+ \begin{axis}[minor x tick num=1,
+ minor y tick num=3]
+ \addplot (\x,\x^3);
+ \addplot (\x,-20*\x);
+ \end{axis}
+\end{tikzpicture}
+\end{codeexample}
-This style commands can be used at any time. The tick line width can be configured with the \lstinline!axis!-options `\texttt{tickwidth}' and `\texttt{subtickwidth}'.
+\end{pgfplotsxykey}
-\subsubsection{\texttt{[xy]tickten=\{LIST\}}}
-The options \texttt{xtickten} and \texttt{ytickten} allow to place ticks at selected positions $10^k, k \in \text{\texttt{LIST}}$. They are only used for logplots. The syntax for `\texttt{LIST}' is the same as above for `\texttt{xtick=LIST}' or `\texttt{ytick=LIST}'.
+\begin{pgfplotsxykey}{extra \x\ ticks=\marg{coordinate list}}
+Adds \emph{additional} tick positions and tick labels to the $x$~or~$y$ axis. `Additional' tick positions do not affect the normal tick placement algorithms, they are drawn after the normal ticks. This has two benefits: first, you can add single, important tick positions without disabling the default tick label generation and second, you can draw tick labels `on top' of others, possibly using different style flags.
-\subsubsection{\texttt{[xy]ticklabels=\{LIST\}}}
-Assigns a \emph{list} of tick \emph{labels} to each tick position. Tick \emph{positions} are assigned using the \texttt{xtick} and \texttt{ytick}-options.
-This is one of two options to assign tick labels directly. The other option is `\texttt{xticklabel=\{COMMAND\}}' (or \texttt{yticklabel=\{COMMAND\}}).
-Option `\texttt{\*ticklabel}' offers higher flexibility while `\texttt{\*ticklabels}' is easier to use.
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{axis}[
+ xmin=0,xmax=3,ymin=0,ymax=15,
+ extra y ticks={2.71828},
+ extra y tick labels={$e$},
+ extra x ticks={2.2},
+ extra x tick style={grid=major,
+ /pgfplots/tick label style={
+ rotate=90,anchor=east}},
+ extra x tick labels={Cut},
+]
+ \addplot (\x,{exp(\x)});
+ \addlegendentry{$e^x$}
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
+\begin{codeexample}[]
+\pgfplotsset{every axis/.append style={width=5.3cm}}
+\begin{tikzpicture}
+\begin{loglogaxis}
+\addplot coordinates
+ {(10,1e-5) (20,5e-6) (40,2.5e-6)};
+\end{loglogaxis}
+\end{tikzpicture}
-The argument \texttt{LIST} has the same format as for ticks, that means
-\begin{lstlisting}
+\begin{tikzpicture}
+\begin{loglogaxis}[
+ extra x ticks={20,40},
+ extra y ticks={5e-6,2.5e-6}]
+\addplot coordinates
+ {(10,1e-5) (20,5e-6) (40,2.5e-6)};
+\end{loglogaxis}
+\end{tikzpicture}
+
+\begin{tikzpicture}
+\begin{loglogaxis}[
+ log identify minor tick positions=false,
+ extra x ticks={20,40},
+ extra y ticks={5e-6,2.5e-6}]
+\addplot coordinates
+ {(10,1e-5) (20,5e-6) (40,2.5e-6)};
+\end{loglogaxis}
+\end{tikzpicture}
+\end{codeexample}
+
+Remarks:
+\begin{itemize}
+\item Use |extra x ticks| to highlight special tick positions. The use of |extra x ticks| does not affect minor tick/grid line generation, so you can place extra ticks at positions $j\cdot 10^i$ in log--plots.
+\item Extra ticks are always typeset as major ticks.
+
+They are affected by |major tick length| or options like |grid=major|.
+\item Use the style |every extra x tick| (|every extra y tick|) to configure the appearance.
+\item You can also use `|extra x tick style=|\marg{...}' which has the same effect.
+\end{itemize}
+\end{pgfplotsxykey}
+
+\begin{pgfplotskeylist}{
+ space between ticks=\marg{number} (initially 35),
+ try min ticks=\marg{number} (initially 4),
+ try min ticks log=\marg{number} (initially 3)}
+see Options |xtick| and |ytick| for a description.
+\end{pgfplotskeylist}
+
+\begin{pgfplotskeylist}{tickwidth=\marg{dimension} (initially 0.15cm),major tick length=\marg{dimension} (initially 0.15cm)}
+ Sets the width of major tick lines.
+\end{pgfplotskeylist}
+
+\begin{pgfplotskeylist}{subtickwidth=\marg{dimension} (initially 0.1cm),minor tick length=\marg{dimension} (initially 0.1cm)}
+ Sets the width of minor tick lines.
+\end{pgfplotskeylist}
+
+\begin{pgfplotsxykey}{\x tickten=\marg{exponent base 10 list}}
+These options allow to place ticks at selected positions $10^k, k \in \text{\marg{exponent base 10 list}}$. They are only used for logplots. The syntax for \marg{exponent base 10 list} is the same as above for |xtick=|\marg{list} or |ytick=|\marg{list}.
+
+Using `|xtickten={1,2,3,4}|' is equivalent to `|xtick={1e1,1e2,1e3,1e4}|', but it requires fewer computational time and it allows to use the short syntax `|xtickten={1,...,4}|'.
+\begin{codeexample}[]
+\begin{tikzpicture}[samples=8]
+\begin{semilogyaxis}[
+ ytickten={-6,-4,...,4},
+ domain=0:10]
+
+% invoke gnuplot to generate coordinates:
+\addplot plot[id=pow1]
+ function {2**(-2*x + 6)};
+\addlegendentry{$2^{-2x + 6}$}
+
+\addplot plot[id=pow2]
+ function {2**(-1.5*x -3)};
+\addlegendentry{$2^{-1.5x -3}$}
+\end{semilogyaxis}
+\end{tikzpicture}
+\end{codeexample}
+\end{pgfplotsxykey}
+
+\begin{pgfplotsxykey}{\x ticklabels=\marg{label list}}
+Assigns a \emph{list} of tick \emph{labels} to each tick position. Tick \emph{positions} are assigned using the |xtick| and |ytick|-options.
+
+This is one of two options to assign tick labels directly. The other option is |xticklabel=|\marg{command} (or |yticklabel=|\marg{command}).
+Option `|xticklabel|' offers higher flexibility while `|xticklabels|' is easier to use.
+
+The argument \marg{label list} has the same format as for ticks, that means
+\begin{codeexample}[code only]
xticklabels={$\frac{1}{2}$,$e$}
-\end{lstlisting}
+\end{codeexample}
Denotes the two--element--list $\{\frac 12, e\}$. The list indices match the indices of the tick positions. If you need commas inside of list elements, use
-\begin{lstlisting}
+\begin{codeexample}[code only]
xticklabels={{0,5}, $e$}.
-\end{lstlisting}
+\end{codeexample}
-Example:
-\begin{lstlisting}
+\begin{codeexample}[]
\begin{tikzpicture}
\begin{axis}[
xtick={-1.5,-1,...,1.5},
@@ -679,76 +2447,33 @@ Example:
$\frac 12$,
$1$}
]
-\addplot[smooth,blue,mark=*] plot coordinates {
- (-1, 1)
- (-0.75, 0.5625)
- (-0.5, 0.25)
- (-0.25, 0.0625)
- (0, 0)
- (0.25, 0.0625)
- (0.5, 0.25)
- (0.75, 0.5625)
- (1, 1)
+\addplot[smooth,blue,mark=*] coordinates {
+ (-1, 1)
+ (-0.75, 0.5625)
+ (-0.5, 0.25)
+ (-0.25, 0.0625)
+ (0, 0)
+ (0.25, 0.0625)
+ (0.5, 0.25)
+ (0.75, 0.5625)
+ (1, 1)
};
\end{axis}
\end{tikzpicture}
-\end{lstlisting}
-yields figure~\ref{fig:ticklistexample}.
-\begin{figure}
- \centering
- \begin{tikzpicture}[baseline]
- \begin{axis}[
- anchor=north east,
- width=6cm,
- xtick={-1.5,-1,...,1.5},
- xticklabels={%
- $-1\frac 12$,
- $-1$,
- $-\frac 12$,
- $0$,
- $\frac 12$,
- $1$}
- ]
- \addplot[smooth,blue,mark=*] plot coordinates {
- (-1, 1)
- (-0.75, 0.5625)
- (-0.5, 0.25)
- (-0.25, 0.0625)
- (0, 0)
- (0.25, 0.0625)
- (0.5, 0.25)
- (0.75, 0.5625)
- (1, 1)
- };
- \end{axis}
- \end{tikzpicture}
- \hspace{10pt}%
- \begin{minipage}[t]{6cm}%
- \vspace{0pt}%
- \begin{lstlisting}
-xtick={-1.5,-1,...,1.5},
-xticklabels={%
- $-1\frac 12$,
- $-1$,
- $-\frac 12$,
- $0$,
- $\frac 12$,
- $1$}
- \end{lstlisting}
- \end{minipage}
- \caption{An example for the \texttt{xticklabels} option.}
- \label{fig:ticklistexample}
-\end{figure}
-
-\subsubsection{\texttt{[xy]ticklabel=\{COMMAND\}}}
-Use \texttt{xticklabel} or \texttt{yticklabel} to change the \LaTeX-command which creates the tick \emph{labels} assigned to each tick position (see options \texttt{xtick} and \texttt{ytick}).
-
-This is one of two options to assign tick labels directly. The other option is `\texttt{xticklabels=\{LIST\}}' (or \texttt{yticklabels=\{LIST\}}). Option `\texttt{\*ticklabel}' offers higher flexibility while `\texttt{\*ticklabels}' is easier to use.
-
-The argument `\texttt{COMMAND}' can be any \LaTeX-text. The following commands are valid inside of \texttt{COMMAND}:
+\end{codeexample}
+\end{pgfplotsxykey}
+
+
+\begin{pgfplotsxykey}{\x ticklabel=\marg{command}}
+Use |xticklabel| or |yticklabel| to change the \TeX-command which creates the tick \emph{labels} assigned to each tick position (see options |xtick| and |ytick|).
+
+This is one of two options to assign tick labels directly. The other option is `|xticklabels=|\marg{label list}' (or |yticklabels=|\marg{label list}). Option `|xticklabel|' offers higher flexibility while `|xticklabels|' is easier to use.
+
+The argument \marg{command} can be any \TeX-text. The following commands are valid inside of \marg{command}:
\begin{description}
\item[\textbackslash tick] The current element of option \lstinline!xtick! (or \lstinline!ytick!).
\item[\textbackslash ticknum] The current tick number, starting with~0 (a counter).
+ \item[\textbackslash nexttick] This command is only valid in case if the |x tick label as interval| option is set (or the corresponding variable for~$y$). It will contain the position of the next tick position, that means the right boundary of the tick interval.
\end{description}
The default argument is
\begin{itemize}
@@ -756,288 +2481,805 @@ The default argument is
\item \lstinline!\axisdefaultticklabellog! for logplots, see below.
\end{itemize}
(the same holds for \lstinline!yticklabel!). The defaults are set to
-\begin{lstlisting}
-\newcommand{\axisdefaultticklabel}[0]{%
- $\prettyprintnumber{\tick}$%
+\begin{codeexample}[code only]
+\def\axisdefaultticklabel{%
+ $\pgfmathprintnumber{\tick}$%
}
-\newcommand{\axisdefaultticklabellog}[0]{{%
- \logtologtentomacro{\tick}{\roundedtick}%
- $10^{\prettyprintnumber{\roundedtick}}$%
-}}
-\end{lstlisting}
+\def\axisdefaultticklabellog{%
+ \pgfkeysgetvalue{/pgfplots/log number format code/.@cmd}\pgfplots@log@label@style
+ \expandafter\pgfplots@log@label@style\tick\pgfeov
+}
+\end{codeexample}
+that means you can configure the appearance of linear axis with the number formatting options described in section~\ref{sec:number:printing} and logarithmic axis with |log number format code|, see below.
+
You can change the appearance of tick labels with
-\begin{lstlisting}
-\tikzstyle{every tick label}+=[font=\tiny]
-\end{lstlisting}
+\begin{codeexample}[code only]
+\pgfplotsset{every tick label/.append style={
+ font=\tiny,
+ /pgf/number format/sci}}
+\end{codeexample}
and/or
-\begin{lstlisting}
-\tikzstyle{every x tick label}+=[above]
-\end{lstlisting}
+\begin{codeexample}[code only]
+\pgfplotsset{every x tick label/.append style={
+ above,
+ /pgf/number format/fixed zerofill}}
+\end{codeexample}
and
-\begin{lstlisting}
-\tikzstyle{every y tick label}+=[font=\bfseries]
-\end{lstlisting}
-
-\subsubsection{\texttt{tickpos=left$|$right$|$both}}
-Allows to choose where to place the small tick lines. Default is ``\texttt{both}''. This setting applies to both $x$~and~$y$ axis where ``left'' and ``right'' mean ``bottom'' and ``top'' for~$y$.
-
-\subsubsection{\texttt{[xy]minorticks=true$|$false}}
-\subsubsection{\texttt{[xy]majorticks=true$|$false}}
-\subsubsection{\texttt{ticks=minor$|$major$|$both$|$none}}
-Enables/disables the small tick lines either for single axis or for all of them. Major ticks are those placed at the tick positions and minor ticks are only used in log plots. Please note that minor ticks are automatically disabled if \texttt{xtick} is not a uniform range\footnote{A uniform list means the difference between all elements is~$1$ for normal plots or, for logplots, $\log(10)$.}. Default is to use minor and major ticks.
-
-You can configure the length of the tick line with `\texttt{minor tick length=DIMEN}' and `\texttt{major tick length=DIMEN}' (where DIMEN is a \TeX-length like 1cm) and its appearance using the following styles:
-\begin{lstlisting}
-\tikzstyle{every tick}+=[color=black] % applies to major and minor ticks,
-\tikzstyle{every minor tick}+=[thin] % applies only to minor ticks,
-\tikzstyle{every major tick}+=[thick] % applies only to major ticks.
-\end{lstlisting}
-There is also the style ``\texttt{every tick}'' which applies to both, major and minor ticks.
-
-\subsubsection{\texttt{major tick length=DIMEN}}
-\subsubsection{\texttt{minor tick length=DIMEN}}
-Allows to configure the length of the small tick lines. Minor ticks are only displayed for logarithmic plots. See option ``\texttt{ticks}'' for appearance styles for ticks.
-
-\subsubsection{\texttt{[xy]minorgrids=true$|$false}}
-\subsubsection{\texttt{[xy]majorgrids=true$|$false}}
-\subsubsection{\texttt{grid=minor$|$major$|$both$|$none}}
-Enables/disables different grid lines. Major grid lines are placed at the normal tick positions (see \texttt{xmajorticks}) while minor grid lines are placed at minor ticks (see \texttt{xminorticks}).
+\begin{codeexample}[code only]
+\pgfplotsset{every y tick label/.append style={font=\bfseries}}
+\end{codeexample}
+Another possibility is to use
+\begin{codeexample}[code only]
+\begin{axis}[y tick label style={above,
+ /pgf/number format/fixed zerofill}
+]
+...
+\end{axis}
+\end{codeexample}
+which has the same effect as the `|every x tick label|' statement above. This is possible for all \PGFPlots-|every|-styles, see section~\ref{sec:styles}.
+\end{pgfplotsxykey}
+
+\begin{pgfplotsxykey}{\x\ tick label as interval=\mchoice{true,false} (initially false)}
+ Allows to treat tick labels as intervals; that means the tick positions denote the interval boundaries. If there are $n$ positions, $(n-1)$ tick labels will be generated, one for each interval.
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{axis}[x tick label as interval]
+ \addplot (\x,3*\x);
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
+ This mode enables the use of |\nexttick| inside of |xticklabel| (or |yticklabel|). A common application might be a bar plot.
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{axis}[
+ ybar interval=0.9,
+ x tick label as interval,
+ xmin=2003,xmax=2030,
+ ymin=0,ymax=140,
+ xticklabel={
+ $\pgfmathprintnumber{\tick}$
+ -- $\pgfmathprintnumber{\nexttick}$},
+ xtick=data,
+ x tick label style={
+ rotate=90,anchor=east,
+ /pgf/number format/1000 sep=}
+]
+
+ \addplot[draw=blue,fill=blue!40!white]
+ coordinates
+ {(2003,40) (2005,100) (2006,15)
+ (2010,90) (2020,120) (2030,3)};
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
+\end{pgfplotsxykey}
+
+\label{sec:scaled:ticks}%
+\begin{pgfplotskey}{scaled ticks=\mchoice{true,false} (initially true)}
+Allows to factor out common exponents in tick labels. For example, if you have tick labels $20000,40000$ and $60000$, you may want to save some space and write $2,4,6$ with a separate factor `$\cdot 10^4$'. Use `|scaled ticks=true|' to enable this feature (default is |true|).
+
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{axis}[scaled ticks=true]
+ \addplot coordinates {
+ (20000,0.0005)
+ (40000,0.0010)
+ (60000,0.0020)
+ };
+\end{axis}
+\end{tikzpicture}%
+\end{codeexample}
+
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{axis}[scaled ticks=false]
+ \addplot coordinates {
+ (20000,0.0005)
+ (40000,0.0010)
+ (60000,0.0020)
+ };
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
+\end{pgfplotskey}
+
+\begin{pgfplotscodekey}{tick scale label code}
+Allows to change the default code for scaled tick labels. The default is
+\begin{codeexample}[code only]
+tick scale label code/.code={$\cdot 10^{#1}$}.
+\end{codeexample}
+\end{pgfplotscodekey}
+
+\begin{pgfplotskey}{scale ticks below=\marg{exponent}}
+Allows fine tuning of the `|scaled ticks|' algorithm: if the axis limits are of magnitude $10^e$ and $e<$\marg{exponent}, the common prefactor~$10^e$ will be factored out. The default is
+\makeatletter
+\pgfplots@scale@ticks@below@exponent
+\makeatother.
+\end{pgfplotskey}
+
+\begin{pgfplotskey}{scale ticks above=\marg{exponent}}
+Allows fine tuning of the '|scaled ticks|' algorithm: if the axis limits are of magnitude $10^e$ and $e>$\marg{exponent}, the common prefactor~$10^e$ will be factored out. The default is
+\makeatletter
+\pgfplots@scale@ticks@above@exponent
+\makeatother.
+\end{pgfplotskey}
+
+
+\begin{pgfplotskey}{tickpos=\mchoice{left,right,both} (initially both)}
+Allows to choose where to place the small tick lines. Default is ``|both|''. This setting applies to both $x$~and~$y$ axis where ``left'' and ``right'' mean ``bottom'' and ``top'' for~$y$.
+\end{pgfplotskey}
+
+\begin{pgfplotskey}{tick align=\mchoice{inside,center,outside} (initially inside)}
+Allows to change the location of the ticks relative to the axis lines.
+Default is ``|inside|''. this setting applies to both $x$~and~$y$ axis.
+\end{pgfplotskey}
+
+
+\begin{pgfplotsxykeylist}{\x minorticks=\mchoice{true,false} (initially true),\x majorticks=\mchoice{true,false} (initially true),ticks=\mchoice{minor,major,both,none} (initially both)}
+Enables/disables the small tick lines either for single axis or for all of them. Major ticks are those placed at the tick positions and minor ticks are between tick positions. Please note that minor ticks are automatically disabled if |xtick| is not a uniform range\footnote{A uniform list means the difference between all elements is the same for linear axis or, for logarithmic axes, $\log(10)$.}.
+
+The key |minor tick length=|\marg{dimen} configures the tick length for minor ticks while the |major| variant applies to major ticks.
+You can configure the appearance using the following styles:
+\begin{codeexample}[code only]
+\pgfplotsset{every tick/.append style={color=black}} % applies to major and minor ticks,
+\pgfplotsset{every minor tick/.append style={thin}} % applies only to minor ticks,
+\pgfplotsset{every major tick/.append style={thick}} % applies only to major ticks.
+\end{codeexample}
+There is also the style ``|every tick|'' which applies to both, major and minor ticks.
+\end{pgfplotsxykeylist}
+
+
+\begin{pgfplotsxykeylist}{\x minorgrids=\mchoice{true,false} (initially true),\x majorgrids=\mchoice{true,false} (initially true),grids=\mchoice{minor,major,both,none} (initially both)}
+Enables/disables different grid lines. Major grid lines are placed at the normal tick positions (see |xmajorticks|) while minor grid lines are placed at minor ticks (see |xminorticks|).
+
+This example employs the coordinates defined on page~\pageref{page:plotcoords:src}.
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{loglogaxis}[
+ xlabel={\textsc{Dof}},
+ ylabel={$L_2$ Error},
+ grid=major
+]
+\plotcoords
+\end{loglogaxis}
+\end{tikzpicture}
+\end{codeexample}
+
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{loglogaxis}[
+ grid=both,
+ tick align=outside,
+ tickpos=left]
+\addplot coordinates
+ {(100,1e-4) (500,1e-5) (1000,3e-6)};
+\addplot coordinates
+ {(100,1e-5) (500,4e-6) (1000,2e-6)};
+\end{loglogaxis}
+\end{tikzpicture}
+\end{codeexample}
Grid lines will be drawn before tick lines are processed, so ticks will be drawn on top of grid lines. You can configure the appearance of grid lines with the styles
-\begin{lstlisting}
-\tikzstyle{every axis grid}=[style=help lines] % applies to major and minor grids,
-\tikzstyle{every minor grid}+=[color=blue] % applies only to minor grid lines,
-\tikzstyle{every major grid}+=[thick] % applies only to major grid lines.
-\end{lstlisting}
-An example for grid lines can be found in section~\ref{sec:gridlines}.
-
-\subsubsection{\texttt{enlargelimits=[true$|$false$|$auto$|$VAL]}}
-Enlarges the axis size somewhat if enabled.
+\begin{codeexample}[code only]
+\pgfplotsset{every axis grid/.style={style=help lines}}
+\pgfplotsset{every minor grid/.append style={color=blue}}
+\pgfplotsset{every major grid/.append style={thick}}
+\end{codeexample}
+\end{pgfplotsxykeylist}
-You can set \texttt{xmin}, \texttt{xmax} and \texttt{ymin}, \texttt{ymax} to the minimum/maximum values of your data and \texttt{enlargelimits} will enlarge the canvas such that the axis doesn't touch the plots.
-\begin{itemize}
- \item The value \texttt{true} enlarges all axes.
- \item The value \texttt{false} uses tight axis limits as specified by the user (or read from input coordinates).
- \item The value \texttt{auto} will enlarge limits only for axis for which axis limits have been determined automatically.
- \item All other values like `\texttt{enlargelimits=0.1}' will enlarge all axis limits relatively (in this example, 10\% of the axis limits will be added at all sides).
- \item If no relative threshold is provided, axis enlargement is done relatively to $x_\text{max}-x_\text{min}$ for normal plots and absolutely for log--plots up to now.
-\end{itemize}
-A small value of \texttt{enlargelimits} may avoid problems with large markers near the boundary.
-\subsubsection{\texttt{legend columns=NUMBER}}
-Allows to configure the maximum number of adjacent legend entries. The default is \texttt{legend columns=1}, so legends are placed vertically below each other. Examples can be found in section~\ref{sec:legendexamples:cols}.
-\subsubsection{\texttt{legend plot pos=left$|$right$|$none}}
-Configures where the small line specifications will be drawn: left of the description, right of the description or not at all. See an example in section~\ref{sec:legendexamples:plotpos}.
-\subsubsection{\texttt{disablelogfilter}}
-Disables numerical evaluation of $\log(x)$ in \LaTeX. If you specify this option, any plot coordinates and tick positions must be provided as $\log(x)$ instead of $x$. This may be faster and -- possibly -- more accurate than the numerical log. The current implementation of $\log(x)$ normalizes~$x$ to $m\cdot 10^e$ and computes
-\[ \log(x) = \log(m) + e \log(10) \]
-where $y = \log(m)$ is computed with a newton method applied to $\exp(y) - m$. The normalization involves string parsing without \TeX-registers. You can savely evaluate $\log(1\cdot 10^{-7})$ although \TeX-registers would produce an underflow for such small numbers.
-The exponential function is implemented in pgf using a truncated Euler McLaurin--series.
+\subsection{Style Options}
+\label{sec:styles}
+\subsubsection{All Supported Styles}
+\PGFPlots\ provides many styles to customize its appearance and behavior. They can be defined and changed in any place where keys are allowed.
-The current implementation of $\log(\cdot)$ is done by the macro \lstinline!\pgfmathlog! which is provided by package \lstinline!pgfmathlog.sty! (contained in the \PGFPlots-bundle).
+\begin{handler}{.style=\marg{key-value-list}}
+ Defines or redefines a style \meta{key}. A style is a normal key which will set all options in \marg{key-value-list} when it is set.
-\subsubsection{\texttt{disabledatascaling}}
-\label{sec:disabledatascaling}%
-Disables internal re-scaling of input data. Normally, every input data like plot coordinates, tick positions or whatever, are parsed without using \TeX's limited number precision. Then, a transformation like
- \[ T(x) = 10^{q-m} \cdot x \]
-is applied to every input coordinate/position where $m$ is ``the order of $x$'' base~$10$. Example: $x=1234 = 1.234\cdot 10^3$ has order~$m=4$ while $x=0.001234 = 1.234\cdot 10^{-3}$ has order $m=-2$. The parameter~$q$ is the order of the axis' width/height.
+ Use |\pgfplotsset{|\meta{key}|/.style={|\meta{key-value-list}|}}| to (re-) define a style \meta{key} in the namespace |/pgfplots|.
+\end{handler}
-The \textbf{effect} is that your plot coordinates can be of \emph{arbitrary precision} like $0.0000001$ and $0.0000004$. For these two coordinates, \PGFPlots\ will use 100pt and 400pt internally. The transformation is quit fast since it relies only on period shifts.
+\begin{handler}{.append style=\marg{key-value-list}}
+ Appends \marg{key-value-list} to an already existing style \meta{key}. This is the preferred method to change the predefined styles: if you only append, you maintain compatibility with future versions.
-The option ``\texttt{disabledatascaling}'' disables this data transformation. That means you are restricted to coordinates which \TeX\ can handle\footnote{Please note that the axis' scaling requires to compute $1/( x_\text{max} - x_{\text{min}} )$. The option \texttt{disabledatascaling} may lead to overflow or underflow in this context, so use it with care! Normally, the data scale transformation avoids this problem.}.
+ Use |\pgfplotsset{|\meta{key}|/.append style={|\meta{key-value-list}|}}| to append \marg{key-value-list} to the style \meta{key}. This will assume the prefix |/pgfplots|.
+\end{handler}
-So far, the data scale transformation applies only to normal axis (logarithmic scales do not need it).
+\begin{command}{\pgfplotsset\marg{key-value-list}}
+ Defines or sets all options in \marg{key-value-list}.
+
+ It is a shortcut for |\pgfqkeys{/pgfplots}|\marg{key-value-list}, that means it inserts the prefix |/pgfplots| to any option which has no full path.
-\subsubsection{\texttt{anchor=NAME}}
-This option shifts the axis horizontally and vertically such that the axis anchor (a point on the axis) is placed at coordinate $(0,0)$\footnote{I haven't understood how to implement an axis as a path command. In the future, the last path coordinate may be used in this place.}.
+ You can define new style keys with |.style| and |.append style|, see above.
+\end{command}
-\begin{itemize}
- \item
-Anchors are useful in conjunction with horizontal or vertical alignment of plots, see the examples in section~\ref{sec:align} and section~\ref{sec:halign}.
-
- \item Anchors are placed on the axis rectangle; any axis labels, titles or legends are completely unaffected.
-
- \item Valid choices for \texttt{NAME} are
- \texttt{north},
- \texttt{north west},
- \texttt{west},
- \texttt{south west},
- \texttt{south},
- \texttt{south east},
- \texttt{east},
- \texttt{north east},
- \texttt{center}.
- They denote the places
+\begin{stylekey}{/pgfplots/every axis}
+ Installed at the beginning of every axis. \Tikz\ options inside of it will be used for anything inside of the axis rectangle and any axis descriptions.
+\end{stylekey}
+
+\begin{stylekey}{/pgfplots/every semilogx axis}
+ Installed at the beginning of every plot with linear $x$~axis and logarithmic $y$~axis, but after `|every axis|'.
+\end{stylekey}
+
+\begin{stylekey}{/pgfplots/every semilogy axis}
+ Likewise, but with interchanged roles for $x$~and~$y$.
+\end{stylekey}
+
+\begin{stylekey}{/pgfplots/every loglog axis}
+ Installed at the beginning of every double--logarithmic plot.
+\end{stylekey}
+
+\begin{stylekey}{/pgfplots/every linear axis}
+ Installed at the beginning of every plot with normal axis scaling.
+\end{stylekey}
+
+\begin{stylekey}{/pgfplots/every axis plot}
+ Used for the \Tikz-drawing command in any `\lstinline!\addplot!' command. May only contain \Tikz\ options.
+\end{stylekey}
+
+\begin{stylekey}{/pgfplots/every axis plot post}
+ This style is very similar to |every axis plot| in that is applies to any drawing command in |\addplot|. However, it is set \emph{after} any user defined styles or |cycle list| options.
+\begin{codeexample}[]
+\begin{tikzpicture}
+\pgfplotsset{
+ every axis plot post/.append style=
+ {mark=none}}
+
+\begin{axis}[
+ legend style={
+ at={(0.03,0.97)},anchor=north west},
+ domain=0:1]
+ \addplot (\x,\x^2);
+ \addplot (\x,{exp(\x)});
+ \legend{$x^2$,$e^x$}
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
+\end{stylekey}
+
+\begin{stylekey}{/pgfplots/every axis plot no \#}
+ Used for every \#th plot where $\#=1,2,3,4,\dotsc$.
+\end{stylekey}
+
+\begin{stylekey}{/pgfplots/every axis label}
+ Used for $x$~and~$y$ axis label. You can use `|at=|\marg{(x,y)} to set its position where $(0,0)$ refers to the lower left corner and $(1,1)$ to the upper right one.
+\end{stylekey}
+
+\begin{stylekey}{/pgfplots/every axis x label}
+ Used for $x$~labels, installed after `|every axis label|'.
+\end{stylekey}
+
+\begin{stylekey}{/pgfplots/every axis y label}
+ Like `|every axis x label|', just for~$y$.
+\end{stylekey}
+
+\begin{stylekey}{/pgfplots/every axis title}
+ Used for any axis title. The |at=|\marg{(x,y)} command works as for `|every axis label|'.
+\end{stylekey}
+
+\begin{stylekey}{/pgfplots/every tick}
+ Installed for each of the small tick lines.
+\end{stylekey}
+
+\begin{stylekey}{/pgfplots/every minor tick}
+ Used for each minor tick line, installed after `|every tick|'.
+\end{stylekey}
+
+\begin{stylekey}{/pgfplots/every major tick}
+ Used for each major tick line, installed after `|every tick|'.
+\end{stylekey}
+
+\begin{stylekey}{/pgfplots/every x tick}
+
+\end{stylekey}
+
+\begin{stylekey}{/pgfplots/every minor x tick}
+
+\end{stylekey}
+
+\begin{stylekey}{/pgfplots/every major x tick}
+
+\end{stylekey}
+
+\begin{stylekey}{/pgfplots/every y tick}
+
+\end{stylekey}
+
+\begin{stylekey}{/pgfplots/every minor y tick}
+
+\end{stylekey}
+
+\begin{stylekey}{/pgfplots/every major y tick}
+
+\end{stylekey}
+
+\begin{stylekey}{/pgfplots/every axis grid}
+ Used for each grid line.
+\end{stylekey}
+
+\begin{stylekey}{/pgfplots/every minor grid}
+ Used for each minor grid line, installed after `|every axis grid|'.
+\end{stylekey}
+
+\begin{stylekey}{/pgfplots/every major grid}
+ Likewise, for major grid lines.
+\end{stylekey}
+
+\begin{stylekey}{/pgfplots/every axis x grid}
+
+\end{stylekey}
+
+\begin{stylekey}{/pgfplots/every minor x grid}
+
+\end{stylekey}
+
+\begin{stylekey}{/pgfplots/every major x grid}
+
+\end{stylekey}
+
+\begin{stylekey}{/pgfplots/every axis y grid}
+
+\end{stylekey}
+
+\begin{stylekey}{/pgfplots/every minor y grid}
+
+\end{stylekey}
+
+\begin{stylekey}{/pgfplots/every major y grid}
+
+\end{stylekey}
+
+\begin{stylekey}{/pgfplots/every tick label}
+ Used for each $x$~and~$y$ tick labels.
+\end{stylekey}
+
+\begin{stylekey}{/pgfplots/every x tick label}
+ Used for each $x$~tick label, installed after `|every tick label|'.
+\end{stylekey}
+
+\begin{stylekey}{/pgfplots/every y tick label}
+ Likewise, for $y$~tick labels.
+\end{stylekey}
+
+\begin{stylekey}{/pgfplots/every x tick scale label}
+ Configures placement and display of the nodes containing the order of magnitude of $x$~tick labels, see~\ref{sec:scaled:ticks} for more information about |scaled ticks|.
+\end{stylekey}
+
+\begin{stylekey}{/pgfplots/every y tick scale label}
+ Likewise, but for $y$-tick scale labels.
+\end{stylekey}
+
+\begin{stylekey}{/pgfplots/every extra x tick}
+ Allows to configure the appearance of `|extra x ticks|'. This style is installed before touching the first extra $x$~tick, so you can set any option which affects tick generation, for example
+\end{stylekey}
+
+\begin{stylekey}{/pgfplots/every error bar}
+ Installed for every error bar.
+\begin{codeexample}[code only]
+\pgfplotsset{every extra x tick/.append style={grid=major}}
+\pgfplotsset{every extra x tick/.append style={major tick length=0pt}}
+\pgfplotsset{every extra x tick/.append style={/pgf/number format=sci subscript}}
+\end{codeexample}
+or something like that.
+\end{stylekey}
+
+\begin{stylekey}{/pgfplots/every extra y tick}
+ Likewise, but for extra $y$-ticks.
+\end{stylekey}
+
+\begin{stylekey}{/pgfplots/every axis legend}
+ Installed for each legend. As for |every axis label|, the legend's position can be placed using coordinates between $0$~and~$1$, see above.
+\end{stylekey}
+
+
+\begin{pgfplotsxykeylist}{%
+ \x\ tick label style=\marg{$\dots$},
+ \x\ tick scale label style=\marg{$\dots$},
+ label style=\marg{$\dots$},
+ \x\ label style=\marg{$\dots$},
+ title style=\marg{$\dots$},
+ tick style=\marg{$\dots$},
+ minor tick style=\marg{$\dots$},
+ major tick style=\marg{$\dots$},
+ \x\ tick style=\marg{$\dots$},
+ minor \x\ tick style=\marg{$\dots$},
+ major \x\ tick style=\marg{$\dots$},
+ grid style=\marg{$\dots$},
+ minor grid style=\marg{$\dots$},
+ major grid style=\marg{$\dots$},
+ \x\ grid style=\marg{$\dots$},
+ minor \x\ grid style=\marg{$\dots$},
+ major \x\ grid style=\marg{$\dots$},
+ extra \x\ tick style=\marg{$\dots$}}
+
+All these options are equivalent to the corresponding `|every ...|'--styles.
+
+For example, |label style=|\marg{...} has the same effect as
+\begin{codeexample}[code only]
+\pgfplotsset{every axis label/.append style={...}}
+\end{codeexample}
+but can be provided as an option (or as part of a user defined style).
+See section~\ref{sec:styles} for more information about the available styles.
+\end{pgfplotsxykeylist}
+
+\subsubsection{Assigning Own Styles}
+\label{sec:styles:own}%
+Use |\pgfplotsset{|\meta{style name}|/.style=|\marg{key-value-list}|}|
+to create own styles. You \emph{can't use} |\tikzstyle|\marg{style name}|=[]|.
+\begin{codeexample}[]
+\pgfplotsset{my personal style/.style=
+ {grid=major,font=\large}}
+
+\begin{tikzpicture}
+\begin{axis}[my personal style]
+ \addplot coordinates {(0,0) (1,1)};
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
+
+\subsection{Alignment Options}
+
+\begin{pgfplotskey}{anchor=\marg{name} (initially south west)}
+\label{option:anchor}%
+This option shifts the axis horizontally and vertically such that the axis anchor (a point on the axis) is placed at coordinate $(0,0)$.
+
+Anchors are useful in conjunction with horizontal or vertical alignment of plots, see the examples below.
+
+There are three sets of anchors available: anchors positioned on the axis rectangle, anchors on the outer bounding box and anchors which have one coordinate on the outer bounding box and the other one at a position of the axis rectangle.
+
+{%
+%\pgfplotsset{every picture/.append style={background rectangle/.style={help lines},show background rectangle}}%
+\pgfplotstableread{pgfplots.testplot}\plottable
+\def\plot{%
+ \begin{axis}[
+ width=5cm,
+ name=test plot,
+ xlabel=$x$,
+ ylabel={$y$},% = \frac 12 \cdot x^3 - 4 x^2 -16 x$},
+ y label style={yshift=-15pt},
+ legend style={at={(1.03,1)},anchor=north west},
+ title=A test plot.
+ ]
+ \addplot table from{\plottable};
+ %\addplot coordinates {(0,0) (1,1)};
+ \addlegendentry{$f(x)$}
+ \addplot[red] plot[id=gnuplot_ppp,domain=-40:40,samples=120] function{10000*sin(x/3)};
+ \addlegendentry{$g(x)$}
+ \end{axis}
+}%
+\def\showit#1#2{%
+ %\node[show them,#2] at (test plot.#1) {(s.#1)};
+ \node[pin=#2:(s.#1),fill=black,circle,scale=0.3] at (test plot.#1) {};
+}%
+In more detail, we have
+\tikzstyle{every pin}=[opacity=0.5,fill=yellow,rectangle,rounded corners=3pt,font=\tiny]
+Anchors on the axis rectangle,
\begin{center}
- \begin{tikzpicture}[x=3cm,y=3cm]
- \draw (0,0) rectangle (1,1);
- \node[above] at (0.5,1) {N};
- \node[above left] at (0,1) {NW};
- \node[left] at (0,0.5) {W};
- \node[below left] at (0,0) {SW};
- \node[below] at (0.5,0) {S};
- \node[below right] at (1,0) {SE};
- \node[right] at (1,0.5) {E};
- \node[above right] at (1,1) {NE};
- \node at (0.5,0.5) {C};
+ \begin{tikzpicture}
+ \plot
+ \showit{north}{90}
+ \showit{north west}{135}
+ \showit{west}{180}
+ \showit{south west}{225}
+ \showit{south}{270}
+ \showit{south east}{305}
+ \showit{east}{0}
+ \showit{north east}{45}
+ \showit{center}{90}
\end{tikzpicture}
\end{center}
- \item The default value is \texttt{anchor=south west}.
+Anchors on the outer bounding box,
+ \begin{center}
+ \begin{tikzpicture}
+ \plot
+ \showit{outer north}{90}
+ \showit{outer north west}{135}
+ \showit{outer west}{180}
+ \showit{outer south west}{225}
+ \showit{outer south}{270}
+ \showit{outer south east}{305}
+ \showit{outer east}{0}
+ \showit{outer north east}{45}
+ \showit{outer center}{90}
+ \end{tikzpicture}
+ \end{center}
+Finally there are anchors which have one coordinate on the outer bounding box, and one on the axis rectangle,
+ \begin{center}
+ \begin{tikzpicture}[show background rectangle]
+ \plot
+ {\pgfplotsset{every pin/.append style={pin distance=1cm}}%
+ \showit{above north}{90}
+ }%
+ \showit{above north east}{90}
+ \showit{right of north east}{0}
+ \showit{right of east}{0}
+ \showit{right of south east}{0}
+ \showit{below south east}{-90}
+ {\pgfplotsset{every pin/.append style={pin distance=1cm}}%
+ \showit{below south}{-90}
+ }%
+ \showit{below south west}{-90}
+ \showit{left of south west}{180}
+ \showit{left of west}{180}
+ \showit{left of north west}{180}
+ \showit{above north west}{90}
+ \end{tikzpicture}
+ \end{center}
+The default value is |anchor=south west|. You can use anchors in conjunction with the \Tikz\ |baseline| option and/or \lstinline!\begin{pgfinterruptboundingbox}! to perform alignment.
+}
-\end{itemize}
+\begin{description}
+\item[Vertical alignment with \texttt{baseline}]
+\label{sec:align}%
+The default axis anchor is |south west|, which means that the picture coordinate $(0,0)$ is the lower left corner of the axis. As a consequence, the \Tikz\ option ``|baseline|'' allows vertical alignment of adjacent plots:
+\begin{codeexample}[]
+\tikzset{domain=-1:1}
+\begin{tikzpicture}
+ \begin{axis}[xlabel=A normal sized $x$ label]
+ \addplot[smooth,blue,mark=*] (\x,\x^2);
+ \end{axis}
+\end{tikzpicture}%
+\hspace{0.15cm}
+\begin{tikzpicture}
+ \begin{axis}[xlabel={$\displaystyle \sum_{i=0}^N n_i $ }]
+ \addplot[smooth,blue,mark=*] (\x,\x^2);
+ \end{axis}
+\end{tikzpicture}
+\end{codeexample}
-\subsubsection{\texttt{width=DIMEN}, \texttt{height=DIMEN}}
-The axis is always scaled such that its dimension is
+\begin{codeexample}[]
+\tikzset{domain=-1:1}
+\begin{tikzpicture}[baseline]
+ \begin{axis}[xlabel=A normal sized $x$ label]
+ \addplot[smooth,blue,mark=*] (\x,\x^2);
+ \end{axis}
+\end{tikzpicture}%
+\hspace{0.15cm}
+\begin{tikzpicture}[baseline]
+ \begin{axis}[xlabel={$\displaystyle \sum_{i=0}^N n_i $ }]
+ \addplot[smooth,blue,mark=*] (\x,\x^2);
+ \end{axis}
+\end{tikzpicture}
+\end{codeexample}
+The |baseline| option configures \Tikz\ to shift position $y=0$ to the text's baseline and the |south west| anchor shifts the axis such the $y=0$ is at the lower left axis corner.
+
+
+\item[Horizontal Alignment]
+\label{sec:halign}%
+If you place multiple |axes| into a single |tikzpicture| and use the `|anchor|'-option, you can control horizontal alignment:
+\begin{codeexample}[]
+\begin{tikzpicture}
+\pgfplotsset{every axis/.append style={
+cycle list={
+ {red,only marks,mark options={
+ fill=red,scale=0.8},mark=*},
+ {black,only marks,mark options={
+ fill=black,scale=0.8},mark=square*}}}}
+
+\begin{axis}[width=4cm,scale only axis,
+ name=main plot]
+\addplot file
+ {plotdata/pgfplots_scatterdata1.dat};
+\addplot file
+ {plotdata/pgfplots_scatterdata2.dat};
+\addplot[blue] coordinates {
+ (0.093947, -0.011481)
+ (0.101957, 0.494273)
+ (0.109967, 1.000027)};
+\end{axis}
+
+% introduce named coordinate:
+\path (main plot.below south west) ++(0,-0.1cm)
+ coordinate (lower plot position);
-{\centering\lstinline!(\axisdefaultwidth,\axisdefaultheight)!.
+\begin{axis}[at={(lower plot position)},
+ anchor=north west,
+ width=4cm,scale only axis,height=0.8cm,
+ ytick=\empty]
+\addplot file
+ {plotdata/pgfplots_scatterdata1_latent.dat};
+\addplot file
+ {plotdata/pgfplots_scatterdata2_latent.dat};
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
+
+
+\item[Bounding box restrictions]
+\label{sec:bounding:box:example}%
+{%
+The following figure is centered and encapsulated with an \lstinline!\fbox! to show its bounding box.
+\setlength{\fboxsep}{0pt}%
+\begin{codeexample}[]
+\fbox{%
+\begin{tikzpicture}%
+ \begin{pgfinterruptboundingbox}
+ \begin{axis}[
+ name=my plot,
+ title=A title,
+ xlabel={$x$},
+ ylabel={$y$},
+ legend style={at={(0.5,0.97)},
+ anchor=north,legend columns=-1},
+ domain=-2:2
+ ]
+ \addplot (\x,\x^2);
+ \addplot (\x,\x^3);
+ \addplot (\x,\x^4);
+ \legend{$x^2$,$x^3$,$x^4$}
+ \end{axis}
+ \end{pgfinterruptboundingbox}
+
+ \useasboundingbox
+ (my plot.below south west)
+ rectangle (my plot.above north east);
+\end{tikzpicture}%
}%
-\noindent
-The options \lstinline!width=DIMEN! and \lstinline!height=DIMEN! override the default scaling. If just one of them is specified, the other one is scaled such that the aspect ratio stays the same.
+\end{codeexample}%
+}%
+The |pgfinterruptboundingbox| environment does not include its content into the image's bounding box, and |\useasboundingbox| sets the pictures bounding box to the following argument.
-\noindent\underline{Remarks:}
-\begin{itemize}
- \item The scaling only affects the width of one unit in $x$-direction or the height for one unit in $y$-direction. Axis labels and tick labels won't be resized, but their size is used to determine the axis scaling.
+\end{description}
+\end{pgfplotskey}
- \item You can use the \Tikz-\lstinline!scale=NUMBER! option,
- \begin{lstlisting}
- \begin{tikzpicture}[scale=2]
- \begin{axis}
- ...
- \end{axis}
- \end{tikzpicture}
- \end{lstlisting}
- to scale the complete picture.
+\begin{pgfplotskey}{at=\marg{coordinate expression}}
+Assigns a position for the complete axis image. This option works similarly to the |at|-option of |\node[at=|\marg{coordinate expression}|]|, see~\cite{tikz}. The common syntax is |at=|\marg{(x,y)}.
+\end{pgfplotskey}
- \item The \Tikz-options \lstinline!x! and \lstinline!y! which set the unit dimensions in $x$ and $y$ directions can be specified as arguments to \lstinline!\begin{axis}[x=1.5cm,y=2cm]! if needed (see below). These settings override the \lstinline!width! and \lstinline!height! options.
- \item You can also force a fixed width/height of the axis (without looking at labels) with
- \begin{lstlisting}
- \begin{tikzpicture}
- \begin{axis}[width=5cm,scale only axis]
- ...
- \end{axis}
- \end{tikzpicture}
- \end{lstlisting}
-
- \item Use
- \begin{lstlisting}
- \renewcommand{\axisdefaultwidth}{3cm}
- \renewcommand{\axisdefaultheight}{6cm}
- \begin{axis}
- ...
- \end{axis}
- \end{lstlisting}
- to replace the default dimension.
-
- \item Please note that up to the writing of this manual, \PGFPlots\ only estimates the size needed for axis- and tick labels. It does not include legends which have been placed outside of the axis\footnote{I.e. the `\texttt{width}' option will not work as expected, but the bounding box is still ok.}. This may be fixed in future versions.
-
- Use the \lstinline!x=DIMEN!, \lstinline!y=DIMEN! and \lstinline!scale only axis! options if the scaling happens to be wrong.
-\end{itemize}
-\subsubsection{\texttt{scale only axis=[true$|$false]}}
-This boolean option allows to apply \texttt{width} and \texttt{height} only to the axis rectangle. If `\texttt{scale only axis}' is enabled, label, tick and legend dimensions won't influence the size of the axis rectangle.
+\subsection{Miscellaneous Options}
-If \texttt{scale only axis=false} (the default), \PGFPlots\ will try to produce the desired width \emph{including} labels, titles and ticks.
+\begin{pgfplotskey}{disablelogfilter=\mchoice{true,false} (initally false, default true)}
+Disables numerical evaluation of $\log(x)$ in \TeX. If you specify this option, any plot coordinates and tick positions must be provided as $\log(x)$ instead of $x$. This may be faster and -- possibly -- more accurate than the numerical log. The current implementation of $\log(x)$ normalizes~$x$ to $m\cdot 10^e$ and computes
+\[ \log(x) = \log(m) + e \log(10) \]
+where $y = \log(m)$ is computed with a newton method applied to $\exp(y) - m$. The normalization involves string parsing without \TeX-registers. You can savely evaluate $\log(1\cdot 10^{-7})$ although \TeX-registers would produce an underflow for such small numbers.
+\end{pgfplotskey}
-\subsubsection{\texttt{x=DIMEN}, \texttt{y=DIMEN}}
-Use
- \begin{lstlisting}
- \begin{tikzpicture}
- \begin{axis}[x=1.5cm,...]
- ...
- \end{axis}
- \end{tikzpicture}
- \end{lstlisting}
- to set the unit size for one $x$-coordinate to 1.5cm. The same is possible for the $y$-coordinate.
+\label{sec:disabledatascaling}%
+\begin{pgfplotskey}{disabledatascaling=\mchoice{true,false} (initally false, default true)}
+Disables internal re-scaling of input data. Normally, every input data like plot coordinates, tick positions or whatever, are parsed without using \TeX's limited number precision. Then, a transformation like
+ \[ T(x) = 10^{q-m} \cdot x - a \]
+is applied to every input coordinate/position where $m$ is ``the order of $x$'' base~$10$. Example: $x=1234 = 1.234\cdot 10^3$ has order~$m=4$ while $x=0.001234 = 1.234\cdot 10^{-3}$ has order $m=-2$. The parameter~$q$ is the order of the axis' width/height.
- Setting $x$ explicitly overrides the \lstinline!width! option. Setting $y$ explicitly overrides the \lstinline!height! option.
+The \textbf{effect} is that your plot coordinates can be of \emph{arbitrary magnitude} like $0.0000001$ and $0.0000004$. For these two coordinates, \PGFPlots\ will use 100pt and 400pt internally. The transformation is quit fast since it relies only on period shifts. This scaling allows precision beyond \TeX's capabilities.
+%\footnote{Please note that while plot coordinates can be of quite large magnitude like $10^12$ or $10^{-9}$, \PGFPlots\ still uses \TeX-registers internally (the math parser of \PGF). If your axis interval is $[1234567.8, 1234567.9]$ or something like that, }.
- Please note that it is \emph{not} possible to specify \lstinline!x! as argument to \lstinline!tikzpicture!. The option
- \begin{lstlisting}
- \begin{tikzpicture}[x=1.5cm]
- \begin{axis}
- ...
- \end{axis}
- \end{tikzpicture}
- \end{lstlisting}
- won't have any effect because an axis is always scale to the final size
-
- {\centering\lstinline!(\axisdefaultwidth,\axisdefaultheight)!
-
- }%
- \noindent
- (see the \lstinline!width! option).
+The option ``|disabledatascaling|'' disables this data transformation. That means you are restricted to coordinates which \TeX\ can handle\footnote{Please note that the axis' scaling requires to compute $1/( x_\text{max} - x_{\text{min}} )$. The option |disabledatascaling| may lead to overflow or underflow in this context, so use it with care! Normally, the data scale transformation avoids this problem.}.
-\subsubsection{\texttt{hide axis=[true$|$false]}}
-Allows to hide the axis. No outer rectangle, no tick marks and no labels will be drawn. Only titles and legends will be processed as usual.
+So far, the data scale transformation applies only to normal axis (logarithmic scales do not need it).
+\end{pgfplotskey}
-Axis scaling and clipping will be done as if you did not use \texttt{hide axis}.
-\subsubsection{\texttt{[xy]filter=CMD}}
-The option \texttt{xfilter} and \texttt{yfilter} allow coordinate filtering. A coordinate filter maps an input coordinate to an output coordinate (or discards it completely).
+\begin{pgfplotsxykey}{\x\ filter/.code=\marg{...}} % FIXME create a xycodekey environment
+The code keys |x filter| and |y filter| allow coordinate filtering. A coordinate filter gets an input coordinate as |#1|, applies some operation and writes the result into the macro |\pgfmathresult|. If |\pgfmathresult| is empty afterwards, the coordinate is discarded.
-Coordinate filters are useful in automatic processing system, where \PGFPlots\ is used to display automatically generated plots. You may not want to filter your coordinates by hand, so these options provide a tool to do this automatically.
+It is allowed if filters do not |\pgfmathresult|. In this case, the unfiltered coordinate will be used.
-Be warned: `\texttt{xfilter}' and `\texttt{yfilter}' are advanced options and may require advanced knowledge about \TeX.
+Coordinate filters are useful in automatic processing system, where \PGFPlots\ is used to display automatically generated plots. You may not want to filter your coordinates by hand, so these options provide a tool to do this automatically.
-They are used as in the following example. The code
-\begin{lstlisting}
-\def\myOwnXfilter#1\to#2{%
- \def#2{0.5}%
-}%
+The following filter adds $0.5$ to every $x$ coordinate.
+\begin{codeexample}[]
\begin{tikzpicture}
-\begin{axis}[xfilter={\myOwnXfilter}]
-\addplot plot coordinates {
+\begin{axis}[x filter/.code=
+ {\pgfmathadd{#1}{0.5}}]
+\addplot coordinates {
(4,0)
(6,1)
};
\end{axis}
\end{tikzpicture}
-\end{lstlisting}
-will result in
-\begin{center}
-{%
-\def\myOwnXfilter#1\to#2{%
- \def#2{0.5}%
-}%
+\end{codeexample}
+Please refer to~\cite[pgfmath manual]{tikz} for details about the math engine of \PGF. Please keep in mind that the math engine works with limited \TeX\ precision.
+
+During evaluation of the filter, the macro |\coordindex| contains the number of the current coordinate (starting with~$0$). Thus, the following filter discards all coordinates after the $5$th and before the $10$th.
+\begin{codeexample}[]
\begin{tikzpicture}
-\begin{axis}[xfilter={\myOwnXfilter}]
-\addplot plot coordinates {
- (4,0)
- (6,1)
-};
+\begin{axis}[
+ samples=20,
+ x filter/.code={
+ \ifnum\coordindex>4\relax
+ \ifnum\coordindex<11\relax
+ \def\pgfmathresult{}
+ \fi
+ \fi
+ }]
+\addplot (\x,\x^2);
\end{axis}
\end{tikzpicture}
-}%
-\end{center}
-because all $x$-coordinates are replaced by~$0.5$.
+\end{codeexample}
+There is also a style key which simplifies selection by index, see below.
-The Argument `\texttt{CMD}' is the name of a \TeX-macro which takes exactly two arguments which are separated by the string `\texttt{\string\to}'. Such a macro is defined as
-\begin{lstlisting}
-\def\exampleFilter#1\to#2{%
- \def#2{#1}%
-}%
-\end{lstlisting}
-This example uses the \TeX-command \lstinline!\def! to define variables and commands. The arguments are used as follows:
-\begin{itemize}
- \item \PGFPlots\ invokes the filter with argument \texttt{\#1} set to the input coordinate. For $x$-filters, this is the $x$-coordinate as it is specified to \lstinline!\addplot!, for $y$-filters it is the $y$-coordinate.
- \item If the corresponding axis is logarithmic, \texttt{\#1} is the \emph{logarithm} of the coordinate as a real number, for example \texttt{\#1=4.2341}.
- \item The arguments to coordinate filters are not transformed. You may need to call coordinate parsing routines.
- \item Argument \texttt{\#2} is the name of a \TeX\ command. The filter should assign this command. The first filter above assigned the constant~$0.5$ and the second filter did not filter anything because it is the identity.
+ \PGFPlots\ invokes the filter with argument |#1| set to the input coordinate. For $x$-filters, this is the $x$-coordinate as it is specified to \lstinline!\addplot!, for $y$-filters it is the $y$-coordinate.
- The replacement text of \texttt{\#2} is expected to be \emph{either} empty \emph{or} a real number (without any length-suffix like `cm' or `pt'). If it is empty, the coordinate won't be drawn at all, it will be thrown away.
-\end{itemize}
+ If the corresponding axis is logarithmic, |#1| is the \emph{logarithm} of the coordinate as a real number, for example |#1=4.2341|.
-\subsection{\texttt{execute at begin plot=COMMANDS}}
-This axis option allows to invoke `\texttt{COMMANDS}' at the beginning of each \lstinline!\addplot! command. The argument `\texttt{COMMANDS}' can be any \LaTeX\ content.
+ The arguments to coordinate filters are not transformed. You may need to call coordinate parsing routines.
+\end{pgfplotsxykey}
-You may use this in conjunction with \texttt{xfilter=...} to reset any counters or whatever. An example would be to change every 4th coordinate.
+\begin{stylekey}{/pgfplots/skip coords between index=\marg{begin}\marg{end}}
+ A style which appends an |x filter| which discards selected coordinates. The selection is done by index where indexing starts with~$0$, see |\coordindex|. Every coordinate with index $\meta{begin} \le i < \meta{end}$ will be skipped.
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{axis}[
+ samples=20,
+ skip coords between index={5}{11},
+ skip coords between index={15}{18}]
-\subsection{\texttt{execute at end plot=COMMANDS}}
-This axis option allows to invoke `\texttt{COMMANDS}' after each \lstinline!\addplot! command. The argument `\texttt{COMMANDS}' can be any \LaTeX\ content.
+\addplot (\x,\x^2);
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
+\end{stylekey}
+
+\begin{pgfplotskey}{filter discard warning=\mchoice{true,false} (initially true)}
+ Issues a notification in your logfile whenever coordinate filters discard coordinates.
+\end{pgfplotskey}
+
+\begin{pgfplotskey}{execute at begin plot=\marg{commands}}
+This axis option allows to invoke \marg{commands} at the beginning of each \lstinline!\addplot! command. The argument \marg{commands} can be any \TeX\ content.
+
+You may use this in conjunction with |xfilter=...| to reset any counters or whatever. An example would be to change every $4$th coordinate.
+\end{pgfplotskey}
+
+\begin{pgfplotskey}{execute at end plot=\marg{commands}}
+This axis option allows to invoke \marg{commands} after each \lstinline!\addplot! command. The argument \marg{commands} can be any \TeX\ content.
+\end{pgfplotskey}
+
+\begin{pgfplotscodekey}{before end axis}
+Allows to insert \marg{commands} just before the axis is ended. This option takes effect inside of the clipped area.
+\begin{codeexample}[]
+\pgfplotsset{every axis/.append style={
+ before end axis/.code={
+ \fill[red] (axis cs:1,10) circle(5pt);
+ \node at (axis cs:-4,10)
+ {\large This text has been inserted
+ using \texttt{before end axis}.};
+ }}}
+\begin{tikzpicture}
+ \begin{axis}
+ \addplot (\x,\x^2);
+ \end{axis}
+\end{tikzpicture}
+\end{codeexample}
+\end{pgfplotscodekey}
+
+\begin{pgfplotscodekey}{after end axis}
+Allows to insert \marg{commands} right after the end of the clipped drawing commands. While |befor end axis| has the same effect as if \marg{commands} had been placed inside of your axis, |after end axis| allows to access axis coordinates without being clipped.
+\begin{codeexample}[]
+\pgfplotsset{every axis/.append style={
+ after end axis/.code={
+ \fill[red] (axis cs:1,10) circle(5pt);
+ \node at (axis cs:-4,10)
+ {\large This text has been inserted using \texttt{after end axis}.};
+ }}}
+\begin{tikzpicture}
+ \begin{axis}
+ \addplot (\x,\x^2);
+ \end{axis}
+\end{tikzpicture}
+\end{codeexample}
+\end{pgfplotscodekey}
+
+\begin{pgfplotscodekey}{extra description}
+Allows to insert \marg{commands} after axis labels, titles and legends have been typeset.
+
+The code can thus use $(0,0)$ to access the lower left corner and $(1,1)$ to access the upper right one. It won't be clipped.
+\begin{codeexample}[]
+\pgfplotsset{every axis/.append style={
+ extra description/.code={
+ \node at (0.5,0.5) {Center!};
+ }}}
+\begin{tikzpicture}
+ \begin{axis}
+ \addplot (\x,\x^2);
+ \end{axis}
+\end{tikzpicture}
+\end{codeexample}
+\end{pgfplotscodekey}
diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.testplot b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.testplot
new file mode 100644
index 00000000000..b293f51b819
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.testplot
@@ -0,0 +1,23 @@
+#Curve 0 of 1, 20 points .5*x**3 - 4*x**2 -16*x**1
+#x y type
+-40.00000 -37760.00000 i
+-35.78947 -27472.03966 i
+-31.57895 -19229.39204 i
+-27.36842 -12808.11780 i
+-23.15789 -7984.27759 i
+-18.94737 -4533.93206 i
+-14.73684 -2233.14186 i
+-10.52632 -857.96763 i
+-6.31579 -184.47004 i
+-2.10526 11.29028 i
+2.10526 -46.74734 i
+6.31579 -134.64353 i
+10.52632 -28.45896 i
+14.73684 495.74574 i
+18.94737 1661.90990 i
+23.15789 3693.97288 i
+27.36842 6815.87403 i
+31.57895 11251.55270 i
+35.78947 17224.94824 i
+40.00000 24960.00000 i
+
diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.testtable b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.testtable
new file mode 100644
index 00000000000..e568f8e1d2d
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.testtable
@@ -0,0 +1,10 @@
+Level Cost Error
+1 7 8.47178381e-02
+2 31 3.04409349e-02
+3 111 1.02214539e-02
+4 351 3.30346265e-03
+5 1023 1.03886535e-03
+6 2815 3.19646457e-04
+7 7423 9.65789766e-05
+8 18943 2.87339125e-05
+9 47103 8.43749881e-06
diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.testtable2.dat b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.testtable2.dat
new file mode 100644
index 00000000000..d9bdc8f72e6
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.testtable2.dat
@@ -0,0 +1,9 @@
+x y errorx errory
+32 32 0 0
+64 64 0 0
+128 128 0 0.3
+1024 1024 0 0.2
+32068 32068 0 0.6
+64000 64000 0 0.6
+128000 128000 0 0.6
+
diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.tex b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.tex
index 2feb78a99bd..b00a5fd7ea6 100644
--- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.tex
+++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.tex
@@ -19,68 +19,50 @@
%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\documentclass[a4paper]{article}
-
-\usepackage{ifpdf}
-\ifpdf
- \usepackage[pdftex]{hyperref}
-\else
- \usepackage[dvipdfm]{hyperref}
-\fi
-% \usepackage{graphicx}
-\usepackage[intlimits]{amsmath}
-\usepackage{amssymb}
-\usepackage{amsfonts}
-
-\newcommand{\R}{\mathbb{R}}
-\newcommand{\N}{\mathbb{N}}
-\newcommand{\Z}{\mathbb{Z}}
-
-\usepackage{listings}
-\usepackage{courier}
-\lstset{%
- basicstyle=\ttfamily,
- language=[LaTeX]tex, % Seems as if \lstset{language=tex} must be invoked BEFORE loading tikz!?
- tabsize=4,
- breaklines=true,
- breakindent=0pt
-}
-
-\ifpdf
- \pdfinfo {
- /Author (Christian Feuersaenger)
- }
-
-\else
- \def\pgfsysdriver{pgfsys-dvipdfm.def}
-\fi
-%\def\pgfsysdriver{pgfsys-pdftex.def}
-\usepackage{pgfplots}
-
-\newcommand{\FIXME}[1]{\textcolor{red}{(FIXME: #1)}}
-
-% fuer endvironment 'sidewaysfigure' bspw
-% \usepackage{rotating}
-
-\newcommand\Tikz{Ti\textit kZ}
-\newcommand\PGF{PGF}
-\newcommand\PGFPlots{Pgfplots}
-
-% Fix overful hboxes automatically:
-\tolerance=2000
-\emergencystretch=10pt
-
-
-\author{%
- Christian Feuers\"anger\footnote{\url{http://wissrech.ins.uni-bonn.de/people/feuersaenger}}\\%
- Institut f\"ur Numerische Simulation\\
- Universit\"at Bonn, Germany}
-\title{Manual for Package \PGFPlots\\{\small Version \pgfplotsversion}}
+\input{pgfplots.preamble.tex}
+
+\def\plotcoords{%
+\addplot coordinates {
+(5,8.312e-02) (17,2.547e-02) (49,7.407e-03)
+(129,2.102e-03) (321,5.874e-04) (769,1.623e-04)
+(1793,4.442e-05) (4097,1.207e-05) (9217,3.261e-06)
+};
+
+\addplot coordinates{
+(7,8.472e-02) (31,3.044e-02) (111,1.022e-02)
+(351,3.303e-03) (1023,1.039e-03) (2815,3.196e-04)
+(7423,9.658e-05) (18943,2.873e-05) (47103,8.437e-06)
+};
+
+\addplot coordinates{
+(9,7.881e-02) (49,3.243e-02) (209,1.232e-02)
+(769,4.454e-03) (2561,1.551e-03) (7937,5.236e-04)
+(23297,1.723e-04) (65537,5.545e-05) (178177,1.751e-05)
+};
+
+\addplot coordinates{
+(11,6.887e-02) (71,3.177e-02) (351,1.341e-02)
+(1471,5.334e-03) (5503,2.027e-03) (18943,7.415e-04)
+(61183,2.628e-04) (187903,9.063e-05) (553983,3.053e-05)
+};
+
+\addplot coordinates{
+(13,5.755e-02) (97,2.925e-02) (545,1.351e-02)
+(2561,5.842e-03) (10625,2.397e-03) (40193,9.414e-04)
+(141569,3.564e-04) (471041,1.308e-04)
+(1496065,4.670e-05)
+};
+}%
+
+\title{%
+ Manual for Package \PGFPlots\\
+ {\small Version \pgfplotsversion}\\
+ {\small\href{http://sourceforge.net/projects/pgfplots}{http://sourceforge.net/projects/pgfplots}}}
\begin{document}
\maketitle
\begin{abstract}%
-\PGFPlots\ draws high--quality function plots in normal or logarithmic scaling with a user-friendly interface. The user supplies axis labels, legend entries and the plot coordinates for one or more plots and \PGFPlots\ applies axis scaling, computes any logarithms and axis ticks and draws the plots. It is based on Till Tantau's package \PGF/\Tikz.
+\PGFPlots\ draws high--quality function plots in normal or logarithmic scaling with a user-friendly interface. The user supplies axis labels, legend entries and the plot coordinates for one or more plots and \PGFPlots\ applies axis scaling, computes any logarithms and axis ticks and draws the plots, supporting line plots, piecewise constant plots, bar plots and area plots. It is based on Till Tantau's package \PGF/\Tikz.
\end{abstract}
\tableofcontents
\section{Introduction}
@@ -89,30 +71,21 @@ This package provides tools to generate plots and labeled axes easily. It draws
It is build completely on \Tikz\ and \PGF\ and may be used as \Tikz\ library.
\section{Upgrade remarks}
-This release provides a lot of improvements which can be found in all detail in ``\texttt{changelog.txt}'' for interested readers. However, some attention is required for upgrades:
-\begin{enumerate}
- \item I have re-implemented legends as \Tikz-matrizes and the default legend styles have been changed accordingly.
+This release provides a lot of improvements which can be found in all detail in \texttt{ChangeLog} for interested readers. However, some attention is useful for upgrades, which does especially affect style options: although |\tikzstyle| is still supported, you should replace any occurance of |\tikzstyle| with |\pgfplotsset{|\meta{style name}|/.style={|\meta{key-value-list}|}}| or the associated |.append style| variant. See section~\ref{sec:styles} for more detail.
- Please \emph{replace}
- \begin{lstlisting}
-\tikzstyle{every axis legend}=[...]
- \end{lstlisting}
- \emph{with}
-\begin{lstlisting}
-\tikzstyle{every axis legend}+=[...].
-\end{lstlisting}
+\section{Acknowledgements}
+I thank God for all hours of enjoyed programming. I thank Pascal Wolkotte, author of package |pgfgraph|, who joined development and contributed code for axis lines and tick alignment. Furthermore, I thank Dr.~Schweitzer for many fruitful discussions and Dr.~Meine for his ideas and suggestions.
- \item Update each \lstinline!\axispath...! command in your files. You will need to use \lstinline!axis cs! as coordinate system to apply any axis transformations. See sections~\ref{sec:axispath} and~\ref{sec:axis:coords} for details.
+Last but not least, I thank Till Tantau and Mark Wibrow for their excellent graphics (and more) package \PGF\ and \Tikz\ which is the base of \PGFPlots.
- \item The manual file name has been renamed.
-\end{enumerate}
\input{pgfplots.install.tex}%
\input{pgfplots.intro.tex}%
\input{pgfplots.reference.tex}%
-\input{pgfplots.examples.tex}%
\input{pgfplots.importexport.tex}%
+\printindex
+
\bibliographystyle{abbrv} %gerapali} %gerabbrv} %gerunsrt.bst} %gerabbrv}% gerplain}
\bibliography{pgfplots.bib}
\end{document}
diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.timeseries.dat b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.timeseries.dat
new file mode 100644
index 00000000000..fee26083851
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.timeseries.dat
@@ -0,0 +1,19 @@
+time 1minload nodes cpus processes memused memcached membuf memtotal
+0 18 100 200 20 15 45 1 150
+1 25 100 200 30 20 45 2 150
+2 25 100 200 30 21 42 2 150
+3 30 100 200 30 20 40 2 150
+4 30 100 200 30 19 40 1 150
+5 80 100 200 30 20 40 3 150
+6 120 100 200 10 3 40 3 150
+7 180 100 200 10 4 41 3 150
+8 183 100 200 10 3 42 2 150
+9 178 100 200 10 2 41 1 150
+10 180 100 200 20 15 45 2 150
+11 184 100 200 20 20 45 3 150
+12 170 100 200 20 22 47 4 150
+13 164 100 200 20 24 50 4 150
+14 150 100 200 20 25 52 3 150
+15 148 100 200 20 26 53 2 150
+16 149 100 200 30 30 54 2 150
+17 154 100 200 30 35 55 1 150
diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplotsexample.pdf b/Master/texmf-dist/doc/latex/pgfplots/pgfplotsexample.pdf
new file mode 100644
index 00000000000..5a40e21c97d
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplotsexample.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/pgfplots/example.tex b/Master/texmf-dist/doc/latex/pgfplots/pgfplotsexample.tex
index f79b996c1a3..d6a2695ad42 100644
--- a/Master/texmf-dist/doc/latex/pgfplots/example.tex
+++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplotsexample.tex
@@ -9,7 +9,7 @@
\centering
\begin{tikzpicture}
\begin{loglogaxis}
- \addplot plot coordinates {
+ \addplot coordinates {
(1,1)
(16,16)
(32,64)
@@ -25,7 +25,7 @@
\begin{loglogaxis}[
xlabel=Cost,
ylabel=Error]
- \addplot plot coordinates {
+ \addplot coordinates {
(5, 8.31160034e-02)
(17, 2.54685628e-02)
(49, 7.40715288e-03)
@@ -47,7 +47,7 @@
(18943, 2.87339125e-05)
(47103, 8.43749881e-06)
};
- \legend{Case 1\\Case 2\\}
+ \legend{Case 1,Case 2}
\end{loglogaxis}
\end{tikzpicture}
\caption{A larger example}
diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplotstable.example1.csv b/Master/texmf-dist/doc/latex/pgfplots/pgfplotstable.example1.csv
new file mode 100644
index 00000000000..7a3ee44f7d6
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplotstable.example1.csv
@@ -0,0 +1,13 @@
+# Convergence results
+# fictional source, generated 2008
+level,dof,error1,error2,info,{grad(log(dof),log(error1))},quot(error1)
+1,9,2.50000000e-01,7.57858283e-01,48,0,0
+2,25,6.25000000e-02,5.00000000e-01,25,-1.35691545e+00,4
+3,81,1.56250000e-02,2.87174589e-01,41,-1.17924958e+00,4
+4,289,3.90625000e-03,1.43587294e-01,8,-1.08987331e+00,4
+5,1089,9.76562500e-04,4.41941738e-02,22,-1.04500712e+00,4
+6,4225,2.44140625e-04,1.69802322e-02,46,-1.02252239e+00,4
+7,16641,6.10351562e-05,8.20091159e-03,40,-1.01126607e+00,4
+8,66049,1.52587891e-05,3.90625000e-03,48,-1.00563427e+00,3.99999999e+00
+9,263169,3.81469727e-06,1.95312500e-03,33,-1.00281745e+00,4.00000001e+00
+10,1050625,9.53674316e-07,9.76562500e-04,2,-1.00140880e+00,4.00000001e+00
diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplotstable.example1.dat b/Master/texmf-dist/doc/latex/pgfplots/pgfplotstable.example1.dat
new file mode 100644
index 00000000000..eec53846198
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplotstable.example1.dat
@@ -0,0 +1,13 @@
+# Convergence results
+# fictional source, generated 2008
+level dof error1 error2 info grad(log(dof),log(error1)) quot(error1)
+1 9 2.50000000e-01 7.57858283e-01 48 0 0
+2 25 6.25000000e-02 5.00000000e-01 25 -1.35691545e+00 4
+3 81 1.56250000e-02 2.87174589e-01 41 -1.17924958e+00 4
+4 289 3.90625000e-03 1.43587294e-01 8 -1.08987331e+00 4
+5 1089 9.76562500e-04 4.41941738e-02 22 -1.04500712e+00 4
+6 4225 2.44140625e-04 1.69802322e-02 46 -1.02252239e+00 4
+7 16641 6.10351562e-05 8.20091159e-03 40 -1.01126607e+00 4
+8 66049 1.52587891e-05 3.90625000e-03 48 -1.00563427e+00 3.99999999e+00
+9 263169 3.81469727e-06 1.95312500e-03 33 -1.00281745e+00 4.00000001e+00
+10 1050625 9.53674316e-07 9.76562500e-04 2 -1.00140880e+00 4.00000001e+00
diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplotstable.example1.out.tex b/Master/texmf-dist/doc/latex/pgfplots/pgfplotstable.example1.out.tex
new file mode 100644
index 00000000000..5dd615f7638
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplotstable.example1.out.tex
@@ -0,0 +1 @@
+\begin {tabular}{cc}dof&error1\\\pgfutilensuremath {9}&\pgfutilensuremath {0.25}\\\pgfutilensuremath {25}&\pgfutilensuremath {6.25\cdot 10^{-2}}\\\pgfutilensuremath {81}&\pgfutilensuremath {1.56\cdot 10^{-2}}\\\pgfutilensuremath {289}&\pgfutilensuremath {3.91\cdot 10^{-3}}\\\pgfutilensuremath {1{,}089}&\pgfutilensuremath {9.77\cdot 10^{-4}}\\\pgfutilensuremath {4{,}225}&\pgfutilensuremath {2.44\cdot 10^{-4}}\\\pgfutilensuremath {16{,}641}&\pgfutilensuremath {6.1\cdot 10^{-5}}\\\pgfutilensuremath {66{,}049}&\pgfutilensuremath {1.53\cdot 10^{-5}}\\\pgfutilensuremath {2.63\cdot 10^{5}}&\pgfutilensuremath {3.81\cdot 10^{-6}}\\\pgfutilensuremath {1.05\cdot 10^{6}}&\pgfutilensuremath {9.54\cdot 10^{-7}}\\\end {tabular}
diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplotstable.idx b/Master/texmf-dist/doc/latex/pgfplots/pgfplotstable.idx
new file mode 100644
index 00000000000..1cf1c458d1d
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplotstable.idx
@@ -0,0 +1,110 @@
+\indexentry{col sep@\texttt {col sep} key|hyperpage}{2}
+\indexentry{pgfplots@\texttt {/pgfplots/}!table@\texttt {table/}!col sep@\texttt {col sep}|hyperpage}{2}
+\indexentry{pgfplotstabletypesetfile@\myprintocmmand {pgfplotstabletypesetfile}|hyperpage}{3}
+\indexentry{pgfplotstableread@\myprintocmmand {pgfplotstableread}|hyperpage}{3}
+\indexentry{pgfplotstabletypeset@\myprintocmmand {pgfplotstabletypeset}|hyperpage}{4}
+\indexentry{columns@\texttt {columns} key|hyperpage}{4}
+\indexentry{pgfplots@\texttt {/pgfplots/}!table@\texttt {table/}!columns@\texttt {columns}|hyperpage}{4}
+\indexentry{column type@\texttt {column type} key|hyperpage}{5}
+\indexentry{pgfplots@\texttt {/pgfplots/}!table@\texttt {table/}!column type@\texttt {column type}|hyperpage}{5}
+\indexentry{assign column name@\texttt {assign column name} key|hyperpage}{5}
+\indexentry{pgfplots@\texttt {/pgfplots/}!table@\texttt {table/}!assign column name@\texttt {assign column name}|hyperpage}{5}
+\indexentry{multicolumn names@\texttt {multicolumn names} key|hyperpage}{5}
+\indexentry{pgfplots@\texttt {/pgfplots/}!table@\texttt {table/}!multicolumn names@\texttt {multicolumn names}|hyperpage}{5}
+\indexentry{dec sep align@\texttt {dec sep align} key|hyperpage}{5}
+\indexentry{pgfplots@\texttt {/pgfplots/}!table@\texttt {table/}!dec sep align@\texttt {dec sep align}|hyperpage}{5}
+\indexentry{dcolumn@\texttt {dcolumn} key|hyperpage}{6}
+\indexentry{pgfplots@\texttt {/pgfplots/}!table@\texttt {table/}!dcolumn@\texttt {dcolumn}|hyperpage}{6}
+\indexentry{every first column@\texttt {every first column} key|hyperpage}{6}
+\indexentry{pgfplots@\texttt {/pgfplots/}!table@\texttt {table/}!every first column@\texttt {every first column}|hyperpage}{6}
+\indexentry{every last column@\texttt {every last column} key|hyperpage}{7}
+\indexentry{pgfplots@\texttt {/pgfplots/}!table@\texttt {table/}!every last column@\texttt {every last column}|hyperpage}{7}
+\indexentry{every even column@\texttt {every even column} key|hyperpage}{7}
+\indexentry{pgfplots@\texttt {/pgfplots/}!table@\texttt {table/}!every even column@\texttt {every even column}|hyperpage}{7}
+\indexentry{every odd column@\texttt {every odd column} key|hyperpage}{7}
+\indexentry{pgfplots@\texttt {/pgfplots/}!table@\texttt {table/}!every odd column@\texttt {every odd column}|hyperpage}{7}
+\indexentry{pgfplotstablecol@\myprintocmmand {pgfplotstablecol}|hyperpage}{7}
+\indexentry{pgfplotstablerow@\myprintocmmand {pgfplotstablerow}|hyperpage}{7}
+\indexentry{before row@\texttt {before row} key|hyperpage}{8}
+\indexentry{pgfplots@\texttt {/pgfplots/}!before row@\texttt {before row}|hyperpage}{8}
+\indexentry{after row@\texttt {after row} key|hyperpage}{8}
+\indexentry{pgfplots@\texttt {/pgfplots/}!after row@\texttt {after row}|hyperpage}{8}
+\indexentry{every even row@\texttt {every even row} key|hyperpage}{8}
+\indexentry{pgfplots@\texttt {/pgfplots/}!every even row@\texttt {every even row}|hyperpage}{8}
+\indexentry{every odd row@\texttt {every odd row} key|hyperpage}{8}
+\indexentry{pgfplots@\texttt {/pgfplots/}!every odd row@\texttt {every odd row}|hyperpage}{8}
+\indexentry{every head row@\texttt {every head row} key|hyperpage}{8}
+\indexentry{pgfplots@\texttt {/pgfplots/}!every head row@\texttt {every head row}|hyperpage}{8}
+\indexentry{every first row@\texttt {every first row} key|hyperpage}{9}
+\indexentry{pgfplots@\texttt {/pgfplots/}!every first row@\texttt {every first row}|hyperpage}{9}
+\indexentry{every last row@\texttt {every last row} key|hyperpage}{9}
+\indexentry{pgfplots@\texttt {/pgfplots/}!every last row@\texttt {every last row}|hyperpage}{9}
+\indexentry{row predicate@\texttt {row predicate} key|hyperpage}{9}
+\indexentry{pgfplots@\texttt {/pgfplots/}!table@\texttt {table/}!row predicate@\texttt {row predicate}|hyperpage}{9}
+\indexentry{skip rows between index@\texttt {skip rows between index} key|hyperpage}{9}
+\indexentry{pgfplots@\texttt {/pgfplots/}!table@\texttt {table/}!skip rows between index@\texttt {skip rows between index}|hyperpage}{9}
+\indexentry{assign cell content@\texttt {assign cell content} key|hyperpage}{10}
+\indexentry{pgfplots@\texttt {/pgfplots/}!table@\texttt {table/}!assign cell content@\texttt {assign cell content}|hyperpage}{10}
+\indexentry{assign cell content as number@\texttt {assign cell content as number} key|hyperpage}{10}
+\indexentry{pgfplots@\texttt {/pgfplots/}!table@\texttt {table/}!assign cell content as number@\texttt {assign cell content as number}|hyperpage}{10}
+\indexentry{string type@\texttt {string type} key|hyperpage}{10}
+\indexentry{pgfplots@\texttt {/pgfplots/}!table@\texttt {table/}!string type@\texttt {string type}|hyperpage}{10}
+\indexentry{every table@\texttt {every table} key|hyperpage}{10}
+\indexentry{pgfplots@\texttt {/pgfplots/}!table@\texttt {table/}!every table@\texttt {every table}|hyperpage}{10}
+\indexentry{font@\texttt {font} key|hyperpage}{10}
+\indexentry{pgfplots@\texttt {/pgfplots/}!table@\texttt {table/}!font@\texttt {font}|hyperpage}{10}
+\indexentry{begin table@\texttt {begin table} key|hyperpage}{10}
+\indexentry{pgfplots@\texttt {/pgfplots/}!table@\texttt {table/}!begin table@\texttt {begin table}|hyperpage}{10}
+\indexentry{end table@\texttt {end table} key|hyperpage}{10}
+\indexentry{pgfplots@\texttt {/pgfplots/}!table@\texttt {table/}!end table@\texttt {end table}|hyperpage}{10}
+\indexentry{outfile@\texttt {outfile} key|hyperpage}{10}
+\indexentry{pgfplots@\texttt {/pgfplots/}!table@\texttt {table/}!outfile@\texttt {outfile}|hyperpage}{10}
+\indexentry{debug@\texttt {debug} key|hyperpage}{11}
+\indexentry{pgfplots@\texttt {/pgfplots/}!table@\texttt {table/}!debug@\texttt {debug}|hyperpage}{11}
+\indexentry{newcolumntype@\myprintocmmand {newcolumntype}|hyperpage}{11}
+\indexentry{pgfmathprintnumber@\myprintocmmand {pgfmathprintnumber}|hyperpage}{12}
+\indexentry{pgfmathprintnumberto@\myprintocmmand {pgfmathprintnumberto}|hyperpage}{12}
+\indexentry{fixed@\texttt {fixed} key|hyperpage}{12}
+\indexentry{pgf@\texttt {/pgf/}!number format@\texttt {number format/}!fixed@\texttt {fixed}|hyperpage}{12}
+\indexentry{fixed zerofill@\texttt {fixed zerofill} key|hyperpage}{12}
+\indexentry{pgf@\texttt {/pgf/}!number format@\texttt {number format/}!fixed zerofill@\texttt {fixed zerofill}|hyperpage}{12}
+\indexentry{sci@\texttt {sci} key|hyperpage}{12}
+\indexentry{pgf@\texttt {/pgf/}!number format@\texttt {number format/}!sci@\texttt {sci}|hyperpage}{12}
+\indexentry{sci zerofill@\texttt {sci zerofill} key|hyperpage}{13}
+\indexentry{pgf@\texttt {/pgf/}!number format@\texttt {number format/}!sci zerofill@\texttt {sci zerofill}|hyperpage}{13}
+\indexentry{zerofill@\texttt {zerofill} key|hyperpage}{13}
+\indexentry{pgf@\texttt {/pgf/}!number format@\texttt {number format/}!zerofill@\texttt {zerofill}|hyperpage}{13}
+\indexentry{std@\texttt {std} key|hyperpage}{13}
+\indexentry{pgf@\texttt {/pgf/}!number format@\texttt {number format/}!std@\texttt {std}|hyperpage}{13}
+\indexentry{int detect@\texttt {int detect} key|hyperpage}{13}
+\indexentry{pgf@\texttt {/pgf/}!number format@\texttt {number format/}!int detect@\texttt {int detect}|hyperpage}{13}
+\indexentry{int trunc@\texttt {int trunc} key|hyperpage}{13}
+\indexentry{pgf@\texttt {/pgf/}!number format@\texttt {number format/}!int trunc@\texttt {int trunc}|hyperpage}{13}
+\indexentry{precision@\texttt {precision} key|hyperpage}{13}
+\indexentry{pgf@\texttt {/pgf/}!number format@\texttt {number format/}!precision@\texttt {precision}|hyperpage}{13}
+\indexentry{set decimal separator@\texttt {set decimal separator} key|hyperpage}{14}
+\indexentry{pgf@\texttt {/pgf/}!number format@\texttt {number format/}!set decimal separator@\texttt {set decimal separator}|hyperpage}{14}
+\indexentry{dec sep@\texttt {dec sep} key|hyperpage}{14}
+\indexentry{pgf@\texttt {/pgf/}!number format@\texttt {number format/}!dec sep@\texttt {dec sep}|hyperpage}{14}
+\indexentry{set thousands separator@\texttt {set thousands separator} key|hyperpage}{14}
+\indexentry{pgf@\texttt {/pgf/}!number format@\texttt {number format/}!set thousands separator@\texttt {set thousands separator}|hyperpage}{14}
+\indexentry{1000 sep@\texttt {1000 sep} key|hyperpage}{14}
+\indexentry{pgf@\texttt {/pgf/}!number format@\texttt {number format/}!1000 sep@\texttt {1000 sep}|hyperpage}{14}
+\indexentry{use period@\texttt {use period} key|hyperpage}{14}
+\indexentry{pgf@\texttt {/pgf/}!number format@\texttt {number format/}!use period@\texttt {use period}|hyperpage}{14}
+\indexentry{use comma@\texttt {use comma} key|hyperpage}{15}
+\indexentry{pgf@\texttt {/pgf/}!number format@\texttt {number format/}!use comma@\texttt {use comma}|hyperpage}{15}
+\indexentry{skip 0.@\texttt {skip 0.} key|hyperpage}{15}
+\indexentry{pgf@\texttt {/pgf/}!number format@\texttt {number format/}!skip 0.@\texttt {skip 0.}|hyperpage}{15}
+\indexentry{sci 10e@\texttt {sci 10e} key|hyperpage}{15}
+\indexentry{pgf@\texttt {/pgf/}!number format@\texttt {number format/}!sci 10e@\texttt {sci 10e}|hyperpage}{15}
+\indexentry{sci 10\textasciicircum e@\texttt {sci 10\textasciicircum e} key|hyperpage}{15}
+\indexentry{pgf@\texttt {/pgf/}!number format@\texttt {number format/}!sci 10\textasciicircum e@\texttt {sci 10\textasciicircum e}|hyperpage}{15}
+\indexentry{sci e@\texttt {sci e} key|hyperpage}{15}
+\indexentry{pgf@\texttt {/pgf/}!number format@\texttt {number format/}!sci e@\texttt {sci e}|hyperpage}{15}
+\indexentry{sci E@\texttt {sci E} key|hyperpage}{15}
+\indexentry{pgf@\texttt {/pgf/}!number format@\texttt {number format/}!sci E@\texttt {sci E}|hyperpage}{15}
+\indexentry{sci subscript@\texttt {sci subscript} key|hyperpage}{15}
+\indexentry{pgf@\texttt {/pgf/}!number format@\texttt {number format/}!sci subscript@\texttt {sci subscript}|hyperpage}{15}
+\indexentry{assume math mode@\texttt {assume math mode} key|hyperpage}{15}
+\indexentry{pgf@\texttt {/pgf/}!number format@\texttt {number format/}!assume math mode@\texttt {assume math mode}|hyperpage}{15}
diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplotstable.pdf b/Master/texmf-dist/doc/latex/pgfplots/pgfplotstable.pdf
new file mode 100644
index 00000000000..d131f2937bd
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplotstable.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplotstable.tex b/Master/texmf-dist/doc/latex/pgfplots/pgfplotstable.tex
new file mode 100644
index 00000000000..e2e3c74fa37
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplotstable.tex
@@ -0,0 +1,862 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Package pgfplots.sty documentation.
+%
+% Copyright 2007/2008 by Christian Feuersaenger.
+%
+% This program is free software: you can redistribute it and/or modify
+% it under the terms of the GNU General Public License as published by
+% the Free Software Foundation, either version 3 of the License, or
+% (at your option) any later version.
+%
+% This program is distributed in the hope that it will be useful,
+% but WITHOUT ANY WARRANTY; without even the implied warranty of
+% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+% GNU General Public License for more details.
+%
+% You should have received a copy of the GNU General Public License
+% along with this program. If not, see <http://www.gnu.org/licenses/>.
+%
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\input{pgfplots.preamble.tex}
+
+\usepackage{array}
+\usepackage{colortbl}
+\usepackage{booktabs}
+
+\pgfqkeys{/codeexample}{%
+ every codeexample/.style={
+ width=4cm,
+ /pgfplots/every axis/.append style={legend style={fill=graphicbackground}}
+ },
+ tabsize=4,
+}
+
+%\pgfplotstableset{debug=true}
+
+\title{%
+ Manual for Package \PGFPlotstable\\
+ {\small Component of \PGFPlots, Version \pgfplotsversion}\\
+ {\small\href{http://sourceforge.net/projects/pgfplots}{http://sourceforge.net/projects/pgfplots}}}
+
+\begin{document}
+\maketitle
+\begin{abstract}%
+ This package reads tab-separated numerical tables from input and generates code for pretty-printed \LaTeX-tabulars. It rounds to the desired precision and prints it in different number formatting styles.
+\end{abstract}
+\tableofcontents
+\section{Introduction}
+\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.
+
+It's input is a text file containing space separated rows, possibly starting with column names. Its output is a \LaTeX\ tabular which contains selected columns of the text table, rounded to the desired precision, printed in the desired number format (fixed point, integer, scientific etc).
+
+It is used with
+\begin{codeexample}[code only]
+\usepackage{pgfplots}
+\end{codeexample}
+\noindent and requires \PGFPlots\ and \PGF\ installed.
+
+\section{Text table input format}
+\PGFPlotstable\ works with plain text file tables in which entries (``cells'') are separated by a separation character. The initial separation character is ``white space'' which means ``at least one space or tab''. Those tables can have a header line which contains column names and most other columns typically contain numerical data.
+
+\noindent The following listing shows |pgfplotstable.example1.dat| and is used often throughout this documentation.
+\begin{codeexample}[code only]
+# Convergence results
+# fictional source, generated 2008
+level dof error1 error2 info grad(log(dof),log(error1)) quot(error1)
+1 9 2.50000000e-01 7.57858283e-01 48 0 0
+2 25 6.25000000e-02 5.00000000e-01 25 -1.35691545e+00 4
+3 81 1.56250000e-02 2.87174589e-01 41 -1.17924958e+00 4
+4 289 3.90625000e-03 1.43587294e-01 8 -1.08987331e+00 4
+5 1089 9.76562500e-04 4.41941738e-02 22 -1.04500712e+00 4
+6 4225 2.44140625e-04 1.69802322e-02 46 -1.02252239e+00 4
+7 16641 6.10351562e-05 8.20091159e-03 40 -1.01126607e+00 4
+8 66049 1.52587891e-05 3.90625000e-03 48 -1.00563427e+00 3.99999999e+00
+9 263169 3.81469727e-06 1.95312500e-03 33 -1.00281745e+00 4.00000001e+00
+10 1050625 9.53674316e-07 9.76562500e-04 2 -1.00140880e+00 4.00000001e+00
+\end{codeexample}
+Lines starting with `|%|' or `|#|' are considered to be comment lines and are ignored.
+
+There is future support for a second header line which must start with `|$flags |' (the space is obligatory, even if the column separator is \emph{not} space!). Currently, such a line is ignored. It may be used to provide number formatting options like precision and number format.
+
+\begin{key}{/pgfplots/table/col sep=\mchoice{space,comma,semicolon,colon,braces} (initially space)}
+ Specifies the column separation character for table reading. The initial choice, |space| means ``at least one white space''. White spaces are tab stops or spaces (newlines always delimit lines).
+
+ For example, the file |pgfplotstable.example1.csv| uses commas as separation characters.
+\begin{codeexample}[code only]
+# Convergence results
+# fictional source generated 2008
+level,dof,error1,error2,info,{grad(log(dof),log(error1))},quot(error1)
+1,9,2.50000000e-01,7.57858283e-01,48,0,0
+2,25,6.25000000e-02,5.00000000e-01,25,-1.35691545e+00,4
+3,81,1.56250000e-02,2.87174589e-01,41,-1.17924958e+00,4
+4,289,3.90625000e-03,1.43587294e-01,8,-1.08987331e+00,4
+5,1089,9.76562500e-04,4.41941738e-02,22,-1.04500712e+00,4
+6,4225,2.44140625e-04,1.69802322e-02,46,-1.02252239e+00,4
+7,16641,6.10351562e-05,8.20091159e-03,40,-1.01126607e+00,4
+8,66049,1.52587891e-05,3.90625000e-03,48,-1.00563427e+00,3.99999999e+00
+9,263169,3.81469727e-06,1.95312500e-03,33,-1.00281745e+00,4.00000001e+00
+10,1050625,9.53674316e-07,9.76562500e-04,2,-1.00140880e+00,4.00000001e+00
+\end{codeexample}
+ Thus, we need to specify |col sep=comma| when we read it.
+\begin{codeexample}[]
+\pgfplotstabletypesetfile[col sep=comma]{pgfplotstable.example1.csv}
+\end{codeexample}
+ You may call |\pgfplotstableset{col sep=comma}| once in your preamble if all your tables uses commas as column separator.
+
+ Please note that if cell entries (for example column names) contain the separation character, you need to enclose the column entry in \emph{braces}: |{grad(log(dof),log(error1)}|. If you want to use unmatched braces, you need to write a backslash before the brace. For example the name `|column{withbrace|' needs to be written as `|column\{withbrace|'.
+
+ Furthermore, if you need empty cells in case |col sep=space|, you have to provide |{}| to delimit such a cell since |col sep=space| uses \emph{at least} one white space (consuming all following ones).
+
+ The value |col sep=braces| is special since it actually uses two separation characters. Every single cell entry is delimited by an opening and a closing brace, \marg{entry}, for this choice. Furthermore, any wite spaces (spaces and tabs) between cell entries are \emph{skipped} in case |braces| until the next \marg{entry} is found.
+\end{key}
+
+\begin{command}{\pgfplotstabletypesetfile[\meta{optional arguments}]\marg{file name}}
+ This command loads the table file \marg{file name} and typesets it using the current configuration of number formats and table options.
+\begin{codeexample}[]
+\pgfplotstabletypesetfile{pgfplotstable.example1.dat}
+\end{codeexample}
+
+ \noindent The configuration can be customized with \meta{optional arguments}.
+
+\begin{codeexample}[]
+\pgfplotstabletypesetfile[sci subscript,sci zerofill]{pgfplotstable.example1.dat}
+\end{codeexample}
+\end{command}
+
+% FIXME : 'header' option!
+\begin{command}{\pgfplotstableread\marg{file name}\marg{\textbackslash macro}}
+ Loads the table \marg{file name} into a \TeX-macro \meta{\textbackslash macro}. This macro can than be used several times.
+\begin{codeexample}[]
+\pgfplotstableread{pgfplotstable.example1.dat}\table
+\pgfplotstabletypeset[columns={dof,error1}]\table
+\hspace{2cm}
+\pgfplotstabletypeset[columns={dof,error2}]\table
+\end{codeexample}
+\end{command}
+
+\begin{command}{\pgfplotstabletypeset[\meta{optional arguments}]\marg{\textbackslash macro}}
+ Works in the same way as |\pgfplotstabletypesetfile|, but it accepts an already loaded table.
+\end{command}
+
+\section{Selecting columns}
+\begin{key}{/pgfplots/table/columns=\marg{comma-separated-list} (initially all available ones)}
+ Selects particular columns the table. If this option is missing, all available columns will be selected.
+
+ Inside of \marg{comma-separated-list}, column names as they appear in the table's header are expected. If there is no header, simply use column names. If there are column names, the special syntax |[index]|\meta{integer} can be used to select columns by index. The first column has index~$0$.
+\begin{codeexample}[]
+\pgfplotstabletypesetfile[columns={dof,level,[index]4}]{pgfplotstable.example1.dat}
+\end{codeexample}
+\end{key}
+
+\begin{pgfplotstablecolumnkey}
+ Sets all options in \marg{key-value-list} exclusively for \marg{column name}.
+
+\begin{codeexample}[]
+\pgfplotstabletypesetfile[
+ columns/error1/.style={
+ column name=$L_2$,
+ sci,sci zerofill,sci subscript,
+ precision=3},
+ columns/error2/.style={
+ column name=$A$,
+ sci,sci zerofill,sci subscript,
+ precision=2},
+ columns/dof/.style={
+ int detect,
+ column name=\textsc{Dof}
+ }
+]
+ {pgfplotstable.example1.dat}
+\end{codeexample}
+ If your column name contains commas `|,|', slashes `|/|' or equal signs `|=|', you need to enclose the column name in braces.
+\begin{codeexample}[width=7cm]
+\pgfplotstabletypesetfile[
+ columns={dof,error1,{grad(log(dof),log(error1))}},
+ columns/error1/.style={
+ column name=$L_2$,
+ sci,sci zerofill,sci subscript,
+ precision=3},
+ columns/dof/.style={
+ int detect,
+ column name=\textsc{Dof}},
+ columns/{grad(log(dof),log(error1))}/.style={
+ column name=slopes $L_2$,
+ fixed,fixed zerofill,
+ precision=1}
+]
+ {pgfplotstable.example1.dat}
+\end{codeexample}
+\end{pgfplotstablecolumnkey}
+
+\begin{key}{/pgfplots/table/column type=\marg{tabular column type} (initially c)}
+ Contains the column type for |tabular|.
+
+ If all column types are empty, the complete argument is skipped (assuming that no |tabular| environment is generated).
+
+ Use |\pgfplotstableset{column type/.add=|\marg{before}\marg{after}|}| to \emph{modify} a value instead of overwriting it. The |.add| key handler works for other options as well.
+\begin{codeexample}[width=7cm]
+\pgfplotstabletypesetfile[
+ columns={dof,error1,info},
+ column type/.add={|}{}% results in '|c'
+]
+ {pgfplotstable.example1.dat}
+\end{codeexample}
+\end{key}
+
+
+\begin{codekey}{/pgfplots/table/assign column name}
+ Allows to \emph{modify} the value of |column name|.
+
+ Argument |#1| is the current column name, that means after
+ evaluation of |column name|. After |assign column| name, a new (possibly modified) value for |column name| should be set.
+
+ That means you can use |column name| to assign the name as such
+ and |assign column name| to generate final \TeX\ code (for example to insert |\multicolumn{1}{c}{#1}|).
+
+ Default is empty which means no change.
+\end{codekey}
+
+\begin{stylekey}{/pgfplots/table/multicolumn names=\marg{tabular column type} (initially c)}
+ A style which typesets each column name using a |\multicolumn{1}|\marg{tabular column type}\marg{the column name} statement.
+\end{stylekey}
+
+\begin{stylekey}{/pgfplots/table/dec sep align=\marg{header column type} (initially c)}
+ A style which employs the current decimal separator as alignment character.
+
+ The first argument determines the alignment of the header column.
+
+ The style |dec sep align| actually introduces two new |tabular| columns, namely |r@{}l|. It introduces multicolumns for column names accordingly and handles numbers which do not have a decimal separator.
+
+\begin{codeexample}[]
+\pgfplotstabletypesetfile[
+ columns={dof,error1,error2,info,{grad(log(dof),log(error1))}},
+ columns/error1/.style={dec sep align},
+ columns/error2/.style={sci,sci subscript,sci zerofill,dec sep align},
+ columns/info/.style={fixed,dec sep align},
+ columns/{grad(log(dof),log(error1))}/.style={fixed,dec sep align}
+]
+ {pgfplotstable.example1.dat}
+\end{codeexample}
+
+ Or with comma as decimal separator:
+\begin{codeexample}[]
+\pgfplotstabletypesetfile[
+ use comma,
+ columns={dof,error1,error2,info,{grad(log(dof),log(error1))}},
+ columns/error1/.style={dec sep align},
+ columns/error2/.style={sci,sci subscript,sci zerofill,dec sep align},
+ columns/info/.style={fixed,dec sep align},
+ columns/{grad(log(dof),log(error1))}/.style={fixed,dec sep align}
+]
+ {pgfplotstable.example1.dat}
+\end{codeexample}
+ It may be advisable to use the |zerofill| variants to force at least one digit after the decimal separator.
+\end{stylekey}
+
+\begin{stylekey}{/pgfplots/table/dcolumn=\marg{tabular column type}\marg{type for column name} (initially \{D\{.\}\{.\}\{2\}\}\{c\})}
+ A style which can be used together with the |dcolumn| package of David Carlisle. It also enables alignment at the decimal separator. However, the decimal separator needs to be exactly one character which is incompatible with `|{,}|' (the default setting for |use comma|).
+\end{stylekey}
+
+\begin{stylekey}{/pgfplots/table/every first column}
+A style which is installed for every first column only.
+\begin{codeexample}[width=7cm]
+\pgfplotstabletypesetfile[
+ every head row/.style={before row=\hline,after row=\hline\hline},
+ every last row/.style={after row=\hline},
+ every first column/.style={
+ column type/.add={|}{}
+ },
+ every last column/.style={
+ column type/.add={}{|}
+ }]
+ {pgfplotstable.example1.dat}
+\end{codeexample}
+\end{stylekey}
+
+\begin{stylekey}{/pgfplots/table/every last column}
+A style which is installed for every last column only.
+\end{stylekey}
+
+\begin{stylekey}{/pgfplots/table/every even column}
+A style which is installed for every column with even column index (starting with~$0$).
+{
+\pgfplotstableset{
+ columns={dof,error1,{grad(log(dof),log(error1))},info},
+ columns/error1/.style={
+ column name=$L_2$,
+ sci,sci zerofill,sci subscript,
+ precision=3},
+ columns/dof/.style={
+ int detect,
+ column name=\textsc{Dof}},
+ columns/{grad(log(dof),log(error1))}/.style={
+ column name=slopes $L_2$,
+ fixed,fixed zerofill,
+ precision=1}}
+
+\begin{codeexample}[code only]
+\pgfplotstableset{
+ columns={dof,error1,{grad(log(dof),log(error1))},info},
+ columns/error1/.style={
+ column name=$L_2$,
+ sci,sci zerofill,sci subscript,
+ precision=3},
+ columns/dof/.style={
+ int detect,
+ column name=\textsc{Dof}},
+ columns/{grad(log(dof),log(error1))}/.style={
+ column name=slopes $L_2$,
+ fixed,fixed zerofill,
+ precision=1}}
+\end{codeexample}
+
+\begin{codeexample}[width=7cm,graphic=white]
+% \usepackage{colortbl}
+\pgfplotstabletypesetfile[
+ every even column/.style={
+ column type/.add={>{\columncolor[gray]{.8}}}{}
+}]
+ {pgfplotstable.example1.dat}
+\end{codeexample}
+}
+\end{stylekey}
+
+\begin{stylekey}{/pgfplots/table/every odd column}
+A style which is installed for every column with odd column index (starting with~$0$).
+\end{stylekey}
+
+\begin{command}{\pgfplotstablecol}
+ During the evaluation of row or column options, this command expands to the current columns' index.
+\end{command}
+\begin{command}{\pgfplotstablerow}
+ During the evaluation of row or column options, this command expands to the current rows' index.
+\end{command}
+
+
+\section{Configuring row appearance}
+\begin{key}{/pgfplots/before row=\marg{\TeX\ code}}
+ Contains \TeX\ code which will be installed before the first cell in a row.
+\end{key}
+
+\begin{key}{/pgfplots/after row=\marg{\TeX\ code}}
+ Contains \TeX\ code which will be installed after the last cell in a row (i.e. after |\\|).
+\end{key}
+
+\begin{stylekey}{/pgfplots/every even row}
+ A style which is installed for each row with even row index. The first row is supposed to be a ``head'' row and does not count. Indexing starts with~$0$.
+{
+\pgfplotstableset{
+ columns={dof,error1,{grad(log(dof),log(error1))}},
+ columns/error1/.style={
+ column name=$L_2$,
+ sci,sci zerofill,sci subscript,
+ precision=3},
+ columns/dof/.style={
+ int detect,
+ column name=\textsc{Dof}},
+ columns/{grad(log(dof),log(error1))}/.style={
+ column name=slopes $L_2$,
+ fixed,fixed zerofill,
+ precision=1}}
+
+\begin{codeexample}[code only]
+\pgfplotstableset{
+ columns={dof,error1,{grad(log(dof),log(error1))}},
+ columns/error1/.style={
+ column name=$L_2$,
+ sci,sci zerofill,sci subscript,
+ precision=3},
+ columns/dof/.style={
+ int detect,
+ column name=\textsc{Dof}},
+ columns/{grad(log(dof),log(error1))}/.style={
+ column name=slopes $L_2$,
+ fixed,fixed zerofill,
+ precision=1}}
+\end{codeexample}
+
+\begin{codeexample}[width=7cm,graphic=white]
+% \usepackage{booktabs}
+\pgfplotstabletypesetfile[
+ every head row/.style={
+ before row=\toprule,after row=\midrule},
+ every last row/.style={
+ after row=\bottomrule},
+]
+ {pgfplotstable.example1.dat}
+\end{codeexample}
+
+\begin{codeexample}[width=7cm,graphic=white]
+% \usepackage{booktabs,colortbl}
+\pgfplotstabletypesetfile[
+ every even row/.style={
+ before row={\rowcolor[gray]{0.9}}},
+ every head row/.style={
+ before row=\toprule,after row=\midrule},
+ every last row/.style={
+ after row=\bottomrule},
+]
+ {pgfplotstable.example1.dat}
+\end{codeexample}
+
+}
+\end{stylekey}
+
+\begin{stylekey}{/pgfplots/every odd row}
+ A style which is installed for each row with odd row index. The first row is supposed to be a ``head'' row and does not count. Indexing starts with~$0$.
+\end{stylekey}
+
+\begin{stylekey}{/pgfplots/every head row}
+ A style which is installed for each first row in the tabular. This can be used to adjust options for column names or to add extra lines/colours.
+\end{stylekey}
+
+\begin{stylekey}{/pgfplots/every first row}
+ A style which is installed for each first \emph{data} row, i.e. after the head row.
+\end{stylekey}
+
+\begin{stylekey}{/pgfplots/every last row}
+ A style which is installed for each last \emph{data} row.
+\end{stylekey}
+
+\begin{codekey}{/pgfplots/table/row predicate}
+ A boolean predicate which allows to select particular rows of the input table. The argument |#1| contains the current row's index (starting with~$0$, not counting comment lines or column names).
+
+ The return value is assigned to the \TeX-if |\ifpgfplotstableuserow|. If the boolean is not changed, the return value is true.
+\begin{codeexample}[width=7cm]
+% \usepackage{booktabs}
+\pgfplotstabletypesetfile[
+ every head row/.style={
+ before row=\toprule,after row=\midrule},
+ every last row/.style={
+ after row=\bottomrule},
+ row predicate/.code={%
+ \ifnum#1>4\relax
+ \ifnum#1<8\relax
+ \pgfplotstableuserowfalse
+ \fi
+ \fi}
+]
+ {pgfplotstable.example1.dat}
+\end{codeexample}
+ Please note that |row predicate| is applied \emph{before} any other option which affects row appearance. For example, the even/odd styles refer to those rows which are selected.
+
+ Furthermore, |row predicate| applies only to the typeset routines, not the read methods. If you want to plot only selected table entries with |\addplot table|, use the \PGFPlots\ coordinate filter options.
+\end{codekey}
+
+\begin{stylekey}{/pgfplots/table/skip rows between index=\marg{begin}\marg{end}}
+ A style which appends an |row predicate| which discards selected rows. The selection is done by index where indexing starts with~$0$. Every row with index $\meta{begin} \le i < \meta{end}$ will be skipped.
+\begin{codeexample}[width=7cm]
+% \usepackage{booktabs}
+\pgfplotstabletypesetfile[
+ every head row/.style={
+ before row=\toprule,after row=\midrule},
+ every last row/.style={
+ after row=\bottomrule},
+ skip rows between index={2}{4},
+ skip rows between index={7}{9}
+]
+ {pgfplotstable.example1.dat}
+\end{codeexample}
+\end{stylekey}
+
+
+\section{Determining cell contents}
+\begin{codekey}{/pgfplots/table/assign cell content}
+ Allows to redefine the algorithm which assigns cell contents. The argument |#1| is the (unformatted) contents of the input table.
+
+ The resulting output needs to be written to |/pgfplots/table/@cell content|.
+\end{codekey}
+
+\begin{key}{/pgfplots/table/assign cell content as number}
+ This here is the default implementation of |assign cell contents|.
+\end{key}
+
+\begin{stylekey}{/pgfplots/table/string type}
+ A style which redefines |assign cell contents| to allow (a) text column(s).
+\end{stylekey}
+
+\section{Customizing and getting the tabular code}
+\begin{stylekey}{/pgfplots/table/every table}
+ A style which is installed at the beginning of every |\pgfplotstabletypeset| command.
+\end{stylekey}
+
+\begin{key}{/pgfplots/table/font=\marg{font name} (initially empty)}
+ Assigns a font used for the complete table.
+\end{key}
+
+\begin{key}{/pgfplots/table/begin table=\marg{code} (initially \textbackslash begin\{tabular\})}
+ Contains \marg{code} which is generated as table start.
+\end{key}
+\begin{key}{/pgfplots/table/end table=\marg{code} (initially \textbackslash end\{tabular\})}
+ Contains \marg{code} which is generated as table end.
+\end{key}
+
+\begin{key}{/pgfplots/table/outfile=\marg{file name} (initially empty)}
+ Writes the generated tabular code into \marg{file name}. It can then be used with |\input|\marg{file name}, \PGFPlotstable\ is no longer required since it contains a completely normal |tabular|.
+\begin{codeexample}[]
+\pgfplotstabletypesetfile[
+ columns={dof,error1},
+ outfile=pgfplotstable.example1.out.tex]
+ {pgfplotstable.example1.dat}
+\end{codeexample}
+and |pgfplotstable.example1.out.tex| contains
+\lstdefineformat{inp}{\\\\=\string\newline}%
+\lstinputlisting[basicstyle=\ttfamily\footnotesize,format=inp]{pgfplotstable.example1.out.tex}
+
+The command |\pgfutilensuremath| checks whether math mode is active and switches to math mode if necessary\footnote{Please note that \lstinline{\\pgfutilensuremath} needs to be replaced by \lstinline{\\ensuremath} if you want to use the output file independent of \PGF. That can be done by \lstinline{\\let\\pgfutilensuremath=\\ensuremath} which enables the \LaTeX-command \lstinline{\\ensuremath}.}.
+\end{key}
+
+\begin{key}{/pgfplots/table/debug=\marg{boolean} (initially false)}
+ If enabled, will write every final tabular code to you log file.
+\end{key}
+
+\section{Defining column types for \texttt{tabular}}
+Besides input of text files, it is sometimes desireable to define column types for existing \texttt{tabular} environments.
+
+\begin{command}{\newcolumntype\marg{letter}[\meta{number of arguments}]$>$\marg{before column}\meta{column type}$<$\marg{after column}}
+The command |\newcolumntype| is part of the |array| package and it defines a new column type \marg{letter} for use in \LaTeX\ tabular environments.
+\begin{codeexample}[code only]
+\usepackage{array}
+\end{codeexample}
+
+\begin{codeexample}[]
+\newcolumntype{d}{>{-}c<{+}}
+\begin{tabular}{dl}
+a & b \\
+c & d \\
+\end{tabular}
+\end{codeexample}
+
+Now, the environment |pgfplotstablecoltype| can be used in \marg{before column} and \marg{after column} to define numerical columns:
+\begin{codeexample}[]
+\newcolumntype{L}[1]
+ {>{\begin{pgfplotstablecoltype}[#1]}r<{\end{pgfplotstablecoltype}}}
+
+\begin{tabular}{L{int detect}L{sci,sci subscript,sci zerofill}}
+9 & 2.50000000e-01\\
+25 & 6.25000000e-02\\
+81 & 1.56250000e-02\\
+289 & 3.90625000e-03\\
+1089 & 9.76562500e-04\\
+4225 & 2.44140625e-04\\
+16641 & 6.10351562e-05\\
+66049 & 1.52587891e-05\\
+263169 & 3.81469727e-06\\
+1050625& 9.53674316e-07\\
+\end{tabular}
+\end{codeexample}
+\noindent The environment |pgfplotstablecoltype| accepts an optional argument which may contain any number formatting options. It is an error if numerical columns contain non-numerical data, so it may be necessary to use |\multicolumn| for column names.
+
+\begin{codeexample}[]
+\newcolumntype{L}[1]
+ {>{\begin{pgfplotstablecoltype}[#1]}r<{\end{pgfplotstablecoltype}}}
+
+\begin{tabular}{L{int detect}L{sci,sci subscript,sci zerofill}}
+\multicolumn{1}{r}{Dof} & \multicolumn{1}{r}{Error}\\
+9 & 2.50000000e-01\\
+25 & 6.25000000e-02\\
+81 & 1.56250000e-02\\
+289 & 3.90625000e-03\\
+1089 & 9.76562500e-04\\
+4225 & 2.44140625e-04\\
+16641 & 6.10351562e-05\\
+66049 & 1.52587891e-05\\
+263169 & 3.81469727e-06\\
+1050625& 9.53674316e-07\\
+\end{tabular}
+\end{codeexample}
+\end{command}
+
+\section{Number formatting options}
+\label{sec:number:printing}%
+The following extract of \cite{tikz} explains how to configure number formats.
+\begin{command}{\pgfmathprintnumber\marg{x}}
+Generates pretty-printed output for the (real) number \marg{x}. The input number \marg{x} is parsed using |\pgfmathfloatparsenumber| which allows arbitrary precision.
+
+Numbers are typeset in math mode using the current set of number printing options, see below. Optional arguments can also be provided using |\pgfmathprintnumber[|\meta{options}|]|\marg{x}.
+\end{command}
+
+\begin{command}{\pgfmathprintnumberto\marg{x}\marg{\textbackslash macro}}
+ Returns the resulting number into \marg{\textbackslash macro} instead of typesetting it directly.
+\end{command}
+
+\begin{key}{/pgf/number format/fixed}
+Configures |\pgfmathprintnumber| to round the number to a fixed number of digits after the period, discarding any trailing zeros.
+
+\begin{codeexample}[]
+\pgfkeys{/pgf/number format/.cd,fixed,precision=2}
+\pgfmathprintnumber{4.568}\hspace{1em}
+\pgfmathprintnumber{5e-04}\hspace{1em}
+\pgfmathprintnumber{0.1}\hspace{1em}
+\pgfmathprintnumber{24415.98123}\hspace{1em}
+\pgfmathprintnumber{123456.12345}
+\end{codeexample}
+
+See section~\ref{sec:number:styles} for how to change the appearance.
+\end{key}
+
+\begin{key}{/pgf/number format/fixed zerofill=\marg{boolean} (default true)}
+Enables or disables zero filling for any number drawn in fixed point format.
+
+\begin{codeexample}[]
+\pgfkeys{/pgf/number format/.cd,fixed,fixed zerofill,precision=2}
+\pgfmathprintnumber{4.568}\hspace{1em}
+\pgfmathprintnumber{5e-04}\hspace{1em}
+\pgfmathprintnumber{0.1}\hspace{1em}
+\pgfmathprintnumber{24415.98123}\hspace{1em}
+\pgfmathprintnumber{123456.12345}
+\end{codeexample}
+This key affects numbers drawn with |fixed| or |std| styles (the latter only if no scientific format is choosen).
+\begin{codeexample}[]
+\pgfkeys{/pgf/number format/.cd,std,fixed zerofill,precision=2}
+\pgfmathprintnumber{4.568}\hspace{1em}
+\pgfmathprintnumber{5e-05}\hspace{1em}
+\pgfmathprintnumber{1}\hspace{1em}
+\pgfmathprintnumber{123456.12345}
+\end{codeexample}
+
+See section~\ref{sec:number:styles} for how to change the appearance.
+\end{key}
+
+\begin{key}{/pgf/number format/sci}
+Configures |\pgfmathprintnumber| to display numbers in scientific format, that means sign, mantisse and exponent (basis~$10$). The mantisse is rounded to the desired precision.
+
+\begin{codeexample}[]
+\pgfkeys{/pgf/number format/.cd,sci,precision=2}
+\pgfmathprintnumber{4.568}\hspace{1em}
+\pgfmathprintnumber{5e-04}\hspace{1em}
+\pgfmathprintnumber{0.1}\hspace{1em}
+\pgfmathprintnumber{24415.98123}\hspace{1em}
+\pgfmathprintnumber{123456.12345}
+\end{codeexample}
+
+See section~\ref{sec:number:styles} for how to change the exponential display style.
+\end{key}
+
+\begin{key}{/pgf/number format/sci zerofill=\marg{boolean} (default true)}
+Enables or disables zero filling for any number drawn in scientific format.
+
+\begin{codeexample}[]
+\pgfkeys{/pgf/number format/.cd,sci,sci zerofill,precision=2}
+\pgfmathprintnumber{4.568}\hspace{1em}
+\pgfmathprintnumber{5e-04}\hspace{1em}
+\pgfmathprintnumber{0.1}\hspace{1em}
+\pgfmathprintnumber{24415.98123}\hspace{1em}
+\pgfmathprintnumber{123456.12345}
+\end{codeexample}
+As with |fixed zerofill|, this option does only affect numbers drawn in |sci| format (or |std| if the scientific format is chosen).
+
+See section~\ref{sec:number:styles} for how to change the exponential display style.
+\end{key}
+
+\begin{stylekey}{/pgf/number format/zerofill=\marg{boolean} (default true)}
+ Sets both, |fixed zerofill| and |sci zerofill| at once.
+\end{stylekey}
+
+\begin{key}{/pgf/number format/std}
+Configures |\pgfmathprintnumber| to a standard algorithm. It chooses either \texttt{fixed} or \texttt{sci}, depending on the order of magnitude. Let $n=s \cdot m \cdot 10^e$ be the input number and $p$ the current precision. If $-p/2 \le e \le 4$, the number is displayed using the fixed format. Otherwise, it is displayed using the scientific format.
+
+\begin{codeexample}[]
+\pgfkeys{/pgf/number format/.cd,std,precision=2}
+\pgfmathprintnumber{4.568}\hspace{1em}
+\pgfmathprintnumber{5e-04}\hspace{1em}
+\pgfmathprintnumber{0.1}\hspace{1em}
+\pgfmathprintnumber{24415.98123}\hspace{1em}
+\pgfmathprintnumber{123456.12345}
+\end{codeexample}
+\end{key}
+
+\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.
+
+\begin{codeexample}[]
+\pgfkeys{/pgf/number format/.cd,int detect,precision=2}
+\pgfmathprintnumber{15}\hspace{1em}
+\pgfmathprintnumber{20}\hspace{1em}
+\pgfmathprintnumber{20.4}\hspace{1em}
+\pgfmathprintnumber{0.01}\hspace{1em}
+\pgfmathprintnumber{0}
+\end{codeexample}
+\end{key}
+
+\begin{key}{/pgf/number format/int trunc}
+Truncates every number to integers (discards any digit after the period).
+
+\begin{codeexample}[]
+\pgfkeys{/pgf/number format/.cd,int trunc}
+\pgfmathprintnumber{4.568}\hspace{1em}
+\pgfmathprintnumber{5e-04}\hspace{1em}
+\pgfmathprintnumber{0.1}\hspace{1em}
+\pgfmathprintnumber{24415.98123}\hspace{1em}
+\pgfmathprintnumber{123456.12345}
+\end{codeexample}
+\end{key}
+
+\begin{key}{/pgf/number format/precision=\marg{number}}
+Sets the desired rounding precision for any display operation. For scientific format, this affects the mantisse.
+\end{key}
+
+\subsection{Changing display styles}%
+\label{sec:number:styles}%
+You can change the way how numbers are displayed. For example, if you use the `\texttt{fixed}' style, the input number is rounded to the desired precision and the current fixed point display style is used to typeset the number. The same is applied to any other format: first, rounding routines are used to get the correct digits, afterwards a display style generates proper \TeX-code.
+
+\begin{key}{/pgf/number format/set decimal separator=\marg{text}}
+Assigns \marg{text} as decimal separator for any fixed point numbers (including the mantisse in sci format).
+\end{key}
+\begin{key}{/pgf/number format/dec sep=\marg{text}}
+ Just another name for |set decimal separator|.
+\end{key}
+
+
+\begin{key}{/pgf/number format/set thousands separator=\marg{text}}
+Assigns \marg{text} as thousands separator for any fixed point numbers (including the mantisse in sci format).
+
+\begin{codeexample}[]
+\pgfkeys{/pgf/number format/.cd,
+ fixed,
+ fixed zerofill,
+ precision=2,
+ set thousands separator={}}
+\pgfmathprintnumber{1234.56}
+\end{codeexample}
+\begin{codeexample}[]
+\pgfkeys{/pgf/number format/.cd,
+ fixed,
+ fixed zerofill,
+ precision=2,
+ set thousands separator={}}
+\pgfmathprintnumber{1234567890}
+\end{codeexample}
+
+\begin{codeexample}[]
+\pgfkeys{/pgf/number format/.cd,
+ fixed,
+ fixed zerofill,
+ precision=2,
+ set thousands separator={.}}
+\pgfmathprintnumber{1234567890}
+\end{codeexample}
+\begin{codeexample}[]
+\pgfkeys{/pgf/number format/.cd,
+ fixed,
+ fixed zerofill,
+ precision=2,
+ set thousands separator={,}}
+\pgfmathprintnumber{1234567890}
+\end{codeexample}
+\begin{codeexample}[]
+\pgfkeys{/pgf/number format/.cd,
+ fixed,
+ fixed zerofill,
+ precision=2,
+ set thousands separator={{{{,}}}}}
+\pgfmathprintnumber{1234567890}
+\end{codeexample}
+The last example employs commas and disables the default comma-spacing.
+\end{key}
+\begin{key}{/pgf/number format/1000 sep=\marg{text}}
+ Just another name for |set thousands separator|.
+\end{key}
+
+
+\begin{key}{/pgf/number format/use period}
+A predefined style which installs periods `\texttt{.}' as decimal separators and commas `\texttt{,}' as thousands separators. This style is the default.
+
+\begin{codeexample}[]
+\pgfkeys{/pgf/number format/.cd,fixed,precision=2,use period}
+\pgfmathprintnumber{12.3456}
+\end{codeexample}
+\begin{codeexample}[]
+\pgfkeys{/pgf/number format/.cd,fixed,precision=2,use period}
+\pgfmathprintnumber{1234.56}
+\end{codeexample}
+\end{key}
+
+\begin{key}{/pgf/number format/use comma}
+A predefined style which installs commas `\texttt{,}' as decimal separators and periods `\texttt{.}' as thousands separators.
+
+\begin{codeexample}[]
+\pgfkeys{/pgf/number format/.cd,fixed,precision=2,use comma}
+\pgfmathprintnumber{12.3456}
+\end{codeexample}
+\begin{codeexample}[]
+\pgfkeys{/pgf/number format/.cd,fixed,precision=2,use comma}
+\pgfmathprintnumber{1234.56}
+\end{codeexample}
+\end{key}
+
+\begin{key}{/pgf/number format/skip 0.=\marg{boolean}}
+ Configures whether numbers like $0.1$ shall be typeset as $.1$ or not.
+\begin{codeexample}[]
+\pgfkeys{/pgf/number format/.cd,
+ fixed,
+ fixed zerofill,precision=2,
+ skip 0.}
+\pgfmathprintnumber{0.56}
+\end{codeexample}
+\begin{codeexample}[]
+\pgfkeys{/pgf/number format/.cd,
+ fixed,
+ fixed zerofill,precision=2,
+ skip 0.=false}
+\pgfmathprintnumber{0.56}
+\end{codeexample}
+\end{key}
+
+\begin{key}{/pgf/number format/sci 10e}
+Uses $m \cdot 10^e$ for any number displayed in scientific format.
+
+\begin{codeexample}[]
+\pgfkeys{/pgf/number format/.cd,sci,sci 10e}
+\pgfmathprintnumber{12.345}
+\end{codeexample}
+\end{key}
+
+\begin{key}{/pgf/number format/sci 10\textasciicircum e}
+The same as `|sci 10e|'.
+\end{key}
+
+\begin{key}{/pgf/number format/sci e}
+Uses the `$1e{+}0$' format which is generated by common scientific tools for any number displayed in scientific format.
+
+\begin{codeexample}[]
+\pgfkeys{/pgf/number format/.cd,sci,sci e}
+\pgfmathprintnumber{12.345}
+\end{codeexample}
+\end{key}
+
+\begin{key}{/pgf/number format/sci E}
+The same with an uppercase `\texttt{E}'.
+
+\begin{codeexample}[]
+\pgfkeys{/pgf/number format/.cd,sci,sci E}
+\pgfmathprintnumber{12.345}
+\end{codeexample}
+\end{key}
+
+\begin{key}{/pgf/number format/sci subscript}
+Typesets the exponent as subscript for any number displayed in scientific format. This style requires very few space.
+
+\begin{codeexample}[]
+\pgfkeys{/pgf/number format/.cd,sci,sci subscript}
+\pgfmathprintnumber{12.345}
+\end{codeexample}
+\end{key}
+
+\begin{key}{/pgf/number format/assume math mode=\marg{boolean} (default true)}
+ Set this to |true| if you don't want any checks for math mode.
+
+ The initial setting installs a |\pgfutilensuremath| around each final number to change to math mode if necessary. Use |assume math mode=true| if you know that math mode is active and you don't want |\pgfutilensuremath|.
+\end{key}
+
+\section{Plain \TeX\ and Con\TeX t support}
+The table code generator is initialised to produce \LaTeX\ |tabular| environments. However, it only relies on~`|&|' being the column separator and~`|\\|' the row terminator. The |column type| feature is more or less specific to |tabular|, but you can disable it completely. Replace |begin table| and |end table| with appropriate \TeX- or Con\TeX t commands to change it. If you have useful default styles (or bug reports), let me know.
+
+\printindex
+
+\bibliographystyle{abbrv} %gerapali} %gerabbrv} %gerunsrt.bst} %gerabbrv}% gerplain}
+\bibliography{pgfplots.bib}
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplotstest.tex b/Master/texmf-dist/doc/latex/pgfplots/pgfplotstest.tex
deleted file mode 100644
index 4fb394c5450..00000000000
--- a/Master/texmf-dist/doc/latex/pgfplots/pgfplotstest.tex
+++ /dev/null
@@ -1,1108 +0,0 @@
-\documentclass[a4paper]{article}
-\usepackage[intlimits]{amsmath}
-\usepackage{amssymb}
-\usepackage{amsfonts}
-\usepackage{ifpdf}
-\usepackage{listings}
-\usepackage{courier}
-\lstset{%
- basicstyle=\ttfamily,
- language=[LaTeX]tex, % Seems as if \lstset{language=tex} must be invoked BEFORE loading tikz!?
- tabsize=4,
- breaklines=true,
- breakindent=0pt
-}
-
-\ifpdf
- \usepackage[pdftex]{hyperref}
- \pdfinfo {
- /Author (Christian Feuersaenger)
- }
-
-\else
- \usepackage[dvipdfm]{hyperref}
- \def\pgfsysdriver{pgfsys-dvipdfm.def}
-\fi
-%\def\pgfsysdriver{pgfsys-pdftex.def}
-\usepackage{pgfplots}
-
-\pgfrealjobname{pgfplotstest}
-
-\def\testsection#1{\message{STARTING TEST SECTION '#1'}\section{#1}}
-\def\testsubsection#1{\message{STARTING TEST SUBSECTION '#1'}\subsection{#1}}
-\def\testsubsubsection#1{\message{STARTING TEST SUBSUBSECTION '#1'}\subsubsection{#1}}
-
-\def\smallplotstest{%
-\addplot[smooth,blue,mark=*] plot coordinates {
- (-1, 1)
- (-0.75, 0.5625)
- (-0.5, 0.25)
- (-0.25, 0.0625)
- (0, 0)
- (0.25, 0.0625)
- (0.5, 0.25)
- (0.75, 0.5625)
- (1, 1)
-};
-}
-
-\def\loglogtestplot{
-\addplot plot coordinates {
- (5, 8.311600e-02)
- (17, 2.546856e-02)
- (49, 7.407153e-03)
- (129, 2.101922e-03)
- (321, 5.873530e-04)
- (769, 1.622699e-04)
- (1793, 4.442489e-05)
- (4097, 1.207141e-05)
- (9217, 3.261015e-06)
-};
-\addlegendentry{$d=2$}
-
-\addplot plot coordinates {
- (7, 8.471784e-02)
- (31, 3.044093e-02)
- (111, 1.022145e-02)
- (351, 3.303463e-03)
- (1023, 1.038865e-03)
- (2815, 3.196465e-04)
- (7423, 9.657898e-05)
- (18943, 2.873391e-05)
- (47103, 8.437499e-06)
-};
-\addlegendentry{$d=3$}
-}%
-
-\def\manylogplots{%
- \addplot plot coordinates {
- (5, 8.312e-02)
- (17, 2.547e-02)
- (49, 7.407e-03)
- (129, 2.102e-03)
- (321, 5.874e-04)
- (769, 1.623e-04)
- (1793, 4.442e-05)
- (4097, 1.207e-05)
- (9217, 3.261e-06)
- };
-
- \addplot plot coordinates {
- (7, 8.472e-02)
- (31, 3.044e-02)
- (111, 1.022e-02)
- (351, 3.303e-03)
- (1023, 1.039e-03)
- (2815, 3.196e-04)
- (7423, 9.658e-05)
- (18943, 2.873e-05)
- (47103, 8.437e-06)
- };
-
- \addplot plot coordinates {
- (9, 7.881e-02)
- (49, 3.243e-02)
- (209, 1.232e-02)
- (769, 4.454e-03)
- (2561, 1.551e-03)
- (7937, 5.236e-04)
- (23297, 1.723e-04)
- (65537, 5.545e-05)
- (178177, 1.751e-05)
- };
-
- \addplot plot coordinates {
- (11, 6.887e-02)
- (71, 3.177e-02)
- (351, 1.341e-02)
- (1471, 5.334e-03)
- (5503, 2.027e-03)
- (18943, 7.415e-04)
- (61183, 2.628e-04)
- (187903, 9.063e-05)
- (553983, 3.053e-05)
- };
-
- \addplot plot coordinates {
- (13, 5.755e-02)
- (97, 2.925e-02)
- (545, 1.351e-02)
- (2561, 5.842e-03)
- (10625, 2.397e-03)
- (40193, 9.414e-04)
- (141569, 3.564e-04)
- (471041, 1.308e-04)
- (1496065, 4.670e-05)
- };
- \legend{$d=2$\\$d=3$\\$d=4$\\$d=5$\\$d=6$\\}
-}%
-
-\author{Christian Feuers\"anger}
-\title{Tests for pgfplots.sty}
-
-\begin{document}
-\maketitle
-
-\testsection{Standard placement normal plot}
-\begin{tikzpicture}
-\begin{axis}
-\smallplotstest
-\end{axis}
-\end{tikzpicture}
-
-\testsection{Scaling tests}
-\testsubsection{width=5cm}
-\begin{tikzpicture}
-\begin{axis}[width=5cm]
-\smallplotstest
-\end{axis}
-\end{tikzpicture}
-
-\testsubsection{width=textwidth}
-\begin{tikzpicture}
-\begin{axis}[width=\textwidth]
-\smallplotstest
-\end{axis}
-\end{tikzpicture}
-
-\testsubsection{width=textwidth, height=textheight}
-\begin{tikzpicture}
-\begin{axis}[height=\textheight,width=\textwidth]
-\smallplotstest
-\end{axis}
-\end{tikzpicture}
-
-\testsubsection{height=3cm}
-\begin{tikzpicture}
-\begin{axis}[height=3cm]
-\smallplotstest
-\end{axis}
-\end{tikzpicture}
-
-\testsubsection{x=3cm}
-\hrule width3cm height1pt
-\vskip10pt
-\begin{tikzpicture}[baseline]
-\begin{axis}[x=3cm]
-\smallplotstest
-\end{axis}
-\end{tikzpicture}
-
-\testsubsection{x=3cm, y=4cm}
-\hrule width3cm height1pt
-\noindent
-\vrule height4cm width1pt
-\hskip10pt
-\begin{tikzpicture}[baseline]
-\begin{axis}[x=3cm,y=4cm]
-\smallplotstest
-\end{axis}
-\end{tikzpicture}
-
-\testsubsection{y=3cm}
-\noindent
-\vrule height3cm width1pt
-\hskip10pt
-\begin{tikzpicture}[baseline]
-\begin{axis}[y=3cm]
-\smallplotstest
-\end{axis}
-\end{tikzpicture}
-
-\testsubsection{Scale vs. Datascale trafo}
-All should have the same size; especially the same height.
-This tests the data scale transformation and rounding inaccuracies during the computation of $x$~and~$y$ unit vectors,
-\[ x = \frac{W}{T(\bar x) - T(\underline x)}. \]
-The larger $x$, the higher the scaling accuracy. Large $x$ means small $T(\bar x) - T(\underline x)$ (relative to width~$W$). But this implies low accuracy for the input data! And nobody wants inaccurate plots.
-
-The datascale transformation~$T$ is set up such that $O(W) = O(x)$, but I am not sure if I need to adjust some parameters. Some parameters lead to inaccurate~$x$ and~$y$ vectors, such that axis sizes are \emph{not} the same although $W$~and~$H$ (width and height) are the same.
-
-\noindent
-{\tikzstyle{every picture}+=[baseline]
-\axispreset{width=3cm,scale only axis,ytick=\empty}%
-\listnew\autoplotspeclist{blue\\}%
-\begin{tikzpicture}%
-\begin{axis}
-\addplot plot coordinates {
- (0.000000, 0.113142)
- (0.062500, 0.114457)
- (0.125000, 0.115773)
- (0.187500, 0.117088)
- (0.250000, 0.118404)
- (0.312500, 0.119719)
- (0.375000, 0.121035)
- (0.437500, 0.122350)
- (0.500000, 0.123666)
- (0.562500, 0.124981)
- (0.625000, 0.126297)
- (0.687500, 0.127612)
- (0.750000, 0.128928)
- (0.812500, 0.130243)
- (0.875000, 0.131559)
- (0.937500, 0.132874)
- (1.000000, 0.134190)
-};
-\end{axis}
-\end{tikzpicture}%
-\begin{tikzpicture}%
-\begin{axis}
-\addplot plot coordinates {
- (0.000000, 0.192392)
- (0.020408, 0.551660)
- (0.040816, 0.816371)
- (0.061224, 0.957528)
- (0.081633, 0.936301)
- (0.102041, 0.784097)
- (0.122449, 0.539922)
- (0.142857, 0.257432)
- (0.163265, -0.039651)
- (0.183673, -0.313379)
- (0.204082, -0.533386)
- (0.224490, -0.712582)
- (0.244898, -0.856655)
- (0.265306, -0.932880)
- (0.285714, -0.953862)
- (0.306122, -0.957749)
- (0.326531, -0.890993)
- (0.346939, -0.774152)
- (0.367347, -0.602360)
- (0.387755, -0.396801)
- (0.408163, -0.132261)
- (0.428571, 0.161664)
- (0.448980, 0.460018)
- (0.469388, 0.720198)
- (0.489796, 0.880398)
- (0.510204, 0.967384)
- (0.530612, 0.900632)
- (0.551020, 0.729232)
- (0.571429, 0.460479)
- (0.591837, 0.155311)
- (0.612245, -0.153827)
- (0.632653, -0.430787)
- (0.653061, -0.653561)
- (0.673469, -0.819444)
- (0.693878, -0.931060)
- (0.714286, -0.984394)
- (0.734694, -0.981970)
- (0.755102, -0.940272)
- (0.775510, -0.825804)
- (0.795918, -0.664138)
- (0.816327, -0.465371)
- (0.836735, -0.219185)
- (0.857143, 0.070697)
- (0.877551, 0.377456)
- (0.897959, 0.658660)
- (0.918367, 0.853564)
- (0.938776, 0.925472)
- (0.959184, 0.868936)
- (0.979592, 0.629528)
- (1.000000, 0.228732)
-};
-\end{axis}
-\end{tikzpicture}%
-\begin{tikzpicture}%
-\begin{axis}
-
-\addplot plot coordinates {
- (0.000000, 0.112104)
- (0.062500, 0.098029)
- (0.125000, 0.083954)
- (0.187500, 0.069879)
- (0.250000, 0.055804)
- (0.312500, 0.041729)
- (0.375000, 0.027654)
- (0.437500, 0.013579)
- (0.500000, -0.000496)
- (0.562500, -0.014571)
- (0.625000, -0.028646)
- (0.687500, -0.042722)
- (0.750000, -0.056797)
- (0.812500, -0.070872)
- (0.875000, -0.084947)
- (0.937500, -0.099022)
- (1.000000, -0.113097)
-};
-\end{axis}
-\end{tikzpicture}%
-\begin{tikzpicture}%
-\begin{axis}
-\addplot plot coordinates {
- (0.000000, -0.963159)
- (0.020408, -0.781664)
- (0.040816, -0.488585)
- (0.061224, -0.137738)
- (0.081633, 0.234861)
- (0.102041, 0.556489)
- (0.122449, 0.791942)
- (0.142857, 0.941856)
- (0.163265, 0.977486)
- (0.183673, 0.930499)
- (0.204082, 0.809581)
- (0.224490, 0.653308)
- (0.244898, 0.474588)
- (0.265306, 0.268631)
- (0.285714, 0.048692)
- (0.306122, -0.168568)
- (0.326531, -0.380963)
- (0.346939, -0.577633)
- (0.367347, -0.751043)
- (0.387755, -0.893755)
- (0.408163, -0.960465)
- (0.428571, -0.932380)
- (0.448980, -0.841830)
- (0.469388, -0.650880)
- (0.489796, -0.346509)
- (0.510204, -0.007265)
- (0.530612, 0.329744)
- (0.551020, 0.621489)
- (0.571429, 0.826905)
- (0.591837, 0.947602)
- (0.612245, 0.956706)
- (0.632653, 0.872426)
- (0.653061, 0.724325)
- (0.673469, 0.528915)
- (0.693878, 0.310032)
- (0.714286, 0.081807)
- (0.734694, -0.143046)
- (0.755102, -0.363063)
- (0.775510, -0.559141)
- (0.795918, -0.733031)
- (0.816327, -0.880063)
- (0.836735, -0.959350)
- (0.857143, -0.968957)
- (0.877551, -0.885145)
- (0.897959, -0.702171)
- (0.918367, -0.410704)
- (0.938776, -0.035900)
- (0.959184, 0.359062)
- (0.979592, 0.719407)
- (1.000000, 0.940563)
-};
-\end{axis}
-\end{tikzpicture}%
-}
-
-
-\testsection{Tick placement}
-\begin{tikzpicture}
-\begin{axis}[
- xtick={-1.5,-1,...,1.5},
- ytick={-0.5,0,...,1.5},
- ]
-\smallplotstest
-\end{axis}
-\end{tikzpicture}
-
-\begin{tikzpicture}
-\begin{axis}[
- xmin=0,xmax=1,
- xtick={-1.5,-1.25,...,1.5}]
-\smallplotstest
-\end{axis}
-\end{tikzpicture}
-
-\testsubsection{Enlargelimits tests}
-\testsubsubsection{enlargelimits=false, x limits provided}
-\begin{tikzpicture}
-\begin{axis}[%
- enlargelimits=false,
- xmin=0,xmax=1,
- xtick={-1.5,-1.25,...,1.5}]
-\smallplotstest
-\end{axis}
-\end{tikzpicture}
-
-\testsubsubsection{enlargelimits=false, no limits provided}
-\begin{tikzpicture}
-\begin{axis}[enlargelimits=false]
-\smallplotstest
-\end{axis}
-\end{tikzpicture}
-
-\testsubsubsection{enlargelimits=true, all limits provided $[-1,1]\times [-1,1]$}
-\begin{tikzpicture}
-\begin{axis}[enlargelimits=true,xmin=-1,xmax=1,ymin=-1,ymax=1]
-\smallplotstest
-\end{axis}
-\end{tikzpicture}
-
-\testsubsubsection{enlargelimits=0.5}
-\begin{tikzpicture}
-\begin{axis}[enlargelimits=0.5]
-\smallplotstest
-\end{axis}
-\end{tikzpicture}
-
-\testsubsection{modified labels}
-
-{
-\tikzstyle{every axis label}=[]
-\tikzstyle{every axis x label}=[
- at={(0.5,1)},
- above,
- yshift=+15pt]
-\tikzstyle{every axis y label}=[
- at={(1,0.5)},
- xshift=+35pt,
- rotate=90]
-
-\begin{tikzpicture}
-\begin{axis}[
- xlabel=$x$ axis,
- ylabel=$y$ axis,
- xmin=0,xmax=1,
- tickpos=right,
- xtick={-1.5,-1.25,...,1.5}]
-\smallplotstest
-\end{axis}
-\end{tikzpicture}
-}
-
-\begin{tikzpicture}
-\begin{axis}[
- xlabel=$x$ axis,
- ylabel=$y$ axis,
- xmin=0,xmax=1,
- tickpos=both,
- xtick={-1.5,-1.25,...,1.5}]
-\smallplotstest
-\end{axis}
-\end{tikzpicture}
-
-\testsection{Tick label assigment tests}
-\testsubsection{Using xticklabel and xtick}
-\begin{tikzpicture}
-\begin{axis}[
- xtick={-1.5,-1,...,1.5},
- xticklabel={%
- \ifcase\ticknum $-1\frac12$%
- \or $-1$%
- \or $-\frac12$%
- \or $0$%
- \or $\frac12$%
- \or $1$%
- \or $1\frac12$%
- \else $\tick$%
- \fi
- }
-]
-\smallplotstest
-\end{axis}
-\end{tikzpicture}
-
-\testsubsection{Using xticklabels}%
-\begin{tikzpicture}
-\begin{axis}[
- xtick={-1.5,-1,...,1.5},
- xticklabels={%
- $-1\frac 12$,
- $-1$,
- $-\frac 12$,
- $0$,
- $\frac 12$,
- $1$}
-]
-\smallplotstest
-\end{axis}
-\end{tikzpicture}
-
-\testsubsection{With commas}
-\begin{tikzpicture}
-\begin{axis}[
- xtick={-1.5,-1,...,1.5},
- xticklabels={%
- {-1,5},
- -1,
- {-0,5},
- 0,
- {0,5},
- 1,
- {1,5}}
-]
-\smallplotstest
-\end{axis}
-\end{tikzpicture}
-
-\testsubsection{Using yticklabels in logplot}%
-{
-\def\tickformat#1{1e#1}%
-\begin{tikzpicture}
-\begin{loglogaxis}[
- ytick={1e-8,1e-7,1e-6,1e-5,1e-4,1e-3,1e-2,1e-1,1e0,1e1},
- yticklabels={%
- \tickformat{-8},
- \tickformat{-7},
- \tickformat{-6},
- \tickformat{-5},
- \tickformat{-4},
- \tickformat{-3},
- \tickformat{-2},
- \tickformat{-1},
- \tickformat{-0}}
-]
-\loglogtestplot
-\end{loglogaxis}
-\end{tikzpicture}
-}
-
-\testsection{Default options log plot}
-\begin{tikzpicture}
-\begin{loglogaxis}
-\loglogtestplot
-\end{loglogaxis}
-\end{tikzpicture}
-
-\testsection{Semilogy plot}
-\begin{tikzpicture}
- \begin{semilogyaxis}[xlabel=Index,ylabel=Value]
- \addplot[color=blue,mark=*] plot coordinates {
- (1,8)
- (2,16)
- (3,32)
- (4,64)
- (5,128)
- (6,256)
- (7,512)
- };
- \end{semilogyaxis}
-\end{tikzpicture}
-
-\testsection{Semilogx plot}
-\begin{tikzpicture}
- \begin{semilogxaxis}[xlabel=Index,ylabel=Value]
- \addplot[color=blue,mark=*] plot coordinates {
- (8,1)
- (16,2)
- (32,3)
- (64,4)
- (128,5)
- (256,6)
- (512,7)
- };
- \end{semilogxaxis}
-\end{tikzpicture}
-
-\testsection{Scaling log plots}
-\hrule
-\nobreak
-\vskip10pt
-\nobreak
-\noindent
-\begin{tikzpicture}
-\begin{loglogaxis}[width=\textwidth]
-\loglogtestplot
-\end{loglogaxis}
-\end{tikzpicture}
-
-\begin{tikzpicture}
-\begin{loglogaxis}[width=\textwidth,height=\textheight]
-\loglogtestplot
-\end{loglogaxis}
-\end{tikzpicture}
-
-\begin{tikzpicture}
-\begin{loglogaxis}[height=5.5cm]
-\loglogtestplot
-\end{loglogaxis}
-\end{tikzpicture}
-
-\testsection{Tick/Tick-Label placement log plots}
-\begin{tikzpicture}
-\begin{loglogaxis}[
- xmin=0.99e2,xmax=1e4,
- ytickten={-5,-4,-3.6,-3,-2,-1,0},
- yticklabel={
- \ifnum\ticknum=2
- $\rightarrow$
- \else
- \axisdefaultticklabellog
- \fi
- }
-]
-\loglogtestplot
-\end{loglogaxis}
-\end{tikzpicture}
-
-\testsection{Legends}
-\begingroup
-\begin{tikzpicture}
-\begin{loglogaxis}[title=A test title,xlabel=Dof,ylabel=Error]
-\loglogtestplot
-\legend{Eins\\Zwei\\}%
-\end{loglogaxis}
-\end{tikzpicture}
-
-\begin{tikzpicture}
-\begin{loglogaxis}[title=A test title,xlabel=Dof,ylabel=Error,legend columns=2]
-\manylogplots
-\end{loglogaxis}
-\end{tikzpicture}
-
-\begin{tikzpicture}
-\begin{loglogaxis}[title=A test title,xlabel=Dof,ylabel=Error,legend columns=3]
-\manylogplots
-\end{loglogaxis}
-\end{tikzpicture}
-
-{
-\tikzstyle{every axis legend}+=[inner sep=0pt,nodes={inner sep=0pt}]
-\begin{tikzpicture}
-\begin{loglogaxis}[title=A test title,xlabel=Dof,ylabel=Error,legend columns=4]
-\manylogplots
-\end{loglogaxis}
-\end{tikzpicture}
-}
-
-{\tikzstyle{every axis legend}+=[at={(0.5,-0.2)},anchor=north]
-\begin{tikzpicture}
-\begin{loglogaxis}[title=A test title,xlabel=Dof,ylabel=Error,legend columns=6]
-\manylogplots
-\end{loglogaxis}
-\end{tikzpicture}
-}%
-
-{\tikzstyle{every axis legend}+=[at={(0.5,0.98)},anchor=north,inner sep=0pt]
-\begin{tikzpicture}
-\begin{loglogaxis}[title=A test title,xlabel=Dof,ylabel=Error,legend columns=-1]
-\manylogplots
-\end{loglogaxis}
-\end{tikzpicture}
-}%
-
-\testsubsection{``legend plot pos'' options}
-\begin{tikzpicture}
-\begin{loglogaxis}[title=A test title,xlabel=Dof,ylabel=Error,legend plot pos=left]
-\manylogplots
-\end{loglogaxis}
-\end{tikzpicture}
-
-\begin{tikzpicture}
-\begin{loglogaxis}[title=A test title,xlabel=Dof,ylabel=Error,legend plot pos=right]
-\manylogplots
-\end{loglogaxis}
-\end{tikzpicture}
-
-\begin{tikzpicture}
-\begin{loglogaxis}[title=A test title,xlabel=Dof,ylabel=Error,legend plot pos=none]
-\manylogplots
-\end{loglogaxis}
-\end{tikzpicture}
-\endgroup
-
-\testsection{Title-option}
-\begin{tikzpicture}
-\begin{loglogaxis}[title=A test title,xlabel=Dof,ylabel=Error]
-\loglogtestplot
-\end{loglogaxis}
-\end{tikzpicture}
-
-\testsection{Scaling test for very small or very large x values}
-\testsubsection{1e-2}
-\begin{tikzpicture}
-\begin{axis}
- \addplot plot coordinates {
- (0.005,1)
- (0.01,2)
- (0.02,4)
- };
-\end{axis}
-\end{tikzpicture}
-
-\testsubsection{1e+2}
-% \tracingmacros=2\tracingcommands=2
-\begin{tikzpicture}
-\begin{axis}
- \addplot plot coordinates {
- (50,1)
- (100,2)
- (200,4)
- };
-\end{axis}
-\end{tikzpicture}
-% \tracingmacros=0\tracingcommands=0
-
-\testsubsection{x=1e+11; y=1e-6}
-\begin{tikzpicture}
-\begin{axis}
- \addplot plot coordinates {
- (5e10,1e-6)
- (1e11,2e-6)
- (2e11,4e-6)
- };
-\end{axis}
-\end{tikzpicture}
-
-\testsubsection{1e+2}
-\begin{tikzpicture}
-\begin{axis}
- \addplot plot coordinates {
- (5,1)
- (10,2)
- (20,4)
- };
-\end{axis}
-\end{tikzpicture}
-
-\testsection{Filter test}
-{%
-\def\myOwnYfilter#1\to#2{%
- \def#2{0.5}%
-}%
-\begin{tikzpicture}
-\begin{axis}[yfilter={\myOwnYfilter}]
-\addplot plot coordinates {
- (4,0)
- (6,1)
-};
-\end{axis}
-\end{tikzpicture}
-}%
-
-\testsection{Test for addplot+[...]}
-{
-\tikzstyle{every axis legend}+=[at={(1.03,1)},anchor=north west]
-\begin{enumerate}
- \item Ohne aenderung:
-
-\begin{tikzpicture}
-\begin{axis}
-\smallplotstest
-
-\addplot plot coordinates {
- (4,0)
- (6,1)
-};
-\legend{eins\\zwei\\}%
-\end{axis}
-\end{tikzpicture}
-
-\item MIT aenderung:
-
-\begin{tikzpicture}
-\begin{axis}
-\smallplotstest
-
-\addplot+[only marks] plot coordinates {
- (4,0)
- (6,1)
-};
-\legend{eins\\zwei\\}%
-\end{axis}
-\end{tikzpicture}
-\end{enumerate}
-}
-
-\testsection{Baseline alignment}
-\noindent
-\begin{tikzpicture}[baseline]
-\begin{axis}[width=0.4\linewidth,xlabel=An x label]
- \smallplotstest
-\end{axis}
-\end{tikzpicture}
-\hspace{1cm}
-\begin{tikzpicture}[baseline]
-\begin{axis}[width=0.4\linewidth,xlabel={\Huge An x label}]
- \smallplotstest
-\end{axis}
-\end{tikzpicture}
-
-\testsubsection{Baseline alignment and externalized graphics}
-One needs \texttt{\textbackslash beginpgfgraphicnamed} around the complete paragraph, so this here doesn't work (see source code):
-
-\beginpgfgraphicnamed{baselinetesta}
-\begin{tikzpicture}[baseline]
-\begin{axis}[width=0.4\linewidth,xlabel=An x label]
- \smallplotstest
-\end{axis}
-\end{tikzpicture}
-\endpgfgraphicnamed
-%
-%
-\hspace{1cm}
-\beginpgfgraphicnamed{baselinetestb}
-\begin{tikzpicture}[baseline]
-\begin{axis}[width=0.4\linewidth,xlabel={\Huge An x label}]
- \smallplotstest
-\end{axis}
-\end{tikzpicture}
-\endpgfgraphicnamed
-
-\testsubsection{Baseline alignment and externalized graphics II}
-\beginpgfgraphicnamed{baselinetestc}
-\begin{tikzpicture}[baseline]
-\begin{axis}[width=0.4\linewidth,xlabel=An x label]
- \smallplotstest
-\end{axis}
-\end{tikzpicture}
-%
-%
-\hspace{1cm}
-\begin{tikzpicture}[baseline]
-\begin{axis}[width=0.4\linewidth,xlabel={\Huge An x label}]
- \smallplotstest
-\end{axis}
-\end{tikzpicture}
-\endpgfgraphicnamed
-
-\testsubsection{Horizontal and Vertical alignment}
-\begin{tikzpicture}[baseline]
-\begin{axis}[width=0.4\linewidth,xlabel=An x label,ylabel=An y label]
- \smallplotstest
-\end{axis}
-
-\begin{scope}[yshift=-4cm]
-\begin{axis}[width=0.4\linewidth,xlabel=An x label,ylabel={$\displaystyle\sum_{k=1}^n \frac 1n$}]
- \smallplotstest
-\end{axis}
-\end{scope}
-
-\node[fill=yellow,circle] at (0,0) {$(0,0)$};
-\end{tikzpicture}
-%
-%
-\hspace{1cm}
-\begin{tikzpicture}[baseline]
-\begin{axis}[width=0.4\linewidth,xlabel={\Huge An x label}]
- \smallplotstest
-\end{axis}
-
-\begin{scope}[yshift=-4cm]
-\begin{axis}[width=0.4\linewidth,xlabel={\Huge An x label},ylabel={$\displaystyle\sum_{k=1}^n \frac 1n$}]
- \smallplotstest
-\end{axis}
-\end{scope}
-\node[fill=yellow,circle] at (0,0) {$(0,0)$};
-\end{tikzpicture}
-
-\testsection{Scaletest}
-
-{
-\listnew{\autoplotspeclist}{%
- red,only marks,mark options={fill=red!80!black},mark=*\\%
- black,only marks,mark options={fill=black},mark=square*\\%
-}%
-\begin{tikzpicture}
-\begin{axis}[%
- width=8cm,
- height=2cm,
- xtick=\empty,
- ytick=\empty
-]
-
-\addplot plot coordinates {
- (0.968555, 0.000000)
- (0.984277, 0.000000)
- (0.030884, 0.000000)
- (0.250000, 0.000000)
- (0.750000, 0.000000)
- (0.468750, 0.000000)
- (0.750000, 0.000000)
- (0.484375, 0.000000)
- (0.968555, 0.000000)
- (0.968555, 0.000000)
- (1.000000, 0.000000)
- (1.000000, 0.000000)
- (0.030176, 0.000000)
- (0.250000, 0.000000)
- (0.250000, 0.000000)
- (0.250000, 0.000000)
- (0.750000, 0.000000)
- (1.000000, 0.000000)
- (0.500000, 0.000000)
- (0.500000, 0.000000)
- (0.234375, 0.000000)
- (0.500000, 0.000000)
- (0.750000, 0.000000)
- (0.000000, 0.000000)
- (0.750000, 0.000000)
- (0.468750, 0.000000)
- (0.500000, 0.000000)
- (0.000000, 0.000000)
- (0.468750, 0.000000)
- (0.000000, 0.000000)
- (0.750000, 0.000000)
- (0.000000, 0.000000)
- (0.234375, 0.000000)
- (1.000000, 0.000000)
-};
-\addplot plot coordinates {
- (0.367188, 0.000000)
- (0.625000, 0.000000)
- (0.312500, 0.000000)
- (0.656250, 0.000000)
- (0.312500, 0.000000)
- (0.148438, 0.000000)
- (0.125000, 0.000000)
- (0.640625, 0.000000)
- (0.136719, 0.000000)
- (0.875000, 0.000000)
- (0.390625, 0.000000)
- (0.828125, 0.000000)
- (0.875000, 0.000000)
- (0.656250, 0.000000)
- (0.125000, 0.000000)
- (0.343750, 0.000000)
- (0.861328, 0.000000)
- (0.312500, 0.000000)
- (0.578125, 0.000000)
- (0.578125, 0.000000)
- (0.625000, 0.000000)
- (0.375000, 0.000000)
- (0.875000, 0.000000)
- (0.812500, 0.000000)
- (0.847656, 0.000000)
- (0.589844, 0.000000)
- (0.343750, 0.000000)
- (0.125000, 0.000000)
- (0.875000, 0.000000)
- (0.125000, 0.000000)
- (0.609375, 0.000000)
- (0.156250, 0.000000)
-};
-\end{axis}
-\end{tikzpicture}
-}
-
-\testsection{Anchortest}
-{
-\def\plot#1{
-\vbox{\hsize=5cm
-#1:
-
-\begin{tikzpicture}
- \begin{axis}[width=5cm,anchor=#1]
- \smallplotstest
- \end{axis}
- \node[fill=yellow,circle] at (0,0) {$(0,0)$};
-\end{tikzpicture}
-}
-}%
-\noindent
-\plot{north}
-\plot{north west}
-\plot{west}
-\plot{south west}
-\plot{south}
-\plot{south east}
-\plot{east}
-\plot{north east}
-\plot{center}
-}
-
-\testsection{Hide axis test}
-\begin{tikzpicture}
- \begin{axis}
- \smallplotstest
- \end{axis}
-\end{tikzpicture}
-\begin{tikzpicture}
- \begin{axis}[hide axis]
- \smallplotstest
- \end{axis}
-\end{tikzpicture}
-\vskip 1cm
-\noindent
-\begin{tikzpicture}
- \begin{axis}[hide axis,title=A plot with hidden axis]
- \smallplotstest
- \end{axis}
-\end{tikzpicture}
-\begin{tikzpicture}
- \begin{axis}[hide axis,title=A plot with hidden axis]
- \smallplotstest
- \legend{A legend\\}
- \end{axis}
-\end{tikzpicture}
-
-\testsection{Style--test}
-{
-%\tikzstyle{every axis}=[xmin=-3,xmax=3]
-\begin{tikzpicture}
- \begin{axis}
- \smallplotstest
- \end{axis}
-\end{tikzpicture}
-}
-
-\testsection{Grid lines test}
-\begin{tikzpicture}
- \begin{axis}[xmajorgrids]
- \smallplotstest
- \end{axis}
-\end{tikzpicture}
-
-\begin{tikzpicture}
- \begin{axis}[ymajorgrids,xmajorgrids]
- \smallplotstest
- \end{axis}
-\end{tikzpicture}
-
-\begin{tikzpicture}
- \begin{loglogaxis}[ymajorgrids,xmajorgrids]
- \loglogtestplot
- \end{loglogaxis}
-\end{tikzpicture}
-
-\begin{tikzpicture}
- \begin{loglogaxis}[grid=both]
- \loglogtestplot
- \end{loglogaxis}
-\end{tikzpicture}
-
-{
-\tikzstyle{every major tick}+=[color=black,thick]
-\begin{tikzpicture}
- \begin{loglogaxis}[grid=major]
- \loglogtestplot
- \end{loglogaxis}
-\end{tikzpicture}
-
-\tikzstyle{every minor tick}+=[color=black,thick]
-\begin{tikzpicture}
- \begin{loglogaxis}[grid=both]
- \loglogtestplot
- \end{loglogaxis}
-\end{tikzpicture}
-}
-
-\testsection{Tick lines test}
-\begin{tikzpicture}
- \begin{loglogaxis}[xmajorticks=false,xminorticks=true]
- \loglogtestplot
- \end{loglogaxis}
-\end{tikzpicture}
-
-\begin{tikzpicture}
- \begin{loglogaxis}[ymajorticks=false,yminorticks=false]
- \loglogtestplot
- \end{loglogaxis}
-\end{tikzpicture}
-
-\begin{tikzpicture}
- \begin{loglogaxis}[ticks=none]
- \loglogtestplot
- \end{loglogaxis}
-\end{tikzpicture}
-
-\begin{tikzpicture}
- \begin{loglogaxis}[ticks=major]
- \loglogtestplot
- \end{loglogaxis}
-\end{tikzpicture}
-
-\testsection{TikZ-coordinate system ``axis''}
-\begin{tikzpicture}
-\begin{axis}
-\smallplotstest
-\axispath\draw (axis cs:0.5,0.6) -- (axis cs:-1,0);
-\end{axis}
-\end{tikzpicture}
-
-\begin{tikzpicture}
- \begin{loglogaxis}
- \axispath\draw
- (axis cs:18943,2.873391e-05) |- (axis cs:47103,8.437499e-06);
- \loglogtestplot
- \end{loglogaxis}
-\end{tikzpicture}
-\end{document}
diff --git a/Master/texmf-dist/doc/latex/pgfplots/plotdata/pgfplots_scatterdata1.dat b/Master/texmf-dist/doc/latex/pgfplots/plotdata/pgfplots_scatterdata1.dat
new file mode 100644
index 00000000000..940bcad71a5
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/plotdata/pgfplots_scatterdata1.dat
@@ -0,0 +1,35 @@
+0.190600 0.860900
+0.194400 0.908000
+0.179900 0.140700
+0.212400 0.294200
+0.218900 0.779100
+0.201700 0.388400
+0.209100 0.679900
+0.196200 0.470800
+0.199900 0.812700
+0.199300 0.850500
+0.204300 0.980300
+0.209500 0.953000
+0.176200 0.145300
+0.207400 0.351900
+0.199000 0.304500
+0.202200 0.256300
+0.197000 0.744300
+0.181100 0.998900
+0.193400 0.554900
+0.218300 0.506500
+0.193800 0.201000
+0.208100 0.531900
+0.204100 0.635500
+0.217000 0.069800
+0.196100 0.710300
+0.198900 0.440900
+0.213000 0.591900
+0.206000 0.030700
+0.186000 0.395900
+0.206500 0.082500
+0.195500 0.672000
+0.221400 -0.013500
+0.202300 0.222300
+0.193300 0.959700
+
diff --git a/Master/texmf-dist/doc/latex/pgfplots/plotdata/pgfplots_scatterdata1_latent.dat b/Master/texmf-dist/doc/latex/pgfplots/plotdata/pgfplots_scatterdata1_latent.dat
new file mode 100644
index 00000000000..33123e0b8b3
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/plotdata/pgfplots_scatterdata1_latent.dat
@@ -0,0 +1,10 @@
+ 0.968555 0
+ 0.030884 0
+ 0.750000 0
+ 0.468750 0
+ 1.000000 0
+ 0.030176 0
+ 0.750000 0
+ 0.468750 0
+ 0 0
+
diff --git a/Master/texmf-dist/doc/latex/pgfplots/plotdata/pgfplots_scatterdata2.dat b/Master/texmf-dist/doc/latex/pgfplots/plotdata/pgfplots_scatterdata2.dat
new file mode 100644
index 00000000000..64404efbcf7
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/plotdata/pgfplots_scatterdata2.dat
@@ -0,0 +1,32 @@
+ 0.005300 0.369500
+ -0.016100 0.610000
+ -0.007400 0.252100
+ 0.002900 0.699600
+ 0.010900 0.232000
+ -0.014100 0.152400
+ -0.008000 -0.003100
+ -0.009100 0.639900
+ -0.008700 0.125800
+ -0.003700 0.897400
+ 0.009600 0.432200
+ -0.009100 0.770800
+ -0.030300 0.974200
+ -0.004000 0.675900
+ -0.002100 0.089500
+ 0.003300 0.319700
+ 0.006100 0.863300
+ 0.000600 0.263700
+ -0.008900 0.471500
+ 0.016000 0.505700
+ 0.000000 0.602600
+ -0.012300 0.404400
+ -0.007000 0.911900
+ 0.006700 0.747200
+ 0.009000 0.825300
+ -0.001500 0.534400
+ -0.020600 0.336300
+ 0.012600 0.039800
+ 0.011600 0.944100
+ -0.003600 0.068000
+ -0.022400 0.575400
+ -0.002900 0.184500
diff --git a/Master/texmf-dist/doc/latex/pgfplots/plotdata/pgfplots_scatterdata2_latent.dat b/Master/texmf-dist/doc/latex/pgfplots/plotdata/pgfplots_scatterdata2_latent.dat
new file mode 100644
index 00000000000..d10aaeb8e53
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/plotdata/pgfplots_scatterdata2_latent.dat
@@ -0,0 +1,9 @@
+ 0.367188 0
+ 0.312500 0
+ 0.136719 0
+ 0.828125 0
+ 0.656250 0
+ 0.343750 0
+ 0.125000 0
+ 0.156250 0
+
diff --git a/Master/texmf-dist/doc/latex/pgfplots/todo.txt b/Master/texmf-dist/doc/latex/pgfplots/todo.txt
index 2c27f484bbd..e0d804e0d36 100644
--- a/Master/texmf-dist/doc/latex/pgfplots/todo.txt
+++ b/Master/texmf-dist/doc/latex/pgfplots/todo.txt
@@ -2,6 +2,36 @@
BUGS
-------------------------------------------------------------
+- extra ticks can be disabled by the tick special cases for axis lines (when two
+ axis lines cross each other)
+
+- \addplot plot[#1] does not use /pgfplots as search path
+
++ eliminate any public reference to the '\\'-lists. They are inconsistent with PGF.
+
++ use '{}' for sci 'e' style - looks better
+
++ the tick scale labels are inadequate.
+ 1. Formatting
+ 2. maybe they should be disabled at all!?
+
++ specifying axis limits for X should also limit those for Y (some sort of
+ clipping)
+
+- the text height of every axis x tick should be adjusted to allow tick scale
+ labels on the same vertical alignment
+ -> bug in pgf: text height does not properly respect to the current font!?
+
++ the new \pgfkeys framework:
+ + I have re-implemented all options with \pgfkeys.
+ this allows styles and mixing of TikZ/pgfplots options.
+ + BUG: if someone provides FULL keynames, the method WILL FAIL.
+ + the style= option fails.
+ + the 'x=' and 'y=' options fail.
+ + every option which exists in both, pgf and tikz, will fail!
+ + 'legend style' fails
+ + the 'legend style, grid style, x label style etc. options' test fails
+
+ axis limits of zero width are not fixed causing division by zero
+ ytick=\empty is broken again :-(
@@ -15,12 +45,10 @@ BUGS
Instead, tick positions should be RECOGNISED AS MINOR TICKS (which is not
that simple).
-- bei normalen plots wird der parser nicht angeworfen
-
+ die legend[font=] variable ist doch dasselbe wie in dem tikzstyle zu legenden,
oder? warum funktioniert es dann anders?
-- implementiere enlargelimits fuer log-achsen
++ implementiere enlargelimits fuer log-achsen
+ markers werden rausgeclipped, wenn die achsen TIGHT sind.
@@ -67,13 +95,13 @@ X Fix the scaling estimations.
-> bei sehr grossen oder sehr kleinen limits schlaegt die derzeitige
einschraenkung der step sizes fehl
-- addplot plot coordinates { (235 , 43252) }
++ addplot plot coordinates { (235 , 43252) }
^
funzt nicht wegen dem leerzeichen vor dem komma
-- verschiebung des ylabels ist komisch, wegen der rotate option
+X verschiebung des ylabels ist komisch, wegen der rotate option
-- die standard-positionierung der achsenlabels beruecksichtigt nicht die breite
++ die standard-positionierung der achsenlabels beruecksichtigt nicht die breite
der ticklabels - entweder ist es daher zu weit weg oder zu nah
+ tickpos packt nur die ticks woanders hin, nicht die tick labels
@@ -140,24 +168,67 @@ X Die gesamtbreite enthaelt zu viele nur grob einkalkulierte einfluesse!
FEATURES
-------------------------------------------------------------
-- prettyprintnumber is not adequate.
+X implement an axis as path-command
+
++ implement proper anchors
+
++ provide simple options for useful bounding box truncations
+
+
++ Maybe I could perform a restore of the current bounding box at the END of an
+ axis. Restore means: restore to the setting BEFORE the axis.
+
+ This is useful if
+ - the size of the inner axis
+ - the size of the final axis
+ remains known until after the complete axis.
+
+ Motivation: the axis as such can have NO contribution to the pictures dimension,
+ and the user can call '\useasboundingbox (inner axis.north east) rectangle
+ (inner axis.south west);
+ or something like that.
+
+ This affects \pgf@picminx and the other variables, see the manual.
+
++ I could create a node which can be referenced and which has the axis' size
+ [ That touches another open problem, see below]
+
++ I could use the new 'local bounding box' option of PGF to restrict the
+ bounding box to the axis' size
+
++ I also need some sort of number style for log-tick-labels.
+
++ move math mode shifts into \prettyprintnumber implementation.
+
++ allow the '-plot' commands.
+ It would be a cool feature if '(FIRST_X,0)' could be inserted as move-to
+ operation before every plot.
+ -> one could make funny features with 'fill' in plot styles.
+
+- make the legend code more general: allow
+ \addformattedlegendentry{ \node{hallo} \nextcell \node{foo} \nextcell #1}
+ where #1 is the auto-generated small plot-spec image. One could also provide
+ '#2' as just the current plot spec OPTIONS.
+
+
++ prettyprintnumber is not adequate.
There are different aims:
1. The user provides
- - precision
- - number format (sci, fixed, truncate to int, 'whatever fits best')
- - the number in any precision or format.
+ + precision
+ + number format (sci, fixed, truncate to int, 'whatever fits best')
+ + the number in any precision or format.
Details:
- - I need \scifloatround
- - sollte die mantisse einer exponential-darstellung runden
- - erfordert u.U. renormalisierungen
- - the fixed point rounding routine needs to distinguish between
- - MAXIMUM precision, 1.000 -> 1
- - FIXED precision 1.000 -> 1.00
- - the 'std' format should use
- - fixed point if
+ + I need \scifloatround
+ + sollte die mantisse einer exponential-darstellung runden
+ + erfordert u.U. renormalisierungen
+ + the fixed point rounding routine needs to distinguish between
+ + MAXIMUM precision, 1.000 -> 1
+ + FIXED precision 1.000 -> 1.00
+ + the 'std' format should use
+ + fixed point if
-4 < e < precision
- - scientific in all other cases.
- - this is copied from 'printf' manual. Motivation:
+ + scientific in all other cases.
+ + this is copied from 'printf' manual. Motivation:
- 0.00013 wastes more space than 1.3e-4 and the latter
one may have higher precision.
- with precision 3, exponent > precision like 12345 =
@@ -192,8 +263,8 @@ FEATURES
- for scientific format: call
\shownumberexponential\sign\mantisse\exponent
There are different possible methods to display \mantisse:
- - MAXIMUM precision
- - FIXED precision
+ + MAXIMUM precision
+ + FIXED precision
The same holds for the exponent:
- zero-pad to X digits
- minimum space
@@ -207,9 +278,9 @@ FEATURES
Maybe I can return the \preperiod and \postperiod parts from the
rounding-routines.
Ideas:
- - prettyprintnumber should access a bunch of configuration variables.
- - these variables should be configurable by a key-value-parser.
- - there should be a key-value-interface for prettyprintnumber, but it would
+ + prettyprintnumber should access a bunch of configuration variables.
+ + these variables should be configurable by a key-value-parser.
+ + there should be a key-value-interface for prettyprintnumber, but it would
be best if that one is not necessarily needed. Most applications will not call
prettyprintnumber directly; they will configure the number format once and
invoke prettyprintnumber without options.
@@ -221,14 +292,14 @@ FEATURES
- document 'legend plot pos' option
-- Most of my loops are quite inefficient. I have learned how to employ
++ Most of my loops are quite inefficient. I have learned how to employ
\@ifnextchar (or the PGF-pendant) to create efficient loops on top of TeXs
parser:
- use \@ifnextchar to check for a TERMINATE token and recurse otherwise.
- linear runtime
- I fear, my loops have quadratic runtime
-- there are some clipping paths in the tick-placement loop which can be
++ there are some clipping paths in the tick-placement loop which can be
replacement with simple \ifdim's.
I guess clipping is not the cheapest operation.
@@ -237,7 +308,7 @@ FEATURES
them like '\tick' during ticklabel typesetting
-- Es sollte unbedingt moeglich sein, die TikZ-Styles zu verwenden. Das
++ Es sollte unbedingt moeglich sein, die TikZ-Styles zu verwenden. Das
\axispreset ist reichlich nervig und inkonsistent mit der restlichen nutzung
-> optimal:
\path (0,0) axis[xlabel=X,width=...] {
@@ -271,7 +342,7 @@ FEATURES
-> convert to \listnew, use listpopfront to access elements
-- provide options for log plot tick formatting:
++ provide options for log plot tick formatting:
10^0.703 vs fixed point format
+ I could provide a global coordinate transformation
@@ -347,27 +418,26 @@ FEATURES
Kann man das nutzen, um sowohl farbige als auch S/W-plots zu generieren?
-> pruefe draftcopy paket
+
- koennte man den kram auch aus (grossen) tabellen rauslesen? Also sowas wie
"plot X versus Y aus file Z"?
- -> das geht sicher!
+-> DEBUG!
Ideen:
- - abstrakte datenstruktur als liste von spalten, eine spalte ist ne liste
+ + abstrakte datenstruktur als liste von spalten, eine spalte ist ne liste
von nummern
- - einlesen:
- - zeilenweise, haengt an die jeweiligen spalten mit \listpushback
+ + einlesen:
+ + zeilenweise, haengt an die jeweiligen spalten mit \listpushback
coordinaten dran
- - read first line as header (optionally my $flags line for column
+ + read first line as header (optionally my $flags line for column
formatting advice)
- - read just strings, no parsing
+ + read just strings, no parsing
- optimal: '\t' as separator. How can I teach TeX to use '\t' as
separator!?
- would allow
- \addplot plot table[x=X,y=Z] {\table}
+ + \addplot plot table[x=X,y=Z] {\table}
and
- \typesettable[columns=...,format=sci,...,formatting options=...] {\table}
- - implementation: simple run through column lists
- -> I need a method for simultaneous traversal of multiple lists, not
- difficult
+ - \typesettable[columns=...,format=sci,...,formatting options=...] {\table}
+ + implementation: simple run through column lists
-> CONSISTENT data representation, powerful display options
@@ -398,7 +468,8 @@ FEATURES
- domain option verwenden zum update der limits
- kann man logs anwenden?
- plot function
- - plot file
+ + plot file
+ + plot table[x=column1,y=column4]
- plot (...)
-> see tikz.code.tex for how to implement that!
diff --git a/Master/texmf-dist/doc/plain/pgfplots/pgfplotsexample.pdf b/Master/texmf-dist/doc/plain/pgfplots/pgfplotsexample.pdf
new file mode 100644
index 00000000000..bce1e290e9b
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/pgfplots/pgfplotsexample.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/plain/pgfplots/pgfplotsexample.tex b/Master/texmf-dist/doc/plain/pgfplots/pgfplotsexample.tex
new file mode 100644
index 00000000000..379cddce5ca
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/pgfplots/pgfplotsexample.tex
@@ -0,0 +1,48 @@
+%% plain tex file
+
+\def\pgfsysdriver{pgfsys-pdftex.def}
+\input pgfplots.tex
+
+Using plain-\TeX.
+
+\tikzpicture
+ \loglogaxis
+ \addplot coordinates {
+ (1,1)
+ (16,16)
+ (32,64)
+ };
+ \endloglogaxis
+\endtikzpicture
+
+\tikzpicture
+ \loglogaxis[
+ xlabel=Cost,
+ ylabel=Error]
+ \addplot coordinates {
+ (5, 8.31160034e-02)
+ (17, 2.54685628e-02)
+ (49, 7.40715288e-03)
+ (129, 2.10192154e-03)
+ (321, 5.87352989e-04)
+ (769, 1.62269942e-04)
+ (1793, 4.44248889e-05)
+ (4097, 1.20714122e-05)
+ (9217, 3.26101452e-06)
+ };
+ \addplot coordinates {
+ (7, 8.47178381e-02)
+ (31, 3.04409349e-02)
+ (111, 1.02214539e-02)
+ (351, 3.30346265e-03)
+ (1023, 1.03886535e-03)
+ (2815, 3.19646457e-04)
+ (7423, 9.65789766e-05)
+ (18943, 2.87339125e-05)
+ (47103, 8.43749881e-06)
+ };
+ \legend{Case 1,Case 2}
+ \endloglogaxis
+\endtikzpicture
+
+\bye
diff --git a/Master/texmf-dist/tex/context/pgfplots/t-pgfplots.tex b/Master/texmf-dist/tex/context/pgfplots/t-pgfplots.tex
new file mode 100644
index 00000000000..93324e1e5b0
--- /dev/null
+++ b/Master/texmf-dist/tex/context/pgfplots/t-pgfplots.tex
@@ -0,0 +1,61 @@
+%--------------------------------------------
+%
+% Package pgfplots
+%
+% Provides a user-friendly interface to create function plots (normal
+% plots, semi-logplots and double-logplots).
+%
+% It is based on Till Tantau's PGF package.
+%
+% Copyright 2007/2008 by Christian Feuersänger.
+%
+% This program is free software: you can redistribute it and/or modify
+% it under the terms of the GNU General Public License as published by
+% the Free Software Foundation, either version 3 of the License, or
+% (at your option) any later version.
+%
+% This program is distributed in the hope that it will be useful,
+% but WITHOUT ANY WARRANTY; without even the implied warranty of
+% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+% GNU General Public License for more details.
+%
+% You should have received a copy of the GNU General Public License
+% along with this program. If not, see <http://www.gnu.org/licenses/>.
+%
+%--------------------------------------------
+
+\usemodule[tikz]
+\usetikzlibrary[plotmarks]
+
+\edef\tikzatcode{\the\catcode`\@}
+\edef\tikzbarcode{\the\catcode`\|}
+\edef\tikzexclaimcode{\the\catcode`\!}
+\catcode`\@=11
+\catcode`\|=12
+\catcode`\!=12
+
+\input pgfplots.code.tex
+
+\let\pgfplots@ORIG@tikz@installcommands@before@context=\tikz@installcommands
+
+\def\tikz@installcommands{%
+ \pgfplots@ORIG@tikz@installcommands@before@context
+ %
+ \let\startaxis=\pgfplots@environment@axis
+ \let\stopaxis=\endpgfplots@environment@axis
+ %
+ \let\startsemilogxaxis=\pgfplots@environment@semilogxaxis
+ \let\stopsemilogxaxis=\endpgfplots@environment@semilogxaxis
+ %
+ \let\startsemilogyaxis=\pgfplots@environment@semilogyaxis
+ \let\stopsemilogyaxis=\endpgfplots@environment@semilogyaxis
+ %
+ \let\startloglogaxis=\pgfplots@environment@loglogaxis
+ \let\stoploglogaxis=\endpgfplots@environment@loglogaxis
+}%
+
+\catcode`\@=\tikzatcode
+\catcode`\|=\tikzbarcode
+\catcode`\!=\tikzexclaimcode
+
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgfplots/liststructure/pgfplotsarray.code.tex b/Master/texmf-dist/tex/generic/pgfplots/liststructure/pgfplotsarray.code.tex
new file mode 100644
index 00000000000..16e4b539c02
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgfplots/liststructure/pgfplotsarray.code.tex
@@ -0,0 +1,202 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% This is a helper package with an elementary array datastructure,
+% featuring O(1) index access and O(N) creation, deletion, copy.
+%
+% The following macros are supplied:
+%
+% \pgfplotsarraynewempty
+% \pgfplotsarraynew
+% \pgfplotsarraycopy
+% \pgfplotsarraypushback
+% \pgfplotsarraysize
+% \pgfplotsarrayselect
+% \pgfplotsarrayletentry
+% \pgfplotsarraycheckempty
+% \pgfplotsarrayforeach
+%
+% Copyright 2007/2008 by Christian Feuersänger.
+%
+% This program is free software: you can redistribute it and/or modify
+% it under the terms of the GNU General Public License as published by
+% the Free Software Foundation, either version 3 of the License, or
+% (at your option) any later version.
+%
+% This program is distributed in the hope that it will be useful,
+% but WITHOUT ANY WARRANTY; without even the implied warranty of
+% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+% GNU General Public License for more details.
+%
+% You should have received a copy of the GNU General Public License
+% along with this program. If not, see <http://www.gnu.org/licenses/>.
+%
+%
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\newcount\c@pgfplotsarray@tmp
+\newif\ifpgfplotsarrayempty
+
+% Creates a new, empty array.
+\long\def\pgfplotsarraynewempty#1{%
+ \pgfplotsarray@@def{#1@size}{0}%
+}
+
+% Creates a new array with an abirtrary number of elements.
+% Arguments:
+% #1: the array's name (a macro name)
+% #2: the elements in the form
+% first\\second\\third\\ ...\\
+% like in tabular with one column.
+%
+% Example:
+% \pgfplotsarraynew\fooarray{First Element\\Second Element\\Third Element\\}
+%
+% WARNING: do NOT forget the final '\\'!
+\long\def\pgfplotsarraynew#1#2{%
+ \pgfplotsarraynewempty{#1}%
+ \long\def\pgfplotsarraynew@impl@rest{#2}%
+ \loop
+ \ifx\pgfplotsarraynew@impl@rest\pgfutil@empty
+ \pgfplots@loop@CONTINUEfalse
+ \else
+ \pgfplots@loop@CONTINUEtrue
+ \fi
+ \ifpgfplots@loop@CONTINUE
+ \expandafter\pgfplotsarraynew@impl\pgfplotsarraynew@impl@rest\toarray#1\relax
+ \repeat
+}
+
+% helper macro for \pgfplotsarraynew
+\long\def\pgfplotsarraynew@impl#1\\#2\toarray#3{%
+ \pgfplotsarraypushback#1\to#3\relax%
+ \def\pgfplotsarraynew@impl@rest{#2}%
+}
+
+
+\def\pgfplotsarray@@let#1=#2{%
+ \def\pgfplotsarray@TMP@@{\expandafter\let\csname\string#1\endcsname}%
+ \expandafter\pgfplotsarray@TMP@@\expandafter=\csname\string#2\endcsname
+}%
+
+\def\pgfplotsarray@@def#1{%
+ \expandafter\def\csname\string#1\endcsname
+}%
+\def\pgfplotsarray@@edef#1{%
+ \expandafter\edef\csname\string#1\endcsname
+}%
+
+\def\pgfplotsarray@@getsizeto#1#2{%
+ \pgfplotsarraysize{#1}\to\c@pgfplotsarray@tmp
+ \edef#2{\the\c@pgfplotsarray@tmp}%
+}%
+
+% Copies array #1 to array #2.
+\def\pgfplotsarraycopy#1\to#2{%
+ \pgfplotsarray@@let{#2@size}={#1@size}%
+ \pgfplotsarray@@getsizeto{#1}{\pgfplotsarray@TMP}%
+ \c@pgfplotsarray@tmp=0
+ \loop
+ \ifnum\c@pgfplotsarray@tmp<\pgfplotsarray@TMP
+ \pgfplotsarray@@let{#2@\the\c@pgfplotsarray@tmp}={#1@\the\c@pgfplotsarray@tmp}%
+ \advance\c@pgfplotsarray@tmp by1
+ \repeat
+}
+
+
+
+% #1: the item to append
+% #2: the array as macro name
+% Example:
+% \pgfplotsarraypushback Next last element\to\fooarray
+\long\def\pgfplotsarraypushback#1\to#2{%
+ \pgfplotsarraysize{#2}\to\c@pgfplotsarray@tmp
+ \pgfplotsarray@@def{#2@\the\c@pgfplotsarray@tmp}{#1}%
+ \advance\c@pgfplotsarray@tmp by1
+ \pgfplotsarray@@edef{#2@size}{\the\c@pgfplotsarray@tmp}%
+}
+
+
+% Counts the number of elements in array #1, storing it into the count
+% register #2.
+% Example:
+% \pgfplotsarraysize\foo\to{\count0}%
+% \the\count0
+\long\def\pgfplotsarraysize#1\to#2{%
+ #2=\csname\string#1@size\endcsname\relax
+}
+
+% Returns the #1th element of array #2 into macro #3
+% Arguments:
+% #1: a count 0,...,N-1 where N is the array size.
+% You may specify a number of a count.
+% #2: a array
+% #3: a macro name
+% Example:
+% Element 0:
+% \pgfplotsarrayselect0\of\foo\to\elem
+% \elem
+% Element \count1:
+% \pgfplotsarrayselect\count1\of\foo\to\elem
+\long\def\pgfplotsarrayselect#1\of#2\to#3{%
+ \c@pgfplotsarray@tmp=#1\relax
+ \expandafter\let\expandafter#3\expandafter=\csname\string#2@\the\c@pgfplotsarray@tmp\endcsname%
+}
+\long\def\pgfplotsarrayletentry#1\of#2=#3{%
+ \c@pgfplotsarray@tmp=#1\relax
+ \expandafter\let\csname\string#2@\the\c@pgfplotsarray@tmp\endcsname=#3\relax
+}
+
+% Sets the boolean \ifpgfplotsarrayempty depending on whether array #1 is empty
+% or not.
+% Example:
+%
+% \pgfplotsarraycheckempty\fooarray
+% \ifpgfplotsarrayempty
+% List fooarray is empty!
+% \else
+% List is not empty.
+% \fi
+\def\pgfplotsarraycheckempty#1{%
+ \pgfplotsarraysize{#1}\to\c@pgfplotsarray@tmp
+ \ifnum\c@pgfplotsarray@tmp=0\relax
+ \pgfplotsarrayemptytrue
+ \else
+ \pgfplotsarrayemptyfalse
+ \fi
+}
+
+
+% Iterates through each array element, names it #2 and calls code #3.
+% Example:
+% \pgfplotsarraynew\fooarray{Eins\\Zwei\\Drei\\}%
+% \pgfplotsarrayforeach\fooarray\as\foo{Element \foo\par}%
+% results in
+% Element Eins
+% Element Zwei
+% Element Drei
+% Each single element will be grouped with TeX groups.
+\long\def\pgfplotsarrayforeach#1\as#2#3{%
+ \pgfplotsarray@@getsizeto{#1}{\pgfplotsarray@TMP}%
+ \c@pgfplotsarray@tmp=0\relax
+ \loop
+ \ifnum\c@pgfplotsarray@tmp<\pgfplotsarray@TMP\relax
+ \begingroup
+ \expandafter\let\expandafter#2\expandafter=\csname\string#1@\the\c@pgfplotsarray@tmp\endcsname%
+ #3%
+ \endgroup
+ \advance\c@pgfplotsarray@tmp by1
+ \repeat
+}
+
+% The same but without groups around #3.
+\long\def\pgfplotsarrayforeachungrouped#1\as#2#3{%
+ \pgfplotsarray@@getsizeto{#1}{\pgfplotsarray@TMP}%
+ \c@pgfplotsarray@tmp=0\relax
+ \loop
+ \ifnum\c@pgfplotsarray@tmp<\pgfplotsarray@TMP\relax
+ \expandafter\let\expandafter#2\expandafter=\csname\string#1@\the\c@pgfplotsarray@tmp\endcsname%
+ #3%
+ \advance\c@pgfplotsarray@tmp by1
+ \repeat
+}
diff --git a/Master/texmf-dist/tex/generic/pgfplots/liststructure/pgfplotsliststructure.code.tex b/Master/texmf-dist/tex/generic/pgfplots/liststructure/pgfplotsliststructure.code.tex
new file mode 100644
index 00000000000..48fd19a890c
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgfplots/liststructure/pgfplotsliststructure.code.tex
@@ -0,0 +1,256 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% This is a helper package with an elementary list datastructure.
+%
+% Its implementation is based on Knuth's list macros in "The TeXbook".
+%
+% The following macros are supplied:
+%
+% \pgfplotslistnewempty
+% \pgfplotslistnew
+% \pgfplotslistcopy
+% \pgfplotslistpopfront
+% \pgfplotslistpushback
+% \pgfplotslistpushfront
+% \pgfplotslistsize
+% \pgfplotslistselect
+% \pgfplotslistcheckempty
+% \pgfplotslistforeach
+%
+% Copyright 2007/2008 by Christian Feuersänger.
+%
+% This program is free software: you can redistribute it and/or modify
+% it under the terms of the GNU General Public License as published by
+% the Free Software Foundation, either version 3 of the License, or
+% (at your option) any later version.
+%
+% This program is distributed in the hope that it will be useful,
+% but WITHOUT ANY WARRANTY; without even the implied warranty of
+% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+% GNU General Public License for more details.
+%
+% You should have received a copy of the GNU General Public License
+% along with this program. If not, see <http://www.gnu.org/licenses/>.
+%
+%
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\newtoks\pgfplotslist@TOK@a
+\newtoks\pgfplotslist@TOK@b
+\newif\ifpgfplotslistempty
+
+
+\newif\ifpgfplots@loop@CONTINUE
+\newif\ifpgfplotslist@is@backslash@terminated
+
+% Creates a new, empty list.
+\long\def\pgfplotslistnewempty#1{\let#1=\pgfutil@empty}
+
+% Creates a new list with an abirtrary number of elements.
+% Arguments:
+% #1: the list's name (a macro name)
+% #2: the elements in the form
+% first\\second\\third\\ ...\\
+% like in tabular with one column.
+% You can also use comma-separated lists
+% first,second,third
+%
+% Example:
+% 1.
+% \pgfplotslistnew\foolist{First Element\\Second Element\\Third Element\\}
+% WARNING: do NOT forget the final '\\'!
+%
+% 2.
+% \pgfplotslistnew\foolist{First Element,Second Element,Third Element}
+%
+% Use braces '{}' to use '\\' or ',' as arguments.
+%
+\long\def\pgfplotslistnew#1#2{%
+ \pgfplotslistnewempty{#1}%
+ \long\def\pgfplotslistnew@impl@rest{#2}%
+ \pgfplotslist@check@backslash@list #2\\\pgfplotslist@EOI
+ \ifpgfplotslist@is@backslash@terminated
+ \else
+ \expandafter\def\expandafter\pgfplotslistnew@impl@rest\expandafter{\pgfplotslistnew@impl@rest,}%
+ \fi
+ \loop
+ \ifx\pgfplotslistnew@impl@rest\pgfutil@empty
+ \pgfplots@loop@CONTINUEfalse
+ \else
+ \pgfplots@loop@CONTINUEtrue
+ \fi
+ \ifpgfplots@loop@CONTINUE
+ \ifpgfplotslist@is@backslash@terminated
+ \expandafter\pgfplotslistnew@impl\pgfplotslistnew@impl@rest\tolist#1\relax
+ \else
+ \expandafter\pgfplotslistnew@impl@comma\pgfplotslistnew@impl@rest\tolist#1\relax
+ \fi
+ \repeat
+}
+\def\pgfplotslist@EOI{\pgfplotslist@EOI}
+
+\def\pgfplotslist@check@backslash@list#1\\#2\pgfplotslist@EOI{%
+ \def\pgfplotslist@TMPB{#2}%
+ \ifx\pgfplotslist@TMPB\pgfutil@empty
+ \pgfplotslist@is@backslash@terminatedfalse
+ \else
+ \pgfplotslist@is@backslash@terminatedtrue
+ \fi
+}%
+
+% Copies list #1 to list #2.
+\def\pgfplotslistcopy#1\to#2{\let#2=#1}
+
+
+% helper macro for \pgfplotslistnew
+\long\def\pgfplotslistnew@impl#1\\#2\tolist#3{%
+ \pgfplotslistpushback#1\to#3\relax%
+ \def\pgfplotslistnew@impl@rest{#2}%
+}
+\long\def\pgfplotslistnew@impl@comma#1,#2\tolist#3{%
+ \pgfplotslistpushback#1\to#3\relax%
+ \def\pgfplotslistnew@impl@rest{#2}%
+}
+
+
+% #1: the item to prepend
+% #2: the list as macro name
+% Example:
+% \pgfplotslistpushfront Next first Element\to\foolist
+\long\def\pgfplotslistpushfront#1\to#2{%
+ \pgfplotslist@TOK@a={\pgfplotslist@sep{#1}}%
+ \pgfplotslist@TOK@b=\expandafter{#2}%
+ \edef#2{\the\pgfplotslist@TOK@a\the\pgfplotslist@TOK@b}%
+}
+
+% #1: the item to append
+% #2: the list as macro name
+% Example:
+% \pgfplotslistpushback Next last element\to\foolist
+\long\def\pgfplotslistpushback#1\to#2{%
+ \pgfplotslist@TOK@a={\pgfplotslist@sep{#1}}%
+ \ifx#2\pgfutil@empty
+ \pgfplotslist@TOK@b={}%
+ \else
+ \pgfplotslist@TOK@b=\expandafter{#2}%
+ \fi
+ \edef#2{\the\pgfplotslist@TOK@b\the\pgfplotslist@TOK@a}%
+}
+
+% Concatenates two lists #2 and #3 into #1
+% Example:
+% \pgfplotslistconcat\result=\foolist&\bar
+\long\def\pgfplotslistconcat#1=#2&#3{%
+ \pgfplotslist@TOK@a=\expandafter{#2}%
+ \pgfplotslist@TOK@b=\expandafter{#3}%
+ \edef#1{\the\pgfplotslist@TOK@a\the\pgfplotslist@TOK@b}%
+}
+
+% implements #2 := pop_front(#1)
+% Example:
+% \pgfplotslistpopfront\foolist\to\poppedfirstelem
+\long\def\pgfplotslistpopfront#1\to#2{%
+ \pgfplotslistcheckempty#1\relax
+ \ifpgfplotslistempty
+ \pgfplots@error{ERROR: \string\pgfplotslistpopfront\ from \string#1\ although list is EMPTY}%
+ \else
+ \expandafter\pgfplotslistpopfront@impl#1\pgfplotslistpopfront@macronames#1#2%
+ \fi
+}
+
+% implementation helper for listpopfront
+\long\def\pgfplotslistpopfront@impl\pgfplotslist@sep#1#2\pgfplotslistpopfront@macronames#3#4{%
+ \def#4{#1}%
+ \def#3{#2}%
+}
+
+% Counts the number of elements in list #1, storing it into the count
+% register #2.
+% Example:
+% \pgfplotslistsize\foo\to{\count0}%
+% \the\count0
+\long\def\pgfplotslistsize#1\to#2{%
+ #2=0%
+ \long\def\pgfplotslist@sep##1{\advance#2 by 1 }%
+ #1%
+}
+
+% Returns the #1th element of list #2 into macro #3
+% Arguments:
+% #1: a count 0,...,N-1 where N is the list size.
+% You may specify a number of a count.
+% #2: a list
+% #3: a macro name
+% Example:
+% Element 0:
+% \pgfplotslistselect0\of\foo\to\elem
+% \elem
+% Element \count1:
+% \pgfplotslistselect\count1\of\foo\to\elem
+\long\def\pgfplotslistselect#1\of#2\to#3{%
+ \global\def\pgfplotslistselect@tmp{\def#3{\pgfplots@error{The requested item #1 of \string#2 is OUT OF RANGE.}}}%
+ \begingroup
+ \count0=#1\relax
+ \long\def\pgfplotslist@sep##1{%
+ \advance\count0-1\relax
+ \ifnum\count0=-1\relax
+ \global\def\pgfplotslistselect@tmp{\def#3{##1}}%
+ \fi%
+ }%
+ #2%
+ \endgroup
+ \pgfplotslistselect@tmp
+}
+
+% Sets the boolean \ifpgfplotslistempty depending on whether list #1 is empty
+% or not.
+% Example:
+%
+% \pgfplotslistcheckempty\foolist
+% \ifpgfplotslistempty
+% List foolist is empty!
+% \else
+% List is not empty.
+% \fi
+\def\pgfplotslistcheckempty#1{%
+ \ifx#1\pgfutil@empty
+ \pgfplotslistemptytrue
+ \else
+ \pgfplotslistemptyfalse
+ \fi
+}
+
+
+% Iterates through each list element, names it #2 and calls code #3.
+% Example:
+% \pgfplotslistnew\foolist{Eins\\Zwei\\Drei\\}%
+% \pgfplotslistforeach\foolist\as\foo{Element \foo\par}%
+% results in
+% Element Eins
+% Element Zwei
+% Element Drei
+% Each single element will be grouped with TeX groups.
+\long\def\pgfplotslistforeach#1\as#2#3{%
+ \begingroup
+ \long\def\pgfplotslist@sep##1{\def#2{##1}%
+ \begingroup
+ #3
+ \endgroup}%
+ #1\relax
+ \endgroup
+}
+
+\newif\ifpgfplotslistforeachungroupedrunning
+
+% The same but without groups around #3.
+\long\def\pgfplotslistforeachungrouped#1\as#2#3{%
+ \ifpgfplotslistforeachungroupedrunning
+ \pgfplots@error{Sorry, you can't nest pgfplotslistforeachungrouped.}%
+ \else
+ \pgfplotslistforeachungroupedrunningtrue
+ \long\def\pgfplotslist@sep##1{\def#2{##1}#3}%
+ #1\relax
+ \pgfplotslistforeachungroupedrunningfalse
+ \fi
+}
diff --git a/Master/texmf-dist/tex/generic/pgfplots/numtable/pgfplotstable.code.tex b/Master/texmf-dist/tex/generic/pgfplots/numtable/pgfplotstable.code.tex
new file mode 100644
index 00000000000..82e27215bf4
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgfplots/numtable/pgfplotstable.code.tex
@@ -0,0 +1,1007 @@
+%--------------------------------------------
+%
+% Package numtable
+%
+% Provides support to read and work with abstact numeric tables of the
+% form
+%
+% COLUMN1 COLUMN2 COLUMN3
+% 1 2 3
+% 4 4 552
+% 1e124 0.00001 1.2345e-12
+% ...
+%
+% Copyright 2007/2008 by Christian Feuersänger.
+%
+% This program is free software: you can redistribute it and/or modify
+% it under the terms of the GNU General Public License as published by
+% the Free Software Foundation, either version 3 of the License, or
+% (at your option) any later version.
+%
+% This program is distributed in the hope that it will be useful,
+% but WITHOUT ANY WARRANTY; without even the implied warranty of
+% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+% GNU General Public License for more details.
+%
+% You should have received a copy of the GNU General Public License
+% along with this program. If not, see <http://www.gnu.org/licenses/>.
+%
+%--------------------------------------------
+
+% This file relies on
+% - pgfplotsliststructure.code.tex
+% - pgfplotsarraystructure.code.tex
+% - a (quite!) recent PGF.
+%
+% and needs some token registers. It does not use more of pgfplots.
+%
+\newif\ifpgfplotstable@search@header
+\newcount\c@pgfplotstable@counta
+\newwrite\pgfplotstable@outfile
+\newif\ifpgfplotstabletypesetdebug
+\newif\ifpgfplotstableuserow
+
+% should always be false; use only in grouped internal macros
+\newif\ifpgfplots@table@options@areset
+
+\input pgfplotstable.coltype.code.tex
+
+\pgfkeys{%
+ /pgfplots/table/header/.is if=pgfplotstable@search@header,
+ /pgfplots/table/header=true,
+ /pgfplots/table/x index/.store in=\pgfplots@plot@tbl@xindex,
+ /pgfplots/table/x index=0,
+ /pgfplots/table/x/.store in=\pgfplots@plot@tbl@x,
+ /pgfplots/table/x=,
+ /pgfplots/table/y index/.store in=\pgfplots@plot@tbl@yindex,
+ /pgfplots/table/y index=1,
+ /pgfplots/table/y/.store in=\pgfplots@plot@tbl@y,
+ /pgfplots/table/y=,
+ /pgfplots/table/x error index/.initial=,
+ /pgfplots/table/y error index/.initial=,
+ /pgfplots/table/x error/.initial=,
+ /pgfplots/table/y error/.initial=,
+ /pgfplots/table/row predicate/.code={},
+ /pgfplots/table/skip rows between index/.style 2 args={%
+ /pgfplots/table/row predicate/.append code={%
+ \ifnum##1<#1\relax
+ \else
+ \ifnum##1<#2\relax
+ \pgfplotstableuserowfalse
+ \fi
+ \fi}
+ },
+ /pgfplots/table/col sep/.is choice,
+ /pgfplots/table/col sep/space/.code = {\def\pgfplotstableread@COLSEP@CASE{0}},
+ /pgfplots/table/col sep/comma/.code = {\def\pgfplotstableread@COLSEP@CASE{1}},
+ /pgfplots/table/col sep/semicolon/.code = {\def\pgfplotstableread@COLSEP@CASE{2}},
+ /pgfplots/table/col sep/colon/.code = {\def\pgfplotstableread@COLSEP@CASE{3}},
+ /pgfplots/table/col sep/braces/.code = {\def\pgfplotstableread@COLSEP@CASE{4}},
+ /pgfplots/table/col sep=space,
+ % columns={name1,name2}
+ % or
+ % columns={[index]2,name2,name3,[index]5}
+ /pgfplots/table/columns/.initial=,
+ /pgfplots/table/column name/.initial=\pgfkeysnovalue,
+ %
+ % this thing here allows to MODIFY 'column name'.
+ %
+ % Argument #1 is the current column name, that means after
+ % evaluating 'column name'. If this key changes anything, it
+ % should write its result back into 'column name'.
+ %
+ % That means you can use 'column name' to assign the name as such
+ % and 'assign column name' to generate final TeX code (for example
+ % to insert \multicolumn{1}{c}{#1} or so).
+ % default is empty which means no change.
+ %/pgfplots/table/assign column name/.code={
+ % \pgfkeyssetvalue{/pgfplots/table/column name}{#1}%
+ %},
+ %
+ %
+ %
+ % A style which inserts \multicolumn{1}{#1}{<column name>} for
+ % each column name.
+ % The column name as such can be set with the 'column name' option.
+ /pgfplots/table/multicolumn names/.style={%
+ /pgfplots/table/assign column name/.code={%
+ \pgfkeyssetvalue{/pgfplots/table/column name}{\multicolumn{1}{#1}{##1}}%
+ }%
+ },
+ /pgfplots/table/multicolumn names/.default=c,
+ /pgfplots/table/dec sep align/.style={%
+ /pgf/number format/assume math mode,
+ /pgf/number format/set decimal separator/.add={&}{},
+ /pgfplots/table/assign column name/.code={%
+ \pgfkeyssetvalue{/pgfplots/table/column name}{\multicolumn{2}{#1}{##1}}%
+ },%
+ /pgfplots/table/column type={>{$}r<{$}@{}>{$}l<{$}},
+ /pgfplots/table/assign cell content/.code={%
+ \pgfmathprintnumberto{##1}\pgfmathresult%
+ \expandafter\pgfutil@in@\expandafter&\expandafter{\pgfmathresult}%
+ \ifpgfutil@in@
+ \else
+ \expandafter\def\expandafter\pgfmathresult\expandafter{\pgfmathresult&}%
+ \fi
+ \pgfkeyslet{/pgfplots/table/@cell content}\pgfmathresult
+ },
+ },
+ /pgfplots/table/dec sep align/.default=c,
+ %
+ % A style which can be used together with the 'dcolumn' package by
+ % David Carlisle.
+ % #1: the dcolumn type, defaults to 'D{.}{.}{2}'
+ % #2: the column name type, defaults to 'c'
+ /pgfplots/table/dcolumn/.style 2 args={%
+ /pgf/number format/assume math mode,
+ column type={#1},
+ multicolumn names=#2,
+ },
+ /pgfplots/table/dcolumn/.default={D{.}{.}{2}}{c},
+ /pgfplots/table/column type/.initial={c},
+ /pgfplots/table/every table/.style={},
+ /pgfplots/table/every even row/.style={},
+ /pgfplots/table/every odd row/.style={},
+ /pgfplots/table/every last row/.style={},
+ /pgfplots/table/every first row/.style={},
+ /pgfplots/table/every head row/.style={},
+ /pgfplots/table/every first column/.style={},
+ /pgfplots/table/every last column/.style={},
+ /pgfplots/table/every even column/.style={},
+ /pgfplots/table/every odd column/.style={},
+ /pgfplots/table/before row/.initial=,
+ /pgfplots/table/after row/.initial=,
+ /pgfplots/table/begin table/.initial={\begin{tabular}},
+ /pgfplots/table/end table/.initial={\end{tabular}},
+ /pgfplots/table/outfile/.initial=,
+ /pgfplots/table/debug/.is if=pgfplotstabletypesetdebug,
+ %
+ % will be redefined by |assign cell content| for every cell:
+ /pgfplots/table/@cell content/.initial=,
+ %
+ % #1: the cells content as it has been found in the input table
+ % this command key should somehow fill |cell content|.
+ /pgfplots/table/assign cell content/.code={%
+ \pgfmathprintnumberto{#1}\pgfmathresult%
+ \pgfkeyslet{/pgfplots/table/@cell content}\pgfmathresult
+ },
+ %
+ % this here is the default formatting. It uses
+ % \pgfmathprintnumber.
+ /pgfplots/table/assign cell content as number/.code={%
+ \pgfmathprintnumberto{#1}\pgfmathresult%
+ \pgfkeyslet{/pgfplots/table/@cell content}\pgfmathresult
+ },
+ /pgfplots/table/string type/.style={%
+ /pgfplots/table/assign cell content/.style={%
+ /pgfplots/table/@cell content={##1}%
+ }%
+ },%
+ /pgfplots/table/font/.initial=,
+ /pgfplots/table/.unknown/.code={%
+ \pgfqkeys{/pgf/number format}{\pgfkeyscurrentname=#1}%
+ }%
+}
+
+% \pgfplotstableread[OPTIONS] {FILE} to \name
+%
+% This method reads a table from FILE to macro \name.
+%
+% FILE is something like
+% G Basis dof L2 A Lmax cgiter maxlevel eps
+% 5 5 5 8.31160034e-02 0.00000000e+00 1.80007647e-01 2 2 -1
+% 17 17 17 2.54685628e-02 0.00000000e+00 3.75580565e-02 5 3 -1
+% ...
+%
+% A number format line is also understood:
+% G Basis dof L2 A Lmax cgiter maxlevel eps
+% $flags int int int sci:8 sci:8 sci:8 int int std:8
+% 5 5 5 8.31160034e-02 0.00000000e+00 1.80007647e-01 2 2 -1
+%
+% or a three-column-gnuplot file with 2 comment headers like
+% #Curve 0, 20 points
+% #x y type
+% 0.00000 0.00000 i
+% 0.52632 0.50235 i
+%
+% The table data is stored columnwise in lists and can be accessed
+% with the other methods of this package.
+\def\pgfplotstableread{%
+ \pgfutil@ifnextchar[{%
+ \pgfplotstableread@impl
+ }{%
+ \pgfplotstableread@impl[]%
+ }%
+}
+
+% BACKWARDS COMPATIBILITY
+\let\pgfnumtableread=\pgfplotstableread
+
+\def\pgfplotstablegetcolumnlist#1\to#2{%
+ \let#2=#1
+}
+
+\def\pgfplotstablegetcolumnbyname#1\of#2\to#3{%
+ \pgfutil@ifundefined{\string#2@#1}{%
+ \pgfplots@error{Sorry, could not retrieve column '#1' from table...}%
+ }{%
+ \expandafter\let\expandafter#3\csname\string#2@#1\endcsname
+ }%
+}
+
+\def\pgfplotstablegetcolumnnamebyindex#1\of#2\to#3{%
+ \pgfplotslistselect#1\of#2\to#3\relax
+}%
+\def\pgfplotstablegetcolumnbyindex#1\of#2\to#3{%
+ \pgfplotslistselect#1\of#2\to#3\relax
+ \expandafter\pgfplotstablegetcolumnbyname#3\of#2\to{#3}%
+}
+
+\def\pgfplotstablecopy#1\to#2{%
+ \let#2=#1%
+ \pgfplotslistforeachungrouped#1\as\pgfplotstable@TMP{%
+ \def\pgfplotstable@TMPB{%
+ \expandafter\let\csname\string#2@\pgfplotstable@TMP\endcsname}%
+ \expandafter\pgfplotstable@TMPB\csname\string#1@\pgfplotstable@TMP\endcsname
+ }%
+}
+
+% Typesets a table.
+%
+% \pgfplotstabletypeset[<options>]<\tablestructure>
+%
+% If you do not select any columns, the complete table is drawn.
+%
+% There are several options and styles which are available in
+% <options>, see the declaration above.
+%
+% ATTENTION: the default implementation employs
+% \begin{tabular}...\end{tabular} and is therefor only usable with
+% LaTeX!
+%
+% You will need to reconfigure the tables.
+%
+% Inside of \pgfplotstabletypeset, the macros \pgfplotstablecol and
+% \pgfplotstablerow will expand to the current column index and row
+% index.
+\def\pgfplotstabletypeset{%
+ \pgfutil@ifnextchar[{%
+ \pgfplotstabletypeset@opt
+ }{%
+ \pgfplotstabletypeset@opt[]%
+ }%
+}
+
+% Like \pgfplotstabletypeset, but the first argument is a file name.
+\def\pgfplotstabletypesetfile{%
+ \pgfutil@ifnextchar[{%
+ \pgfplotstabletypesetfile@opt
+ }{%
+ \pgfplotstabletypesetfile@opt[]%
+ }%
+}
+\def\pgfplotstabletypesetfile@opt[#1]#2{%
+ \begingroup
+ \ifpgfplots@table@options@areset
+ \else
+ \pgfplots@table@options@aresettrue
+ \pgfplotstableset{/pgfplots/table/every table,#1}%
+ \fi
+ \pgfplotstableread{#2}\pgfplotstabletypesetfile@opt@@
+ \pgfplotstabletypeset\pgfplotstabletypesetfile@opt@@
+ \endgroup
+}%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% IMPLEMENTATION
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\newif\ifpgfplotstableread@curline@contains@colnames
+\newif\ifpgfplotstableread@foundcolnames
+\newif\ifpgfplotstableread@skipline
+\def\pgfplotstableread@impl[#1]#2{%
+ \pgfutil@ifnextchar t{%
+ \pgfplotstableread@impl@@{#1}{#2}%
+ }{%
+ \pgfplotstableread@impl@{#1}{#2}%
+ }%
+}%
+
+% I don't know why; but I started with
+% >> \pgfplotstableread[]{file} to \macro
+% That ' to ' is really ugly. This here is for backwards
+% compatibility:
+\def\pgfplotstableread@impl@@#1#2to #3{%
+ \pgfplotstableread@impl@{#1}{#2}{#3}%
+}%
+
+\def\pgfplotstableread@impl@#1#2#3{%
+ \begingroup
+ \ifpgfplots@table@options@areset
+ \else
+ \pgfplotstableset{/pgfplots/table/every table,#1}%
+ \fi
+%\pgfplots@message{ATTEMPTING TO READ #2}%
+ \openin1=#2\relax
+ \def\pgfplotstableread@filename{#2}%
+ \let\pgfplotstableread@lineno=\c@pgf@counta
+ \let\pgfplotstableread@numcols=\c@pgf@countb
+ \let\pgfplotstableread@curcol=\c@pgf@countc
+ \let\pgfplotstableread@usablelineno=\c@pgf@countd
+ \pgfplotstableread@lineno=0
+ \pgfplotstableread@usablelineno=0
+ \pgfplotstableread@numcols=0
+ \pgfplotslistnewempty\pgfplotstable@colnames
+ \ifeof1
+ \pgfplotstable@error{Could not read table file '#2'.}%
+ \fi
+ %
+ \pgfplotstableread@loop@over@lines
+ %
+ \ifpgfplotstableread@foundcolnames
+ \else
+ \pgfplotstableread@create@column@names@with@numbers
+ \fi
+ % Well, now write the identified data to #3:
+ %
+ % make all temporaries global:
+ \global\let\pgfplotstable@colnames=\pgfplotstable@colnames
+ \pgfplotstableread@curcol=0\relax
+ \loop
+ \ifnum\pgfplotstableread@curcol<\pgfplotstableread@numcols
+%\pgfplots@message{ASSIGNING COLUMN NO \the\pgfplotstableread@curcol / \the\pgfplotstableread@numcols}%
+ % numtable@TMP := column list content
+ \expandafter\global\expandafter\let\expandafter\pgfplotstable@TMP\csname numtable@col@\the\pgfplotstableread@curcol\endcsname
+ % global := numtable@TMP
+ \expandafter\global\expandafter\let\csname numtable@col@\the\pgfplotstableread@curcol\endcsname=\pgfplotstable@TMP
+ \advance\pgfplotstableread@curcol by1\relax
+ \repeat
+ \closein1
+ \endgroup
+ % Now, we can access the global variables!
+ % copy them to #3.
+ \let#3=\pgfplotstable@colnames
+ \c@pgfplotstable@counta=0\relax%
+ \pgfplotslistforeachungrouped\pgfplotstable@colnames\as\pgfplotstable@TMP{%
+ \def\pgfplotstable@TMPB{%
+ \expandafter\let\csname\string#3@\pgfplotstable@TMP\endcsname}%
+ \expandafter\pgfplotstable@TMPB\csname numtable@col@\the\c@pgfplotstable@counta\endcsname
+%\message{Column '\pgfplotstable@TMP' has entries: \expandafter\meaning\csname numtable@col@\the\c@pgfplotstable@counta\endcsname}%
+ \expandafter\global\expandafter\let\csname numtable@col@\the\c@pgfplotstable@counta\endcsname=\pgfutil@empty
+ \advance\c@pgfplotstable@counta by1\relax
+ }%
+ \global\let\pgfplotstable@colnames=\pgfutil@empty
+}
+
+\def\pgfplotstableread@loop@over@lines{%
+ \ifeof1
+%\pgfplots@message{EOF}%
+ \else
+ \read1 to\pgfplotstable@LINE
+ \ifeof1
+ \else
+ \expandafter\pgfplotstableread@checkspecial@line\pgfplotstable@LINE\pgfplotstable@EOI
+ \ifpgfplotstableread@skipline
+ \else
+ %--------------------------------------------------
+ % \ifnum\pgfplotstableread@lineno=0
+ % \let\pgfplotstable@firstline=\pgfplotstable@LINE
+ % \fi
+ %--------------------------------------------------
+%\pgfplots@message{READING LINE \the\pgfplotstableread@lineno: '\meaning\pgfplotstable@LINE'.}%
+ \ifnum\pgfplotstableread@numcols=0\relax
+ \pgfplotstableread@curcol=0\relax
+ \pgfplotstableread@curline@contains@colnamesfalse
+ \pgfplotstableread@impl@DO\pgfplotstableread@impl@countcols@and@identifynames@NEXT\pgfplotstable@LINE
+ %\expandafter\pgfplotstableread@impl@countcols@and@identifynames@ITERATE\pgfplotstable@LINE\pgfplotstable@EOI
+ \pgfplotstableread@numcols=\pgfplotstableread@curcol
+ \pgfplotstableread@curcol=0\relax
+ % Create empty column lists:
+ \pgfplotstableread@create@column@lists
+ %
+ \ifnum\pgfplotstableread@usablelineno=0\relax
+ \ifnum\pgfplotstableread@lineno=2\relax
+ \ifnum\pgfplotstableread@numcols=3\relax
+ % The file started with
+ % #...
+ % #...
+ % X Y i
+ % -> thats a gnuplot file!
+ \pgfplotstableread@curline@contains@colnamesfalse
+ \fi
+ \fi
+ \fi
+ % Now, read the first line.
+ % It contains either
+ % - column names,
+ % - numerical data,
+ % - nothing (comments).
+ \ifpgfplotstableread@curline@contains@colnames
+ \pgfplotstableread@foundcolnamestrue
+ \pgfplotstableread@curcol=0\relax
+ \pgfplotstableread@impl@DO\pgfplotstableread@impl@collectcolnames@NEXT\pgfplotstable@LINE
+ %\expandafter\pgfplotstableread@impl@collectcolnames@ITERATE\pgfplotstable@LINE\pgfplotstable@EOI
+ \else
+ \pgfplotstableread@foundcolnamesfalse
+ \pgfplotstableread@curcol=0\relax
+ % Leave column name lists empty...
+ \pgfplotstableread@impl@DO\pgfplotstableread@impl@nextrow@NEXT\pgfplotstable@LINE
+ %\expandafter\pgfplotstableread@impl@nextrow@ITERATE\pgfplotstable@LINE\pgfplotstable@EOI
+ \fi
+%\pgfplots@message{After reading first row: found '\the\pgfplotstableread@numcols' columns; column name list='\meaning\pgfplotstable@colnames'}%
+ \else
+ \pgfplotstableread@curcol=0\relax
+ \pgfplotstableread@impl@DO\pgfplotstableread@impl@nextrow@NEXT\pgfplotstable@LINE
+ %\expandafter\pgfplotstableread@impl@nextrow@ITERATE\pgfplotstable@LINE\pgfplotstable@EOI
+ \fi
+ \ifnum\pgfplotstableread@curcol=\pgfplotstableread@numcols
+ \else
+ \pgfplotstable@error{ERROR: the input table has an unexpected number of columns in row '\the\pgfplotstableread@lineno'. Expected: '\the\pgfplotstableread@numcols'; got '\the\pgfplotstableread@curcol. Maybe the input table is corrupted?}%
+ \fi
+ \advance\pgfplotstableread@usablelineno by1\relax
+ \fi
+ \fi
+ \advance\pgfplotstableread@lineno by1\relax
+ \pgfplotstableread@loop@over@lines
+ \fi
+}
+
+\def\pgfplotstableread@checkspecial@line{%
+ \pgfutil@ifnextchar##{%
+ \pgfplotstableread@skiplinetrue
+ \pgfplotstableread@impl@gobble
+ }{%
+ \pgfutil@ifnextchar${%
+ \pgfplotstableread@process@flags@line
+ }{%
+ \pgfutil@ifnextchar\pgfplotstable@EOI{%
+ \pgfplotstableread@skiplinetrue
+ \pgfplotstableread@impl@gobble
+ }{%
+ \pgfutil@ifnextchar\par{%
+ \pgfplotstableread@skiplinetrue
+ \pgfplotstableread@impl@gobble
+ }{%
+ \pgfplotstableread@skiplinefalse
+ \pgfplotstableread@impl@gobble
+ }%
+ }%
+ }%
+ }%
+}
+
+\long\def\pgfplotstableread@process@flags@line$flags {%
+%\pgfplots@message{Ignoring flags line ...}%
+ \pgfplotstableread@skiplinetrue
+ \pgfplotstableread@impl@gobble
+}
+
+\def\pgfplotstableread@create@column@lists{%
+ \loop
+ \ifnum\pgfplotstableread@curcol<\pgfplotstableread@numcols
+ \expandafter\pgfplotslistnewempty\csname numtable@col@\the\pgfplotstableread@curcol\endcsname
+ \advance\pgfplotstableread@curcol by1\relax
+ \repeat
+}
+
+\def\pgfplotstableread@create@column@names@with@numbers{%
+ \pgfplotstableread@curcol=0\relax
+ \loop
+ \ifnum\pgfplotstableread@curcol<\pgfplotstableread@numcols
+ \expandafter\pgfplotslistpushback\the\pgfplotstableread@curcol\to\pgfplotstable@colnames
+ \advance\pgfplotstableread@curcol by1\relax
+ \repeat
+}
+
+\long\def\pgfplotstableread@impl@gobble#1\pgfplotstable@EOI{}%
+
+\def\pgfplotstable@EOI{\pgfplotstable@EOI}%
+
+%%%%%%%%%%%%%%%
+
+% A loop command which processes every single entry in a raw data row #2
+% and invokes the macro #1{<arg>} for each found column entry.
+%
+% Columns are separated by the /pgfplots/table/col sep character.
+%
+% #1: a command which takes precisely one argument. It will be called
+% for each found column entry
+%
+% #2: a macro containing a raw data line with <col sep> separated
+% entries.
+\def\pgfplotstableread@impl@DO#1#2{%
+ \let\pgfplotstableread@impl@ITERATE@NEXT@=#1\relax
+ \ifcase\pgfplotstableread@COLSEP@CASE\relax
+ % SPACE:
+ \expandafter\pgfplotstableread@impl@ITERATE#2\pgfplotstable@EOI
+ \or
+ % COMMA:
+ \let\pgfplotstableread@impl@ITERATE@NEXT=\pgfplotstableread@impl@ITERATE@NEXT@COMMA
+ \expandafter\pgfplotstableread@impl@ITERATE#2,\pgfplotstable@EOI
+ \or
+ % SEMICOLON:
+ \let\pgfplotstableread@impl@ITERATE@NEXT=\pgfplotstableread@impl@ITERATE@NEXT@SEMICOLON
+ \expandafter\pgfplotstableread@impl@ITERATE#2;\pgfplotstable@EOI
+ \or
+ % COLON:
+ \let\pgfplotstableread@impl@ITERATE@NEXT=\pgfplotstableread@impl@ITERATE@NEXT@COLON
+ \expandafter\pgfplotstableread@impl@ITERATE#2:\pgfplotstable@EOI
+ \or
+ % BRACE:
+ \let\pgfplotstableread@impl@ITERATE@NEXT=\pgfplotstableread@impl@ITERATE@NEXT@BRACE
+ \expandafter\pgfplotstableread@impl@ITERATE#2\pgfplotstable@EOI
+ \fi
+}%
+\def\pgfplotstableread@impl@ITERATE{%
+ \pgfutil@ifnextchar\pgfplotstable@EOI{%
+ \pgfplotstableread@impl@gobble
+ }{%
+ \pgfplotstableread@impl@ITERATE@NEXT
+ }%
+}%
+\def\pgfplotstableread@impl@ITERATE@NEXT#1 {%
+ \pgfplotstableread@impl@ITERATE@NEXT@{#1}%
+ \pgfplotstableread@impl@ITERATE
+}%
+\def\pgfplotstableread@impl@ITERATE@NEXT@COMMA#1,{%
+ \pgfplotstableread@impl@ITERATE@NEXT@{#1}%
+ \pgfplotstableread@impl@ITERATE
+}%
+\def\pgfplotstableread@impl@ITERATE@NEXT@SEMICOLON#1;{%
+ \pgfplotstableread@impl@ITERATE@NEXT@{#1}%
+ \pgfplotstableread@impl@ITERATE
+}%
+\def\pgfplotstableread@impl@ITERATE@NEXT@COLON#1:{%
+ \pgfplotstableread@impl@ITERATE@NEXT@{#1}%
+ \pgfplotstableread@impl@ITERATE
+}%
+\def\pgfplotstableread@impl@ITERATE@NEXT@BRACE#1{%
+ \pgfplotstableread@impl@ITERATE@NEXT@{#1}%
+ \pgfplotstableread@impl@ITERATE
+}%
+%%%%%%%%%%%%
+
+
+\long\def\pgfplotstableread@impl@nextrow@NEXT#1{%
+%\pgfplots@message{Inserting '#1' at (\the\pgfplotstableread@lineno, \the\pgfplotstableread@curcol).}%
+ \def\pgfplotstableread@TMP{\pgfplotslistpushback#1\to}%
+ \expandafter\pgfplotstableread@TMP\csname numtable@col@\the\pgfplotstableread@curcol\endcsname
+ \advance\pgfplotstableread@curcol by1\relax
+}
+
+
+
+\long\def\pgfplotstableread@impl@collectcolnames@NEXT#1{%
+%\pgfplots@message{Got column name no \the\pgfplotstableread@curcol\ as '#1'}%
+ \pgfutil@ifundefined{pgfplotstableread@impl@COLNAME@#1}{%
+ \def\pgfplotstable@TMP{#1}%
+ }{% generate unique column names
+ \pgfplots@warning{Warning: table '\pgfplotstableread@filename' has non-unique column name '#1'. Only the first occurence can be accessed via column names.}%
+ \edef\pgfplotstable@TMP{#1--index\the\pgfplotstableread@curcol}%
+ }%
+ \expandafter\def\csname pgfplotstableread@impl@COLNAME@#1\endcsname{foo}% remember this name.
+ \expandafter\pgfplotslistpushback\expandafter{\pgfplotstable@TMP}\to\pgfplotstable@colnames
+ \advance\pgfplotstableread@curcol by1\relax
+}
+
+
+
+
+\long\def\pgfplotstableread@impl@countcols@and@identifynames@NEXT#1{%
+ \advance\pgfplotstableread@curcol by1\relax
+ \ifpgfplotstable@search@header
+ \ifpgfplotstableread@curline@contains@colnames
+ \else
+ \pgfplotstableread@isnumber@ITERATE#1\pgfplotstable@EOI
+%\ifpgfplotstableread@curline@contains@colnames\pgfplots@message{'#1' is a column name!}\else\pgfplots@message{'#1' is NO column name!}\fi
+ \fi
+ \fi
+}
+\def\pgfplotstableread@isnumber@plus{+}
+\def\pgfplotstableread@isnumber@minus{-}
+\def\pgfplotstableread@isnumber@zero{0}
+\def\pgfplotstableread@isnumber@one{1}
+\def\pgfplotstableread@isnumber@two{2}
+\def\pgfplotstableread@isnumber@three{3}
+\def\pgfplotstableread@isnumber@four{4}
+\def\pgfplotstableread@isnumber@five{5}
+\def\pgfplotstableread@isnumber@six{6}
+\def\pgfplotstableread@isnumber@seven{7}
+\def\pgfplotstableread@isnumber@eight{8}
+\def\pgfplotstableread@isnumber@nine{9}
+\def\pgfplotstableread@isnumber@e{e}
+\def\pgfplotstableread@isnumber@E{E}
+\def\pgfplotstableread@isnumber@period{.}
+
+\def\pgfplotstableread@isnumber@ITERATE#1{%
+ \def\pgfplotstableread@CURTOK{#1}%
+ \ifx\pgfplotstableread@CURTOK\pgfplotstable@EOI
+ \def\pgfplotstableread@NEXT{}%
+ \else
+ \def\pgfplotstableread@NEXT{\pgfplotstableread@isnumber@ITERATE}%
+ \ifx\pgfplotstableread@CURTOK\pgfplotstableread@isnumber@plus
+ \else
+ \ifx\pgfplotstableread@CURTOK\pgfplotstableread@isnumber@minus
+ \else
+ \ifx\pgfplotstableread@CURTOK\pgfplotstableread@isnumber@zero
+ \else
+ \ifx\pgfplotstableread@CURTOK\pgfplotstableread@isnumber@one
+ \else
+ \ifx\pgfplotstableread@CURTOK\pgfplotstableread@isnumber@two
+ \else
+ \ifx\pgfplotstableread@CURTOK\pgfplotstableread@isnumber@three
+ \else
+ \ifx\pgfplotstableread@CURTOK\pgfplotstableread@isnumber@four
+ \else
+ \ifx\pgfplotstableread@CURTOK\pgfplotstableread@isnumber@five
+ \else
+ \ifx\pgfplotstableread@CURTOK\pgfplotstableread@isnumber@six
+ \else
+ \ifx\pgfplotstableread@CURTOK\pgfplotstableread@isnumber@seven
+ \else
+ \ifx\pgfplotstableread@CURTOK\pgfplotstableread@isnumber@eight
+ \else
+ \ifx\pgfplotstableread@CURTOK\pgfplotstableread@isnumber@nine
+ \else
+ \ifx\pgfplotstableread@CURTOK\pgfplotstableread@isnumber@e
+ \else
+ \ifx\pgfplotstableread@CURTOK\pgfplotstableread@isnumber@E
+ \else
+ \ifx\pgfplotstableread@CURTOK\pgfplotstableread@isnumber@period
+ \else
+%\message{NO ITS NOT! Token: '\meaning\pgfplotstableread@CURTOK'}%
+ % it's no number, so it is a column name.
+ \pgfplotstableread@curline@contains@colnamestrue
+ \def\pgfplotstableread@NEXT{\pgfplotstableread@impl@gobble}%
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \fi
+ \pgfplotstableread@NEXT
+}
+
+\def\pgfplotstable@error#1{\PackageError{numtable}{#1}{Please refer to the manual for further information.}}%
+
+
+\def\pgfplotstableset{%
+ \pgfqkeys{/pgfplots/table}%
+}%
+
+% Accepts a macro #1 which contains an argument denoting a column
+% name.
+%
+% It checks whether #1 starts with '#', indicating that it is actually
+% a column INDEX. If that is the case,
+% \ifpgfplotstableread@foundcolnames is set to false and the index is
+% returned into #1.
+%
+% Otherwise, \ifpgfplotstableread@foundcolnames is set to true.
+\def\pgfplotstabletypeset@is@colname#1{%
+ \expandafter\pgfplotstabletypeset@is@colname@#1\pgfplotstable@EOI
+ \ifpgfplotstableread@foundcolnames
+ \else
+ \let#1=\pgfplotstable@TMP
+ \fi
+}%
+\def\pgfplotstabletypeset@is@colname@{%
+ \pgfutil@ifnextchar[{%
+ \pgfplotstabletypeset@is@colname@index
+ }{%
+ \pgfplotstableread@foundcolnamestrue
+ \pgfplotstabletypeset@is@colname@name
+ }%
+}
+\def\pgfplotstabletypeset@is@colname@index@@{index}%
+\def\pgfplotstabletypeset@is@colname@index[#1]#2\pgfplotstable@EOI{%
+ \def\pgfplotstable@TMP{#1}%
+ \ifx\pgfplotstable@TMP\pgfplotstabletypeset@is@colname@index@@
+ \pgfplotstableread@foundcolnamesfalse
+ \def\pgfplotstable@TMP{#2}%
+ \else
+ \pgfplotstableread@foundcolnamestrue
+ \fi
+}%
+\def\pgfplotstabletypeset@is@colname@name#1\pgfplotstable@EOI{}%
+\def\pgfplotstabletypeset@getfinalentry#1#2{%
+ \pgfkeysvalueof{/pgfplots/table/assign cell content/.@cmd}#1\pgfeov
+ \pgfkeysgetvalue{/pgfplots/table/@cell content}{#2}%
+}%
+
+% processes the option 'assign column name'
+\def\pgfplotstabletypeset@assign@final@colname#1#2{%
+ \pgfkeysifdefined{/pgfplots/table/assign column name/.@cmd}{%
+ \pgfkeysvalueof{/pgfplots/table/assign column name/.@cmd}#1\pgfeov
+ \pgfkeysgetvalue{/pgfplots/table/column name}{#2}%
+ }{}%
+}
+\def\pgfplotstabletypeset@nocolname{\pgfkeysnovalue}
+
+% checks if #1 contains invalid chars for pgfkeys and sets
+% \ifpgfutil@in@ to true if that is the case.
+\def\pgfplotstable@checkspecialchars@pgfkeys#1\pgfplotstable@EOI{%
+ \pgfutil@in@/{#1}%
+ \ifpgfutil@in@
+ \else
+ \pgfutil@in@={#1}%
+ \ifpgfutil@in@
+ \else
+ \pgfutil@in@,{#1}%
+ \fi
+ \fi
+
+}%
+
+% TODO
+% - replace grouped list foreach by popfront-loop and use arrays
+% directly -> group only the pgfkeys eval
+\def\pgfplotstabletypeset@opt[#1]#2{%
+ \begingroup
+ \def\pgfplotstablecol{\the\c@pgfplotstable@colindex}%
+ \def\pgfplotstablerow{\the\c@pgfplotstable@rowindex}%
+% \def\pgfplotstablecols{\the\c@pgfplotstable@numcols}%
+% \def\pgfplotstablerows{\the\c@pgfplotstable@numrows}%
+ \ifpgfplots@table@options@areset
+ \else
+ \pgfplotstableset{/pgfplots/table/every table,#1}%
+ \fi
+ \pgfkeysgetvalue{/pgfplots/table/columns}{\pgfplotstable@colnames}%
+ \ifx\pgfplotstable@colnames\pgfutil@empty
+ \pgfplotstablegetcolumnlist#2\to\pgfplotstable@colnames
+ \else
+ \expandafter\pgfplotslistnew\expandafter\pgfplotstable@colnames\expandafter{\pgfplotstable@colnames}%
+ \fi
+ \global\pgfplotslistnewempty\pgfplotstabletypeset@final@colnames
+ \global\pgfplotslistnewempty\pgfplotstabletypeset@final@coltypes
+ \global\pgfplotslistnewempty\pgfplotstabletypeset@final@cols
+ \let\c@pgfplotstable@numcols=\c@pgf@counta
+ \let\c@pgfplotstable@numrows=\c@pgf@countd
+ \let\c@pgfplotstable@rowindex=\c@pgf@countc
+ \let\c@pgfplotstable@colindex=\c@pgf@countb
+ \pgfplotslistsize\pgfplotstable@colnames\to\c@pgfplotstable@numcols
+ \c@pgfplotstable@colindex=0\relax
+ \pgfplotslistforeach\pgfplotstable@colnames\as\pgfplotstable@colname{%
+ \c@pgfplotstable@rowindex=0\relax
+ \pgfplotstabletypeset@is@colname\pgfplotstable@colname
+ \ifpgfplotstableread@foundcolnames
+ \else
+ \pgfplotstablegetcolumnnamebyindex\pgfplotstable@colname\of#2\to\pgfplotstable@colname
+ \fi
+ \pgfplotstablegetcolumnbyname\pgfplotstable@colname\of#2\to\pgfplotstable@col
+ %
+ % Set keys for columns!
+ \ifodd\c@pgfplotstable@colindex
+ \pgfplotslist@TOK@a={every odd column}%
+ \else
+ \pgfplotslist@TOK@a={every even column}%
+ \fi
+ \ifnum\c@pgfplotstable@colindex=0\relax
+ \pgfplotslist@TOK@a=\expandafter{\the\pgfplotslist@TOK@a,every first column}%
+ \fi
+ \global\advance\c@pgfplotstable@colindex by1\relax
+ \ifnum\c@pgfplotstable@colindex=\c@pgfplotstable@numcols
+ \pgfplotslist@TOK@a=\expandafter{\the\pgfplotslist@TOK@a,every last column}%
+ \fi
+ \pgfplotslist@TOK@b=\expandafter{\pgfplotstable@colname}%
+ \expandafter\pgfplotstable@checkspecialchars@pgfkeys\the\pgfplotslist@TOK@b\pgfplotstable@EOI
+ \ifpgfutil@in@
+ \edef\pgfplotstable@TMP{\the\pgfplotslist@TOK@a,columns/{\the\pgfplotslist@TOK@b}/.try}%
+ \else
+ \edef\pgfplotstable@TMP{\the\pgfplotslist@TOK@a,columns/\the\pgfplotslist@TOK@b/.try}%
+ \fi
+ \expandafter\pgfplotstableset\expandafter{\pgfplotstable@TMP}%
+ %
+ \pgfkeysgetvalue{/pgfplots/table/column name}{\pgfplotstable@colname@out}%
+ \ifx\pgfplotstable@colname@out\pgfplotstabletypeset@nocolname
+ \let\pgfplotstable@colname@out=\pgfplotstable@colname
+ \fi
+ \expandafter\pgfplotstabletypeset@assign@final@colname\expandafter{\pgfplotstable@colname@out}\pgfplotstable@colname@out
+ {\globaldefs=1
+ \expandafter\pgfplotslistpushback\pgfplotstable@colname@out\to\pgfplotstabletypeset@final@colnames
+ }%
+ \pgfkeysgetvalue{/pgfplots/table/column type}{\pgfplotstable@coltype}%
+ {\globaldefs=1
+ \expandafter\pgfplotslistpushback\pgfplotstable@coltype\to\pgfplotstabletypeset@final@coltypes
+ }%
+ %
+ \pgfplotslistnewempty\pgfplotstable@col@processed
+ \pgfplotslistforeachungrouped\pgfplotstable@col\as\pgfplotstable@entry{%
+ \pgfplotstableuserowtrue
+ \edef\pgfplotstable@TMP{\noexpand\pgfkeysvalueof{/pgfplots/table/row predicate/.@cmd}\the\c@pgfplotstable@rowindex}%
+ \pgfplotstable@TMP\pgfeov
+ \ifpgfplotstableuserow
+ \expandafter\pgfplotstabletypeset@getfinalentry\expandafter{\pgfplotstable@entry}{\pgfplotstable@entry}%
+ \expandafter\pgfplotslistpushback\pgfplotstable@entry\to\pgfplotstable@col@processed
+ \fi
+ \advance\c@pgfplotstable@rowindex by1\relax
+ }%
+ {\globaldefs=1
+ \expandafter\pgfplotslistpushback\expandafter{\pgfplotstable@col@processed}\to\pgfplotstabletypeset@final@cols
+ }%
+ }%
+ %
+ % Ok, I have now everything which will come into the final table.
+ %
+ % But I have it column-oriented; I need to transpose the storage.
+ %
+ % The following code assembles a
+ % \begin{tabular}{}
+ % ...
+ % \end{tabular}
+ % statement piece after piece.
+ %
+%\message{I have now \meaning\pgfplotstabletypeset@final@colnames, and \meaning\pgfplotstabletypeset@final@cols.}%
+ % Step 1: column names.
+ \c@pgfplotstable@colindex=0\relax
+ % STEP 1.1: collect column types:
+ \def\pgfplotstable@resulttypes{}%
+ \pgfplotslistforeachungrouped\pgfplotstabletypeset@final@coltypes\as\pgfplotstable@coltype{%
+ \pgfplotslist@TOK@a=\expandafter{\pgfplotstable@resulttypes}%
+ \pgfplotslist@TOK@b=\expandafter{\pgfplotstable@coltype}%
+ \edef\pgfplotstable@resulttypes{\the\pgfplotslist@TOK@a\the\pgfplotslist@TOK@b}%
+ }%
+ \pgfkeysgetvalue{/pgfplots/table/begin table}{\pgfplotstable@entry}%
+ \pgfplotslist@TOK@a=\expandafter{\pgfplotstable@entry}%
+ \ifx\pgfplotstable@resulttypes\pgfutil@empty
+ \edef\pgfplotstable@result{\the\pgfplotslist@TOK@a}%
+ \else
+ \pgfplotslist@TOK@b=\expandafter{\pgfplotstable@resulttypes}%
+ \edef\pgfplotstable@result{\the\pgfplotslist@TOK@a{\the\pgfplotslist@TOK@b}}%
+ \fi
+ %
+ \pgfkeysgetvalue{/pgfplots/table/font}{\pgfplotstable@font}%
+ \ifx\pgfplotstable@font\pgfutil@empty
+ \else
+ \pgfplotslist@TOK@a=\expandafter{\pgfplotstable@font}%
+ \pgfplotslist@TOK@b=\expandafter{\pgfplotstable@result}%
+ \edef\pgfplotstable@result{\noexpand\begingroup\the\pgfplotslist@TOK@a\the\pgfplotslist@TOK@b}%
+ \fi
+ %
+
+ % Step 1.2: Collect FIRST ROW (column names)
+ \begingroup
+ \pgfplotstableset{every head row}%
+ \pgfkeysgetvalue{/pgfplots/table/before row}{\pgfplotstable@before}%
+ \pgfkeysgetvalue{/pgfplots/table/after row}{\pgfplotstable@after}%
+ \pgfplotslist@TOK@a=\expandafter{\pgfplotstable@before}%
+ \pgfplotslist@TOK@b=\expandafter{\pgfplotstable@after}%
+ \xdef\pgfplotstable@TMP{%
+ \noexpand\def\noexpand\pgfplotstable@before{\the\pgfplotslist@TOK@a}%
+ \noexpand\def\noexpand\pgfplotstable@after{\the\pgfplotslist@TOK@b}%
+ }%
+ \endgroup
+ \pgfplotstable@TMP
+ % insert 'before row' here:
+ \pgfplotslist@TOK@a=\expandafter{\pgfplotstable@before}%
+ \pgfplotslist@TOK@b=\expandafter{\pgfplotstable@result}%
+ \edef\pgfplotstable@result{\the\pgfplotslist@TOK@b\the\pgfplotslist@TOK@a}%
+ %
+ \pgfplotslistforeachungrouped\pgfplotstabletypeset@final@colnames\as\pgfplotstable@colname@out{%
+ \advance\c@pgfplotstable@colindex by1\relax
+ \pgfplotslist@TOK@a=\expandafter{\pgfplotstable@result}%
+ \ifnum\c@pgfplotstable@colindex=\c@pgfplotstable@numcols\relax
+ \pgfplotslist@TOK@b=\expandafter{\pgfplotstable@colname@out \\}%
+ \else
+ \pgfplotslist@TOK@b=\expandafter{\pgfplotstable@colname@out &}%
+ \fi
+ \edef\pgfplotstable@result{\the\pgfplotslist@TOK@a\the\pgfplotslist@TOK@b}%
+ }%
+ % insert 'after row' here:
+ \pgfplotslist@TOK@a=\expandafter{\pgfplotstable@result}%
+ \pgfplotslist@TOK@b=\expandafter{\pgfplotstable@after}%
+ \edef\pgfplotstable@result{\the\pgfplotslist@TOK@a\the\pgfplotslist@TOK@b}%
+ %
+%\message{I have now \meaning\pgfplotstable@result.}%
+ % Step 2: column contents.
+ % I will first convert \pgfplotstabletypeset@final@cols into an array.
+ \c@pgfplotstable@colindex=0\relax
+ \pgfplotsarraynewempty\pgfplotstabletypeset@final@cols@array
+ \pgfplotslistforeachungrouped\pgfplotstabletypeset@final@cols\as\pgfplotstable@col@processed{%
+ \expandafter\pgfplotsarraypushback\expandafter{\pgfplotstable@col@processed}\to\pgfplotstabletypeset@final@cols@array
+ }%
+ % init numrows:
+ \pgfplotsarrayselect\c@pgfplotstable@colindex\of\pgfplotstabletypeset@final@cols@array\to\pgfplotstable@col@processed
+ \pgfplotslistsize\pgfplotstable@col@processed\to\c@pgfplotstable@numrows
+ %
+ % Now, we loop over every column as long as there are still rows
+ % left. We assemble rows while we go.
+ %
+ \c@pgfplotstable@rowindex=0\relax
+ \ifnum\c@pgfplotstable@colindex<\c@pgfplotstable@numcols
+ \pgfplots@loop@CONTINUEtrue
+ \else
+ \pgfplots@loop@CONTINUEfalse
+ \fi
+ \loop
+ \ifpgfplots@loop@CONTINUE
+ \pgfplotsarrayselect\c@pgfplotstable@colindex\of\pgfplotstabletypeset@final@cols@array\to\pgfplotstable@col@processed
+ \pgfplotslistcheckempty\pgfplotstable@col@processed
+ \ifpgfplotslistempty
+ \pgfplots@loop@CONTINUEfalse
+ \else
+ \ifnum\c@pgfplotstable@colindex=0\relax
+ % Install styles for the next row.
+ \begingroup
+ \ifodd\c@pgfplotstable@rowindex
+ \pgfplotslist@TOK@a={every odd row}%
+ \else
+ \pgfplotslist@TOK@a={every even row}%
+ \fi
+ \ifnum\c@pgfplotstable@rowindex=0\relax
+ \pgfplotslist@TOK@a=\expandafter{\the\pgfplotslist@TOK@a,every first row}%
+ \fi
+ % misuse as temporary variable:
+ \c@pgfplotstable@colindex=\c@pgfplotstable@rowindex
+ \advance\c@pgfplotstable@colindex by1\relax
+ \ifnum\c@pgfplotstable@colindex=\c@pgfplotstable@numrows
+ \edef\pgfplotstable@TMP{\the\pgfplotslist@TOK@a,every row no \the\c@pgfplotstable@rowindex/.try,every last row}%
+ \else
+ \edef\pgfplotstable@TMP{\the\pgfplotslist@TOK@a,every row no \the\c@pgfplotstable@rowindex/.try}%
+ \fi
+ \expandafter\pgfplotstableset\expandafter{\pgfplotstable@TMP}%
+ \pgfkeysgetvalue{/pgfplots/table/before row}{\pgfplotstable@before}%
+ \pgfkeysgetvalue{/pgfplots/table/after row}{\pgfplotstable@after}%
+ \pgfplotslist@TOK@a=\expandafter{\pgfplotstable@before}%
+ \pgfplotslist@TOK@b=\expandafter{\pgfplotstable@after}%
+ \xdef\pgfplotstable@TMP{%
+ \noexpand\def\noexpand\pgfplotstable@before{\the\pgfplotslist@TOK@a}%
+ \noexpand\def\noexpand\pgfplotstable@after{\the\pgfplotslist@TOK@b}%
+ }%
+ \endgroup
+ \pgfplotstable@TMP
+ % insert 'before row' here:
+ \pgfplotslist@TOK@a=\expandafter{\pgfplotstable@before}%
+ \pgfplotslist@TOK@b=\expandafter{\pgfplotstable@result}%
+ \edef\pgfplotstable@result{\the\pgfplotslist@TOK@b\the\pgfplotslist@TOK@a}%
+ \fi
+ %
+ %
+ \pgfplotslistpopfront\pgfplotstable@col@processed\to\pgfplotstable@entry
+ \pgfplotsarrayletentry\c@pgfplotstable@colindex\of\pgfplotstabletypeset@final@cols@array=\pgfplotstable@col@processed
+ \advance\c@pgfplotstable@colindex by1\relax
+ \pgfplotslist@TOK@a=\expandafter{\pgfplotstable@result}%
+ \ifnum\c@pgfplotstable@colindex=\c@pgfplotstable@numcols\relax
+ \pgfplotslist@TOK@b=\expandafter{\pgfplotstable@entry \\}%
+ \else
+ \pgfplotslist@TOK@b=\expandafter{\pgfplotstable@entry &}%
+ \fi
+ \edef\pgfplotstable@result{\the\pgfplotslist@TOK@a\the\pgfplotslist@TOK@b}%
+ \ifnum\c@pgfplotstable@colindex=\c@pgfplotstable@numcols\relax
+ \c@pgfplotstable@colindex=0\relax
+ % insert 'after row' here:
+ \pgfplotslist@TOK@a=\expandafter{\pgfplotstable@result}%
+ \pgfplotslist@TOK@b=\expandafter{\pgfplotstable@after}%
+ \edef\pgfplotstable@result{\the\pgfplotslist@TOK@a\the\pgfplotslist@TOK@b}%
+ \advance\c@pgfplotstable@rowindex by1\relax
+ \fi
+%\message{I have now \meaning\pgfplotstable@result.}%
+ \fi
+ \repeat
+ \pgfplotslist@TOK@a=\expandafter{\pgfplotstable@result}%
+ \pgfkeysgetvalue{/pgfplots/table/end table}{\pgfplotstable@entry}%
+ \pgfplotslist@TOK@b=\expandafter{\pgfplotstable@entry}%
+ \edef\pgfplotstable@result{\the\pgfplotslist@TOK@a\the\pgfplotslist@TOK@b}%
+ \ifx\pgfplotstable@font\pgfutil@empty
+ \else
+ \pgfplotslist@TOK@a=\expandafter{\pgfplotstable@result\endgroup}%
+ \edef\pgfplotstable@result{\the\pgfplotslist@TOK@a}%
+ \fi
+ \ifpgfplotstabletypesetdebug
+ \pgfplotslist@TOK@a=\expandafter{\pgfplotstable@result}%
+ \immediate\write16{------- PGFPLOTSTABLE DEBUG MODE: --------}%
+ \immediate\write16{{\the\pgfplotslist@TOK@a}}%
+ \fi
+ \pgfkeysgetvalue{/pgfplots/table/outfile}{\pgfplotstable@entry}%
+ \ifx\pgfplotstable@entry\pgfutil@empty
+ \else
+ \begingroup
+ \immediate\openout\pgfplotstable@outfile=\pgfplotstable@entry\relax
+ \pgfplotslist@TOK@a=\expandafter{\pgfplotstable@result}%
+ \immediate\write\pgfplotstable@outfile{\the\pgfplotslist@TOK@a}%
+ \immediate\closeout\pgfplotstable@outfile
+ \endgroup
+ \fi
+ \pgfplotstable@result
+ \endgroup
+}%
+
+
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgfplots/numtable/pgfplotstable.coltype.code.tex b/Master/texmf-dist/tex/generic/pgfplots/numtable/pgfplotstable.coltype.code.tex
new file mode 100644
index 00000000000..b56d65147fc
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgfplots/numtable/pgfplotstable.coltype.code.tex
@@ -0,0 +1,85 @@
+%--------------------------------------------
+%
+% Package numtable.
+%
+% This file provides support for column types in LaTeX tabular
+% environments, i.e.
+%
+%\begin{tabular}{>{\pgfplotstablecoltype}c<{\endpgfplotstablecoltype}}
+% 1 \\
+% 2 \\
+% 3 \\
+%\end{tabular}
+%
+%
+%
+% Copyright 2007/2008 by Christian Feuersänger.
+%
+% This program is free software: you can redistribute it and/or modify
+% it under the terms of the GNU General Public License as published by
+% the Free Software Foundation, either version 3 of the License, or
+% (at your option) any later version.
+%
+% This program is distributed in the hope that it will be useful,
+% but WITHOUT ANY WARRANTY; without even the implied warranty of
+% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+% GNU General Public License for more details.
+%
+% You should have received a copy of the GNU General Public License
+% along with this program. If not, see <http://www.gnu.org/licenses/>.
+%
+%--------------------------------------------
+
+
+
+% If I did not get it wrong, the tabular package, initialised with a
+% column type like
+% >{\pgfplotstablecoltype}c<{\endpgfplotstablecoltype}
+% yields
+%
+% \pgfplotstablecoltype \ignorespaces <content> \unskip \endpgfplotstablecoltype
+% OR
+% \pgfplotstablecoltype \ignorespaces <content> \\ \endpgfplotstablecoltype
+%
+% So, I define \pgfplotstablecoltype to skip \ignorespaces and \unskip and simply
+% get <content>.
+\def\pgfplotstablecoltype{%
+ \begingroup
+ \let\pgfplotstablecoltype@content=\empty
+ \pgfutil@ifnextchar[{%
+ \pgfplotstablecoltype@
+ }{%
+ \pgfplotstablecoltype@until@end@start
+ }%
+}%
+\def\pgfplotstablecoltype@[#1]{%
+ \pgfqkeys{/pgf/number format}{#1}%
+ \pgfplotstablecoltype@until@end@start
+}%
+
+\def\pgfplotstablecoltype@until@end@start\ignorespaces{%
+ \pgfplotstablecoltype@until@end
+}%
+\def\pgfplotstablecoltype@until@end{%
+ \pgfutil@ifnextchar\\{%
+ \pgfplotstablecoltype@finish%
+ }{%
+ \pgfutil@ifnextchar{\unskip}{%
+ \pgfplotstablecoltype@finish%
+ }{%
+ \pgfplotstablecoltype@next
+ }%
+ }%
+}
+\def\pgfplotstablecoltype@next#1{%
+ \expandafter\def\expandafter\pgfplotstablecoltype@content\expandafter{\pgfplotstablecoltype@content#1}%
+ \pgfplotstablecoltype@until@end
+}
+\def\pgfplotstablecoltype@finish{%
+%\message{COLLECTED \meaning\pgfplotstablecoltype@content}%
+ \pgfmathprintnumber{\pgfplotstablecoltype@content}%
+ \endgroup
+}%
+
+%\def\pgfplotstablecoltype{\message{COLLECT}}%
+\def\endpgfplotstablecoltype{}%
diff --git a/Master/texmf-dist/tex/generic/pgfplots/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_loader.code.tex b/Master/texmf-dist/tex/generic/pgfplots/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_loader.code.tex
new file mode 100644
index 00000000000..628fc7f374e
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgfplots/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_loader.code.tex
@@ -0,0 +1,12 @@
+\pgfkeysifdefined{/pgf/number format/1000 sep/.@cmd}{\endinput}{}
+%--------------------------------------------------
+% \pgfutil@ifundefined{pgfplothandlerybarinterval}
+% {}%
+% {\endinput}%
+%--------------------------------------------------
+
+\immediate\write16{Package pgfplots: loading support code for older PGF versions...}
+\input pgfplotsoldpgfsupp_misc.code.tex
+\input pgfplotsoldpgfsupp_pgfkeysfiltered.code.tex
+\input pgfplotsoldpgfsupp_pgfmathfloat.code.tex
+\input pgfplotsoldpgfsupp_pgflibraryplothandlers.code.tex
diff --git a/Master/texmf-dist/tex/generic/pgfplots/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_misc.code.tex b/Master/texmf-dist/tex/generic/pgfplots/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_misc.code.tex
new file mode 100644
index 00000000000..9e037470f6e
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgfplots/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_misc.code.tex
@@ -0,0 +1,96 @@
+
+% ======================================================
+% compatibility with PGF 2.0
+\def\pgfkeysaddvalue#1#2#3{%
+ {%
+ \toks0{#2}%
+ \pgfkeysifdefined{#1}
+ {\pgfkeys@temptoks\expandafter\expandafter\expandafter{\csname pgfk@#1\endcsname}}%
+ {\pgfkeys@temptoks{}}%
+ \toks1{#3}%
+ \xdef\pgfkeys@global@temp{\the\toks0 \the\pgfkeys@temptoks \the\toks1}% believe or don't: the spaces are important
+ }%
+ \pgfkeyslet{#1}\pgfkeys@global@temp%
+}
+
+\def\pgfkeys@try{%
+ \pgfkeysifdefined{\pgfkeyscurrentpath/.@cmd}%
+ {%
+ \pgfkeysgetvalue{\pgfkeyscurrentpath/.@cmd}{\pgfkeys@code}%
+ \ifx\pgfkeyscurrentvalue\pgfkeysnovalue@text% Hmm... no value
+ \pgfkeysifdefined{\pgfkeyscurrentpath/.@def}%
+ {\pgfkeysgetvalue{\pgfkeyscurrentpath/.@def}{\pgfkeyscurrentvalue}}
+ {}% no default, so leave it
+ \fi%
+ \let\pgfkeyscurrentkey=\pgfkeyscurrentpath% make sure that \pgfkeys@code doesn't know about 'try'. Important for .is choice
+ % FIXME: maybe there are more things like that - also adjust currentname!?
+ \expandafter\pgfkeys@code\pgfkeyscurrentvalue\pgfeov%
+ \pgfkeyssuccesstrue%
+ }%
+ {%
+ \pgfkeysifdefined{\pgfkeyscurrentpath}%
+ {%
+ \ifx\pgfkeyscurrentvalue\pgfkeysnovalue@text%
+ \pgfkeysvalueof{\pgfkeyscurrentpath}%
+ \else%
+ \pgfkeyslet{\pgfkeyscurrentpath}\pgfkeyscurrentvalue%
+ \fi%
+ \pgfkeyssuccesstrue%
+ }%
+ {\pgfkeyssuccessfalse}%
+ }%
+}
+% ======================================================
+
+\def\pgfutilensuremath#1{%
+ \ifmmode#1\else$#1$\fi
+}
+
+\tikzoption{ybar}[]{\let\tikz@plot@handler=\pgfplothandlerybar}
+\tikzoption{xbar}[]{\let\tikz@plot@handler=\pgfplothandlerxbar}
+\tikzoption{ybar interval}[]{\let\tikz@plot@handler=\pgfplothandlerybarinterval}
+\tikzoption{xbar interval}[]{\let\tikz@plot@handler=\pgfplothandlerxbarinterval}
+\tikzoption{const plot}[]{\let\tikz@plot@handler=\pgfplothandlerconstantlineto}
+\tikzoption{const plot mark left}[]{\let\tikz@plot@handler=\pgfplothandlerconstantlineto}
+\tikzoption{const plot mark right}[]{\let\tikz@plot@handler=\pgfplothandlerconstantlinetomarkright}
+\tikzoption{jump mark right}[]{\let\tikz@plot@handler=\pgfplothandlerjumpmarkright}
+\tikzoption{jump mark left}[]{\let\tikz@plot@handler=\pgfplothandlerjumpmarkleft}
+
+
+
+
+% ======================================================
+
+
+\newif\ifpgfmathcomparison
+
+% Assigns \pgfmathresult to 1.0 if #1 ~= #1.
+%
+% It will also set the boolean \ifpgfmathcomparison accordingly
+% (globally).
+\def\pgfmathapproxequalto#1#2{%
+ \edef\pgfmath@marshal{%
+ \noexpand\pgfmathparse{#2}
+ \noexpand\let\noexpand\pgfmath@arg\noexpand\pgfmathresult%
+ \noexpand\pgfmathparse{#1}%
+ }%
+ \pgfmath@marshal%
+ \pgfmathapproxequalto@{\pgfmathresult}{\pgfmath@arg}}
+\def\pgfmathapproxequalto@#1#2{%
+ \begingroup%
+ \pgfmath@x#1pt%
+ \pgfmath@y#2pt%
+ \advance\pgfmath@x-\pgfmath@y%
+ \ifdim\pgfmath@x<0pt
+ \multiply\pgfmath@x by-1
+ \fi
+ \ifdim\pgfmath@x<0.0001pt\relax%
+ \def\pgfmathresult{1.0}%
+ \global\pgfmathcomparisontrue
+ \else%
+ \def\pgfmathresult{0.0}%
+ \global\pgfmathcomparisonfalse
+ \fi%
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup%
+}
diff --git a/Master/texmf-dist/tex/generic/pgfplots/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfkeysfiltered.code.tex b/Master/texmf-dist/tex/generic/pgfplots/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfkeysfiltered.code.tex
new file mode 100644
index 00000000000..cd5c328c700
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgfplots/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfkeysfiltered.code.tex
@@ -0,0 +1,927 @@
+% Copyright 2008 by Christian Feuersaenger
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+%
+% This file contains additions to pgfkeys.code.tex (loaded
+% automatically at the end of pgfkeys.code.tex)
+%
+% Improvements:
+%
+% - option filtering
+% you provide
+% - a boolean predicate
+% - a "filter handler" which will be invoked for non-matching options,
+% - a key=value list as usual.
+% The filter sets only matching options and invokes the handler for
+% unmatching ones.
+%
+% - Fast family support as in xkeyval.
+% - A key like /my tree/my option can be associated with /my family
+% - You can efficiently set keys which belong to a set of "active"
+% families.
+% Remaining options can be collected into a macro.
+
+% WARNING:
+% this file overwrites
+% \pgfkeys@addpath
+% \pgfkeys@nevermind
+%
+% all other features are 'additive'
+
+
+% these implementations will be switched dynamically with their
+% filtered versions (in \pgfkeys@install@filter@and@invoke)
+\let\pgfkeys@orig@case@one=\pgfkeys@case@one
+\let\pgfkeys@orig@@set=\pgfkeys@@set
+\let\pgfkeys@orig@@qset=\pgfkeys@@qset
+\let\pgfkeys@orig@try=\pgfkeys@try
+\let\pgfkeys@orig@unknown=\pgfkeys@unknown
+
+\newif\ifpgfkeysfilteringisactive
+\newif\ifpgfkeysfiltercontinue
+\let\pgfkeys@key@predicate=\pgfkeys@empty
+\let\pgfkeys@filtered@handler=\pgfkeys@empty
+\newtoks\pgfkeys@tmptoks
+
+% Performs 'filtered' key settings.
+%
+% For every option for which the path prefixing has already been done,
+% the current key filter predicate will be invoked. If the predicate
+% returns true, pgfkeys will process this key in the normal manner.
+% If not, a key filter handler will be invoked.
+%
+% The *predicate* and *handler* semantics are as follows:
+% PRECONDITION:
+% 1. The variables
+% \pgfkeyscurrentkey (full path including name)
+% \pgfkeyscurrentkeyRAW (the current key as it has been
+% found in the key=value list
+% without path modification)
+% \pgfkeyscurrentvalue
+% are all set. If the current key is a handler variable,
+% \pgfkeyscurrentname
+% and
+% \pgfkeyscurrentpath
+% are also set.
+% 2. The type of option has already been checked, that means
+% case (1) whether '.@cmd' exists
+% case (2) whether the key as such has its value
+% case (3) it is a handler like '.code', '.cd' or whatever.
+% case (0) it is unknown.
+% The actual case number (0-3) will be provided as contents
+% of the macro
+% \pgfkeyscasenumber.
+% Please note that unknown options will be processed with
+% the usual '.unknown' handlers unless the key filter takes
+% control over unknown options as well.
+%
+% POSTCONDITION:
+% the predicate sets
+% \pgfkeysfiltercontinuetrue
+% or
+% \pgfkeysfiltercontinuefalse
+% (the boolean \ifpgfkeysfiltercontinue).
+% Depending on this 'if', option processing will be continued or
+% skipped.
+%
+% The handler can do anything with the option, for example collect
+% unmatched ones.
+%
+% ATTENTION: \pgfkeysfiltered can't be nested (yet). Use the
+% \pgfkeyspredicateAND if you need multiple predicates at once.
+% Nesting would produce unexpected results because the current filter
+% state can't be stored/restored without TeX-groups, therefor it is
+% disabled.
+%
+% ATTENTION: you can't filter error messages.
+%
+% REMARK: In case (3), the macros \pgfkeyscurrentpath and
+% \pgfkeyscurrentname have already been computed, you do not need to
+% invoke \pgfkeyssplitpath. In any other case, neither path nor name
+% are required for the options processing - if you need them for
+% predicates/handlers, you need to compute them by hand.
+%
+%
+% Example:
+% \def\unmatched{}
+% \pgfkeys{/pgf/key filters/is descendant of/.install key filter=/my group}
+% \pgfkeys{/pgf/key filter handlers/append filtered to/.install key filter handler=\unmatched}
+% \pgfkeysfiltered%
+% {/my group/option 1=value 1,/tikz/option 2=value 2}
+% ->
+% will set '/my group/option 1' as usual, but '/tikz/option 2' will not
+% be set. Instead, it will be appended to '\unmatched' such that
+% \unmatched = {/tikz/option 2=value2}
+% after the operation.
+%
+% Arguments:
+% #1: key-value list.
+\def\pgfkeysfiltered{%
+ % produce
+ % '{<default path>}'
+ % each expanded exactly one time into the register:
+ \expandafter\pgfkeysfiltered@@install\expandafter{\pgfkeysdefaultpath}%
+}
+
+% #1: old value of default path.
+% #2: key-value-list.
+\def\pgfkeysfiltered@@install#1#2{%
+ \pgfkeys@install@filter@and@invoke{%
+ \let\pgfkeysdefaultpath\pgfkeys@root%
+ \pgfkeys@parse#2,\pgfkeys@mainstop%
+ \def\pgfkeysdefaultpath{#1}%
+ }%
+}
+
+% Assuming that macro #1 contains a key=value list, this command
+% performs an \pgfkeysalso command for the content of macro #1.
+%
+% It can be used in conjunction with
+% - \pgfkeysfiltered and
+% - \pgfkeysappendfilterednamestomacro:
+% the first pass fill only process options matching the filter, then,
+% a \pgfkeysalsofrom can be used at a later time to set the remaining
+% options.
+%
+% Example:
+% \pgfkeys{/my group/.cd,/utils/exec=\pgfkeysalsofrom\filtered}
+\def\pgfkeysalsofrom#1{%
+ \expandafter\pgfkeysalso\expandafter{#1}%
+}
+
+% The same as \pgfkeysalsofrom, but it invokes \pgfkeysalsofiltered.
+\def\pgfkeysalsofilteredfrom#1{%
+ \expandafter\pgfkeysalsofiltered\expandafter{#1}%
+}
+
+% #1 = options
+\long\def\pgfkeysalsofiltered#1{%
+ \pgfkeys@install@filter@and@invoke{\pgfkeysalso{#1}}%
+}%
+
+% The same like \pgfkeysfiltered, but with quick search path setting.
+%
+% #1: default path
+% #2: key-value-pairs
+\def\pgfqkeysfiltered#1{%
+ \expandafter\pgfqkeysfiltered@@install\expandafter{\pgfkeysdefaultpath}{#1}%
+}
+
+% #1: old value of default path.
+% #2: default path
+% #3: key-value-list.
+\def\pgfqkeysfiltered@@install#1#2#3{%
+ \pgfkeys@install@filter@and@invoke{%
+ \def\pgfkeysdefaultpath{#2/}\pgfkeys@parse#3,\pgfkeys@mainstop\def\pgfkeysdefaultpath{#1}%
+ }%
+}
+
+% Family management
+%
+% The family code provides the following features:
+% 1. every key can be associated with 0 or 1 'family'.
+% 2. Families are a loose association which are independend of the key
+% hierarchy.
+% For example, /my tree/key1 can belong to family /tikz.
+%
+% 3. It is possible to "activate" or "deactivate" single families.
+% Furthermore, it is possible to set only keys which belong to
+% active families (using \pgfkeysfiltered).
+% 4. Runtime complexities:
+% If you have N options and you only want to process K active
+% families, the runtime is O( N + K ):
+% - activate every family O(K)
+% - use \pgfkeyshasactivefamily as filter predicate O(N)
+% - deactivate every family O(K)
+
+
+% Activates family #1.
+%
+% #1 maybe a macro.
+\def\pgfkeysactivatefamily#1{%
+ \pgfkeysiffamilydefined
+ {#1}%
+ {\csname pgfk@#1/familyactivetrue\endcsname}%
+ {\pgfkeysvalueof{/errors/family unknown/.@cmd}{#1}\pgfeov}%
+%\message{[ACTIVATING FAMILY #1]}%
+}
+
+% Deactivates family #1.
+%
+% #1 maybe a macro.
+\def\pgfkeysdeactivatefamily#1{
+ \pgfkeysiffamilydefined
+ {#1}%
+ {\csname pgfk@#1/familyactivefalse\endcsname}%
+ {\pgfkeysvalueof{/errors/family unknown/.@cmd}{#1}\pgfeov}%
+%\message{[DEACTIVATING FAMILY #1]}%
+}
+
+% Activates all families in the comma separated list #1.
+%
+% It will also generate code for deactivation of all those families
+% into the command #2.
+%
+% #1: a comma-separated list of fully qualified family names.
+% #2: a command which will be filled with a deactivate-all command.
+\def\pgfkeysactivatefamilies#1#2{%
+ \pgfkeyssavekeyfilterstateto\pgfkeys@cur@state
+ \expandafter\pgfkeysactivatefamilies@impl\expandafter{\pgfkeys@cur@state}{#1}{#2}%
+}
+% #1: commands needed to restore the old filtering state
+% #2: family name list
+% #3: macro name for de-activate command
+\def\pgfkeysactivatefamilies@impl#1#2#3{%
+ \pgfkeysinstallkeyfilter{/pgf/key filters/false}{}%
+ \let#3=\pgfkeys@empty%
+ \def\pgfkeys@filtered@handler{\pgfkeys@family@activate@handler{#3}}%
+ \pgfkeysalsofiltered{#2}%
+ #1%
+}
+
+\def\pgfkeys@family@activate@handler#1{%
+ \pgfkeysactivatefamily{\pgfkeyscurrentkey}%
+ % produce
+ % <old list> '\pgfkeysdeactivatefamily{' <current key> '}'
+ \pgfkeys@tmptoks=\expandafter\expandafter\expandafter{\expandafter#1\expandafter\pgfkeysdeactivatefamily\expandafter{\pgfkeyscurrentkey}}%
+ \edef#1{\the\pgfkeys@tmptoks}%
+}
+
+% If for testing whether a family exists.
+%
+% #1 = fully qualified family name
+% #2 = if-case
+% #3 = else-case
+%
+% Description:
+%
+% If the family exists, #2 will be executed. Otherwise, #3 will be
+% called.
+\long\def\pgfkeysiffamilydefined#1#2#3{\pgfkeys@ifcsname ifpgfk@#1/familyactive\endcsname#2\else#3\fi}
+
+% Sets the TeX boolean
+% \ifpgfkeysfiltercontinue := ( family #1 is active )
+%
+% Argument:
+% #1 the family name. Maybe a macro.
+\def\pgfkeysisfamilyactive#1{%
+ \pgfkeysiffamilydefined{#1}{%
+ \expandafter\let\expandafter\ifpgfkeysfiltercontinue\csname ifpgfk@#1/familyactive\endcsname
+ }{%
+ \pgfkeysvalueof{/errors/family unknown/.@cmd}{#1}\pgfeov%
+ \expandafter\expandafter\expandafter\let\csname ifpgfkeysfiltercontinue\endcsname\csname iffalse\endcsname
+ }%
+}%
+
+% Retrieve the family of full key #1 into macro #2.
+%
+% Will set the TeX boolean \ifpgfkeyssuccess to whether the full key
+% really has a family.
+%
+% The family for any key is stored in the sub-key #1/family.
+%
+% Parameters:
+% #1: the full key name for which the family is requested. Maybe a
+% macro.
+% #2: a macro name which will be filled with the result.
+\def\pgfkeysgetfamily#1#2{%
+ \pgfkeysifdefined{#1/family}{\pgfkeysgetvalue{#1/family}{#2}\pgfkeyssuccesstrue}{\pgfkeyssuccessfalse}%
+}
+
+
+
+% Sets \ifpgfkeysfiltercontinue to true iff the current key belongs to
+% the /errors tree.
+\long\def\pgfkeys@cur@is@descendant@of@errors{%
+ \expandafter\pgfkeys@cur@is@descendant@of@errors@impl\pgfkeyscurrentkey/errors\pgf@@eov
+}%
+\long\def\pgfkeys@cur@is@descendant@of@errors@impl#1/errors#2\pgf@@eov{%
+ \def\pgfkeyspred@TMP{#1}%
+ \ifx\pgfkeyspred@TMP\pgfkeys@empty
+%\message{[SPECIAL CHECK] '\pgfkeyscurrentkey' is descendant of '/errors': TRUE.}%
+ \pgfkeysfiltercontinuetrue
+ \else
+%\message{[SPECIAL CHECK] '\pgfkeyscurrentkey' is descendant of '/errors': FALSE.}%
+ \pgfkeysfiltercontinuefalse
+ \fi
+}%
+
+% \pgfkeysinterruptkeyfilter
+% ...
+% \endpgfkeysinterruptkeyfilter
+% temporarily interrupts key filtering and enables it in
+% \endpgfkeysinterruptkeyfilter.
+%
+% If key filtering it not active, this has no effect at all.
+%
+% REMARK:
+% \pgfkeysinterruptkeyfilter...\endpgfkeysinterruptkeyfilter does NOT
+% introduce a \TeX-group.
+\def\pgfkeysinterruptkeyfilter{%
+ \ifpgfkeysfilteringisactive
+ \let\pgfkeys@case@one=\pgfkeys@orig@case@one
+ \let\pgfkeys@try=\pgfkeys@orig@try
+ \let\pgfkeys@unknown=\pgfkeys@orig@unknown
+ \fi
+}
+
+\def\endpgfkeysinterruptkeyfilter{%
+ \ifpgfkeysfilteringisactive
+ \let\pgfkeys@case@one=\pgfkeys@case@one@filtered
+ \let\pgfkeys@try=\pgfkeys@try@filtered
+ \let\pgfkeys@unknown=\pgfkeys@unknown@filtered
+ \fi
+}
+
+% Activates families #1, calls \pgfkeysfiltered and deactivates the
+% families afterwards.
+%
+% REMARK: you need to install a family-based key filter predicate
+% manually to benefit from the activated families!
+%
+% #1: comma separated family list
+% #2: key-value pairs
+%
+% @see \pgfkeysactivatefamiliesandfilteroptions
+\def\pgfkeysactivatefamiliesandfilteroptions#1#2{%
+ \pgfkeysactivatefamilies{#1}{\pgfkeys@family@deactivation}%
+ \pgfkeysfiltered{#2}%
+ \pgfkeys@family@deactivation
+}
+
+% The "quick" variant of \pgfkeysactivatefamiliesandfilteroptions: it
+% also assigns a default path.
+%
+% #1: comma separated family list
+% #2: default path
+% #3: key-value pairs
+\def\pgfqkeysactivatefamiliesandfilteroptions#1#2#3{%
+ \pgfkeysactivatefamilies{#1}{\pgfkeys@family@deactivation}%
+ \pgfqkeysfiltered{#2}{#3}%
+ \pgfkeys@family@deactivation
+}
+
+% Public version of split path:
+\def\pgfkeyssplitpath{\pgfkeys@split@path}%
+
+
+% The same as \pgfkeysactivatefamiliesandfilteroptions but just for
+% ONE family.
+%
+% #1: family (maybe a macro)
+% #2: key-value pairs
+\def\pgfkeysactivatesinglefamilyandfilteroptions#1#2{%
+ \pgfkeysactivatefamily{#1}%
+ \pgfkeysfiltered{#2}%
+ \pgfkeysdeactivatefamily{#1}%
+}
+
+% The "quick" variant of \pgfkeysactivatesinglefamilyandfilteroptions
+%
+% #1: family (maybe a macro)
+% #2: default path
+% #3: key-value pairs
+\def\pgfqkeysactivatesinglefamilyandfilteroptions#1#2#3{%
+ \pgfkeysactivatefamily{#1}%
+ \pgfqkeysfiltered{#2}{#3}%
+ \pgfkeysdeactivatefamily{#1}%
+}
+
+% Installs the key filter '#1' with argument '#2'.
+% This is equivalent to
+% \pgfkeys{#1/.install key filter=#2}
+%
+% The current values of the key filter handler is stored into the public
+% macros
+% \pgfkeyscurrentkeyfilter
+% and
+% \pgfkeyscurrentkeyfilterargs
+%
+% #1: a full key name; may be a macro
+% #2: optional arguments for the key. If the key expects more than one
+% argument, supply '{{first}{second}}'
+\def\pgfkeysinstallkeyfilter#1#2{%
+ \pgfkeysifdefined{#1/.@cmd}{%
+ \edef\pgfkeyscurrentkeyfilter{#1}%
+ \def\pgfkeyscurrentkeyfilterargs{#2}%
+ \pgfkeysgetvalue{#1/.@cmd}{\pgfkeys@key@predicate@}%
+ \def\pgfkeys@key@predicate{\pgfkeys@key@predicate@#2\pgfeov}%
+ }{%
+ \pgfkeysvalueof{/errors/no such key filter/.@cmd}{#1}{#2}\pgfeov%
+ }%
+}
+
+% Installs the key filter handler '#1' with argument '#2'.
+% This is equivalent to
+% \pgfkeys{#1/.install key filter handler=#2}
+%
+% The current values of the key filter handler is stored into the public
+% macros
+% \pgfkeyscurrentkeyfilterhandler
+% and
+% \pgfkeyscurrentkeyfilterhandlerargs
+%
+% #1: a full key name; may be a macro
+% #2: optional arguments for the handler. If the handler expects more than one
+% argument, supply '{{first}{second}}'
+\def\pgfkeysinstallkeyfilterhandler#1#2{%
+ \pgfkeysifdefined{#1/.@cmd}{%
+ \edef\pgfkeyscurrentkeyfilterhandler{#1}%
+ \def\pgfkeyscurrentkeyfilterhandlerargs{#2}%
+ \pgfkeysgetvalue{#1/.@cmd}{\pgfkeys@filtered@handler@}%
+ \def\pgfkeys@filtered@handler{\pgfkeys@filtered@handler@#2\pgfeov}%
+ }{%
+ \pgfkeysvalueof{/errors/no such key filter handler/.@cmd}{#1}{#2}\pgfeov%
+ }%
+}
+
+% Creates a macro which contains commands to re-activate the current
+% key filter and key filter handler. It can be used to temporarily
+% switch the key filter.
+\def\pgfkeyssavekeyfilterstateto#1{%
+ % produce the string
+ % \pgfkeysinstallkeyfilter{...}{...}
+ % \pgfkeysinstallkeyfilterhandler{...}{...}
+ % where each argument is expanded once
+ % FIXME: Do the same with less overhead!
+ \pgfkeys@tmptoks={\pgfkeysinstallkeyfilter}%
+ \pgfkeys@tmptoks=\expandafter\expandafter\expandafter{\expandafter\the\expandafter\pgfkeys@tmptoks\expandafter{\pgfkeyscurrentkeyfilter}}%
+ \pgfkeys@tmptoks=\expandafter\expandafter\expandafter{\expandafter\the\expandafter\pgfkeys@tmptoks\expandafter{\pgfkeyscurrentkeyfilterargs}\pgfkeysinstallkeyfilterhandler}%
+ \pgfkeys@tmptoks=\expandafter\expandafter\expandafter{\expandafter\the\expandafter\pgfkeys@tmptoks\expandafter{\pgfkeyscurrentkeyfilterhandler}}%
+ \pgfkeys@tmptoks=\expandafter\expandafter\expandafter{\expandafter\the\expandafter\pgfkeys@tmptoks\expandafter{\pgfkeyscurrentkeyfilterhandlerargs}}%
+ \edef#1{%
+ \the\pgfkeys@tmptoks
+ }%
+}
+
+
+\pgfkeys{%
+ /errors/family unknown/.code=\pgfkeys@error{%
+ Sorry, I do not know family '#1' and can't work with any assoicated family handling. Perhaps you misspelled it?},
+ /errors/no such key filter/.code 2 args=\pgfkeys@error{Sorry, there is no such key filter '#1'.},
+ /errors/no such key filter handler/.code 2 args=\pgfkeys@error{Sorry, there is no such key filter handler '#1'.},
+ % HANDLERS:
+ %
+ % .is family should
+ % 1. '.cd' into the families' path,
+ % 2. define booleans to activate/deactive the family
+ % (see \pgfkeysisfamilyactive)
+ % 3. make sure that \pgfkeyshasactivefamily returns true for
+ % the family itsself.
+ /handlers/.is family/.append code={%
+ %\newif is an \outer macro in plain tex, so this here is not portable:
+ %\expandafter\newif\csname if\pgfkeyscurrentpath/familyactive\endcsname
+ \edef\pgfkeyspred@TMP{pgfk@\pgfkeyscurrentpath/familyactive}%
+ \expandafter\pgfkeys@non@outer@newif\expandafter{\pgfkeyspred@TMP}%
+ \edef\pgfkeyspred@TMP{\pgfkeyscurrentpath/.belongs to family=\pgfkeyscurrentpath}%
+ \expandafter\pgfkeysalso\expandafter{\pgfkeyspred@TMP}%
+ },%
+ /handlers/.activate family/.code=\pgfkeysactivatefamily{\pgfkeyscurrentpath},
+ /handlers/.deactivate family/.code=\pgfkeysdeactivatefamily{\pgfkeyscurrentpath},
+ /handlers/.belongs to family/.code={%
+ \pgfkeysiffamilydefined{#1}{%
+ \pgfkeyssetvalue{\pgfkeyscurrentpath/family}{#1}%
+ }{%
+ \pgfkeysalso{/errors/family unknown=#1}%
+ }%
+ },%
+ %
+ %
+ % An addition to the '.try' and '.retry' handlers:
+ %
+ % It is the same as '.retry', but if the option is still unknown, the
+ % usual handlers for unknown keys will be invoked.
+ /handlers/.lastretry/.code={%
+ \ifpgfkeyssuccess\else
+ \pgfkeys@try
+ \ifpgfkeyssuccess\else
+ % discard the '.lastretry' suffix:
+ \edef\pgfkeyscurrentkey{\pgfkeyscurrentpath}%
+ \pgfkeys@split@path%
+ \pgfkeys@unknown
+ \fi
+ \fi
+ },
+ %
+ %
+ /handlers/.install key filter/.code={%
+ \pgfkeysinstallkeyfilter{\pgfkeyscurrentpath}{#1}%
+ },%
+ /handlers/.install key filter handler/.code={%
+ \pgfkeysinstallkeyfilterhandler{\pgfkeyscurrentpath}{#1}%
+ },%
+ %
+ %
+ % KEY FILTER HANDLERS:
+ %
+ /pgf/key filter handlers/append filtered to/.code={%
+ % Produce
+ % <orig key> '={' <value> '}'
+ % where both, the key and the value are expanded just ONCE:
+ \pgfkeys@tmptoks=\expandafter\expandafter\expandafter{\expandafter\pgfkeyscurrentkeyRAW\expandafter=\expandafter{\pgfkeyscurrentvalue}}%
+ \ifx#1\pgfkeys@empty
+ \else
+ % Produce <old list> ',' <orig key> '={' <value> '}'
+ \pgfkeys@tmptoks=\expandafter\expandafter\expandafter{\expandafter#1\expandafter,\the\pgfkeys@tmptoks}%
+ \fi
+ \edef#1{\the\pgfkeys@tmptoks}%
+ },%
+ /pgf/key filter handlers/ignore/.code={},
+ /pgf/key filter handlers/ignore/.install key filter handler,
+ /pgf/key filter handlers/log/.code={%
+ \immediate\write16{LOG: the option '\pgfkeyscurrentkey' (was originally '\pgfkeyscurrentkeyRAW') (case \pgfkeyscasenumber) has not been processed due to pgfkeysfiltered.}%
+ },
+ %
+ %
+ % KEY FILTER PREDICATES:
+ %
+ % Returns true iff the currently processed key belongs to an active family.
+ % A family is active if it has been activated before.
+ /pgf/key filters/active families/.code={%
+ \ifnum\pgfkeyscasenumber=0
+ % unknown options shall be processed with the
+ % unknown-handlers.
+ \pgfkeysfiltercontinuetrue
+ \else
+ \ifnum\pgfkeyscasenumber=3
+ \pgfkeysgetfamily\pgfkeyscurrentpath\pgfkeyspred@TMP
+ \else
+ \pgfkeysgetfamily\pgfkeyscurrentkey\pgfkeyspred@TMP
+ \fi
+ \ifpgfkeyssuccess
+ \pgfkeysisfamilyactive{\pgfkeyspred@TMP}%
+ \else% Ok, it does not belong to any family.
+ \pgfkeysfiltercontinuefalse
+ \fi
+ \fi
+ },%
+ %
+ %
+ %
+ % This filter works as follows:
+ % 1. if the current key belongs to a family:
+ % return whether its family is active,
+ % 2. if the current key does NOT belong to a family:
+ % return the result of criterion '#1',
+ % 3. the current key is unknown:
+ % return the result of criterion '#2'.
+ %
+ % Arguments:
+ % #1: the predicate which will be invoked in case 2.
+ % It will be invoked with the current case number as argument.
+ % #2: the predicate which will be invoked in case 3 with
+ % the current case number as argument.
+ /pgf/key filters/active families or no family/.code 2 args={%
+ \ifnum\pgfkeyscasenumber=0
+ \pgfkeysevalkeyfilterwith{#2}%
+ \else
+ \ifnum\pgfkeyscasenumber=3
+ \pgfkeysgetfamily\pgfkeyscurrentpath\pgfkeyspred@TMP
+ \else
+ \pgfkeysgetfamily\pgfkeyscurrentkey\pgfkeyspred@TMP
+ \fi
+ \ifpgfkeyssuccess
+ \pgfkeysisfamilyactive{\pgfkeyspred@TMP}%
+ \else% Ok, it does not belong to any family.
+ \pgfkeysevalkeyfilterwith{#1}%
+ \fi
+ \fi
+ },
+ /pgf/key filters/active families or no family DEBUG/.code 2 args={%
+ \ifnum\pgfkeyscasenumber=0
+ \immediate\write16{[pgfkeyshasactivefamilyornofamily(\pgfkeyscurrentkey, \pgfkeyscasenumber) invoking unknown handler '#2']}%
+ \pgfkeysevalkeyfilterwith{#2}%
+ \else
+ \ifnum\pgfkeyscasenumber=3
+ \pgfkeysgetfamily\pgfkeyscurrentpath\pgfkeyspred@TMP
+ \else
+ \pgfkeysgetfamily\pgfkeyscurrentkey\pgfkeyspred@TMP
+ \fi
+ \ifpgfkeyssuccess
+ \pgfkeysisfamilyactive{\pgfkeyspred@TMP}%
+ \ifpgfkeysfiltercontinue
+ \immediate\write16{[pgfkeyshasactivefamilyornofamily(\pgfkeyscurrentkey, \pgfkeyscasenumber) family is ACTIVE]}%
+ \else
+ \immediate\write16{[pgfkeyshasactivefamilyornofamily(\pgfkeyscurrentkey, \pgfkeyscasenumber) family is NOT active.]}%
+ \fi
+ \else% Ok, it does not belong to any family.
+ \immediate\write16{[pgfkeyshasactivefamilyornofamily(\pgfkeyscurrentkey, \pgfkeyscasenumber) invoking has-no-family-handler '#1']}%
+ \pgfkeysevalkeyfilterwith{#1}%
+ \fi
+ \fi
+ },
+ %
+ % Processes only options which are childs of #1.
+ % Example:
+ % is descendant of/.install key filter=/foo
+ % will be true for
+ % /foo/bar/x=y
+ % /foo/.cd
+ % /foo/bar/.style=...
+ % but not for
+ % /bar/foo/...
+ /pgf/key filters/is descendant of/.code={%
+ \ifnum\pgfkeyscasenumber=0
+ % unknown options shall be processed with the
+ % unknown-handlers.
+ \pgfkeysfiltercontinuetrue
+ \else
+ % string prefix comparison:
+ \long\def\pgfkeysisdescendantof@impl##1#1##2\pgf@@eov{%
+ \def\pgfkeyspred@TMP{##1}%
+ \ifx\pgfkeyspred@TMP\pgfkeys@empty
+%\message{'\pgfkeyscurrentkey' (case \pgfkeyscasenumber) is descendant of '#1': TRUE.}%
+ \pgfkeysfiltercontinuetrue
+ \else
+%\message{'\pgfkeyscurrentkey' (case \pgfkeyscasenumber) is descendant of '#1': FALSE.}%
+ \pgfkeysfiltercontinuefalse
+ \fi
+ }%
+ \expandafter\pgfkeysisdescendantof@impl\pgfkeyscurrentkey#1\pgf@@eov
+ \fi
+ },%
+ %
+ %
+ %
+ % Returns true if the currently processed full key equals #2.
+ /pgf/key filters/equals/.code={%
+ \ifnum\pgfkeyscasenumber=0
+ % Unknown option:
+ \pgfkeysfiltercontinuetrue
+ \else
+ \def\pgfkeyspred@TMP{#1}%
+ \ifx\pgfkeyscurrentkey\pgfkeyspred@TMP
+ \pgfkeysfiltercontinuetrue
+ \else
+ \pgfkeysfiltercontinuefalse
+ \fi
+ \fi
+ },%
+ %
+ %
+ % Argument #1 can be any other (evaluated) filter predicate, its logical return
+ % value will be inverted.
+ % Example:
+ % not/.install key filter={is descendend of=/tikz}
+ % will install a key filter which evaluates 'is descendant of' with argument '/tikz' and returns the logical negation of the result.
+ /pgf/key filters/not/.code={%
+ \pgfkeysevalkeyfilterwith{#1}%
+ \ifpgfkeysfiltercontinue
+ \pgfkeysfiltercontinuefalse
+ \else
+ \pgfkeysfiltercontinuetrue
+ \fi
+ },%
+ /pgf/key filters/and/.code 2 args={%
+ \pgfkeysevalkeyfilterwith{#1}%
+ \ifpgfkeysfiltercontinue
+ \pgfkeysevalkeyfilterwith{#2}%
+ \fi
+ },%
+ /pgf/key filters/or/.code 2 args={%
+ \pgfkeysevalkeyfilterwith{#1}%
+ \ifpgfkeysfiltercontinue
+ \else
+ \pgfkeysevalkeyfilterwith{#2}%
+ \fi
+ },%
+ /pgf/key filters/true/.code={\pgfkeysfiltercontinuetrue},%
+ /pgf/key filters/true/.install key filter,
+ /pgf/key filters/false/.code={\pgfkeysfiltercontinuefalse},%
+ %
+ % Returns false if the current key is unknown, which avoids calling
+ % the unknown handlers.
+ /pgf/key filters/defined/.code={%
+ \ifnum\pgfkeyscasenumber=0
+ \pgfkeysfiltercontinuefalse
+ \else
+ \pgfkeysfiltercontinuetrue
+ \fi
+ },
+}%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Private IMPLEMENTATION
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+% This command does THE SAME work as \pgfkeys@case@one,
+% but it applies filtering whenever it identified the type of an
+% option.
+\def\pgfkeys@case@one@filtered{%
+ \pgfkeys@cur@is@descendant@of@errors
+ \ifpgfkeysfiltercontinue
+ \pgfkeys@orig@case@one
+ \else
+ \pgfkeysfiltercontinuetrue
+ \pgfkeysifdefined{\pgfkeyscurrentkey/.@cmd}{%
+ % CASE ONE: a command option
+ \def\pgfkeyscasenumber{1}%
+ \pgfkeys@key@predicate%
+ \ifpgfkeysfiltercontinue
+%\message{PROCESSING KEY \pgfkeyscurrentkey!}%
+ \pgfkeysgetvalue{\pgfkeyscurrentkey/.@cmd}{\pgfkeys@code}%
+ \expandafter\pgfkeys@code\pgfkeyscurrentvalue\pgfeov
+ \else
+%\message{FILTEReD OUT KEY \pgfkeyscurrentkey!}%
+ \pgfkeys@filtered@handler%
+ \fi
+ }{%
+ % CASE TWO: a normal value option
+ \pgfkeysifdefined{\pgfkeyscurrentkey}{%
+ \def\pgfkeyscasenumber{2}%
+ \pgfkeys@key@predicate%
+ \ifpgfkeysfiltercontinue
+%\message{PROCESSING KEY \pgfkeyscurrentkey!}%
+ \pgfkeys@case@two@extern
+ \else
+%\message{FILTEReD OUT KEY \pgfkeyscurrentkey!}%
+ \pgfkeys@filtered@handler%
+ \fi
+ }{%
+ \pgfkeys@split@path
+ % CASE THREE: a handler
+ \pgfkeysifdefined{/handlers/\pgfkeyscurrentname/.@cmd}{%
+ \def\pgfkeyscasenumber{3}%
+ \pgfkeys@key@predicate%
+ \ifpgfkeysfiltercontinue
+%\message{PROCESSING KEY \pgfkeyscurrentkey!}%
+ \pgfkeysgetvalue{/handlers/\pgfkeyscurrentname/.@cmd}{\pgfkeys@code}%
+ \expandafter\pgfkeys@code\pgfkeyscurrentvalue\pgfeov
+ \else
+%\message{FILTERED OUT KEY \pgfkeyscurrentkey!}%
+ \pgfkeys@filtered@handler%
+ \fi
+ }{%
+ \pgfkeys@unknown
+ }%
+ }%
+ }%
+ \fi
+}%
+
+\def\pgfkeys@unknown@filtered{%
+ % CASE ZERO: an unknown option.
+ \def\pgfkeyscasenumber{0}%
+ \pgfkeys@key@predicate%
+ \ifpgfkeysfiltercontinue
+%\message{PROCESSING KEY \pgfkeyscurrentkey!}%
+ % start normal 'unknown' handlers:
+ \pgfkeys@orig@unknown
+ \else
+%\message{FILTEReD OUT KEY \pgfkeyscurrentkey!}%
+ \pgfkeys@filtered@handler%
+ \fi
+}
+
+% Does the same as \pgfkeys@try, but it also invokes the key filters.
+\def\pgfkeys@try@filtered{%
+ \ifpgfkeysfiltercontinue
+ \pgfkeys@orig@try
+ \else
+ \pgfkeysfiltercontinuetrue
+ \pgfkeysifdefined{\pgfkeyscurrentpath/.@cmd}%
+ {%
+ % CASE ONE: a command option
+ \def\pgfkeyscasenumber{1}%
+ \pgfkeys@key@predicate%
+ \ifpgfkeysfiltercontinue
+ \pgfkeysgetvalue{\pgfkeyscurrentkey/.@cmd}{\pgfkeys@code}%
+ \ifx\pgfkeyscurrentvalue\pgfkeysnovalue@text% Hmm... no value
+ \pgfkeysifdefined{\pgfkeyscurrentpath/.@def}%
+ {\pgfkeysgetvalue{\pgfkeyscurrentpath/.@def}{\pgfkeyscurrentvalue}}
+ {}% no default, so leave it
+ \fi%
+ \expandafter\pgfkeys@code\pgfkeyscurrentvalue\pgfeov%
+ \else
+ \pgfkeys@filtered@handler%
+ \fi
+ \pgfkeyssuccesstrue%
+ }%
+ {%
+ \pgfkeysifdefined{\pgfkeyscurrentpath}%
+ {% CASE TWO: a normal value option
+ \def\pgfkeyscasenumber{2}%
+ \pgfkeys@key@predicate%
+ \ifpgfkeysfiltercontinue
+ \ifx\pgfkeyscurrentvalue\pgfkeysnovalue@text%
+ \pgfkeysvalueof{\pgfkeyscurrentpath}%
+ \else%
+ \pgfkeyslet{\pgfkeyscurrentpath}\pgfkeyscurrentvalue%
+ \fi%
+ \else
+ \pgfkeys@filtered@handler%
+ \fi
+ \pgfkeyssuccesstrue%
+ }%
+ {\pgfkeyssuccessfalse}%
+ }%
+ \fi
+}
+
+
+% #1 the code to invoke after init and before cleanup
+\def\pgfkeys@install@filter@and@invoke#1{%
+ \ifpgfkeysfilteringisactive
+ \pgfkeys@error{Sorry, nested calls to key filtering routines are not allowed. (reason: It is not possible to properly restore the previous filtering state after returning from the nested call)}%
+ \fi
+ \pgfkeysfilteringisactivetrue
+ \let\pgfkeys@case@one=\pgfkeys@case@one@filtered
+ \let\pgfkeys@try=\pgfkeys@try@filtered
+ \let\pgfkeys@unknown=\pgfkeys@unknown@filtered
+ #1%
+ \let\pgfkeys@case@one=\pgfkeys@orig@case@one
+ \let\pgfkeys@try=\pgfkeys@orig@try
+ \let\pgfkeys@unknown=\pgfkeys@orig@unknown
+ \pgfkeysfilteringisactivefalse
+}
+
+
+%--------------------------------------------------
+% \def\pgfkeys@eval@key@filter@subroutine@case@one{%
+% \pgfkeysifdefined{\pgfkeyscurrentkey/.@cmd}{%
+% \pgfkeysgetvalue{\pgfkeyscurrentkey/.@cmd}{\pgfkeys@code}%
+% \let\pgfkeyspred@TMP=\pgfkeyscurrentvalue
+% \pgfkeys@eval@key@filter@subroutine@restorestate
+% \expandafter\pgfkeys@code\pgfkeyspred@TMP\pgfeov
+% }{%
+% \pgfkeysvalueof{/errors/no such key filter/.@cmd}\pgfkeyscurrentkey\pgfkeyscurrentvalue\pgfeov%
+% }%
+% }
+% % THIS VERSION IS TOO SLOW. See below.
+% \def\pgfkeysevalkeyfilterwith#1{%
+% \edef\pgfkeys@eval@key@filter@subroutine@restorestate{%
+% \noexpand\def\noexpand\pgfkeyscurrentkey{\pgfkeyscurrentkey}%
+% \noexpand\def\noexpand\pgfkeyscurrentkeyRAW{\pgfkeyscurrentkeyRAW}%
+% \noexpand\def\noexpand\pgfkeyscurrentname{\pgfkeyscurrentname}%
+% \noexpand\def\noexpand\pgfkeyscurrentvalue{\pgfkeyscurrentvalue}%
+% \noexpand\pgfkeys@pathtoks={\pgfkeyscurrentpath}%
+% }%
+% \pgfkeysinterruptkeyfilter
+% \let\pgfkeys@case@one=\pgfkeys@eval@key@filter@subroutine@case@one
+% \pgfkeysalso{#1}%
+% \endpgfkeysinterruptkeyfilter% this here also restored \pgfkeys@case@one.
+% \pgfkeys@eval@key@filter@subroutine@restorestate
+% }%
+%--------------------------------------------------
+
+
+% Evaluates a key filter '#1'. Example:
+% \pgfkeysevalkeyfilterwith{/pgf/key filters/equals=/tikz}
+%
+% \pgfkeysevalkeyfilterwith works only if key filtering is
+% active.
+%
+% The argument '#1' MUST be a FULL KEY.
+%
+% The implementation employs a subset of the \pgfkeysalso code.
+\def\pgfkeysevalkeyfilterwith#1{%
+ \pgfkeys@eval@key@filter@subroutine@unpack#1=\pgfkeysnovalue=\pgfkeys@stop
+}%
+\def\pgfkeys@eval@key@filter@subroutine@unpack#1=#2=#3\pgfkeys@stop{%
+ \pgfkeys@spdef\pgfkeyspred@TMP{#1}%
+ \edef\pgfkeyspred@TMP{\pgfkeyspred@TMP}%
+ \pgfkeys@spdef\pgfkeyspred@TMPB{#2}% TMPB=value
+ \ifx\pgfkeyspred@TMPB\pgfkeysnovalue@text% Hmm... no value
+ \pgfkeysifdefined{\pgfkeyspred@TMP/.@def}%
+ {\pgfkeysgetvalue{\pgfkeyspred@TMP/.@def}{\pgfkeyspred@TMPB}}
+ {}% no default, so leave it
+ \fi%
+ \ifx\pgfkeyspred@TMPB\pgfkeysvaluerequired%
+ \pgfkeysvalueof{/errors/value required/.@cmd}\pgfkeyspred@TMP\pgfkeyspred@TMPB\pgfeov%
+ \else%
+ \pgfkeysifdefined{\pgfkeyspred@TMP/.@cmd}{%
+ \pgfkeysgetvalue{\pgfkeyspred@TMP/.@cmd}{\pgfkeys@code}%
+ \expandafter\pgfkeys@code\pgfkeyspred@TMPB\pgfeov
+ }{%
+ \pgfkeysvalueof{/errors/no such key filter/.@cmd}\pgfkeyspred@TMP\pgfkeyspred@TMPB\pgfeov%
+ }%
+ \fi%
+}
+
+
+\def\pgfkeys@nevermind#1\relax{\let\pgfkeyscurrentkeyRAW=\pgfkeyscurrentkey}
+\def\pgfkeys@addpath#1\relax{\def\pgfkeyscurrentkeyRAW{#1}% old @addpath:
+ \edef\pgfkeyscurrentkey{\pgfkeysdefaultpath#1}%
+}
+
+\def\pgfkeys@non@outer@newif@#1#2{%
+ \expandafter\edef\csname #2true\endcsname{\noexpand\let\noexpand#1=\noexpand\iftrue}%
+ \expandafter\edef\csname #2false\endcsname{\noexpand\let\noexpand#1=\noexpand\iffalse}%
+ \csname #2false\endcsname
+}%
+
+% For latex and context, this here has the same effect as a \newif
+% applied to 'if#1'. For plain tex, it has also the same effect, but
+% it is not an \outer macro as the plain-tex \newif.
+\def\pgfkeys@non@outer@newif#1{%
+ \expandafter\pgfkeys@non@outer@newif@\csname if#1\endcsname{#1}%
+}
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgfplots/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryplothandlers.code.tex b/Master/texmf-dist/tex/generic/pgfplots/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryplothandlers.code.tex
new file mode 100644
index 00000000000..0d120a8b722
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgfplots/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryplothandlers.code.tex
@@ -0,0 +1,922 @@
+% Copyright 2006 by Till Tantau
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+
+\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgfplots/pgfplots/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryplothandlers.code.tex,v 1.3 2008/06/07 17:08:33 ludewich Exp $
+
+\newif\ifpgf@plot@started
+
+
+% This handler converts each plot stream command into a curveto
+% command, except for the first, which is converted to the previously
+% specified action.
+%
+% Example:
+%
+% \pgfpathmoveto{\pgfpointorigin}
+% \pgfsetlinetofirstplotpoint
+% \pgfplothandlercurveto
+% \pgfplotxyfile{mytable}
+
+\def\pgfplothandlercurveto{%
+ \def\pgf@plotstreamstart{%
+ \global\let\pgf@plotstreampoint=\pgf@plot@curveto@handler@initial%
+ \global\let\pgf@plotstreamspecial=\pgfutil@gobble%
+ \global\let\pgf@plotstreamend=\pgf@plot@curveto@handler@finish%
+ \global\pgf@plot@startedfalse%
+ }%
+}
+
+\def\pgf@plot@curveto@handler@initial#1{%
+ \pgf@process{#1}%
+ \pgf@xa=\pgf@x%
+ \pgf@ya=\pgf@y%
+ \pgf@plot@first@action{\pgfqpoint{\pgf@xa}{\pgf@ya}}%
+ \xdef\pgf@plot@curveto@first{\noexpand\pgfqpoint{\the\pgf@xa}{\the\pgf@ya}}%
+ \global\let\pgf@plot@curveto@first@support=\pgf@plot@curveto@first%
+ \global\let\pgf@plotstreampoint=\pgf@plot@curveto@handler@second%
+}
+
+\def\pgf@plot@curveto@handler@second#1{%
+ \pgf@process{#1}%
+ \xdef\pgf@plot@curveto@second{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}%
+ \global\let\pgf@plotstreampoint=\pgf@plot@curveto@handler@third%
+ \global\pgf@plot@startedtrue%
+}
+
+\def\pgf@plot@curveto@handler@third#1{%
+ \pgf@process{#1}%
+ \xdef\pgf@plot@curveto@current{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}%
+ % compute difference vector:
+ \pgf@xa=\pgf@x%
+ \pgf@ya=\pgf@y%
+ \pgf@process{\pgf@plot@curveto@first}
+ \advance\pgf@xa by-\pgf@x%
+ \advance\pgf@ya by-\pgf@y%
+ % compute support directions:
+ \pgf@xa=\pgf@plottension\pgf@xa%
+ \pgf@ya=\pgf@plottension\pgf@ya%
+ % first marshal:
+ \pgf@process{\pgf@plot@curveto@second}%
+ \pgf@xb=\pgf@x%
+ \pgf@yb=\pgf@y%
+ \pgf@xc=\pgf@x%
+ \pgf@yc=\pgf@y%
+ \advance\pgf@xb by-\pgf@xa%
+ \advance\pgf@yb by-\pgf@ya%
+ \advance\pgf@xc by\pgf@xa%
+ \advance\pgf@yc by\pgf@ya%
+ \edef\pgf@marshal{\noexpand\pgfpathcurveto{\noexpand\pgf@plot@curveto@first@support}%
+ {\noexpand\pgfqpoint{\the\pgf@xb}{\the\pgf@yb}}{\noexpand\pgf@plot@curveto@second}}%
+ {\pgf@marshal}%
+ % Prepare next:
+ \global\let\pgf@plot@curveto@first=\pgf@plot@curveto@second%
+ \global\let\pgf@plot@curveto@second=\pgf@plot@curveto@current%
+ \xdef\pgf@plot@curveto@first@support{\noexpand\pgfqpoint{\the\pgf@xc}{\the\pgf@yc}}%
+}
+
+\def\pgf@plot@curveto@handler@finish{%
+ \ifpgf@plot@started%
+ \pgfpathcurveto{\pgf@plot@curveto@first@support}{\pgf@plot@curveto@second}{\pgf@plot@curveto@second}%
+ \fi%
+}
+
+
+% This commands sets the tension for smoothing of plots.
+%
+% #1 = tension of curves. A value of 1 will yield a circle when the
+% control points are at quarters of a circle. A smaller value
+% will result in a tighter curve. Default is 0.5.
+%
+% Example:
+%
+% \pgfsetplottension{0.2}
+
+\def\pgfsetplottension#1{%
+ \pgf@x=#1pt\relax%
+ \pgf@x=0.2775\pgf@x\relax%
+ \edef\pgf@plottension{\pgf@sys@tonumber\pgf@x}}
+\pgfsetplottension{0.5}
+
+
+% This handler converts the plot stream command into a curveto
+% command that is closed using a closepath.
+%
+% Example:
+%
+% \pgfpathmoveto{\pgfpointorigin}
+% \pgfplothandlerclosedcurve
+% \pgfplotxyfile{mytable}
+
+\def\pgfplothandlerclosedcurve{%
+ \def\pgf@plotstreamstart{%
+ \global\let\pgf@plotstreampoint=\pgf@plot@closedcurve@handler@initial%
+ \global\let\pgf@plotstreamspecial=\pgfutil@gobble%
+ \global\let\pgf@plotstreamend=\pgf@plot@closedcurve@handler@finish%
+ }%
+}
+
+\def\pgf@plot@closedcurve@handler@initial#1{%
+ \pgf@process{#1}%
+ \pgf@xa=\pgf@x%
+ \pgf@ya=\pgf@y%
+ \xdef\pgf@plot@closedcurve@initial{\noexpand\pgfqpoint{\the\pgf@xa}{\the\pgf@ya}}%
+ \global\let\pgf@plotstreampoint=\pgf@plot@closedcurve@handler@second%
+ \global\pgf@plot@startedfalse%
+}
+
+\def\pgf@plot@closedcurve@handler@second#1{%
+ \pgf@process{#1}%
+ \xdef\pgf@plot@closedcurve@after@initial{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}%
+ {\pgfpathmoveto{}}%
+ \global\let\pgf@plotstreampoint=\pgf@plot@closedcurve@handler@third%
+}
+
+\def\pgf@plot@closedcurve@handler@third#1{%
+ \global\pgf@plot@startedtrue%
+ \pgf@process{#1}%
+ \xdef\pgf@plot@closedcurve@current{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}%
+ % compute difference vector:
+ \pgf@xa=\pgf@x%
+ \pgf@ya=\pgf@y%
+ \pgf@process{\pgf@plot@closedcurve@initial}
+ \advance\pgf@xa by-\pgf@x%
+ \advance\pgf@ya by-\pgf@y%
+ % compute support directions:
+ \pgf@xa=\pgf@plottension\pgf@xa%
+ \pgf@ya=\pgf@plottension\pgf@ya%
+ % first marshal:
+ \pgf@process{\pgf@plot@closedcurve@after@initial}%
+ \pgf@xb=\pgf@x%
+ \pgf@yb=\pgf@y%
+ \pgf@xc=\pgf@x%
+ \pgf@yc=\pgf@y%
+ \advance\pgf@xb by-\pgf@xa%
+ \advance\pgf@yb by-\pgf@ya%
+ \advance\pgf@xc by\pgf@xa%
+ \advance\pgf@yc by\pgf@ya%
+ \global\let\pgf@plot@closedcurve@first=\pgf@plot@closedcurve@after@initial%
+ \global\let\pgf@plot@closedcurve@second=\pgf@plot@closedcurve@current%
+ \xdef\pgf@plot@closedcurve@after@initial@presupport{\noexpand\pgfqpoint{\the\pgf@xb}{\the\pgf@yb}}%
+ \xdef\pgf@plot@closedcurve@first@support{\noexpand\pgfqpoint{\the\pgf@xc}{\the\pgf@yc}}%
+ \global\let\pgf@plotstreampoint=\pgf@plot@closedcurve@handler@fourth%
+}
+
+\def\pgf@plot@closedcurve@handler@fourth#1{%
+ \pgf@process{#1}%
+ \xdef\pgf@plot@closedcurve@current{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}%
+ % compute difference vector:
+ \pgf@xa=\pgf@x%
+ \pgf@ya=\pgf@y%
+ \pgf@process{\pgf@plot@closedcurve@first}
+ \advance\pgf@xa by-\pgf@x%
+ \advance\pgf@ya by-\pgf@y%
+ % compute support directions:
+ \pgf@xa=\pgf@plottension\pgf@xa%
+ \pgf@ya=\pgf@plottension\pgf@ya%
+ % first marshal:
+ \pgf@process{\pgf@plot@closedcurve@second}%
+ \pgf@xb=\pgf@x%
+ \pgf@yb=\pgf@y%
+ \pgf@xc=\pgf@x%
+ \pgf@yc=\pgf@y%
+ \advance\pgf@xb by-\pgf@xa%
+ \advance\pgf@yb by-\pgf@ya%
+ \advance\pgf@xc by\pgf@xa%
+ \advance\pgf@yc by\pgf@ya%
+ \edef\pgf@marshal{\noexpand\pgfpathcurveto{\noexpand\pgf@plot@closedcurve@first@support}%
+ {\noexpand\pgfqpoint{\the\pgf@xb}{\the\pgf@yb}}{\noexpand\pgf@plot@closedcurve@second}}%
+ {\pgf@marshal}%
+ % Prepare next:
+ \global\let\pgf@plot@closedcurve@first=\pgf@plot@closedcurve@second%
+ \global\let\pgf@plot@closedcurve@second=\pgf@plot@closedcurve@current%
+ \xdef\pgf@plot@closedcurve@first@support{\noexpand\pgfqpoint{\the\pgf@xc}{\the\pgf@yc}}%
+}
+
+\def\pgf@plot@closedcurve@handler@finish{%
+ \ifpgf@plot@started
+ %
+ % first, draw line from 2nd last to last:
+ %
+ \pgf@process{\pgf@plot@closedcurve@initial}%
+ % compute difference vector:
+ \pgf@xa=\pgf@x%
+ \pgf@ya=\pgf@y%
+ \pgf@process{\pgf@plot@closedcurve@first}%
+ \advance\pgf@xa by-\pgf@x%
+ \advance\pgf@ya by-\pgf@y%
+ % compute support directions:
+ \pgf@xa=\pgf@plottension\pgf@xa%
+ \pgf@ya=\pgf@plottension\pgf@ya%
+ % first marshal:
+ \pgf@process{\pgf@plot@closedcurve@second}%
+ \pgf@xb=\pgf@x%
+ \pgf@yb=\pgf@y%
+ \pgf@xc=\pgf@x%
+ \pgf@yc=\pgf@y%
+ \advance\pgf@xb by-\pgf@xa%
+ \advance\pgf@yb by-\pgf@ya%
+ \advance\pgf@xc by\pgf@xa%
+ \advance\pgf@yc by\pgf@ya%
+ \edef\pgf@marshal{\noexpand\pgfpathcurveto{\noexpand\pgf@plot@closedcurve@first@support}%
+ {\noexpand\pgfqpoint{\the\pgf@xb}{\the\pgf@yb}}{\noexpand\pgf@plot@closedcurve@second}}%
+ {\pgf@marshal}%
+ \xdef\pgf@plot@closedcurve@first@support{\noexpand\pgfqpoint{\the\pgf@xc}{\the\pgf@yc}}%
+ %
+ % second, draw line from last point to start:
+ %
+ \pgf@process{\pgf@plot@closedcurve@after@initial}%
+ % compute difference vector:
+ \pgf@xa=\pgf@x%
+ \pgf@ya=\pgf@y%
+ \pgf@process{\pgf@plot@closedcurve@second}%
+ \advance\pgf@xa by-\pgf@x%
+ \advance\pgf@ya by-\pgf@y%
+ % compute support directions:
+ \pgf@xa=\pgf@plottension\pgf@xa%
+ \pgf@ya=\pgf@plottension\pgf@ya%
+ % first marshal:
+ \pgf@process{\pgf@plot@closedcurve@initial}%
+ \pgf@xb=\pgf@x%
+ \pgf@yb=\pgf@y%
+ \pgf@xc=\pgf@x%
+ \pgf@yc=\pgf@y%
+ \advance\pgf@xb by-\pgf@xa%
+ \advance\pgf@yb by-\pgf@ya%
+ \advance\pgf@xc by\pgf@xa%
+ \advance\pgf@yc by\pgf@ya%
+ \edef\pgf@marshal{\noexpand\pgfpathcurveto{\noexpand\pgf@plot@closedcurve@first@support}%
+ {\noexpand\pgfqpoint{\the\pgf@xb}{\the\pgf@yb}}{\noexpand\pgf@plot@closedcurve@initial}}%
+ {\pgf@marshal}%
+ %
+ % third, draw line from first to second point:
+ %
+ \edef\pgf@marshal{\noexpand\pgfpathcurveto{\noexpand\pgfqpoint{\the\pgf@xc}{\the\pgf@yc}}%
+ {\noexpand\pgf@plot@closedcurve@after@initial@presupport}{\noexpand\pgf@plot@closedcurve@after@initial}}%
+ {\pgf@marshal}%
+ \pgfpathclose%
+ \fi%
+}
+
+
+
+
+
+% This handler converts each point in a stream into a line from the
+% $y$-axis to the given points coordinate, resulting in a
+% ``comb.''
+%
+% Example:
+%
+% \pgfplothandlerxcomb
+% \pgfplotxyfile{mytable}
+
+\def\pgfplothandlerxcomb{%
+ \def\pgf@plotstreamstart{%
+ \global\let\pgf@plotstreampoint=\pgf@plot@xcomb@handler%
+ \global\let\pgf@plotstreamspecial=\pgfutil@gobble%
+ \global\let\pgf@plotstreamend=\pgfplotxzerolevelstreamend%
+ \pgfplotxzerolevelstreamstart
+ }%
+}
+
+\def\pgf@plot@xcomb@handler#1{%
+ \pgf@process{#1}%
+ \pgf@xa=\pgf@x%
+ \pgf@ya=\pgf@y%
+ \begingroup
+ \pgfplotxzerolevelstreamnext
+ \endgroup
+ \pgf@yb=\pgf@x
+ \pgfpathmoveto{\pgfqpoint{\pgf@yb}{\pgf@ya}}%
+ \pgfpathlineto{\pgfqpoint{\pgf@xa}{\pgf@ya}}%
+}
+
+
+% This handler converts each point in a stream into a line from the
+% $x$-axis straight up to the given points coordinate, resulting in a
+% ``comb.''
+%
+% Example:
+%
+% \pgfplothandlerycomb
+% \pgfplotxyfile{mytable}
+
+\def\pgfplothandlerycomb{%
+ \def\pgf@plotstreamstart{%
+ \global\let\pgf@plotstreampoint=\pgf@plot@ycomb@handler%
+ \global\let\pgf@plotstreamspecial=\pgfutil@gobble%
+ \global\let\pgf@plotstreamend=\pgfplotyzerolevelstreamend%
+ \pgfplotyzerolevelstreamstart
+ }%
+}
+
+\def\pgf@plot@ycomb@handler#1{%
+ \pgf@process{#1}%
+ \pgf@xa=\pgf@x%
+ \pgf@ya=\pgf@y%
+ \begingroup
+ \pgfplotyzerolevelstreamnext
+ \endgroup
+ \pgf@yb=\pgf@x
+ \pgfpathmoveto{\pgfqpoint{\pgf@xa}{\pgf@yb}}%
+ \pgfpathlineto{\pgfqpoint{\pgf@xa}{\pgf@ya}}%
+}
+
+% PGF Bar or comb plots usually draw something from zero to the current plot's coordinate.
+%
+% The 'zero' offset can be changed using an input stream.
+%
+% There are two such streams which can be configured independently.
+% The first one returns "zeros" for coordinate x, the second one
+% returns "zeros" for coordinate y.
+%
+% \pgfplotxzerolevelstreamstart
+% \pgfplotxzerolevelstreamnext % assigns \pgf@x globally
+% \pgfplotxzerolevelstreamnext
+% \pgfplotxzerolevelstreamnext
+% \pgfplotxzerolevelstreamend
+%
+% and
+% \pgfplotyzerolevelstreamstart
+% \pgfplotyzerolevelstreamnext % assigns \pgf@x globally
+% \pgfplotyzerolevelstreamend
+%
+\def\pgfplotxzerolevelstreamstart{\pgf@plotxzerolevelstreamstart}%
+\def\pgfplotxzerolevelstreamend{\pgf@plotxzerolevelstreamend}%
+\def\pgfplotxzerolevelstreamnext{\pgf@plotxzerolevelstreamnext}
+\def\pgfplotyzerolevelstreamstart{\pgf@plotyzerolevelstreamstart}%
+\def\pgfplotyzerolevelstreamend{\pgf@plotyzerolevelstreamend}%
+\def\pgfplotyzerolevelstreamnext{\pgf@plotyzerolevelstreamnext}
+
+% This zero level stream always returns '#1' (a dimension).
+\def\pgfplotxzerolevelstreamconstant#1{%
+ \edef\pgfplotxzerolevelstreamconstant@val{#1}%
+ \def\pgf@plotxzerolevelstreamstart{%
+ \global\let\pgf@plotxzerolevelstreamend=\relax
+ \gdef\pgf@plotxzerolevelstreamnext{\global\pgf@x=\pgfplotxzerolevelstreamconstant@val\relax}%
+ }%
+}%
+\pgfplotxzerolevelstreamconstant{0pt}%
+
+% This zero level stream always returns '#1'.
+\def\pgfplotyzerolevelstreamconstant#1{%
+ \edef\pgfplotyzerolevelstreamconstant@val{#1}%
+ \def\pgf@plotyzerolevelstreamstart{%
+ \global\let\pgf@plotyzerolevelstreamend=\relax
+ \gdef\pgf@plotyzerolevelstreamnext{\global\pgf@x=\pgfplotyzerolevelstreamconstant@val\relax}%
+ }%
+}%
+\pgfplotyzerolevelstreamconstant{0pt}%
+
+\def\pgfplotbarwidth{\pgfkeysvalueof{/pgf/bar width}}
+
+\pgfqkeys{/pgf}{%
+ bar width/.initial=10pt,
+ bar shift/.initial=0pt,
+ bar interval width/.initial=1,
+ bar interval shift/.initial=0.5,
+}
+
+% This handler places a rectangle at each point in the plot stream, a
+% rectangle which touches the x-axis at one end and the current point
+% at the other end:
+% --(X)--
+% | |
+% | |
+% | |
+% --(0)--
+% Example:
+%
+% \pgfplothandlerybar
+% \pgfplotxyfile{mytable}
+\def\pgfplothandlerybar{%
+ \def\pgf@plotstreamstart{%
+ \global\let\pgf@plotstreampoint=\pgf@plot@ybar@handler%
+ \global\let\pgf@plotstreamspecial=\pgfutil@gobble%
+ \global\let\pgf@plotstreamend=\pgfplotyzerolevelstreamend%
+ \pgfmathparse{\pgfplotbarwidth}%
+ \xdef\pgfplotbarwidth@{\pgfmathresult pt}%
+ \pgfmathparse{\pgfkeysvalueof{/pgf/bar shift}}%
+ \xdef\pgfplotbarshift@{\pgfmathresult pt}%
+ \pgfplotyzerolevelstreamstart
+ }%
+}
+
+\def\pgf@plot@ybar@handler#1{%
+ \pgf@process{#1}%
+ \pgf@ya=\pgf@y
+ \expandafter\pgf@xb\pgfplotbarwidth@\relax
+ \pgf@xc=\pgf@x
+ \advance\pgf@xc by-.5\pgf@xb
+ \advance\pgf@xc by\pgfplotbarshift@\relax
+ \begingroup
+ \pgfplotyzerolevelstreamnext
+ \endgroup
+ \pgf@yb=\pgf@x
+ \advance\pgf@ya by-\pgf@yb
+ \pgfpathrectangle
+ {\pgfqpoint{\pgf@xc}{\pgf@yb}}%
+ {\pgfqpoint{\pgf@xb}{\pgf@ya}}%
+}
+
+% This handler places a rectangle at each point in the plot stream, a
+% rectangle which touches the y-axis at one end and the current point
+% at the other end:
+% ---------
+% | |
+% (0) (X)
+% | |
+% ---------
+% Example:
+%
+% \pgfplothandlerxbar
+% \pgfplotxyfile{mytable}
+\def\pgfplothandlerxbar{%
+ \def\pgf@plotstreamstart{%
+ \global\let\pgf@plotstreampoint=\pgf@plot@xbar@handler%
+ \global\let\pgf@plotstreamspecial=\pgfutil@gobble%
+ \global\let\pgf@plotstreamend=\pgfplotxzerolevelstreamend%
+ \pgfmathparse{\pgfplotbarwidth}%
+ \xdef\pgfplotbarwidth@{\pgfmathresult pt}%
+ \pgfmathparse{\pgfkeysvalueof{/pgf/bar shift}}%
+ \xdef\pgfplotbarshift@{\pgfmathresult pt}%
+ \pgfplotxzerolevelstreamstart
+ }%
+}
+
+\def\pgf@plot@xbar@handler#1{%
+ \pgf@process{#1}%
+ \pgf@ya=\pgf@x
+ \expandafter\pgf@xb\pgfplotbarwidth@\relax
+ \pgf@xc=\pgf@y
+ \advance\pgf@xc by-.5\pgf@xb
+ \advance\pgf@xc by\pgfplotbarshift@\relax
+ \begingroup
+ \pgfplotxzerolevelstreamnext
+ \endgroup
+ \pgf@yb=\pgf@x
+ \advance\pgf@ya by-\pgf@yb
+ \pgfpathrectangle
+ {\pgfqpoint{\pgf@yb}{\pgf@xc}}%
+ {\pgfqpoint{\pgf@ya}{\pgf@xb}}%
+}
+
+% This handler is a variant of \pgfplothandlerybar which works with
+% intervals instead of points.
+%
+% Bars are drawn between successive input coordinates and the width is
+% determined relatively to the interval length.
+%
+% It looks like this:
+%
+% |---| |-----|
+% | | | |
+% | | | |
+% | | | |
+% (X)------(X)-----------(X)
+%
+% where (X) denotes the x-axis offsets of input coordinates.
+%
+% In more detail, if (x_i,y_i) and (x_{i+1},y_{i+1}) denote successive
+% input coordinates, the bar will be placed above the
+% interval [x_i,x_{i+1}], centered at
+%
+% x_i + \pgfkeysvalueof{/pgf/bar interval shift} * (x_{i+1} - x_i)
+%
+% with width
+%
+% \pgfkeysvalueof{/pgf/bar interval width} * (x_{i+1} - x_i).
+%
+% If you have N+1 input points, you will get N bars (one for each
+% interval). The y_i value of the last bar will be ignored.
+%
+% Example:
+%
+% \pgfplothandlerybarinterval
+% \pgfplotxyfile{mytable}
+\def\pgfplothandlerybarinterval{%
+ \def\pgf@plotstreamstart{%
+ \global\let\pgf@plotstreampoint=\pgf@plot@ybarinterval@handler@first%
+ \global\let\pgf@plotstreamspecial=\pgfutil@gobble%
+ \global\let\pgf@plotstreamend=\pgfplotyzerolevelstreamend%
+ \pgfmathparse{\pgfkeysvalueof{/pgf/bar interval width}}%
+ \xdef\pgfplotbarintervalwidth@{\pgfmathresult}%
+ \pgfmathparse{\pgfkeysvalueof{/pgf/bar interval shift}}%
+ \xdef\pgfplotbarintervalshift@{\pgfmathresult}%
+ \pgfplotyzerolevelstreamstart
+ }%
+}
+
+\def\pgf@plot@ybarinterval@handler@first#1{%
+ \pgf@process{#1}%
+ \xdef\pgf@plot@barinterval@intervalstart{\the\pgf@x}%
+ \xdef\pgf@plot@barinterval@bar{\the\pgf@y}%
+ \global\let\pgf@plotstreampoint=\pgf@plot@ybarinterval@handler%
+}
+\def\pgf@plot@ybarinterval@handler#1{%
+ \pgf@process{#1}%
+ \pgf@ya=\pgf@plot@barinterval@bar
+ \xdef\pgf@plot@barinterval@bar{\the\pgf@y}%
+ \pgf@xc=\pgf@plot@barinterval@intervalstart\relax
+ \xdef\pgf@plot@barinterval@intervalstart{\the\pgf@x}%
+ \pgf@xb=\pgf@x
+ \advance\pgf@xb by-\pgf@xc
+ \advance\pgf@xc by\pgfplotbarintervalshift@\pgf@xb
+ \pgf@xb=\pgfplotbarintervalwidth@\pgf@xb
+ \advance\pgf@xc by-.5\pgf@xb% center
+ \begingroup
+ \pgfplotyzerolevelstreamnext
+ \endgroup
+ \pgf@yb=\pgf@x
+ \advance\pgf@ya by-\pgf@yb
+ \pgfpathrectangle
+ {\pgfqpoint{\pgf@xc}{\pgf@yb}}%
+ {\pgfqpoint{\pgf@xb}{\pgf@ya}}%
+}
+
+% Like \pgfplothandlerybarinterval but for xbar.
+\def\pgfplothandlerxbarinterval{%
+ \def\pgf@plotstreamstart{%
+ \global\let\pgf@plotstreampoint=\pgf@plot@xbarinterval@handler@first%
+ \global\let\pgf@plotstreamspecial=\pgfutil@gobble%
+ \global\let\pgf@plotstreamend=\pgfplotxzerolevelstreamend%
+ \pgfmathparse{\pgfkeysvalueof{/pgf/bar interval width}}%
+ \xdef\pgfplotbarintervalwidth@{\pgfmathresult}%
+ \pgfmathparse{\pgfkeysvalueof{/pgf/bar interval shift}}%
+ \xdef\pgfplotbarintervalshift@{\pgfmathresult}%
+ \pgfplotxzerolevelstreamstart
+ }%
+}
+
+\def\pgf@plot@xbarinterval@handler@first#1{%
+ \pgf@process{#1}%
+ \xdef\pgf@plot@barinterval@intervalstart{\the\pgf@y}%
+ \xdef\pgf@plot@barinterval@bar{\the\pgf@x}%
+ \global\let\pgf@plotstreampoint=\pgf@plot@xbarinterval@handler%
+}
+\def\pgf@plot@xbarinterval@handler#1{%
+ \pgf@process{#1}%
+ \pgf@ya=\pgf@plot@barinterval@bar
+ \xdef\pgf@plot@barinterval@bar{\the\pgf@x}%
+ \pgf@xc=\pgf@plot@barinterval@intervalstart\relax
+ \xdef\pgf@plot@barinterval@intervalstart{\the\pgf@y}%
+ \pgf@xb=\pgf@y
+ \advance\pgf@xb by-\pgf@xc
+ \advance\pgf@xc by\pgfplotbarintervalshift@\pgf@xb
+ \pgf@xb=\pgfplotbarintervalwidth@\pgf@xb
+ \advance\pgf@xc by-.5\pgf@xb% center
+ \begingroup
+ \pgfplotxzerolevelstreamnext
+ \endgroup
+ \pgf@yb=\pgf@x
+ \advance\pgf@ya by-\pgf@yb
+ \pgfpathrectangle
+ {\pgfqpoint{\pgf@yb}{\pgf@xc}}%
+ {\pgfqpoint{\pgf@ya}{\pgf@xb}}%
+}
+
+
+% This handler is very similar to \pgfplothandlerlineto, but it
+% produces CONSTANT connected pieces of the form
+%
+% x
+% |
+% x--- |
+% | x----
+% x-|
+%
+% Example:
+%
+% \pgfplothandlerconstantlineto
+% \pgfplotxyfile{mytable}
+\def\pgfplothandlerconstantlineto{%
+ \def\pgf@plotstreamstart{%
+ \global\let\pgf@plotstreampoint=\pgf@plot@const@line@handler%
+ \global\let\pgf@plotstreamspecial=\pgfutil@gobble%
+ \global\let\pgf@plotstreamend=\relax%
+ }%
+}
+\def\pgf@plot@const@line@handler#1{%
+ \pgf@plot@first@action{#1}%
+ \xdef\pgf@plot@const@line@handler@last{\the\pgf@y}%
+ \global\let\pgf@plotstreampoint=\pgf@plot@const@line@handler@@%
+}
+\def\pgf@plot@const@line@handler@@#1{%
+ \pgf@process{#1}%
+ \pgf@xa=\pgf@x
+ \pgf@ya=\pgf@y
+ \expandafter\pgf@yb\pgf@plot@const@line@handler@last
+ \pgfpathlineto{\pgfqpoint{\pgf@xa}{\pgf@yb}}%
+ \pgfpathlineto{\pgfqpoint{\pgf@xa}{\pgf@ya}}%
+ \xdef\pgf@plot@const@line@handler@last{\the\pgf@ya}%
+}
+
+% A variant of \pgfplothandlerconstantlineto which places its mark on
+% the right line ends.
+%
+% |---x
+% ---x |
+% |--x
+% x
+%
+% Example:
+%
+% \pgfplothandlerconstantlinetomarkright
+% \pgfplotxyfile{mytable}
+\def\pgfplothandlerconstantlinetomarkright{%
+ \def\pgf@plotstreamstart{%
+ \global\let\pgf@plotstreampoint=\pgf@plot@const@line@mark@right@handler%
+ \global\let\pgf@plotstreamspecial=\pgfutil@gobble%
+ \global\let\pgf@plotstreamend=\relax%
+ }%
+}
+\def\pgf@plot@const@line@mark@right@handler#1{%
+ \pgf@plot@first@action{#1}%
+ \xdef\pgf@plot@const@line@handler@last{\the\pgf@x}%
+ \global\let\pgf@plotstreampoint=\pgf@plot@const@line@mark@right@handler@@%
+}
+\def\pgf@plot@const@line@mark@right@handler@@#1{%
+ \pgf@process{#1}%
+ \pgf@xa=\pgf@x
+ \pgf@ya=\pgf@y
+ \expandafter\pgf@yb\pgf@plot@const@line@handler@last
+ \pgfpathlineto{\pgfqpoint{\pgf@yb}{\pgf@ya}}%
+ \pgfpathlineto{\pgfqpoint{\pgf@xa}{\pgf@ya}}%
+ \xdef\pgf@plot@const@line@handler@last{\the\pgf@xa}%
+}
+
+% This handler is in fact a variant of \pgfplothandlerconstantlineto,
+% but it does not draw vertical lines. It produces a sequence of
+% line-to and move-to operations such that plot marks are placed at
+% each right end:
+%
+% ---x
+% ---x
+% ---x
+% --x
+%
+% Example:
+%
+% \pgfplothandlerjumpmarkright
+% \pgfplotxyfile{mytable}
+\def\pgfplothandlerjumpmarkright{%
+ \def\pgf@plotstreamstart{%
+ \global\let\pgf@plotstreampoint=\pgf@plot@jumpmarkright@handler%
+ \global\let\pgf@plotstreamspecial=\pgfutil@gobble%
+ \global\let\pgf@plotstreamend=\relax%
+ }%
+}
+\def\pgf@plot@jumpmarkright@handler#1{%
+ \pgf@plot@first@action{#1}%
+ \xdef\pgf@plot@const@line@handler@last{\the\pgf@x}%
+ \global\let\pgf@plotstreampoint=\pgf@plot@jumpmarkright@handler@@%
+}
+\def\pgf@plot@jumpmarkright@handler@@#1{%
+ \pgf@process{#1}%
+ \pgf@xa=\pgf@x
+ \pgf@ya=\pgf@y
+ \expandafter\pgf@yb\pgf@plot@const@line@handler@last
+ \pgfpathmoveto{\pgfqpoint{\pgf@yb}{\pgf@ya}}%
+ \pgfpathlineto{\pgfqpoint{\pgf@xa}{\pgf@ya}}%
+ \xdef\pgf@plot@const@line@handler@last{\the\pgf@xa}%
+}
+
+% This handler is in fact a variant of \pgfplothandlerconstantlineto,
+% but it does not draw vertical lines. It produces a sequence of
+% line-to and move-to operations such that plot marks are placed at
+% each left end:
+%
+% x---
+% x---
+% x---
+% x--
+%
+% Example:
+%
+% \pgfplothandlerjumpmarkleft
+% \pgfplotxyfile{mytable}
+\def\pgfplothandlerjumpmarkleft{%
+ \def\pgf@plotstreamstart{%
+ \global\let\pgf@plotstreampoint=\pgf@plot@jumpmarkleft@handler%
+ \global\let\pgf@plotstreamspecial=\pgfutil@gobble%
+ \global\let\pgf@plotstreamend=\relax%
+ }%
+}
+\def\pgf@plot@jumpmarkleft@handler#1{%
+ \pgf@plot@first@action{#1}%
+ \xdef\pgf@plot@const@line@handler@last{\the\pgf@y}%
+ \global\let\pgf@plotstreampoint=\pgf@plot@jumpmarkleft@handler@@%
+}
+\def\pgf@plot@jumpmarkleft@handler@@#1{%
+ \pgf@process{#1}%
+ \pgf@xa=\pgf@x
+ \pgf@ya=\pgf@y
+ \expandafter\pgf@yb\pgf@plot@const@line@handler@last
+ \pgfpathlineto{\pgfqpoint{\pgf@xa}{\pgf@yb}}%
+ \pgfpathmoveto{\pgfqpoint{\pgf@xa}{\pgf@ya}}%
+ \xdef\pgf@plot@const@line@handler@last{\the\pgf@ya}%
+}
+
+
+
+% This handler converts each point in a stream into a line from the
+% origin to the point's coordinate, resulting in a ``star''.
+%
+% Example:
+%
+% \pgfplothandlerpolarcomb
+% \pgfplotxyfile{mytable}
+
+\def\pgfplothandlerpolarcomb{%
+ \def\pgf@plotstreamstart{%
+ \global\let\pgf@plotstreampoint=\pgf@plot@polarcomb@handler%
+ \global\let\pgf@plotstreamspecial=\pgfutil@gobble%
+ \global\let\pgf@plotstreamend=\relax%
+ }%
+}
+
+\def\pgf@plot@polarcomb@handler#1{%
+ \pgf@process{#1}%
+ \pgf@xa=\pgf@x%
+ \pgf@ya=\pgf@y%
+ \pgfpathmoveto{\pgfpointorigin}%
+ \pgfpathlineto{\pgfqpoint{\pgf@xa}{\pgf@ya}}%
+}
+
+
+
+
+% This handler draws a given mark at each point.
+%
+% #1 = some code to be executed at each point (with the coordinate
+% system translated to that point).
+% Typically, this code will be \pgfuseplotmark{whatever}.
+%
+% Example:
+%
+% \pgfplothandlermark{\pgfuseplotmark{*}}
+% \pgfplotxyfile{mytable}
+
+\def\pgfplothandlermark#1{%
+ \pgf@plothandlermark{%
+ \ifnum\pgf@plot@mark@count<\pgf@plot@mark@repeat\relax%
+ \else%
+ \global\pgf@plot@mark@count=0\relax%
+ #1%
+ \fi%
+ }%
+}
+
+\newcount\pgf@plot@mark@count
+\def\pgf@plot@mark@phase{0}
+
+\def\pgf@plothandlermark#1{%
+ \def\pgf@plot@mark{#1}%
+ \def\pgf@plotstreamstart{%
+ \global\pgf@plot@mark@count=\pgf@plot@mark@repeat\relax%
+ \global\advance\pgf@plot@mark@count by-\pgf@plot@mark@phase\relax%
+ \global\let\pgf@plotstreampoint=\pgf@plot@mark@handler%
+ \global\let\pgf@plotstreamspecial=\pgfutil@gobble%
+ \global\let\pgf@plotstreamend=\relax%
+ }%
+}
+
+\def\pgf@plot@mark@handler#1{%
+ \global\advance\pgf@plot@mark@count by1\relax%
+ {\pgftransformshift{#1}\pgf@plot@mark}%
+}
+
+
+% Set the repeat count for marks. For example, if 3 is given as a
+% value, only every third point will get a mark.
+%
+% #1 = repeat count
+%
+% Example:
+%
+% \pgfsetplotmarkrepeat{2}
+
+\def\pgfsetplotmarkrepeat#1{\def\pgf@plot@mark@repeat{#1}}
+\pgfsetplotmarkrepeat{1}
+
+
+% Set the phase for marks. For example, if 3 is the repeat and 3 is
+% the phase, already the first point will be marked.
+%
+% #1 = the index of the first point that should be marked.
+%
+% Example:
+%
+% \pgfsetplotmarkphase{3}
+
+\def\pgfsetplotmarkphase#1{\def\pgf@plot@mark@phase{#1}}
+\pgfsetplotmarkphase{1}
+
+
+
+% This handler draws a given mark at those points whose number is
+% given in the (pgffor-like) list.
+%
+% #1 = some code to be executed at each point (with the coordinate
+% system translated to that point).
+% Typically, this code will be \pgfuseplotmark{whatever}.
+% #2 = list of positions like "1,2,4,...,9,10"
+%
+% Example:
+%
+% \pgfplothandlermarklisted{\pgfuseplotmark{*}}{1,2,4,...,9}
+% \pgfplotxyfile{mytable}
+
+\def\pgfplothandlermarklisted#1#2{%
+ \let\pgf@plot@mark@list=\pgfutil@empty%
+ \edef\pgf@marshal{\noexpand\foreach\noexpand\pgf@temp in{#2}}
+ \pgf@marshal{\xdef\pgf@plot@mark@list{\pgf@plot@mark@list(\pgf@temp)}}%
+ \pgf@plothandlermark{%
+ \edef\pgf@marshal{\noexpand\pgfutil@in@{(\the\pgf@plot@mark@count)}{\pgf@plot@mark@list}}%
+ \pgf@marshal%
+ \ifpgfutil@in@#1\fi}%
+}
+
+
+% Define a new plot mark for use with \pgfplotmark.
+%
+% #1 = a plot mark mnemonic
+% #2 = code for drawing the mark
+%
+% Example:
+%
+% \pgfdeclareplotmark{*}{\pgfpathcircle{\pgfpointorigin}{2pt}\pgfusepathqfill}
+
+\def\pgfdeclareplotmark#1#2{\expandafter\def\csname pgf@plot@mark@#1\endcsname{#2}}
+
+
+% Set the size of plot marks. For circles, this will be the radius,
+% for other shapes it should be about half the width/height.
+%
+% Example:
+%
+% \pgfsetplotmarksize{1pt}
+
+\def\pgfsetplotmarksize#1{\pgfmathsetlength\pgfplotmarksize{#1}}
+
+\newdimen\pgfplotmarksize
+\pgfplotmarksize=2pt
+
+
+% Insert a plot mark's code at the origin.
+%
+% #1 = plot mark mnemonic
+%
+% Example:
+%
+% \pgfuseplotmark{*}
+
+\def\pgfuseplotmark#1{\csname pgf@plot@mark@#1\endcsname}
+
+
+% A stroke-filled circle mark
+
+\pgfdeclareplotmark{*}
+{%
+ \pgfpathcircle{\pgfpointorigin}{\pgfplotmarksize}
+ \pgfusepathqfillstroke
+}
+
+
+% A plus-sign like mark
+
+\pgfdeclareplotmark{+}
+{%
+ \pgfpathmoveto{\pgfqpoint{-\pgfplotmarksize}{0pt}}
+ \pgfpathlineto{\pgfqpoint{\pgfplotmarksize}{0pt}}
+ \pgfpathmoveto{\pgfqpoint{0pt}{\pgfplotmarksize}}
+ \pgfpathlineto{\pgfqpoint{0pt}{-\pgfplotmarksize}}
+ \pgfusepathqstroke
+}
+
+
+% An x-shaped mark
+
+\pgfdeclareplotmark{x}
+{%
+ \pgfpathmoveto{\pgfqpoint{-.70710678\pgfplotmarksize}{-.70710678\pgfplotmarksize}}
+ \pgfpathlineto{\pgfqpoint{.70710678\pgfplotmarksize}{.70710678\pgfplotmarksize}}
+ \pgfpathmoveto{\pgfqpoint{-.70710678\pgfplotmarksize}{.70710678\pgfplotmarksize}}
+ \pgfpathlineto{\pgfqpoint{.70710678\pgfplotmarksize}{-.70710678\pgfplotmarksize}}
+ \pgfusepathqstroke
+}
+
+% See pgflibraryplotmarks for more plot marks
+
+
+
+
+
+
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgfplots/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmathfloat.code.tex b/Master/texmf-dist/tex/generic/pgfplots/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmathfloat.code.tex
new file mode 100644
index 00000000000..cb479f8dc73
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgfplots/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmathfloat.code.tex
@@ -0,0 +1,2007 @@
+% Copyright 2008 by Christian Feuersaenger
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+%
+% This file contains methods for basic floating point arithmetics, rounding
+% to arbitrary precision and number pretty printing.
+%
+% Version 0.9.4 2008/03/18
+
+\global\newif\ifpgfmathfloatcomparison
+\newif\ifpgfmathfloatroundhasperiod
+\newif\ifpgfmathprintnumberskipzeroperiod
+
+
+% used internally in grouped macros:
+\toksdef\pgfmathfloat@tmptoks=1
+\newif\ifpgfmathfloat@fixed@digits@after@period
+\newif\ifpgfmathfloatroundmayneedrenormalize
+\toksdef\pgfmathfloat@a@Mtok=0
+
+%% WARNING: avoid conflicting register names!
+\let\pgfmathfloat@a@S=\c@pgf@counta
+\let\pgfmathfloat@a@M=\pgf@xa
+\let\pgfmathfloat@a@E=\c@pgf@countb
+\let\pgfmathfloat@b@S=\c@pgf@countc
+\let\pgfmathfloat@b@M=\pgf@xb
+\let\pgfmathfloat@b@E=\c@pgf@countd
+
+% can be changed with options.
+\def\pgfmathfloat@round@precision{2}
+
+
+% Computes a normalised floating point representation for #1 of the
+% form
+% [FLAGS] MANTISSE EXPONENT
+% meaning
+% [+-]X.XXXXXXX*10^C
+% where
+% X.XXXXXX is a mantisse with first number != 0, C is an integer and
+% FLAGS contains the sign and some other special cases.
+%
+% This method does NOT use TeX Registers to represent the numbers! The
+% computation is COMPLETELY STRING BASED.
+% This allows numbers such at 10000000 or 5.23e-10 to be represented
+% properly, although TeX-registers would produce overflow/underflow
+% errors in these cases.
+%
+% It is to be used to compute logs, because log(X*10^Y) = log(X) + log(10)*Y
+%
+% Arguments:
+% #1: an arbitrary number which shall be parsed. Maybe a macro.
+% Examples:
+% [+-]XXXXX.XXXXXX
+% [+-]XXXXX.XXXXXXeXXXX
+% [+-]0.0000XXXXXX
+% [+-]0.0000XXXXXXeXXXX
+% [+-]inf
+% nan
+% Maybe a macro containing such a number.
+%
+% Return value:
+% \pgfmathresult will be \def'ed to
+% FLAGS MANTISSE 'e' EXPONENT
+% where
+% FLAGS is a number in [0-5] where
+% 0 == '0' (the number is +- 0.0),
+% 1 == '+',
+% 2 == '-',
+% 3 == 'not a number'
+% 4 == '+ infinity'
+% 5 == '- infinity'
+%
+% MANTISSE is a normalised number 1 <= M < 10. It always contains a
+% period and at least one digit after the period.
+%
+% EXPONENT is an integer value.
+%
+% Example:
+% \pgfmathfloatparsenumber{1}
+% -> \pgfmathresult = 11.0e0
+% \pgfmathfloatparsenumber{141.212}
+% -> \pgfmathresult = 11.41212e2
+\def\pgfmathfloatparsenumber#1{%
+ \begingroup
+ \expandafter\pgfmathfloatparsenumber@impl#1\pgfmathfloat@EOI
+ \ifpgfmathfloatparsenumberpendingperiod
+ \pgfmathfloat@a@Mtok=\expandafter{\the\pgfmathfloat@a@Mtok.0}%
+ \fi
+ \edef\pgfmathresult{%
+ \the\pgfmathfloat@a@S\the\pgfmathfloat@a@Mtok e\the\pgfmathfloat@a@E}%
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
+}
+
+% The same as \pgfmathfloatparsenumber, but does not perform sanity checking.
+\def\pgfmathfloatqparsenumber#1{%
+ \begingroup
+ \let\pgfmathfloatparsenumber@sanitize@digit=\relax
+ \expandafter\pgfmathfloatparsenumber@impl#1\pgfmathfloat@EOI
+ \ifpgfmathfloatparsenumberpendingperiod
+ \pgfmathfloat@a@Mtok=\expandafter{\the\pgfmathfloat@a@Mtok.0}%
+ \fi
+ \edef\pgfmathresult{%
+ \the\pgfmathfloat@a@S\the\pgfmathfloat@a@Mtok e\the\pgfmathfloat@a@E}%
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
+}
+
+
+% decomposes a lowlevel floating point representation into flags,
+% mantisse and exponent.
+%
+% #4: integer register for the flags.
+% #5: dimen registers for the mantisse.
+% #6: integer register for the exponent.
+\def\pgfmathfloat@decompose#1#2e#3\relax#4#5#6{%
+ #4=#1\relax
+ #5=#2pt%
+ #6=#3\relax%
+}
+% overloaded, #5 needs to be a token register for the mantisse.
+\def\pgfmathfloat@decompose@tok#1#2e#3\relax#4#5#6{%
+ #4=#1\relax
+ #5={#2}%
+ #6=#3\relax%
+}
+% overloaded, returns only ONE of the three components into #4:
+\def\pgfmathfloat@decompose@F#1#2e#3\relax#4{#4=#1\relax}%
+\def\pgfmathfloat@decompose@M#1#2e#3\relax#4{#4=#2pt}%
+\def\pgfmathfloat@decompose@Mtok#1#2e#3\relax#4{#4={#2}}%
+\def\pgfmathfloat@decompose@E#1#2e#3\relax#4{#4=#3\relax}%
+
+% Takes a floating point number #1 as input and writes flags to macro
+% #2, mantisse to macro #3 and exponent to macro #4.
+\def\pgfmathfloattomacro#1#2#3#4{%
+ \begingroup
+ \expandafter\pgfmathfloat@decompose@tok#1\relax\pgfmathfloat@a@S\pgfmathfloat@a@Mtok\pgfmathfloat@a@E
+ \xdef\pgfmathfloat@TMPB{%
+ \noexpand\def\noexpand#2{\the\pgfmathfloat@a@S}%
+ \noexpand\def\noexpand#3{\the\pgfmathfloat@a@Mtok}%
+ \noexpand\def\noexpand#4{\the\pgfmathfloat@a@E}%
+ }%
+ \endgroup
+ \pgfmathfloat@TMPB
+}
+
+% Takes a floating point number #1 as input and writes flags to count
+% register #2, mantisse to dimen register #3 and exponent to count
+% register #4.
+\def\pgfmathfloattoregisters#1#2#3#4{%
+ \expandafter\pgfmathfloat@decompose#1\relax{#2}{#3}{#4}%
+}
+
+% the same, but writes the mantisse into a token register.
+\def\pgfmathfloattoregisterstok#1#2#3#4{%
+ \expandafter\pgfmathfloat@decompose@tok#1\relax{#2}{#3}{#4}%
+}
+
+% Extracts the flags of #1 into the count register #2.
+\def\pgfmathfloatgetflags#1#2{%
+ \expandafter\pgfmathfloat@decompose@F#1\relax{#2}%
+}
+% Extracts the mantisse of #1 into the dimen register #2.
+\def\pgfmathfloatgetmantisse#1#2{%
+ \expandafter\pgfmathfloat@decompose@M#1\relax{#2}%
+}
+% Extracts the mantisse of #1 into the token register #2.
+\def\pgfmathfloatgetmantissetok#1#2{%
+ \expandafter\pgfmathfloat@decompose@Mtok#1\relax{#2}%
+}
+% Extracts the exponent of #1 into the count register #2.
+\def\pgfmathfloatgetmantisse#1#2{%
+ \expandafter\pgfmathfloat@decompose@E#1\relax{#2}%
+}
+
+% Defines \pgfmathresult as the floating point number encoded by
+% the flags #1, mantisse #2 and exponent #3.
+%
+% All arguments are characters and will be expanded using '\edef'.
+\def\pgfmathfloatcreate#1#2#3{%
+ \edef\pgfmathresult{#1#2e#3}%
+}%
+
+
+% Compares #1 with #2 and sets \pgfmathresult either to 1.0 or 0.0.
+%
+% It also sets the boolean \ifpgfmathfloatcomparison (globally.
+\def\pgfmathfloatlessthan@#1#2{%
+%\def\pgfmathfloatlessthan#1#2#3\and#4#5#6{%
+ \global\pgfmathfloatcomparisonfalse
+ \begingroup
+ \expandafter\pgfmathfloat@decompose#1\relax\pgfmathfloat@a@S\pgfmathfloat@a@M\pgfmathfloat@a@E
+ \expandafter\pgfmathfloat@decompose#2\relax\pgfmathfloat@b@S\pgfmathfloat@b@M\pgfmathfloat@b@E
+ \ifcase\pgfmathfloat@a@S
+ % x = 0 -> (x<y <=> y >0)
+ \ifnum1=\pgfmathfloat@b@S
+ \global\pgfmathfloatcomparisontrue
+ \fi
+ \or
+ % x > 0 -> (x<y <=> ( y > 0 && |x| < |y|) )
+ \ifnum1=\pgfmathfloat@b@S
+ % y>0:
+ \pgfmathfloatlessthan@positive
+ \fi
+ \or
+ % x < 0 -> (x<y <=> (y >= 0 || |x| > |y|) )
+ \ifnum2=\pgfmathfloat@b@S
+ % 'y<0':
+ \pgfmathfloatgreaterthan@positive
+ \else
+ \global\pgfmathfloatcomparisontrue
+ \fi
+ \else
+ \pgfmath@error{Sorry, 'pgfmathfloatlessthan@{#1}{#2}' not yet supported.}%
+ \fi
+ \endgroup
+ \ifpgfmathfloatcomparison
+ \def\pgfmathresult{1.0}%
+ \else
+ \def\pgfmathresult{0.0}%
+ \fi
+}
+\let\pgfmathfloatlessthan=\pgfmathfloatlessthan@
+
+% compares \pgfmathfloat@a@[SME] < \pgfmathfloat@b@[SME]
+\def\pgfmathfloatlessthan@positive{%
+ \ifnum\pgfmathfloat@a@E<\pgfmathfloat@b@E
+ \global\pgfmathfloatcomparisontrue
+ \else
+ \ifnum\pgfmathfloat@a@E=\pgfmathfloat@b@E
+ \ifdim\pgfmathfloat@a@M<\pgfmathfloat@b@M
+ \global\pgfmathfloatcomparisontrue
+ \fi
+ \fi
+ \fi
+}
+
+% compares \pgfmathfloat@a@[SME] > \pgfmathfloat@b@[SME]
+\def\pgfmathfloatgreaterthan@positive{%
+ \ifnum\pgfmathfloat@a@E>\pgfmathfloat@b@E
+ \global\pgfmathfloatcomparisontrue
+ \else
+ \ifnum\pgfmathfloat@a@E=\pgfmathfloat@b@E
+ \ifdim\pgfmathfloat@a@M>\pgfmathfloat@b@M
+ \global\pgfmathfloatcomparisontrue
+ \fi
+ \fi
+ \fi
+}
+
+
+\def\pgfmathfloatmax@#1#2{%
+ \pgfmathfloatlessthan{#1}{#2}%
+ \ifpgfmathfloatcomparison
+ \edef\pgfmathresult{#2}%
+ \else
+ \edef\pgfmathresult{#1}%
+ \fi
+}
+\let\pgfmathfloatmax=\pgfmathfloatmax@
+
+\def\pgfmathfloatmin@#1#2{%
+ \pgfmathfloatlessthan{#1}{#2}%
+ \ifpgfmathfloatcomparison
+ \edef\pgfmathresult{#1}%
+ \else
+ \edef\pgfmathresult{#2}%
+ \fi
+}
+\let\pgfmathfloatmin=\pgfmathfloatmin@
+
+% Renormalizes #1 to extended precision mantisse, meaning
+% 100 <= m < 1000
+% instead of 1 <= m < 10.
+%
+% The 'extended precision' means we have higher accuracy when we apply pgfmath operations to mantisses.
+%
+% The input argument is expected to be a normalized floating point number; the output argument is a non-normalized floating point number (well, normalized to extended precision).
+%
+% The operation is supposed to be very fast.
+\def\pgfmathfloattoextentedprecision#1{%
+ \begingroup
+ \pgfmathfloattoextentedprecision@a{#1}%
+ \pgfmathfloatcreate{\pgfmathfloat@a@S}{\pgfmathresult}{\pgfmathfloat@a@E}%
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
+}%
+
+% Does the same work as \pgfmathfloattoextentedprecision, but this one here fills the
+% registers \pgfmathfloat@a@S and \pgfmathfloat@a@E with the flags and (renormalized) exponent.
+% It destroys the content of \pgfmathfloat@a@Mtok.
+\def\pgfmathfloattoextentedprecision@a#1{%
+ \expandafter\pgfmathfloat@decompose@tok#1\relax\pgfmathfloat@a@S\pgfmathfloat@a@Mtok\pgfmathfloat@a@E
+ \ifnum\pgfmathfloat@a@S<3
+ \advance\pgfmathfloat@a@E by-2\relax% compensate for shift above
+ \expandafter\pgfmathfloattoextentedprecision@@\the\pgfmathfloat@a@Mtok 00\pgfmathfloat@EOI
+ \else
+ \edef\pgfmathresult{#1}%
+ \fi
+}%
+\def\pgfmathfloattoextentedprecision@@#1.#2#3#4\pgfmathfloat@EOI{%
+ \edef\pgfmathresult{#1#2#3.#4}%
+}%
+
+
+% Similar to \pgfmathfloattoextentedprecision@a, this one here fills the '@b' registers.
+\def\pgfmathfloattoextentedprecision@b#1{%
+ \expandafter\pgfmathfloat@decompose@tok#1\relax\pgfmathfloat@b@S\pgfmathfloat@a@Mtok\pgfmathfloat@b@E
+ \ifnum\pgfmathfloat@b@S<3
+ \advance\pgfmathfloat@b@E by-2\relax
+ \expandafter\pgfmathfloattoextentedprecision@@\the\pgfmathfloat@a@Mtok 00\pgfmathfloat@EOI
+ \else
+ \edef\pgfmathresult{#1}%
+ \fi
+}%
+
+% Addition of two floating point numbers using 8 significant digits.
+\def\pgfmathfloatadd@#1#2{%
+ \begingroup
+ %
+ % renormalize argument to 100 <= m < 1000 for extended accuracy:
+ \pgfmathfloattoextentedprecision@a{#1}%
+ \let\pgfmathfloat@arga=\pgfmathresult
+ %
+ \pgfmathfloattoextentedprecision@b{#2}%
+ \let\pgfmathfloat@argb=\pgfmathresult
+ %
+ \pgfmathfloatcomparisontrue% re-use this boolean here to handle special cases.
+ \ifcase\pgfmathfloat@a@S
+ \edef\pgfmathresult{#2}%
+ \pgfmathfloatcomparisonfalse
+ \or
+ \or
+ \edef\pgfmathfloat@arga{-\pgfmathfloat@arga}%
+ \else
+ \pgfmathfloatcomparisonfalse
+ \pgfmathfloatcreate{\the\pgfmathfloat@a@S}{0.0}{0}%
+ \fi
+ \ifcase\pgfmathfloat@b@S
+ \edef\pgfmathresult{#1}%
+ \pgfmathfloatcomparisonfalse
+ \or
+ \or
+ \edef\pgfmathfloat@argb{-\pgfmathfloat@argb}%
+ \else
+ \pgfmathfloatcomparisonfalse
+ \pgfmathfloatcreate{\the\pgfmathfloat@b@S}{0.0}{0}%
+ \fi
+ \ifpgfmathfloatcomparison
+ % Shift lesser mantisse to fit the larger one:
+ \ifnum\pgfmathfloat@a@E<\pgfmathfloat@b@E
+ \pgfmathfloatadd@shift{\pgfmathfloat@arga}{\pgfmathfloat@a@E}{\pgfmathfloat@b@E}%
+ \else
+ \pgfmathfloatadd@shift{\pgfmathfloat@argb}{\pgfmathfloat@b@E}{\pgfmathfloat@a@E}%
+ \fi
+ % add them!
+ \pgfmathadd@{\pgfmathfloat@arga}{\pgfmathfloat@argb}%
+ % renormalize sum. This is the only part were an expensive routine comes into play:
+ \edef\pgfmathresult{\pgfmathresult e\the\pgfmathfloat@a@E}%
+ \expandafter\pgfmathfloatqparsenumber\expandafter{\pgfmathresult}%
+ \fi
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
+}%
+
+
+% #1=mantisse which needs to be shifted (with smaller exponent)
+% #2=smaller exponent
+% #3=larger exponent
+%
+% ATTENTION: this helper method DESTROYS contents of \pgfmathfloat@a@S.
+\def\pgfmathfloatadd@shift#1#2#3{%
+ \pgf@xa=#1 pt
+ \pgfmathfloat@a@S=#3
+ \advance\pgfmathfloat@a@S by-#2
+ \ifcase\pgfmathfloat@a@S
+ \or
+ \divide\pgf@xa by10\relax
+ \or
+ \divide\pgf@xa by100\relax
+ \or
+ \divide\pgf@xa by1000\relax
+ \or
+ \divide\pgf@xa by10000\relax
+ \or
+ \divide\pgf@xa by10000\relax
+ \divide\pgf@xa by10\relax
+ \or
+ \divide\pgf@xa by10000\relax
+ \divide\pgf@xa by100\relax
+ \or
+ \divide\pgf@xa by10000\relax
+ \divide\pgf@xa by1000\relax
+ \or
+ \divide\pgf@xa by10000\relax
+ \divide\pgf@xa by10000\relax
+ \else
+ \pgf@xa=0pt
+ \fi
+ #2=#3
+ \edef#1{\pgf@sys@tonumber\pgf@xa}%
+}
+
+\let\pgfmathfloatadd=\pgfmathfloatadd@
+
+
+% Subtracts two floating point numbers.
+\def\pgfmathfloatsubtract@#1#2{%
+ \begingroup
+ \expandafter\pgfmathfloat@decompose@tok#2\relax\pgfmathfloat@b@S\pgfmathfloat@a@Mtok\pgfmathfloat@b@E
+ \ifcase\pgfmathfloat@b@S
+ \edef\pgfmathresult{#1}%
+ \or
+ \pgfmathfloatcreate{2}{\the\pgfmathfloat@a@Mtok}{\the\pgfmathfloat@b@E}%
+ \let\pgfmathfloatsub@arg=\pgfmathresult
+ \pgfmathfloatadd@{#1}{\pgfmathfloatsub@arg}%
+ \or
+ \pgfmathfloatcreate{1}{\the\pgfmathfloat@a@Mtok}{\the\pgfmathfloat@b@E}%
+ \let\pgfmathfloatsub@arg=\pgfmathresult
+ \pgfmathfloatadd@{#1}{\pgfmathfloatsub@arg}%
+ \else
+ \pgfmathfloatcreate{\the\pgfmathfloat@b@S}{0.0}{0}%
+ \fi
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
+}%
+
+\let\pgfmathfloatsubtract=\pgfmathfloatsubtract@
+
+% Scales a floating point number #1 with a fixed point number #2 using pgfmathmultiply.
+%
+% Use this method if #2 is small number.
+\def\pgfmathfloatmultiplyfixed@#1#2{%
+ \begingroup
+ %
+ % renormalize argument to 100 <= m < 1000 for extended accuracy:
+ \pgfmathfloattoextentedprecision@a{#1}%
+ \let\pgfmathfloat@arga=\pgfmathresult
+ %
+ \pgfmathfloatcomparisontrue% re-use this boolean here to handle special cases.
+ \ifcase\pgfmathfloat@a@S
+ \edef\pgfmathresult{#1}%
+ \pgfmathfloatcomparisonfalse
+ \or
+ \or
+ \edef\pgfmathfloat@arga{-\pgfmathfloat@arga}%
+ \else
+ \pgfmathfloatcomparisonfalse
+ \pgfmathfloatcreate{\the\pgfmathfloat@a@S}{0.0}{0}%
+ \fi
+ \ifpgfmathfloatcomparison
+ \pgfmathmultiply@{\pgfmathfloat@arga}{#2}%
+ % renormalize product. This is the only part were an expensive routine comes into play:
+ \edef\pgfmathresult{\pgfmathresult e\the\pgfmathfloat@a@E}%
+ \expandafter\pgfmathfloatqparsenumber\expandafter{\pgfmathresult}%
+ \fi
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
+}%
+
+\let\pgfmathfloatmultiplyfixed=\pgfmathfloatmultiplyfixed@
+
+% Converts a composed floating point representation to fixed point.
+%
+% Example:
+% \pgfmathfloattofixed{142e1}
+% -> \pgfmathresult = 42.0
+\def\pgfmathfloattofixed@#1{%
+ \begingroup
+ \expandafter\pgfmathfloat@decompose@tok#1\relax\pgfmathfloat@a@S\pgfmathfloat@a@Mtok\pgfmathfloat@a@E
+ \ifcase\pgfmathfloat@a@S
+ \def\pgfmathresult{0.0}%
+ \or
+ \expandafter\pgfmathfloattofixed@impl\the\pgfmathfloat@a@Mtok\relax
+ \or
+ \expandafter\pgfmathfloattofixed@impl\the\pgfmathfloat@a@Mtok\relax
+ \edef\pgfmathresult{-\pgfmathresult}%
+ \or\def\pgfmathresult{nan}%
+ \or\def\pgfmathresult{inf}%
+ \or\def\pgfmathresult{-inf}%
+ \fi
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
+}
+\let\pgfmathfloattofixed=\pgfmathfloattofixed@
+
+% Divides or multiplies the input number by 10^#4 using an arithmetic
+% left/right shift.
+%
+% Input:
+% #1 a normalised floating point number.
+% #2 a positive or negative integer number denoting the shift.
+%
+% Example:
+% \pgfmathfloatshift{11e3}{4}%
+% -> pgfmathresult = 11e7
+\def\pgfmathfloatshift@#1#2{%
+ \begingroup
+ \expandafter\pgfmathfloat@decompose@tok#1\relax\pgfmathfloat@a@S\pgfmathfloat@a@Mtok\pgfmathfloat@a@E
+ \expandafter\advance\expandafter\pgfmathfloat@a@E#2\relax
+ \edef\pgfmathresult{\the\pgfmathfloat@a@S\the\pgfmathfloat@a@Mtok e\the\pgfmathfloat@a@E}%
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
+}
+\let\pgfmathfloatshift=\pgfmathfloatshift@
+
+% Computes a good guess for log(X.XXXX) where the input number should
+% be between 0 < x < 10.
+%
+% If it is not in this range, the returned value will be bad.
+%
+% For use in the newton implementation of log(x). Please note that we
+% first compute a normalized floating point representation of x, and
+% the mantisse is always between 0 and 10.
+\def\pgfmathlog@smaller@ten@newton@startval#1.#2\to#3{%
+ \ifcase#1
+ \pgfmath@error{pgfmathlog@newton: INTERNAL ERROR: should not happen!
+ [\#1=0 should have been caught before!]}%
+ \or#3=0.530628pt
+ \or#3=0.993pt
+ \or#3=1.308pt
+ \or#3=1.5pt
+ \or#3=1.71pt
+ \or#3=1.872pt
+ \or#3=2.01pt
+ \or#3=2.145pt
+ \or#3=2.24pt
+ \fi
+}
+
+% FIXME : eliminate \pgfmathlog@invoke@expanded ?
+
+% Expands #2 using \edef and invokes #1 with the resulting string.
+%
+% Example:
+% \pgfmath@y=7.9pt
+% \pgfmathlog@invoke@expanded\pgfmathexp@{{\pgf@sys@tonumber{\pgfmath@y}}}%
+% will invoke
+% \pgfmathexp@{7.9}
+\def\pgfmathlog@invoke@expanded#1#2{%
+ \edef\pgfmath@resulttemp{#2}%
+ \expandafter#1\pgfmath@resulttemp
+}
+
+% This implementation of log(X) is done with a newton method applied to x-exp(y) = 0.
+% The implementation \pgfmathexp is used for exp(y).
+%
+% see \pgfmathlog@
+\def\pgfmathlog@newton#1{%
+ \pgfmathfloatparsenumber{#1}%
+ \pgfmathlog@newton@float{\pgfmathresult}%
+}
+
+% the same as \pgfmathlog@newton, but this one takes a floating point number as input.
+\def\pgfmathlog@newton@float#1{%
+ \begingroup%
+ % compute #1 = M*10^E with normalised mantisse M = [+-]*[1-9].XXXXX
+ \expandafter\pgfmathfloat@decompose#1\relax\pgfmathfloat@a@S\pgfmathfloat@a@M\pgfmathfloat@a@E
+ \let\pgfmathlog@loopcount=\pgfmathfloat@b@S% this counter is not used here... use it as loop counter.
+ %
+ \ifnum\pgfmathfloat@a@S=1
+ % Now, compute log(#1) = log(M) + E*log(10)
+ \expandafter\pgfmathlog@smaller@ten@newton@startval\the\pgfmathfloat@a@M.\to\pgfmathfloat@b@M
+ \pgfmathlog@loopcount=0
+ \loop
+ \ifnum\pgfmathlog@loopcount<3
+ \pgfmathlog@invoke@expanded\pgfmathexp@{{\pgf@sys@tonumber{\pgfmathfloat@b@M}}}%
+ \let\pgfmathlog@tmp=\pgfmathresult
+ \pgfmathlog@invoke@expanded\pgfmathdivide@{{\pgf@sys@tonumber{\pgfmathfloat@a@M}}{\pgfmathlog@tmp}}%
+ \expandafter\pgfmath@ya\pgfmathresult pt
+ \advance\pgfmathfloat@b@M by\pgfmath@ya
+ \advance\pgfmathfloat@b@M by-1pt
+ \advance\pgfmathlog@loopcount by1
+ \repeat
+ \pgfmathfloat@a@M=2.302585pt% = log(10)
+ \multiply\expandafter\pgfmathfloat@a@M\pgfmathfloat@a@E
+ \advance\pgfmathfloat@b@M by\pgfmathfloat@a@M
+ \edef\pgfmathresult{\pgf@sys@tonumber{\pgfmathfloat@b@M}}%
+ \else
+ \let\pgfmathresult=\pgfutil@empty%
+ \fi
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup%
+}
+
+% Computes log(x) into \pgfmathresult.
+%
+% REMARK
+% This method does NOT use TeX Registers to represent the numbers! The
+% computation is COMPLETELY STRING BASED.
+% This allows numbers such at 10000000 or 5.23e-10 to be represented
+% properly, although TeX-registers would produce overflow/underflow
+% errors in these cases.
+%
+% The natural logarithm is computed using log(X*10^Y) = log(X) + log(10)*Y
+\let\pgfmathlog@=\pgfmathlog@newton
+
+\let\pgfmathlog@float=\pgfmathlog@newton@float
+
+% Public interface method. This is expected to use \pgfmathparse but
+% it DOESN'T do that. \pgfmathparse naturally can't handle numbers
+% which exceed TeX's numerical capabilities. However, exponentials are
+% typically either too large or too small for TeX.
+%
+% @see \pgfmathnormalisedfloatingpoint for how we parse arguments.
+% @see \pgfmathlog@
+\let\pgfmathlog=\pgfmathlog@newton
+
+% Rounds a fixed point number #1 to \pgfmathfloat@round@precision digits precision and returns
+% the result into \pgfmathresult.
+%
+% Any trailing zeros after the period are discarded.
+% See \pgfmathroundtozerofill if you want trailing zeros and fixed
+% width.
+%
+% This method is PURELY text based and can work with arbirtrary
+% precision (well, limited to TeX's stack size and integer size).
+%
+% Examples:
+% \pgfmathroundto{1}
+% -> \pgfmathresult = '1'
+%
+% \pgfmathroundto{19999.9996}
+% -> \pgfmathresult = '20000'
+%
+% Arguments:
+% #1 may be either a number or a macro expanding to a number.
+%
+% SIDE EFFECT: the global variable \ifpgfmathfloatroundhasperiod will be set.
+\def\pgfmathroundto#1{%
+ \pgfmathfloatroundhasperiodtrue
+ \begingroup
+ \pgfmathfloat@fixed@digits@after@periodfalse
+ \pgfmathroundto@impl{#1}%
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
+}
+
+
+% Overloaded method.
+%
+% This variant always uses a FIXED number behind the period and fills
+% in zeros if necessary.
+% Examples:
+% \pgfmathroundtozerofill{1}
+% -> \pgfmathresult = '1.00'
+%
+% \pgfmathroundtozerofill{19999.9996}
+% -> \pgfmathresult = '20000.00'
+%
+% SIDE EFFECT: the global variable \ifpgfmathfloatroundhasperiod will be set.
+\def\pgfmathroundtozerofill#1{%
+ \pgfmathfloatroundhasperiodtrue
+ \begingroup
+ \pgfmathfloat@fixed@digits@after@periodtrue
+ \pgfmathroundto@impl{#1}%
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
+}
+
+\def\pgfmathprintnumber@fixed@styleDEFAULT#1#2#3e#4\relax{%
+ \begingroup
+ \pgfkeysgetvalue{/pgf/number format/set decimal separator}\pgfmathprintnumber@fixed@styleDEFAULT@DEC@SEP
+ \pgfkeysgetvalue{/pgf/number format/set thousands separator}\pgfmathprintnumber@fixed@styleDEFAULT@THOUSAND@SEP
+ \c@pgf@counta=#4\relax
+ \def\pgfmathresult{}%
+ \ifpgfmathfloatroundhasperiod
+ \expandafter\pgfmathprintnumber@fixed@styleDEFAULT@impl@period#1\pgfmathfloat@EOI
+ \else
+ \expandafter\pgfmathprintnumber@fixed@styleDEFAULT@impl@noperiod#1\pgfmathfloat@EOI\pgfmathfloat@EOI\pgfmathfloat@EOI%
+ \fi
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
+}
+\def\pgfmathprintnumber@fixed@styleDEFAULT@impl@period#1.#2\pgfmathfloat@EOI{%
+ \ifpgfmathprintnumberskipzeroperiod
+ \def\pgfmathfloat@TMPB{#1}%
+ \ifx\pgfmathfloatparsenumber@tok@ZERO\pgfmathfloat@TMPB
+ \else
+ \def\pgfmathfloat@TMPC{-0}%
+ \ifx\pgfmathfloat@TMPC\pgfmathfloat@TMPB
+ \def\pgfmathresult{-}%
+ \else
+ \def\pgfmathfloat@TMPC{+0}%
+ \ifx\pgfmathfloat@TMPC\pgfmathfloat@TMPB
+ \def\pgfmathresult{+}%
+ \else
+ \pgfmathprintnumber@fixed@styleDEFAULT@impl@noperiod#1\pgfmathfloat@EOI\pgfmathfloat@EOI\pgfmathfloat@EOI
+ \fi
+ \fi
+ \fi
+ \else
+ \pgfmathprintnumber@fixed@styleDEFAULT@impl@noperiod#1\pgfmathfloat@EOI\pgfmathfloat@EOI\pgfmathfloat@EOI
+ \fi
+ \begingroup
+ \toks0=\expandafter{\pgfmathresult}%
+ \toks1=\expandafter{\pgfmathprintnumber@fixed@styleDEFAULT@DEC@SEP #2}%
+ \xdef\pgfmathfloat@TMPB{\the\toks0\the\toks1}%
+ \endgroup
+ \let\pgfmathresult=\pgfmathfloat@TMPB
+}%
+\def\pgfmathprintnumber@fixed@styleDEFAULT@impl@noperiod{%
+ \ifx\pgfmathprintnumber@fixed@styleDEFAULT@THOUSAND@SEP\pgfutil@empty
+ \def\pgfmathprintnumber@fixed@styleDEFAULT@impl@noperiod@NEXT{%
+ \pgfmathprintnumber@fixed@styleDEFAULT@impl@noperiod@printall}%
+ \else
+ \ifnum\c@pgf@counta<0\relax
+ \def\pgfmathprintnumber@fixed@styleDEFAULT@impl@noperiod@NEXT{%
+ \pgfmathprintnumber@fixed@styleDEFAULT@impl@noperiod@printall}%
+ \else
+ \advance\c@pgf@counta by1% counta:= total number of digits, N.
+ \c@pgf@countb=\c@pgf@counta
+ \divide\c@pgf@countb by3% countb := N DIV 3
+ \c@pgf@countc=\c@pgf@countb
+ \multiply\c@pgf@countc by3
+ \advance\c@pgf@counta by-\c@pgf@countc% now counta := N MOD 3
+ \def\pgfmathprintnumber@fixed@styleDEFAULT@impl@noperiod@NEXT{%
+ \pgfmathprintnumber@fixed@styleDEFAULT@impl@noperiod@printsign
+ }%
+ \fi
+ \fi
+ \pgfmathprintnumber@fixed@styleDEFAULT@impl@noperiod@NEXT
+}
+\def\pgfmathprintnumber@fixed@styleDEFAULT@impl@noperiod@printsign#1{%
+ \def\pgfmathfloat@TMPB{#1}%
+ \ifx\pgfmathfloat@TMPB\pgfmathfloatparsenumber@tok@MINUS
+ \expandafter\def\expandafter\pgfmathresult\expandafter{\pgfmathresult #1}% FIXME: '-' is enough!?
+ \let\pgfmathfloat@TMPB=\pgfutil@empty
+ \else
+ \ifx\pgfmathfloat@TMPB\pgfmathfloatparsenumber@tok@PLUS
+ \expandafter\def\expandafter\pgfmathresult\expandafter{\pgfmathresult #1}% FIXME: '+' is enough?
+ \let\pgfmathfloat@TMPB=\pgfutil@empty
+ \fi\fi
+ \ifnum\c@pgf@counta>0
+ \def\pgfmathprintnumber@fixed@styleDEFAULT@impl@noperiod@NEXT{%
+ \expandafter\pgfmathprintnumber@fixed@styleDEFAULT@impl@noperiod@printtrailingdigits\pgfmathfloat@TMPB
+ }%
+ \else
+ \def\pgfmathprintnumber@fixed@styleDEFAULT@impl@noperiod@NEXT{%
+ \expandafter\pgfmathprintnumber@fixed@styleDEFAULT@impl@noperiod@counteverythird\pgfmathfloat@TMPB
+ }%
+ \fi
+ \pgfmathprintnumber@fixed@styleDEFAULT@impl@noperiod@NEXT
+}
+\def\pgfmathprintnumber@fixed@styleDEFAULT@impl@noperiod@printtrailingdigits#1#2{%
+ \ifcase\c@pgf@counta
+ \or
+ \expandafter\def\expandafter\pgfmathresult\expandafter{\pgfmathresult #1}%
+ \def\pgfmathprintnumber@fixed@styleDEFAULT@impl@noperiod@NEXT{%
+ \pgfmathprintnumber@fixed@styleDEFAULT@impl@noperiod@counteverythird#2%
+ }%
+ \or
+ \expandafter\def\expandafter\pgfmathresult\expandafter{\pgfmathresult #1#2}%
+ \def\pgfmathprintnumber@fixed@styleDEFAULT@impl@noperiod@NEXT{%
+ \pgfmathprintnumber@fixed@styleDEFAULT@impl@noperiod@counteverythird%
+ }%
+ \fi
+ \ifnum\c@pgf@countb>0\relax
+ \begingroup
+ \toks0=\expandafter{\pgfmathresult}%
+ \toks1=\expandafter{\pgfmathprintnumber@fixed@styleDEFAULT@THOUSAND@SEP}%
+ \xdef\pgfmathfloat@TMPB{\the\toks0\the\toks1}%
+ \endgroup
+ \let\pgfmathresult=\pgfmathfloat@TMPB
+ \fi
+ \pgfmathprintnumber@fixed@styleDEFAULT@impl@noperiod@NEXT
+}
+\def\pgfmathprintnumber@fixed@styleDEFAULT@impl@noperiod@counteverythird#1#2#3{%
+ \ifnum\c@pgf@countb>0\relax
+ \expandafter\def\expandafter\pgfmathresult\expandafter{\pgfmathresult #1#2#3}%
+ \advance\c@pgf@countb by-1
+ \ifnum\c@pgf@countb>0\relax
+ \begingroup
+ \toks0=\expandafter{\pgfmathresult}%
+ \toks1=\expandafter{\pgfmathprintnumber@fixed@styleDEFAULT@THOUSAND@SEP}%
+ \xdef\pgfmathfloat@TMPB{\the\toks0\the\toks1}%
+ \endgroup
+ \let\pgfmathresult=\pgfmathfloat@TMPB
+ \fi
+ \def\pgfmathprintnumber@fixed@styleDEFAULT@impl@noperiod@NEXT{%
+ \pgfmathprintnumber@fixed@styleDEFAULT@impl@noperiod@counteverythird%
+ }%
+ \else
+ % in thise case, #1#2#3 are expected to be
+ % \pgfmathfloat@EOI\pgfmathfloat@EOI\pgfmathfloat@EOI
+ \def\pgfmathfloat@TMPB{\pgfmathfloat@EOI\pgfmathfloat@EOI\pgfmathfloat@EOI}%
+ \def\pgfmathfloat@TMPC{#1#2#3}%
+ \ifx\pgfmathfloat@TMPC\pgfmathfloat@TMPB
+ \else
+ \pgfmath@error{INTERNAL ERROR in fixed style - The input sequence did not terminate as expected; which indicates a wrong exponent argument provided to \string\pgfmathprintnumber@fixed@style}%
+ \fi
+ \let\pgfmathprintnumber@fixed@styleDEFAULT@impl@noperiod@NEXT=\relax
+ \fi
+ \pgfmathprintnumber@fixed@styleDEFAULT@impl@noperiod@NEXT
+}
+\def\pgfmathprintnumber@fixed@styleDEFAULT@impl@noperiod@printall#1\pgfmathfloat@EOI\pgfmathfloat@EOI\pgfmathfloat@EOI{%
+ \expandafter\def\expandafter\pgfmathresult\expandafter{\pgfmathresult #1}%
+}%
+
+% #1 maybe a macro
+\def\pgfmathprintnumber@fixed@stylePERIOD#1#2#3e#4\relax{%
+ \def\pgfmathresult{#1}%
+}
+
+% #1 maybe a macro
+\def\pgfmathprintnumber@fixed@styleCOMMA#1#2#3e#4\relax{%
+ \ifpgfmathfloatroundhasperiod
+ \expandafter\pgfmathprintnumber@fixed@styleCOMMA@impl#1\pgfmathfloat@EOI
+ \else
+ \def\pgfmathresult{#1}%
+ \fi
+}
+\def\pgfmathprintnumber@fixed@styleCOMMA@impl#1.#2\pgfmathfloat@EOI{\def\pgfmathresult{#1{,}#2}}
+
+% The default style to display fixed point numbers.
+%
+% It does not apply numerics, but it is responsable to typeset the
+% rounded number.
+% It can access the \ifpgfmathfloatroundhasperiod boolean.
+%
+% Arguments:
+% #1#2#3e#4\relax
+
+% Input:
+% #1 the fixed point number to be displayed (maybe a macro).
+% #2#3e#4: the (possibly unformatted) floating point representation which belongs to #1.
+% It is used to determine sign and exponent.
+\let\pgfmathprintnumber@fixed@style=\pgfmathprintnumber@fixed@styleDEFAULT
+
+
+% Rounds a normalized floating point number to \pgfmathfloat@round@precision
+% digits precision and writes the result to \pgfmathresult.
+%
+% This method uses \pgfmathroundto for the mantisse.
+%
+% @see pgfmathfloatroundzerofill
+%
+% SIDE EFFECT: the global variable \ifpgfmathfloatroundhasperiod will be set to
+% whether the final mantisse #5 has a period or not.
+\def\pgfmathfloatround#1{%
+ \pgfmathfloatroundhasperiodtrue
+ \begingroup
+ \pgfmathfloat@fixed@digits@after@periodfalse
+ \expandafter\pgfmathfloat@decompose@tok#1\relax\pgfmathfloat@a@S\pgfmathfloat@a@Mtok\pgfmathfloat@a@E
+ \pgfmathfloatround@impl
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
+}
+
+% Overload.
+%
+% This method uses a fixed width for the mantisse and fills in zeros
+% if necessary.
+%
+% This method uses \pgfmathroundtozerofill for the mantisse.
+%
+% SIDE EFFECT: the global variable \ifpgfmathfloatroundhasperiod will be set to
+% whether the final mantisse #5 has a period or not.
+\def\pgfmathfloatroundzerofill#1{%
+ \pgfmathfloatroundhasperiodtrue
+ \begingroup
+ \pgfmathfloat@fixed@digits@after@periodtrue
+ \expandafter\pgfmathfloat@decompose@tok#1\relax\pgfmathfloat@a@S\pgfmathfloat@a@Mtok\pgfmathfloat@a@E
+ \pgfmathfloatround@impl
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
+}
+
+\newif\ifpgfmathfloatround@allow@empty@mantisse
+\def\pgfmathfloatround@mantisse@ONE{1.0}%
+
+% #1: sign
+% #2: mantisse
+% #3: exponent
+% #4: CODE to display if the mantisse is drawn.
+% #5: CODE to display if the mantisse is NOT draw.
+% #6: CODE to display the exponent.
+\def\pgfmathfloatrounddisplaystyle@shared@impl#1#2e#3\relax#4#5#6{%
+ \expandafter\ifcase#1\relax
+ \pgfmathprintnumber@fixed@style{#2}#1#2e0\relax%
+ \expandafter\def\expandafter\pgfmathresult\expandafter{\pgfmathresult #4#6}%
+ \or\pgfmathprintnumber@fixed@style{#2}#1#2e0\relax%
+ \expandafter\def\expandafter\pgfmathresult\expandafter{\pgfmathresult #4#6}%
+ \or\pgfmathprintnumber@fixed@style{#2}#1#2e0\relax%
+ \expandafter\def\expandafter\pgfmathresult\expandafter{\expandafter-\pgfmathresult #4#6}%
+ \or\def\pgfmathresult{NaN}%
+ \or\def\pgfmathresult{\infty}%
+ \or\def\pgfmathresult{-\infty}%
+ \fi
+}
+
+\def\pgfmathfloatrounddisplaystyle@std#1#2e#3\relax{%
+ \pgfmathfloatrounddisplaystyle@shared@impl#1#2e#3\relax{\cdot}{}{10^{#3}}%
+}
+\def\pgfmathfloatrounddisplaystyle@subscript#1#2e#3\relax{%
+ \pgfmathfloatrounddisplaystyle@shared@impl#1#2e#3\relax{}{1}{_{#3}}%
+}
+\def\pgfmathfloatrounddisplaystyle@e#1#2e#3\relax{%
+ \ifnum#3<0\relax
+ {\count0=#3\relax
+ \multiply\count0 by-1
+ \xdef\pgfmathfloat@TMPB{e{-}\the\count0}%
+ }%
+ \let\pgfmathresult=\pgfmathfloat@TMPB
+ \else
+ \def\pgfmathresult{e{+}#3}%
+ \fi
+ \def\pgfmathfloat@TMPB{\pgfmathfloatrounddisplaystyle@shared@impl#1#2e#3\relax{}{1}}%
+ \expandafter\pgfmathfloat@TMPB\expandafter{\pgfmathresult}%
+}
+\def\pgfmathfloatrounddisplaystyle@E#1#2e#3\relax{%
+ \ifnum#3<0\relax
+ {\count0=#3\relax
+ \multiply\count0 by-1
+ \xdef\pgfmathfloat@TMPB{E{-}\the\count0}%
+ }%
+ \let\pgfmathresult=\pgfmathfloat@TMPB
+ \else
+ \def\pgfmathresult{E{+}#3}%
+ \fi
+ \def\pgfmathfloat@TMPB{\pgfmathfloatrounddisplaystyle@shared@impl#1#2e#3\relax{}{1}}%
+ \expandafter\pgfmathfloat@TMPB\expandafter{\pgfmathresult}%
+}
+
+% A macro which takes three arguments, sign, mantisse and exponent and
+% expands to the final TeX-representation for that floating point
+% number.
+%
+% PRECONDITION:
+% the floating point number has already been rounded properly and
+% the mantisse has been rounded correcty.
+%
+% #1: SIGN
+% #2: MANTISSE
+% #3: EXPONENT
+\let\pgfmathfloatrounddisplaystyle=\pgfmathfloatrounddisplaystyle@std
+\newif\ifpgfmathfloat@usezerofill@sci
+\newif\ifpgfmathfloat@usezerofill@fixed
+\newif\ifpgfmathprintnumber@assumemathmode
+
+\pgfkeys{%
+ /pgf/number format/.is family,
+ /pgf/number format,
+ fixed/.code= \pgfmath@set@number@printer{pgfmathprintnumber@FIXED},
+ %fixed zerofill/.code= \pgfmath@set@number@printer{pgfmathprintnumber@FIXED@ZEROFILL},
+ %sci zerofill/.code= \pgfmath@set@number@printer{pgfmathprintnumber@SCI@ZEROFILL},
+ sci/.code= \pgfmath@set@number@printer{pgfmathprintnumber@SCI},
+ std/.code= \pgfmath@set@number@printer{pgfmathprintnumber@STD},
+ int detect/.code= \pgfmath@set@number@printer{pgfmathprintnumber@INT@DETECT},
+ int trunc/.code= \pgfmath@set@number@printer{pgfmathprintnumber@INT@TRUNC},
+ assume math mode/.is if=pgfmathprintnumber@assumemathmode,
+ assume math mode/.default=true,
+ fixed zerofill/.is if= pgfmathfloat@usezerofill@fixed,
+ fixed zerofill/.default=true,
+ sci zerofill/.is if= pgfmathfloat@usezerofill@sci,
+ sci zerofill/.default=true,
+ zerofill/.style= {/pgf/number format/fixed zerofill=#1,/pgf/number format/sci zerofill=#1},
+ zerofill/.default= true,
+ precision/.store in= \pgfmathfloat@round@precision,
+ fixed default/.code= {\let\pgfmathprintnumber@fixed@style=\pgfmathprintnumber@fixed@styleDEFAULT},
+ set decimal separator/.initial=,
+ dec sep/.style={/pgf/number format/set decimal separator=#1},
+ set thousands separator/.initial=,
+ 1000 sep/.style={/pgf/number format/set thousands separator=#1},
+ use period/.style= {/pgf/number format/set decimal separator={.},/pgf/number format/set thousands separator={{{,}}}},
+ use comma/.style= {/pgf/number format/set decimal separator={{{,}}},/pgf/number format/set thousands separator={.}},
+ skip 0./.is if=pgfmathprintnumberskipzeroperiod,
+ skip 0./.default=true,
+ skip 0.= false,
+ use period,
+ sci 10^e/.code= {\let\pgfmathfloatrounddisplaystyle=\pgfmathfloatrounddisplaystyle@std},
+ sci 10e/.code= {\let\pgfmathfloatrounddisplaystyle=\pgfmathfloatrounddisplaystyle@std},
+ sci e/.code= {\let\pgfmathfloatrounddisplaystyle=\pgfmathfloatrounddisplaystyle@e},
+ sci E/.code= {\let\pgfmathfloatrounddisplaystyle=\pgfmathfloatrounddisplaystyle@E},
+ sci subscript/.code= {\let\pgfmathfloatrounddisplaystyle=\pgfmathfloatrounddisplaystyle@subscript},
+% sci may skip mantisse/.is if=pgfmathfloatround@allow@empty@mantisse,
+% sci may skip mantisse/.default=true,
+}
+
+
+
+\def\pgfmathprintnumber@STD#1{%
+ % parse the input:
+ \pgfmathfloatparsenumber{#1}%
+ \expandafter\pgfmathprintnumber@STD@issci\pgfmathresult\relax
+}
+
+\def\pgfmathprintnumber@STD@issci#1#2e#3\relax{%
+ \expandafter\ifnum#1<3
+ \expandafter\ifnum#3>4
+ \pgfmathprintnumber@SCI@issci#1#2e#3\relax%
+ \else
+ \begingroup
+ \c@pgf@counta=\pgfmathfloat@round@precision\relax
+ \divide\c@pgf@counta by-2\relax
+ \ifnum#3<\c@pgf@counta
+ \pgfmathprintnumber@SCI@issci#1#2e#3\relax%
+ \else
+ \pgfmathprintnumber@FIXED@issci#1#2e#3\relax%
+ \fi
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
+ \fi
+ \else% nan or inf:
+ \pgfmathfloatrounddisplaystyle#1#2e#3\relax%
+ \fi
+}
+
+
+\def\pgfmathprintnumber@INT@TRUNC#1{%
+ \pgfmathfloatparsenumber{#1}%
+ \expandafter\pgfmathprintnumber@INT@TRUNC@issci\pgfmathresult\relax
+}
+
+\def\pgfmathprintnumber@INT@TRUNC@impl#1.#2\relax#3#4e#5\relax{%
+ \pgfmathfloatroundhasperiodfalse
+ \pgfmathprintnumber@fixed@style{#1}#3#4e#5\relax%
+}
+\def\pgfmathprintnumber@INT@TRUNC@issci#1#2e#3\relax{%
+ \ifnum#1<3\relax
+ \pgfmathfloattofixed{#1#2e#3}%
+ \expandafter\pgfmathprintnumber@INT@TRUNC@impl\pgfmathresult\relax#1#2e#3\relax
+ \else
+ \pgfmathfloatrounddisplaystyle#1#2e#3\relax%
+ \fi
+}
+
+
+\def\pgfmathprintnumber@INT@DETECT#1{%
+ \pgfmathfloatparsenumber{#1}%
+ \expandafter\pgfmathprintnumber@INT@DETECT@issci\pgfmathresult\relax
+}
+
+\def\pgfmathprintnumber@INT@DETECT@issci#1#2e#3\relax{%
+ \begingroup
+ \ifnum#1<3\relax
+ \pgfmathfloattofixed{#1#2e#3}%
+ \def\pgfmathfloat@round@precision{6}%
+ \expandafter\pgfmathroundto\expandafter{\pgfmathresult}%
+ \ifpgfmathfloatroundhasperiod
+ \pgfmathprintnumber@SCI@issci#1#2e#3\relax
+ \else
+ \expandafter\pgfmathprintnumber@fixed@style\expandafter{\pgfmathresult}#1#2e#3\relax
+ \fi
+ \else
+ \pgfmathfloatrounddisplaystyle#1#2e#3\relax%
+ \fi
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
+}
+
+\def\pgfmathprintnumber@FIXED#1{%
+ \pgfmathfloatparsenumber{#1}%
+ \expandafter\pgfmathprintnumber@FIXED@issci\pgfmathresult\relax
+}
+
+\def\pgfmathprintnumber@FIXED@issci#1#2e#3\relax{%
+ \begingroup
+ \ifnum#1<3
+ \pgfmathfloattofixed{#1#2e#3}%
+ \ifpgfmathfloat@usezerofill@fixed
+ \expandafter\pgfmathroundtozerofill\expandafter{\pgfmathresult}%
+ \else
+ \expandafter\pgfmathroundto\expandafter{\pgfmathresult}%
+ \fi
+ \ifpgfmathfloatroundmayneedrenormalize
+ \pgfmathfloat@a@E=#3\relax
+ \advance\pgfmathfloat@a@E by1
+ \edef\pgfmathfloat@TMPB{\noexpand\pgfmathprintnumber@fixed@style{\pgfmathresult}#1#2e\the\pgfmathfloat@a@E}%
+ \pgfmathfloat@TMPB\relax%
+ \else
+ \expandafter\pgfmathprintnumber@fixed@style\expandafter{\pgfmathresult}#1#2e#3\relax%
+ \fi
+ \else% nan or inf:
+ \pgfmathfloatrounddisplaystyle#1#2e#3\relax%
+ \fi
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
+}
+
+
+\def\pgfmathprintnumber@SCI#1{%
+ \pgfmathfloatparsenumber{#1}%
+ \expandafter\pgfmathprintnumber@SCI@issci\pgfmathresult\relax
+}
+
+\def\pgfmathprintnumber@SCI@issci#1#2e#3\relax{%
+ \ifpgfmathfloat@usezerofill@sci
+ \pgfmathfloatroundzerofill{#1#2e#3}%
+ \else
+ \pgfmathfloatround{#1#2e#3}%
+ \fi
+ \expandafter\pgfmathfloatrounddisplaystyle\pgfmathresult\relax
+}
+
+% Prints argument #1 using the current pretty printer environment (all
+% variables in /pgf/number format).
+%
+% You may specify optional arguments with \pgfmathprintnumber[...].
+\def\pgfmathprintnumber{%
+ \pgfutil@ifnextchar[%
+ {\pgfmathprintnumber@OPT}%
+ {\pgfmathprintnumber@noopt}%
+}
+
+\def\pgfmathprintnumber@noopt#1{%
+ \pgfmathprintnumber@{#1}%
+ \ifpgfmathprintnumber@assumemathmode
+ \else
+ \pgfutilensuremath{\pgfmathresult}%
+ \fi
+}%
+\def\pgfmathprintnumber@OPT[#1]#2{%
+ \begingroup
+ \pgfqkeys{/pgf/number format}{#1}%
+ \pgfmathprintnumber@{#2}%
+ \ifpgfmathprintnumber@assumemathmode
+ \else
+ \pgfutilensuremath{\pgfmathresult}%
+ \fi
+ \endgroup
+}%
+
+% As \pgfmathprintnumber, but it produces its output into the second
+% argument.
+\def\pgfmathprintnumberto{%
+ \pgfutil@ifnextchar[%
+ {\pgfmathprintnumberto@OPT}%
+ {\pgfmathprintnumberto@noopt}%
+}
+
+\def\pgfmathprintnumberto@noopt#1#2{%
+ \begingroup
+ \pgfmathprintnumber@{#1}%
+ \ifpgfmathprintnumber@assumemathmode
+ \global\let\pgfmathfloat@TMPB=\pgfmathresult
+ \else
+ \toks0=\expandafter{\pgfmathresult}%
+ \xdef\pgfmathfloat@TMPB{\noexpand\pgfutilensuremath{\the\toks0}}%
+ \fi
+ \endgroup
+ \let#2=\pgfmathfloat@TMPB
+}%
+\def\pgfmathprintnumberto@OPT[#1]#2#3{%
+ \begingroup
+ \pgfqkeys{/pgf/number format}{#1}%
+ \pgfmathprintnumber@{#2}%
+ \ifpgfmathprintnumber@assumemathmode
+ \global\let\pgfmathfloat@TMPB=\pgfmathresult
+ \else
+ \toks0=\expandafter{\pgfmathresult}%
+ \xdef\pgfmathfloat@TMPB{\noexpand\pgfutilensuremath{\the\toks0}}%
+ \fi
+ \endgroup
+ \let#3=\pgfmathfloat@TMPB
+}%
+
+
+% Changes the current number pretty printer to #1.
+%
+% #1 is the macro base name for the pretty print routine, without the
+% leading '\'.
+\def\pgfmath@set@number@printer#1{%
+ \expandafter\let\expandafter\pgfmathprintnumber@\csname #1\endcsname
+ \expandafter\let\expandafter\pgfmathprintnumber@issci\csname #1@issci\endcsname
+}
+
+\pgfmath@set@number@printer{pgfmathprintnumber@STD}
+%\pgfmath@set@number@printer{pgfmathprintnumber@FIXED}
+%\pgfmath@set@number@printer{pgfmathprintnumber@FIXED@ZEROFILL}
+%\pgfmath@set@number@printer{pgfmathprintnumber@SCI@ZEROFILL}
+%\pgfmath@set@number@printer{pgfmathprintnumber@SCI}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% IMPL
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% equals only itsself when compared with \ifx:
+\def\pgfmathfloat@EOI{\pgfmathfloat@EOI}%
+
+% Re-use counters internally.
+%
+% They are always grouped and only used inside of the rounding
+% routines.
+\let\c@pgfmathroundto@prec=\pgfmathfloat@b@S% ATTENTION: DOUBLE-USED REGISTERS!
+\let\c@pgfmathroundto@offsetbehindperiod=\pgfmathfloat@b@E
+\newcount\c@pgfmathroundto@lastzeros
+
+\newif\ifpgfmathround@impl@PREPERIOD@is@negative@zero
+
+% PRECONDITION:
+% \ifpgfmathfloatroundhasperiod=\iftrue holds outside of the
+% current TeX group.
+%
+% POSTCONDITION:
+% \ifpgfmathfloatroundhasperiod will be set correctly AFTER the
+% current TeX group.
+% \ifpgfmathfloatroundmayneedrenormalize will be set globally
+\def\pgfmathroundto@impl#1{%
+ \global\pgfmathfloatroundmayneedrenormalizefalse
+ \pgfmathfloat@tmptoks={}%
+ \let\pgfmathround@next=\pgfutil@empty
+ \let\pgfmathround@cur=\pgfutil@empty
+ \let\pgfmathresult=\pgfutil@empty
+ \edef\pgfmathround@input{#1}%
+ \expandafter\c@pgfmathroundto@prec\pgfmathfloat@round@precision\relax
+ \c@pgfmathroundto@lastzeros=0
+ \c@pgfmathroundto@offsetbehindperiod=-1 % means: no period found so far
+ \pgfmathround@impl@PREPERIOD@is@negative@zerotrue
+ \expandafter\pgfmathroundto@impl@ITERATE@NODOT@firstcall\pgfmathround@input\pgfmathfloat@EOI
+}
+
+% \pgfmathroundto implementation in WORDS:
+%
+% coarse idea:
+% 1. collect all digits/sign BEFORE the first period in REVERSE order
+% 2. then, collect UP TO \prec digits after the period in REVERSE order
+% Steps 1. and 2. lead to the digit [sign] sequence
+% "x_{-p} x_{-p+1} ... x_{-2} x_{-1} '.' x_0 ... x_r"
+% where 'r' is the total number of digits. The integer 'p' denotes the
+% ACTUALLY collected number of digits behind the period.
+%
+% Let 'k' be the desired precision.
+%
+% Please note that pgfmathroundto rounds the mantisse, that means |abs(x)|.
+%
+% There are exactly TWO cases:
+% 1. The case with p<=k and x_{-p-1} = end of input.
+% 2. The case with p=k and x_{-p-1} is a further, next character.
+%
+% Then, for case 1.):
+% discard any unused zeros at the tail of our number (possibly
+% including the period)
+%
+% and in case 2.)
+% if NEXT DIGIT < 5:
+% do exactly the same as in case 1.) above and discard any
+% following digits.
+% else
+% let q := -p
+% while(x_q = 9 and q<=r )
+% if q>=0
+% set x_q = '0'
+% else
+% discard digit x_q='9'
+% fi
+% ++q
+% if q=0
+% discard the period
+% fi
+% end while
+% if q = r+1
+% insert a '1'
+% else
+% set x_q = x_q + 1
+% fi
+% fi
+%
+% All these loops have been implemented in spaghetti-code below.
+% Sorry, I fear its hard to understand. In principle, everything is
+% realised using more or less finite state machines (with some number
+% counting logic).
+%
+% Some comments:
+% - The token register \pgfmathfloat@tmptoks is used to accumulate the REVERSED input number.
+% - \pgfmathfloat@EOI always denotes 'END OF INPUT'.
+% - in the second stage, we need to reverse \pgfmathfloat@tmptoks.
+% This is -again- done with \pgfmathfloat@tmptoks.
+
+\def\pgfmathroundto@impl@discard@period#1.#2\pgfmathfloat@EOI{%
+ \pgfmathfloatroundhasperiodfalse
+ \aftergroup\pgfmathfloatroundhasperiodfalse
+ \def\pgfmathresult{#1}%
+}
+
+\def\pgfmathroundto@impl@gobble@rest@and@start#1\pgfmathfloat@EOI{%
+ \pgfmathroundto@impl@start
+}
+\def\pgfmathroundto@impl@gobble@and@start\pgfmathfloat@EOI{%
+ \pgfmathroundto@impl@start
+}
+\def\pgfmathroundto@impl@gobble\pgfmathfloat@EOI{}%
+\def\pgfmathroundto@impl@gobble@rest#1\pgfmathfloat@EOI{}%
+
+% This method will be invoked as soon as the first step, the reverse
+% collection of up to PREC digits after the period, has finished.
+\def\pgfmathroundto@impl@start{%
+ \ifx\pgfmathround@next\pgfutil@empty
+ \ifnum\c@pgfmathroundto@offsetbehindperiod<0
+ % no period found.
+ \ifpgfmathfloat@fixed@digits@after@period
+ \ifnum\c@pgfmathroundto@prec=0\relax
+ \pgfmathfloatroundhasperiodfalse
+ \aftergroup\pgfmathfloatroundhasperiodfalse
+ \edef\pgfmathresult{\pgfmathround@input}%
+ \else
+ \pgfmathfloat@tmptoks=\expandafter{\pgfmathround@input.}%
+ \c@pgfmathroundto@offsetbehindperiod=\c@pgfmathroundto@prec
+ \pgfmathroundto@impl@append@zeros
+ \edef\pgfmathresult{\the\pgfmathfloat@tmptoks}%
+ \fi
+ \else
+ \pgfmathfloatroundhasperiodfalse
+ \aftergroup\pgfmathfloatroundhasperiodfalse
+ \edef\pgfmathresult{\pgfmathround@input}%
+ \fi
+ \else
+ %\ifnum\c@pgfmathroundto@offsetbehindperiod>\c@pgfmathroundto@prec
+ % \pgfmath@error{Internal logic error in pgfmathroundto at [I] - should not have happened!?}%
+ %\fi
+ \pgfmathroundto@impl@finish@with@truncation
+ \fi
+ \else
+ %\ifnum\c@pgfmathroundto@offsetbehindperiod=\c@pgfmathroundto@prec
+ %\else
+ % \pgfmath@error{Internal logic error in pgfmathroundto at [II] - should not have happened!? I have offsetbehindperiod=\the\c@pgfmathroundto@offsetbehindperiod and prec = \the\c@pgfmathroundto@prec}%
+ %\fi
+ \expandafter\ifnum\pgfmathround@next<5\relax
+ \pgfmathroundto@impl@finish@with@truncation
+ \else
+ \multiply\c@pgfmathroundto@offsetbehindperiod by-1
+ \expandafter\pgfmathroundto@impl@ADD@ONE\the\pgfmathfloat@tmptoks\pgfmathfloat@EOI
+ \fi
+ \fi
+}
+
+% takes the current input and decides whether trailing zeros shall be
+% discarded or more zeros need to be filled in.
+\def\pgfmathroundto@impl@finish@with@truncation{%
+ \ifpgfmathfloat@fixed@digits@after@period
+ \expandafter\pgfmathroundto@impl@REVERSE\the\pgfmathfloat@tmptoks\pgfmathfloat@EOI
+ \ifnum\c@pgfmathroundto@lastzeros=\c@pgfmathroundto@offsetbehindperiod
+ \ifpgfmathround@impl@PREPERIOD@is@negative@zero
+ % write '0.0000' instead of '-0.0000':
+ \expandafter\pgfmathroundto@impl@discard@minus\the\pgfmathfloat@tmptoks\pgfmathfloat@EOI
+ \fi
+ \fi
+ \ifnum\c@pgfmathroundto@prec=0\relax
+ \expandafter\pgfmathroundto@impl@discard@period\the\pgfmathfloat@tmptoks\pgfmathfloat@EOI
+ \else
+ \advance\c@pgfmathroundto@prec by-\c@pgfmathroundto@offsetbehindperiod
+ \c@pgfmathroundto@offsetbehindperiod=\c@pgfmathroundto@prec
+ \pgfmathroundto@impl@append@zeros
+ \edef\pgfmathresult{\the\pgfmathfloat@tmptoks}%
+ \fi
+ \else
+ \pgfmathroundto@impl@discard@suffix@zeros
+ \fi
+}
+
+\def\pgfmathroundto@impl@discard@minus-#1\pgfmathfloat@EOI{\pgfmathfloat@tmptoks={#1}}%
+
+% appends \c@pgfmathroundto@offsetbehindperiod zeros at the end of \pgfmathfloat@tmptoks.
+\def\pgfmathroundto@impl@append@zeros{%
+ \ifnum\c@pgfmathroundto@offsetbehindperiod>0
+ \pgfmathfloat@tmptoks=\expandafter{\the\pgfmathfloat@tmptoks0}%
+ \advance\c@pgfmathroundto@offsetbehindperiod by-1
+ \pgfmathroundto@impl@append@zeros
+ \fi
+}
+
+\def\pgfmathroundto@impl@ADD@ONE{%
+ \pgfmathfloat@tmptoks={}% no longer needed because its old value will be read from input
+ \pgfmathroundto@impl@ADD@ONE@ITERATE
+}
+\def\pgfmathroundto@impl@ADD@ONE@ITERATE{%
+ \pgfutil@ifnextchar\pgfmathfloat@EOI{%
+ \global\pgfmathfloatroundmayneedrenormalizetrue
+ \edef\pgfmathresult{1\the\pgfmathfloat@tmptoks}%
+ \pgfmathroundto@impl@gobble
+ }{%
+ \pgfutil@ifnextchar.{%
+ \ifnum\c@pgfmathroundto@prec=0
+ % silently discard period in special case precision=0
+ \def\pgfmathround@nextcmd{\pgfmathroundto@impl@ADD@ONE@ITERATE@gobble@dot}%
+ \else
+ \def\pgfmathround@nextcmd{\pgfmathroundto@impl@ADD@ONE@NEXT@COLLECT}%
+ \fi
+ \pgfmathround@nextcmd
+ }{%
+ \pgfutil@ifnextchar+{%
+ \global\pgfmathfloatroundmayneedrenormalizetrue
+ \edef\pgfmathresult{1\the\pgfmathfloat@tmptoks}%
+ \pgfmathroundto@impl@gobble@rest
+ }{%
+ \pgfutil@ifnextchar-{%
+ \global\pgfmathfloatroundmayneedrenormalizetrue
+ \edef\pgfmathresult{-1\the\pgfmathfloat@tmptoks}%
+ \pgfmathroundto@impl@gobble@rest
+ }{%
+ \pgfmathroundto@impl@ADD@ONE@NEXT
+ }%
+ }%
+ }%
+ }%
+}
+
+\def\pgfmathroundto@impl@ADD@ONE@ITERATE@gobble@dot.{%
+ \pgfmathfloatroundhasperiodfalse
+ \aftergroup\pgfmathfloatroundhasperiodfalse
+ \pgfmathroundto@impl@ADD@ONE@ITERATE
+}
+
+\def\pgfmathroundto@impl@ADD@ONE@NEXT@COLLECT#1{%
+ \pgfmathfloat@tmptoks=\expandafter{\expandafter#1\the\pgfmathfloat@tmptoks}%
+ \pgfmathroundto@impl@ADD@ONE@ITERATE
+}
+\def\pgfmathroundto@impl@ADD@ONE@NEXT#1{%
+ \ifnum#1=9
+ \ifnum\c@pgfmathroundto@offsetbehindperiod<0
+ \ifpgfmathfloat@fixed@digits@after@period
+ \pgfmathfloat@tmptoks=\expandafter{\expandafter0\the\pgfmathfloat@tmptoks}%
+ \else
+ % silently DROP digit
+ \fi
+ \else
+ \pgfmathfloat@tmptoks=\expandafter{\expandafter0\the\pgfmathfloat@tmptoks}%
+ \fi
+ \advance\c@pgfmathroundto@offsetbehindperiod by1
+ \ifnum\c@pgfmathroundto@offsetbehindperiod=0
+ \ifpgfmathfloat@fixed@digits@after@period
+ \def\pgfmathround@nextcmd{\pgfmathroundto@impl@ADD@ONE@ITERATE}%
+ \else
+ \def\pgfmathround@nextcmd{\pgfmathroundto@impl@ADD@ONE@ITERATE@gobble@dot}%
+ \fi
+ \else
+ \def\pgfmathround@nextcmd{\pgfmathroundto@impl@ADD@ONE@ITERATE}%
+ \fi
+ \else
+ % re-use this counter:
+ \c@pgfmathroundto@lastzeros=#1
+ \advance\c@pgfmathroundto@lastzeros by1
+ \edef\pgfmathresult{\the\c@pgfmathroundto@lastzeros\the\pgfmathfloat@tmptoks}%
+ \pgfmathfloat@tmptoks=\expandafter{\pgfmathresult}%
+ \def\pgfmathround@nextcmd{\pgfmathroundto@impl@REVERSE@ITERATE}%
+ \fi
+ \pgfmathround@nextcmd
+}
+
+
+\def\pgfmathroundto@impl@discard@suffix@zeros{%
+ \ifnum\c@pgfmathroundto@lastzeros=\c@pgfmathroundto@offsetbehindperiod
+ \ifpgfmathround@impl@PREPERIOD@is@negative@zero
+ \pgfmathfloatroundhasperiodfalse
+ \aftergroup\pgfmathfloatroundhasperiodfalse
+ \def\pgfmathresult{0}% write '0' instead of '-0'
+ \else
+ \expandafter\pgfmathroundto@impl@discard@period\pgfmathround@input\pgfmathfloat@EOI
+ \fi
+ \else
+ \ifnum\c@pgfmathroundto@lastzeros=0
+ \expandafter\pgfmathroundto@impl@REVERSE\the\pgfmathfloat@tmptoks\pgfmathfloat@EOI
+ \else
+ \expandafter\pgfmathroundto@impl@discard@suffix@zeros@ITERATE\the\pgfmathfloat@tmptoks\pgfmathfloat@EOI
+ \fi
+ \fi
+}
+
+% PRECONDITION:
+% \c@pgfmathroundto@lastzeros > 0
+\def\pgfmathroundto@impl@discard@suffix@zeros@ITERATE#1{%
+ \advance\c@pgfmathroundto@lastzeros by-1
+ \ifnum\c@pgfmathroundto@lastzeros=0
+ \def\pgfmathround@nextcmd{\pgfmathroundto@impl@REVERSE}%
+ \else
+ \def\pgfmathround@nextcmd{\pgfmathroundto@impl@discard@suffix@zeros@ITERATE}%
+ \fi
+ \pgfmathround@nextcmd
+}
+
+% Usage:
+% \pgfmathroundto@impl@REVERSE#1\pgfmathfloat@EOI
+% -> writes #1 reversed into \pgfmathfloat@tmptoks
+\def\pgfmathroundto@impl@REVERSE{%
+ \pgfmathfloat@tmptoks={}%
+ \pgfmathroundto@impl@REVERSE@ITERATE
+}
+
+\def\pgfmathroundto@impl@REVERSE@ITERATE{%
+ \pgfutil@ifnextchar\pgfmathfloat@EOI{%
+ \edef\pgfmathresult{\the\pgfmathfloat@tmptoks}%
+ \pgfmathroundto@impl@gobble
+ }{%
+ \pgfmathroundto@impl@REVERSE@NEXT
+ }%
+}
+
+\def\pgfmathroundto@impl@REVERSE@NEXT#1{%
+ \pgfmathfloat@tmptoks=\expandafter{\expandafter#1\the\pgfmathfloat@tmptoks}%
+ \pgfmathroundto@impl@REVERSE@ITERATE
+}
+
+\def\pgfmathroundto@impl@BEGIN@DOT.{%
+ \pgfmathfloat@tmptoks=\expandafter{\expandafter.\the\pgfmathfloat@tmptoks}%
+ \c@pgfmathroundto@offsetbehindperiod=0
+ \pgfmathroundto@impl@ITERATE@DOT
+}
+\def\pgfmathroundto@impl@ITERATE@DOT{%
+ \pgfutil@ifnextchar\pgfmathfloat@EOI{%
+ % finished.
+ \pgfmathroundto@impl@gobble@and@start
+ }{%
+ \pgfmathroundto@impl@NEXT@DOT
+ }%
+}
+\def\pgfmathroundto@impl@NEXT@DOT#1{%
+ \ifnum\c@pgfmathroundto@offsetbehindperiod=\c@pgfmathroundto@prec
+ \def\pgfmathround@next{#1}%
+ \def\pgfmathround@nextcmd{\pgfmathroundto@impl@gobble@rest@and@start}%
+ \else
+ \advance\c@pgfmathroundto@offsetbehindperiod by1
+ \ifnum#1=0
+ \advance\c@pgfmathroundto@lastzeros by1
+ \else
+ \c@pgfmathroundto@lastzeros=0
+ \fi
+ \pgfmathfloat@tmptoks=\expandafter{\expandafter#1\the\pgfmathfloat@tmptoks}%
+ \def\pgfmathround@nextcmd{\pgfmathroundto@impl@ITERATE@DOT}%
+ \fi
+ \pgfmathround@nextcmd
+}%
+
+% in contrast to pgfmathroundto@impl@ITERATE@NODOT, this method here
+% checks also for signs
+\def\pgfmathroundto@impl@ITERATE@NODOT@firstcall#1{%
+ \def\pgfmathround@cur{#1}%
+ \ifx\pgfmathround@cur\pgfmathfloat@EOI
+ \pgfmathround@impl@PREPERIOD@is@negative@zerofalse
+ \def\pgfmathround@nextcmd{\pgfmathroundto@impl@start}%
+ \else
+ \ifx\pgfmathround@cur\pgfmathfloatparsenumber@tok@PERIOD
+ \pgfmathround@impl@PREPERIOD@is@negative@zerofalse
+ \def\pgfmathround@nextcmd{\pgfmathroundto@impl@BEGIN@DOT.}%
+ \else
+ \ifx\pgfmathround@cur\pgfmathfloatparsenumber@tok@MINUS
+ \else
+ \pgfmathround@impl@PREPERIOD@is@negative@zerofalse
+ \fi
+ \pgfmathfloat@tmptoks=\expandafter{\expandafter#1\the\pgfmathfloat@tmptoks}%
+ \def\pgfmathround@nextcmd{\pgfmathroundto@impl@ITERATE@NODOT}%
+ \fi
+ \fi
+ \pgfmathround@nextcmd
+}
+
+\def\pgfmathroundto@impl@ITERATE@NODOT#1{%
+ \def\pgfmathround@cur{#1}%
+ \ifx\pgfmathround@cur\pgfmathfloat@EOI
+ \def\pgfmathround@nextcmd{\pgfmathroundto@impl@start}%
+ \else
+ \ifx\pgfmathround@cur\pgfmathfloatparsenumber@tok@PERIOD
+ \def\pgfmathround@nextcmd{\pgfmathroundto@impl@BEGIN@DOT.}%
+ \else
+ \ifx\pgfmathround@cur\pgfmathfloatparsenumber@tok@ZERO
+ \else
+ \pgfmathround@impl@PREPERIOD@is@negative@zerofalse
+ \fi
+ \pgfmathfloat@tmptoks=\expandafter{\expandafter#1\the\pgfmathfloat@tmptoks}%
+ \def\pgfmathround@nextcmd{\pgfmathroundto@impl@ITERATE@NODOT}%
+ \fi
+ \fi
+ \pgfmathround@nextcmd
+}
+
+%--------------------------------------------
+% END of pgfmathroundto implementation.
+%--------------------------------------------
+
+
+% flags, mantisse and exponent has already been stored into
+% \pgfmathfloat@a@* [using ...@Mtok]
+%
+% PRECONDITION:
+% \ifpgfmathfloatroundhasperiod = \iftrue outside of the current
+% group
+%
+% POSTCONDITION:
+% \ifpgfmathfloatroundhasperiod will be set after the current TeX
+% group.
+\def\pgfmathfloatround@impl{%
+ \expandafter\pgfmathroundto@impl\expandafter{\the\pgfmathfloat@a@Mtok}%
+ \ifpgfmathfloatroundmayneedrenormalize
+ \ifpgfmathfloatroundhasperiod
+ \expandafter\pgfmathfloatround@impl@renormalize\pgfmathresult\pgfmathfloat@EOI%
+ \else
+ \expandafter\pgfmathfloatround@impl@renormalize\pgfmathresult.\pgfmathfloat@EOI%
+ \fi
+ \advance\pgfmathfloat@a@E by1
+ \fi
+ \edef\pgfmathresult{\the\pgfmathfloat@a@S\pgfmathresult e\the\pgfmathfloat@a@E}%
+}
+
+\def\pgfmathfloatround@impl@renormalize#1#2.#3\pgfmathfloat@EOI{%
+ \pgfmathroundto@impl{#1.#2#3}%
+}
+
+
+
+
+
+% ATTENTION: this thing REQUIRES a period in the mantisse!
+% collects everything into \pgfmathresult
+\def\pgfmathfloattofixed@impl#1.#2\relax{%
+ \ifnum\pgfmathfloat@a@E<0
+ \pgfmathfloat@a@Mtok={0.}%
+ \loop
+ \ifnum\pgfmathfloat@a@E<-1
+ \pgfmathfloat@a@Mtok=\expandafter{\the\pgfmathfloat@a@Mtok 0}%
+ \advance\pgfmathfloat@a@E by1
+ \repeat
+ \def\pgfmathfloat@TMPB{#2}%
+ \def\pgfmathfloat@TMPC{0}%
+ \ifx\pgfmathfloat@TMPB\pgfmathfloat@TMPC
+ \edef\pgfmathresult{\the\pgfmathfloat@a@Mtok #1}%
+ \else
+ \edef\pgfmathresult{\the\pgfmathfloat@a@Mtok #1#2}%
+ \fi
+ \else
+ \ifnum\pgfmathfloat@a@E=0%
+ \edef\pgfmathresult{#1.#2}%
+ \else
+ \pgfmathfloat@a@Mtok={#1}%
+ \pgfmathfloattofixed@impl@collectmantisse#2\count\pgfmathfloat@a@E
+ \edef\pgfmathresult{\the\pgfmathfloat@a@Mtok}%
+ \fi
+ \fi
+}
+
+\def\pgfmathfloattofixed@impl@collectmantisse#1#2\count#3{%
+ \pgfmathfloat@a@Mtok=\expandafter{\the\pgfmathfloat@a@Mtok #1}%
+ \advance\pgfmathfloat@a@E by-1%
+ \def\pgfmathfloat@TMPB{#2}%
+ \ifx\pgfmathfloat@TMPB\pgfutil@empty
+ \loop
+ \ifnum\pgfmathfloat@a@E>0%
+ \pgfmathfloat@a@Mtok=\expandafter{\the\pgfmathfloat@a@Mtok 0}%
+ \advance\pgfmathfloat@a@E by-1%
+ \repeat
+ \pgfmathfloat@a@Mtok=\expandafter{\the\pgfmathfloat@a@Mtok .0}%
+ \else
+ \ifnum\pgfmathfloat@a@E=0
+ \pgfmathfloat@a@Mtok=\expandafter{\the\pgfmathfloat@a@Mtok .#2}%
+ \else
+ \pgfmathfloattofixed@impl@collectmantisse#2\count#3%
+ \fi
+ \fi
+}
+
+
+% ============================================
+%
+%
+% \pgfmathfloatparsenumber implementation
+%
+%
+% ============================================
+
+
+% accepted parser tokens:
+\def\pgfmathfloatparsenumber@tok@ONE{1}
+\def\pgfmathfloatparsenumber@tok@TWO{2}
+\def\pgfmathfloatparsenumber@tok@THREE{3}
+\def\pgfmathfloatparsenumber@tok@FOUR{4}
+\def\pgfmathfloatparsenumber@tok@FIVE{5}
+\def\pgfmathfloatparsenumber@tok@SIX{6}
+\def\pgfmathfloatparsenumber@tok@SEVEN{7}
+\def\pgfmathfloatparsenumber@tok@EIGHT{8}
+\def\pgfmathfloatparsenumber@tok@NINE{9}
+\def\pgfmathfloatparsenumber@tok@ZERO{0}
+\def\pgfmathfloatparsenumber@tok@e{e}
+\def\pgfmathfloatparsenumber@tok@E{E}
+\def\pgfmathfloatparsenumber@tok@PLUS{+}
+\def\pgfmathfloatparsenumber@tok@MINUS{-}
+\def\pgfmathfloatparsenumber@tok@n{n}
+\def\pgfmathfloatparsenumber@tok@N{N}
+\def\pgfmathfloatparsenumber@tok@i{i}
+\def\pgfmathfloatparsenumber@tok@I{I}
+\def\pgfmathfloatparsenumber@tok@PERIOD{.}
+
+\newif\ifpgfmathfloatparsenumberpendingperiod
+
+% Starts a finite-start-machine parser to read a number.
+%
+% It assigns \pgfmathfloat@a@S, \pgfmathfloat@a@Mtok, \pgfmathfloat@a@E.
+\def\pgfmathfloatparsenumber@impl#1{%
+ \pgfmathfloatparsenumberpendingperiodfalse
+ \pgfmathfloat@tmptoks={}% this register is used to collect PENDING ZEROS
+ \pgfmathfloat@a@E=0
+ % start parsing: check for sign:
+ \def\pgfmathfloatparsenumber@curtok{#1}%
+ \ifx\pgfmathfloatparsenumber@curtok\pgfmathfloatparsenumber@tok@PLUS
+ \pgfmathfloat@a@S=1\relax%
+ \def\pgfmathfloatparsenumber@NEXT{\pgfmathfloatparsenumber@impl@init}%
+ \else
+ \ifx\pgfmathfloatparsenumber@curtok\pgfmathfloatparsenumber@tok@MINUS
+ \pgfmathfloat@a@S=2\relax%
+ \def\pgfmathfloatparsenumber@NEXT{\pgfmathfloatparsenumber@impl@init}%
+ \else
+ \pgfmathfloat@a@S=1\relax%
+ \def\pgfmathfloatparsenumber@NEXT{\pgfmathfloatparsenumber@impl@init#1}%
+ \fi
+ \fi
+ \pgfmathfloatparsenumber@NEXT
+}
+
+\def\pgfmathfloatparsenumber@sanitize@digit{%
+ \ifx\pgfmathfloatparsenumber@curtok\pgfmathfloatparsenumber@tok@ONE
+ \else
+ \ifx\pgfmathfloatparsenumber@curtok\pgfmathfloatparsenumber@tok@TWO
+ \else
+ \ifx\pgfmathfloatparsenumber@curtok\pgfmathfloatparsenumber@tok@THREE
+ \else
+ \ifx\pgfmathfloatparsenumber@curtok\pgfmathfloatparsenumber@tok@FOUR
+ \else
+ \ifx\pgfmathfloatparsenumber@curtok\pgfmathfloatparsenumber@tok@FIVE
+ \else
+ \ifx\pgfmathfloatparsenumber@curtok\pgfmathfloatparsenumber@tok@SIX
+ \else
+ \ifx\pgfmathfloatparsenumber@curtok\pgfmathfloatparsenumber@tok@SEVEN
+ \else
+ \ifx\pgfmathfloatparsenumber@curtok\pgfmathfloatparsenumber@tok@EIGHT
+ \else
+ \ifx\pgfmathfloatparsenumber@curtok\pgfmathfloatparsenumber@tok@NINE
+ \else
+ \def\pgfmathfloatparsenumber@NEXT{\expandafter\pgfmathfloatparsenumber@impl@error\pgfmathfloatparsenumber@curtok}%
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi
+}
+
+% FROM: checksign.
+%
+\def\pgfmathfloatparsenumber@impl@init#1{%
+ \def\pgfmathfloatparsenumber@curtok{#1}%
+ \ifx\pgfmathfloatparsenumber@curtok\pgfmathfloatparsenumber@tok@n
+ \def\pgfmathfloatparsenumber@NEXT{\pgfmathfloatparsenumber@impl@readnan}%
+ \else
+ \ifx\pgfmathfloatparsenumber@curtok\pgfmathfloatparsenumber@tok@i
+ \def\pgfmathfloatparsenumber@NEXT{\pgfmathfloatparsenumber@impl@readinf}%
+ \else
+ \ifx\pgfmathfloatparsenumber@curtok\pgfmathfloatparsenumber@tok@ZERO
+ \def\pgfmathfloatparsenumber@NEXT{\pgfmathfloatparsenumber@impl@leadingzero}%
+ \else
+ \def\pgfmathfloatparsenumber@NEXT{%
+ \pgfmathfloat@a@Mtok={#1}%
+ \pgfmathfloatparsenumberpendingperiodtrue
+ \pgfmathfloatparsenumber@impl@positiveexp}%
+ \pgfmathfloatparsenumber@sanitize@digit
+ \fi
+ \fi
+ \fi
+ \pgfmathfloatparsenumber@NEXT
+}
+
+\def\pgfmathfloatparsenumber@impl@error#1\pgfmathfloat@EOI{%
+ \begingroup
+ \pgfmathfloat@a@Mtok={#1}%
+ \pgfmath@error{Could not read input number, sorry. The unreadable part was near '\the\pgfmathfloat@a@Mtok'.}%
+ \endgroup
+}%
+
+\def\pgfmathfloatparsenumber@impl@finish#1\pgfmathfloat@EOI{}
+
+\def\pgfmathfloatparsenumber@impl@readnan an{%
+ \pgfmathfloat@a@S=3\relax%
+ \pgfmathfloat@a@Mtok={nan}%
+ \pgfmathfloat@a@E=0%
+ \pgfmathfloatparsenumber@impl@finish
+}
+\def\pgfmathfloatparsenumber@impl@readinf nf{%
+ \ifnum\pgfmathfloat@a@S=1
+ \pgfmathfloat@a@S=4\relax%
+ \pgfmathfloat@a@Mtok={inf}%
+ \else
+ \pgfmathfloat@a@S=5\relax%
+ \pgfmathfloat@a@Mtok={-inf}%
+ \fi
+ \pgfmathfloat@a@E=0%
+ \pgfmathfloatparsenumber@impl@finish
+}
+\def\pgfmathfloatparsenumber@impl@leadingzero#1{%
+ \def\pgfmathfloatparsenumber@curtok{#1}%
+ \ifx\pgfmathfloatparsenumber@curtok\pgfmathfloatparsenumber@tok@ZERO
+ \def\pgfmathfloatparsenumber@NEXT{%
+ \pgfmathfloatparsenumber@impl@leadingzero}%
+ \else
+ \ifx\pgfmathfloatparsenumber@curtok\pgfmathfloatparsenumber@tok@PERIOD
+ \def\pgfmathfloatparsenumber@NEXT{%
+ \pgfmathfloat@a@E=-1
+ \pgfmathfloatparsenumber@impl@leadingzero@foundperiod}%
+ \else
+ \ifx\pgfmathfloatparsenumber@curtok\pgfmathfloatparsenumber@tok@e
+ \def\pgfmathfloatparsenumber@NEXT{%
+ \pgfmathfloat@a@S=0\relax%
+ \pgfmathfloat@a@Mtok={0.0}%
+ \pgfmathfloat@a@E=0%
+ \pgfmathfloatparsenumber@impl@readexponent}%
+ \else
+ \ifx\pgfmathfloatparsenumber@curtok\pgfmathfloatparsenumber@tok@E
+ \def\pgfmathfloatparsenumber@NEXT{%
+ \pgfmathfloat@a@S=0\relax%
+ \pgfmathfloat@a@Mtok={0.0}%
+ \pgfmathfloat@a@E=0%
+ \pgfmathfloatparsenumber@impl@readexponent}%
+ \else
+ \ifx\pgfmathfloatparsenumber@curtok\pgfmathfloat@EOI
+ \def\pgfmathfloatparsenumber@NEXT{%
+ \pgfmathfloat@a@S=0\relax%
+ \pgfmathfloat@a@Mtok={0.0}%
+ \pgfmathfloat@a@E=0%
+ }%
+ \else
+ \def\pgfmathfloatparsenumber@NEXT{%
+ \pgfmathfloat@a@Mtok={#1}%
+ \pgfmathfloatparsenumberpendingperiodtrue
+ \pgfmathfloatparsenumber@impl@positiveexp}%
+ \pgfmathfloatparsenumber@sanitize@digit
+ \fi\fi\fi
+ \fi
+ \fi
+ \pgfmathfloatparsenumber@NEXT
+}
+
+\def\pgfmathfloatparsenumber@impl@leadingzero@foundperiod#1{%
+ \def\pgfmathfloatparsenumber@curtok{#1}%
+ \ifx\pgfmathfloatparsenumber@curtok\pgfmathfloatparsenumber@tok@ZERO
+ \def\pgfmathfloatparsenumber@NEXT{%
+ \advance\pgfmathfloat@a@E by-1
+ \pgfmathfloatparsenumber@impl@leadingzero@foundperiod}%
+ \else
+ \ifx\pgfmathfloatparsenumber@curtok\pgfmathfloatparsenumber@tok@e
+ \def\pgfmathfloatparsenumber@NEXT{%
+ \pgfmathfloat@a@S=0\relax%
+ \pgfmathfloat@a@Mtok={0.0}%
+ \pgfmathfloat@a@E=0%
+ \pgfmathfloatparsenumber@impl@readexponent}%
+ \else
+ \ifx\pgfmathfloatparsenumber@curtok\pgfmathfloatparsenumber@tok@E
+ \def\pgfmathfloatparsenumber@NEXT{%
+ \pgfmathfloat@a@S=0\relax%
+ \pgfmathfloat@a@Mtok={0.0}%
+ \pgfmathfloat@a@E=0%
+ \pgfmathfloatparsenumber@impl@readexponent}%
+ \else
+ \ifx\pgfmathfloatparsenumber@curtok\pgfmathfloat@EOI
+ \def\pgfmathfloatparsenumber@NEXT{%
+ \pgfmathfloat@a@S=0\relax%
+ \pgfmathfloat@a@Mtok={0.0}%
+ \pgfmathfloat@a@E=0%
+ }%
+ \else
+ \def\pgfmathfloatparsenumber@NEXT{%
+ \pgfmathfloat@a@Mtok={#1}%
+ \pgfmathfloatparsenumberpendingperiodtrue
+ \pgfmathfloatparsenumber@impl@finish@number@after@period}%
+ \pgfmathfloatparsenumber@sanitize@digit
+ \fi\fi\fi
+ \fi
+ \pgfmathfloatparsenumber@NEXT
+}
+
+
+\def\pgfmathfloatparsenumber@impl@positiveexp#1{%
+ \def\pgfmathfloatparsenumber@curtok{#1}%
+ \ifx\pgfmathfloatparsenumber@curtok\pgfmathfloatparsenumber@tok@ZERO
+ \def\pgfmathfloatparsenumber@NEXT{%
+ \advance\pgfmathfloat@a@E by1
+ \pgfmathfloat@tmptoks=\expandafter{\the\pgfmathfloat@tmptoks0}%
+ \pgfmathfloatparsenumber@impl@pendingzeros@positiveexp}%
+ \else
+ \ifx\pgfmathfloatparsenumber@curtok\pgfmathfloatparsenumber@tok@PERIOD
+ \def\pgfmathfloatparsenumber@NEXT{\pgfmathfloatparsenumber@impl@finish@number@after@period}%
+ \else
+ \ifx\pgfmathfloatparsenumber@curtok\pgfmathfloatparsenumber@tok@e
+ \def\pgfmathfloatparsenumber@NEXT{\pgfmathfloatparsenumber@impl@readexponent}%
+ \else
+ \ifx\pgfmathfloatparsenumber@curtok\pgfmathfloatparsenumber@tok@E
+ \def\pgfmathfloatparsenumber@NEXT{\pgfmathfloatparsenumber@impl@readexponent}%
+ \else
+ \ifx\pgfmathfloatparsenumber@curtok\pgfmathfloat@EOI
+ \def\pgfmathfloatparsenumber@NEXT{}%
+ \else
+ \def\pgfmathfloatparsenumber@NEXT{%
+ \advance\pgfmathfloat@a@E by1
+ \ifpgfmathfloatparsenumberpendingperiod
+ \pgfmathfloat@a@Mtok=\expandafter{\the\pgfmathfloat@a@Mtok.}%
+ \pgfmathfloatparsenumberpendingperiodfalse
+ \fi
+ \pgfmathfloat@a@Mtok=\expandafter{\the\pgfmathfloat@a@Mtok#1}%
+ \pgfmathfloatparsenumber@impl@positiveexp}%
+ \pgfmathfloatparsenumber@sanitize@digit
+ \fi\fi\fi
+ \fi
+ \fi
+ \pgfmathfloatparsenumber@NEXT
+}
+
+\def\pgfmathfloatparsenumber@impl@readexponent#1\pgfmathfloat@EOI{%
+ \advance\pgfmathfloat@a@E by#1\relax
+}
+
+\def\pgfmathfloatparsenumber@impl@pendingzeros@positiveexp#1{%
+ \def\pgfmathfloatparsenumber@curtok{#1}%
+ \ifx\pgfmathfloatparsenumber@curtok\pgfmathfloatparsenumber@tok@ZERO
+ \def\pgfmathfloatparsenumber@NEXT{%
+ \pgfmathfloat@tmptoks=\expandafter{\the\pgfmathfloat@tmptoks0}%
+ \advance\pgfmathfloat@a@E by1
+ \pgfmathfloatparsenumber@impl@pendingzeros@positiveexp}%
+ \else
+ \ifx\pgfmathfloatparsenumber@curtok\pgfmathfloatparsenumber@tok@PERIOD
+ \def\pgfmathfloatparsenumber@NEXT{\pgfmathfloatparsenumber@impl@finish@number@after@period}%
+ \else
+ \ifx\pgfmathfloatparsenumber@curtok\pgfmathfloatparsenumber@tok@e
+ \def\pgfmathfloatparsenumber@NEXT{\pgfmathfloatparsenumber@impl@readexponent}%
+ \else
+ \ifx\pgfmathfloatparsenumber@curtok\pgfmathfloatparsenumber@tok@E
+ \def\pgfmathfloatparsenumber@NEXT{\pgfmathfloatparsenumber@impl@readexponent}%
+ \else
+ \ifx\pgfmathfloatparsenumber@curtok\pgfmathfloat@EOI
+ \def\pgfmathfloatparsenumber@NEXT{}%
+ \else
+ \def\pgfmathfloatparsenumber@NEXT{%
+ \advance\pgfmathfloat@a@E by1
+ \ifpgfmathfloatparsenumberpendingperiod
+ \pgfmathfloat@a@Mtok=\expandafter{\the\pgfmathfloat@a@Mtok.}%
+ \pgfmathfloatparsenumberpendingperiodfalse
+ \fi
+ \pgfmathfloat@a@Mtok=\expandafter\expandafter\expandafter{\expandafter\the\expandafter\pgfmathfloat@a@Mtok\the\pgfmathfloat@tmptoks}%
+ \pgfmathfloat@tmptoks={}%
+ \pgfmathfloat@a@Mtok=\expandafter{\the\pgfmathfloat@a@Mtok#1}%
+ \pgfmathfloatparsenumber@impl@positiveexp}%
+ \pgfmathfloatparsenumber@sanitize@digit
+ \fi\fi\fi
+ \fi
+ \fi
+ \pgfmathfloatparsenumber@NEXT
+}
+
+\def\pgfmathfloatparsenumber@impl@finish@number@after@period#1{%
+ \def\pgfmathfloatparsenumber@curtok{#1}%
+ \ifx\pgfmathfloatparsenumber@curtok\pgfmathfloatparsenumber@tok@ZERO
+ \def\pgfmathfloatparsenumber@NEXT{%
+ \pgfmathfloat@tmptoks=\expandafter{\the\pgfmathfloat@tmptoks0}%
+ \pgfmathfloatparsenumber@impl@pendingzeros}%
+ \else
+ \ifx\pgfmathfloatparsenumber@curtok\pgfmathfloatparsenumber@tok@e
+ \def\pgfmathfloatparsenumber@NEXT{\pgfmathfloatparsenumber@impl@readexponent}%
+ \else
+ \ifx\pgfmathfloatparsenumber@curtok\pgfmathfloatparsenumber@tok@E
+ \def\pgfmathfloatparsenumber@NEXT{\pgfmathfloatparsenumber@impl@readexponent}%
+ \else
+ \ifx\pgfmathfloatparsenumber@curtok\pgfmathfloat@EOI
+ \def\pgfmathfloatparsenumber@NEXT{}%
+ \else
+ \def\pgfmathfloatparsenumber@NEXT{%
+ \ifpgfmathfloatparsenumberpendingperiod
+ \pgfmathfloat@a@Mtok=\expandafter{\the\pgfmathfloat@a@Mtok.}%
+ \pgfmathfloatparsenumberpendingperiodfalse
+ \fi
+ \pgfmathfloat@a@Mtok=\expandafter\expandafter\expandafter{\expandafter\the\expandafter\pgfmathfloat@a@Mtok\the\pgfmathfloat@tmptoks}%
+ \pgfmathfloat@tmptoks={}%
+ \pgfmathfloat@a@Mtok=\expandafter{\the\pgfmathfloat@a@Mtok#1}%
+ \pgfmathfloatparsenumber@impl@finish@number@after@period}%
+ \pgfmathfloatparsenumber@sanitize@digit
+ \fi\fi\fi
+ \fi
+ \pgfmathfloatparsenumber@NEXT
+}
+
+\def\pgfmathfloatparsenumber@impl@pendingzeros#1{%
+ \def\pgfmathfloatparsenumber@curtok{#1}%
+ \ifx\pgfmathfloatparsenumber@curtok\pgfmathfloatparsenumber@tok@ZERO
+ \def\pgfmathfloatparsenumber@NEXT{%
+ \pgfmathfloat@tmptoks=\expandafter{\the\pgfmathfloat@tmptoks0}%
+ \pgfmathfloatparsenumber@impl@pendingzeros}%
+ \else
+ \ifx\pgfmathfloatparsenumber@curtok\pgfmathfloatparsenumber@tok@e
+ \def\pgfmathfloatparsenumber@NEXT{\pgfmathfloatparsenumber@impl@readexponent}%
+ \else
+ \ifx\pgfmathfloatparsenumber@curtok\pgfmathfloatparsenumber@tok@E
+ \def\pgfmathfloatparsenumber@NEXT{\pgfmathfloatparsenumber@impl@readexponent}%
+ \else
+ \ifx\pgfmathfloatparsenumber@curtok\pgfmathfloat@EOI
+ \def\pgfmathfloatparsenumber@NEXT{}%
+ \else
+ \def\pgfmathfloatparsenumber@NEXT{%
+ \ifpgfmathfloatparsenumberpendingperiod
+ \pgfmathfloat@a@Mtok=\expandafter{\the\pgfmathfloat@a@Mtok.}%
+ \pgfmathfloatparsenumberpendingperiodfalse
+ \fi
+ \pgfmathfloat@a@Mtok=\expandafter\expandafter\expandafter{\expandafter\the\expandafter\pgfmathfloat@a@Mtok\the\pgfmathfloat@tmptoks}%
+ \pgfmathfloat@tmptoks={}%
+ \pgfmathfloat@a@Mtok=\expandafter{\the\pgfmathfloat@a@Mtok#1}%
+ \pgfmathfloatparsenumber@impl@finish@number@after@period}%
+ \pgfmathfloatparsenumber@sanitize@digit
+ \fi\fi\fi
+ \fi
+ \pgfmathfloatparsenumber@NEXT
+}
+
+
+
diff --git a/Master/texmf-dist/tex/generic/pgfplots/pgfplots/pgfplots.code.tex b/Master/texmf-dist/tex/generic/pgfplots/pgfplots/pgfplots.code.tex
new file mode 100644
index 00000000000..ed8e8e611ec
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgfplots/pgfplots/pgfplots.code.tex
@@ -0,0 +1,5918 @@
+%--------------------------------------------
+%
+% Package pgfplots
+%
+% Provides a user-friendly interface to create function plots (normal
+% plots, semi-logplots and double-logplots).
+%
+% It is based on Till Tantau's PGF package.
+%
+% Copyright 2007/2008 by Christian Feuersänger.
+%
+% This program is free software: you can redistribute it and/or modify
+% it under the terms of the GNU General Public License as published by
+% the Free Software Foundation, either version 3 of the License, or
+% (at your option) any later version.
+%
+% This program is distributed in the hope that it will be useful,
+% but WITHOUT ANY WARRANTY; without even the implied warranty of
+% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+% GNU General Public License for more details.
+%
+% You should have received a copy of the GNU General Public License
+% along with this program. If not, see <http://www.gnu.org/licenses/>.
+%
+%--------------------------------------------
+
+\input pgfplotsliststructure.code.tex
+\input pgfplotsarray.code.tex
+\input pgfplotstable.code.tex
+\input pgfplotsoldpgfsupp_loader.code.tex
+\input pgfplots.stackedplots.code.tex
+
+\usetikzlibrary{decorations,decorations.pathmorphing,decorations.pathreplacing}
+
+% FIXME: reduce number of variables!
+\newtoks\pgfplots@toka
+
+\newcount\pgfplots@ticknum
+\newif\ifpgfplots@xislinear
+\newif\ifpgfplots@yislinear
+\newcount\pgfplots@numplots
+\newdimen\pgfplots@xcoordminTEX
+\newdimen\pgfplots@xcoordmaxTEX
+\newdimen\pgfplots@ycoordminTEX
+\newdimen\pgfplots@ycoordmaxTEX
+\newdimen\pgfplots@tmpa
+\newdimen\pgfplots@tmpb
+\newif\ifpgfplots@warn@for@filter@discards
+\newif\ifpgfplots@isuniformtick
+\newif\ifpgfplots@addplot@table@from@macro
+\newif\ifpgfplots@clip@limits
+\newif\ifpgfplots@enlargelimits
+\newif\ifpgfplots@enlargelimits@rel@thresh
+\newif\ifpgfplots@enlargelimits@auto
+\newif\ifpgfplots@tickshow
+\newif\ifpgfplots@xminorticks
+\newif\ifpgfplots@xmajorticks
+\newif\ifpgfplots@yminorticks
+\newif\ifpgfplots@ymajorticks
+\newif\ifpgfplots@xminorgrids
+\newif\ifpgfplots@xmajorgrids
+\newif\ifpgfplots@yminorgrids
+\newif\ifpgfplots@ymajorgrids
+\newif\ifpgfplots@scaled@ticks
+\newif\ifpgfplots@identify@log@minor@tick@pos
+\newif\ifpgfplots@disablelogfilter
+\newif\ifpgfplots@disabledatascaling
+\newif\ifpgfplots@hide
+\newif\ifpgfplots@is@old@list@format
+\newif\ifpgfplots@errorbars@enabled
+\newif\ifpgfplots@scale@only@axis
+\newif\ifpgfplots@xticklabel@interval
+\newif\ifpgfplots@yticklabel@interval
+\newif\ifpgfplots@stacked@x
+\newif\ifpgfplots@stackedmode
+\newif\ifpgfplots@stacked@reverse
+\newif\ifpgfplots@stacked@plus
+\let\pgfplots@TMP=\pgfutil@empty
+\let\pgfplots@TMPB=\pgfutil@empty
+\let\pgfplots@TMPC=\pgfutil@empty
+\let\pgfnodepartimagebox=\pgfnodeparttextbox
+
+\newif\ifpgfplots@collect@firstplot@astick
+
+\def\pgfplots@errorbars@xdirection{0}% pre-init, see below
+\def\pgfplots@errorbars@ydirection{0}%
+
+\def\pgfplots@error#1{\PackageError{pgfplots}{#1}{}}%
+\def\pgfplots@warning#1{\pgfplots@message{#1}}%
+\def\pgfplots@message#1{%
+ \immediate\write16{#1}%
+}%
+
+\def\pgfplots@leftover{}
+\def\pgfplots@rightover{}
+\def\axisdefaultwidth{240pt}
+\def\axisdefaultheight{207pt}
+
+
+% Assigns list contents #2 to a list macro #1.
+%
+% The list contents may be provided in one of two formats:
+% a) in the (deprecated) list format 'first\\second\\thirst\\'
+% or
+% b) in the PGF foreach list format 'first,second,third'.
+\def\pgfplots@assign@list#1#2{%
+ \def\pgfplots@TMP{#2}%
+ \ifx\pgfplots@TMP\pgfutil@empty
+ \pgfplotslistnewempty#1%
+ \else
+ \pgfplots@check@backwards@compatible@list@format #2\\\pgfplots@EOI
+ \ifpgfplots@is@old@list@format
+ \pgfplotslistnew#1{#2}%
+ \else
+ \pgfplots@foreach@to@list{#2}\to#1
+ \fi
+ \fi
+}%
+
+\def\pgfplots@EOI{\pgfplots@EOI}%
+
+% Sets the boolean \ifpgfplots@is@old@list@format to true if and only
+% if the input is a list in the format '{first\\second\\}'.
+%
+% This format is deprecated, but is still provided for backwards
+% compatibility.
+%
+% Usage:
+% \pgfplots@check@backwards@compatible@list@format <argument>'\\'\pgfplots@EOI
+% you NEED to append '\\\pgfplots@EOI' at the end.
+\def\pgfplots@check@backwards@compatible@list@format#1\\#2\pgfplots@EOI{%
+ \def\pgfplots@TMP{#2}%
+ \ifx\pgfplots@TMP\pgfutil@empty
+ \pgfplots@is@old@list@formatfalse
+ \else
+ \pgfplots@is@old@list@formattrue
+ \fi
+}%
+
+
+
+% Creates a named plot cycle list.
+%
+% #1: the name of the final list. Can be used in 'cycle list name'
+% #2: the list entries. You can use either a comma-separated list or
+% a '\\'-terminated list. The latter case also requires '\\'
+% AFTER the last entry.
+\def\pgfcreateplotcyclelist#1#2{\pgfplots@assign@list#1{#2}}
+
+\pgfcreateplotcyclelist{\blackwhiteplotspeclist}{%
+ mark options={fill=gray},mark=*\\%
+ mark options={fill=gray},mark=square*\\%
+ mark options={fill=gray},mark=otimes*\\%
+ mark=star\\%
+ mark options={fill=gray},mark=diamond*\\%
+ densely dashed,mark options={solid,fill=gray},mark=*\\%
+ densely dashed,mark options={solid,fill=gray},mark=square*\\%
+ densely dashed,mark options={solid,fill=gray},mark=otimes*\\%
+ densely dashed,mark options={solid},mark=star\\%
+ densely dashed,mark options={solid,fill=gray},mark=diamond*\\%
+}
+\pgfcreateplotcyclelist{\coloredplotspeclist}{%
+ blue,mark options={fill=blue!80!black},mark=*\\%
+ red,mark options={fill=red!80!black},mark=square*\\%
+ brown!60!black,mark options={fill=brown!80!black},mark=otimes*\\%
+ black,mark=star\\%
+ blue,mark options={fill=blue!80!black},mark=diamond*\\%
+ red,densely dashed,mark options={solid,fill=red!80!black},mark=*\\%
+ brown!60!black,densely dashed,mark options={solid,fill=brown!80!black},mark=square*\\%
+ black,densely dashed,mark options={solid,fill=gray},mark=otimes*\\%
+ blue,densely dashed,mark=star,mark options=solid\\%
+ red,densely dashed,mark options={solid,fill=red!80!black},mark=diamond*\\%
+}
+
+\def\pgfplotsset{\pgfqkeys{/pgfplots}}
+
+\def\pgfplotsdeprecatedstylecheck#1{%
+ \pgfkeysifdefined{#1/.@cmd}{%
+ \begingroup
+ \edef\pgfkeyscurrentkey{#1}%
+ \pgfkeyssplitpath
+ \pgfplots@warning{Warning: Loading deprecated style option
+ \pgfkeyscurrentpath/\pgfkeyscurrentname.
+ Please replace '\string\tikzstyle{\pgfkeyscurrentname}'
+ with '\string\pgfplotsset{\pgfkeyscurrentname/.style={}}'
+ (or '\string\pgfplotsset{\pgfkeyscurrentname/.append style={}}').}%
+ \endgroup
+ \pgfkeysvalueof{#1/.@cmd}\pgfeov
+ }{}%
+}%
+
+\pgfkeys{%
+ /pgfplots/search path for tikz/.unknown/.code={%
+ \let\searchname=\pgfkeyscurrentname%
+ \pgfkeysalso{%
+ /tikz/\searchname/.try=#1,
+ /pgfplots/\searchname/.lastretry=#1
+ }%
+ },%
+ /pgfplots/.is family,
+ /pgfplots/scale/.is family,
+ /pgfplots/legend/.is family,
+ /pgfplots/tick/.is family,
+ /pgfplots/axis/.is family,
+ /pgfplots/descriptions/.is family,
+ /pgfplots/style commands/.is family,
+ /pgfplots/naming commands/.is family,
+ /pgfplots/error bars/.is family,
+ /pgfplots/every axis/.style={},
+ /pgfplots/every axis/.append code={\pgfplotsdeprecatedstylecheck{/tikz/every axis}},
+ /pgfplots/every axis/.belongs to family=/pgfplots/style commands,
+ /pgfplots/every semilogx axis/.style={},
+ /pgfplots/every semilogx axis/.append code={\pgfplotsdeprecatedstylecheck{/tikz/every semilogx axis}},
+ /pgfplots/every semilogx axis/.belongs to family=/pgfplots/style commands,
+ /pgfplots/every semilogy axis/.style={},
+ /pgfplots/every semilogy axis/.append code={\pgfplotsdeprecatedstylecheck{/tikz/every semilogy axis}},
+ /pgfplots/every semilogy axis/.belongs to family=/pgfplots/style commands,
+ /pgfplots/every loglog axis/.style={},
+ /pgfplots/every loglog axis/.append code={\pgfplotsdeprecatedstylecheck{/tikz/every loglog axis}},
+ /pgfplots/every loglog axis/.belongs to family=/pgfplots/style commands,
+ /pgfplots/every linear axis/.style={},
+ /pgfplots/every linear axis/.append code={\pgfplotsdeprecatedstylecheck{/tikz/every linear axis}},
+ /pgfplots/every linear axis/.belongs to family=/pgfplots/style commands,
+ /pgfplots/every axis plot/.style={},
+ /pgfplots/every axis plot/.append code={\pgfplotsdeprecatedstylecheck{/tikz/every axis plot}},
+ /pgfplots/every axis plot/.belongs to family=/pgfplots/style commands,
+ /pgfplots/every axis plot post/.style={},
+ /pgfplots/every axis plot post/.append code={\pgfplotsdeprecatedstylecheck{/tikz/every axis plot}},
+ /pgfplots/every axis label/.style={},
+ /pgfplots/every axis label/.append code={\pgfplotsdeprecatedstylecheck{/tikz/every axis label}},
+ /pgfplots/every axis label/.belongs to family=/pgfplots/style commands,
+ /pgfplots/every axis x label/.style={at={(0.5,0)},below,yshift=-15pt},
+ /pgfplots/every axis x label/.append code={\pgfplotsdeprecatedstylecheck{/tikz/every axis x label}},
+ /pgfplots/every axis x label/.belongs to family=/pgfplots/style commands,
+ /pgfplots/every axis y label/.style={at={(0,0.5)},xshift=-35pt,rotate=90},
+ /pgfplots/every axis y label/.append code={\pgfplotsdeprecatedstylecheck{/tikz/every axis y label}},
+ /pgfplots/every axis y label/.belongs to family=/pgfplots/style commands,
+ /pgfplots/every axis title/.style={at={(0.5,1)},above,yshift=6pt},
+ /pgfplots/every axis title/.append code={\pgfplotsdeprecatedstylecheck{/tikz/every axis title}},
+ /pgfplots/every axis title/.belongs to family=/pgfplots/style commands,
+ /pgfplots/every tick/.style={very thin,gray},
+ /pgfplots/every tick/.append code={\pgfplotsdeprecatedstylecheck{/tikz/every tick}},
+ /pgfplots/every tick/.belongs to family=/pgfplots/style commands,
+ /pgfplots/every minor tick/.style={},
+ /pgfplots/every minor tick/.append code={\pgfplotsdeprecatedstylecheck{/tikz/every minor tick}},
+ /pgfplots/every minor tick/.belongs to family=/pgfplots/style commands,
+ /pgfplots/every major tick/.style={},
+ /pgfplots/every major tick/.append code={\pgfplotsdeprecatedstylecheck{/tikz/every major tick}},
+ /pgfplots/every major tick/.belongs to family=/pgfplots/style commands,
+ /pgfplots/every x tick/.style={},
+ /pgfplots/every x tick/.append code={\pgfplotsdeprecatedstylecheck{/tikz/every x tick}},
+ /pgfplots/every x tick/.belongs to family=/pgfplots/style commands,
+ /pgfplots/every minor x tick/.style={},
+ /pgfplots/every minor x tick/.append code={\pgfplotsdeprecatedstylecheck{/tikz/every minor x tick}},
+ /pgfplots/every minor x tick/.belongs to family=/pgfplots/style commands,
+ /pgfplots/every major x tick/.style={},
+ /pgfplots/every major x tick/.append code={\pgfplotsdeprecatedstylecheck{/tikz/every major x tick}},
+ /pgfplots/every major x tick/.belongs to family=/pgfplots/style commands,
+ /pgfplots/every y tick/.style={},
+ /pgfplots/every y tick/.append code={\pgfplotsdeprecatedstylecheck{/tikz/every y tick}},
+ /pgfplots/every y tick/.belongs to family=/pgfplots/style commands,
+ /pgfplots/every minor y tick/.style={},
+ /pgfplots/every minor y tick/.append code={\pgfplotsdeprecatedstylecheck{/tikz/every minor y tick}},
+ /pgfplots/every minor y tick/.belongs to family=/pgfplots/style commands,
+ /pgfplots/every major y tick/.style={},
+ /pgfplots/every major y tick/.append code={\pgfplotsdeprecatedstylecheck{/tikz/every major y tick}},
+ /pgfplots/every major y tick/.belongs to family=/pgfplots/style commands,
+ /pgfplots/every axis grid/.style={help lines},
+ /pgfplots/every axis grid/.append code={\pgfplotsdeprecatedstylecheck{/tikz/every axis grid}},
+ /pgfplots/every axis grid/.belongs to family=/pgfplots/style commands,
+ /pgfplots/every minor grid/.style={},
+ /pgfplots/every minor grid/.append code={\pgfplotsdeprecatedstylecheck{/tikz/every minor grid}},
+ /pgfplots/every minor grid/.belongs to family=/pgfplots/style commands,
+ /pgfplots/every major grid/.style={},
+ /pgfplots/every major grid/.append code={\pgfplotsdeprecatedstylecheck{/tikz/every major grid}},
+ /pgfplots/every major grid/.belongs to family=/pgfplots/style commands,
+ /pgfplots/every axis x grid/.style={},
+ /pgfplots/every axis x grid/.append code={\pgfplotsdeprecatedstylecheck{/tikz/every axis x grid}},
+ /pgfplots/every axis x grid/.belongs to family=/pgfplots/style commands,
+ /pgfplots/every minor x grid/.style={},
+ /pgfplots/every minor x grid/.append code={\pgfplotsdeprecatedstylecheck{/tikz/every minor x grid}},
+ /pgfplots/every minor x grid/.belongs to family=/pgfplots/style commands,
+ /pgfplots/every major x grid/.style={},
+ /pgfplots/every major x grid/.append code={\pgfplotsdeprecatedstylecheck{/tikz/every major x grid}},
+ /pgfplots/every major x grid/.belongs to family=/pgfplots/style commands,
+ /pgfplots/every axis y grid/.style={},
+ /pgfplots/every axis y grid/.append code={\pgfplotsdeprecatedstylecheck{/tikz/every axis y grid}},
+ /pgfplots/every axis y grid/.belongs to family=/pgfplots/style commands,
+ /pgfplots/every minor y grid/.style={},
+ /pgfplots/every minor y grid/.append code={\pgfplotsdeprecatedstylecheck{/tikz/every minor y grid}},
+ /pgfplots/every minor y grid/.belongs to family=/pgfplots/style commands,
+ /pgfplots/every major y grid/.style={},
+ /pgfplots/every major y grid/.append code={\pgfplotsdeprecatedstylecheck{/tikz/every major y grid}},
+ /pgfplots/every major y grid/.belongs to family=/pgfplots/style commands,
+ /pgfplots/every tick label/.style={},
+ /pgfplots/every tick label/.append code={\pgfplotsdeprecatedstylecheck{/tikz/every tick label}},
+ /pgfplots/every tick label/.belongs to family=/pgfplots/style commands,
+ /pgfplots/every x tick label/.style={},
+ /pgfplots/every x tick label/.append code={\pgfplotsdeprecatedstylecheck{/tikz/every x tick label}},
+ /pgfplots/every x tick label/.belongs to family=/pgfplots/style commands,
+ /pgfplots/every extra x tick/.style={},
+ /pgfplots/every extra x tick/.append code={\pgfplotsdeprecatedstylecheck{/tikz/every extra x tick}},
+ /pgfplots/every extra x tick/.belongs to family=/pgfplots/style commands,
+ /pgfplots/extra x tick style/.belongs to family=/pgfplots/style commands,
+ /pgfplots/extra x tick style/.code={%
+ \pgfkeysalso{/pgfplots/every extra x tick/.append style={#1}}%
+ },
+ /pgfplots/every x tick scale label/.style={at={(1,0)},yshift=-2em,left,inner sep=0pt},
+ /pgfplots/every x tick scale label/.append code={\pgfplotsdeprecatedstylecheck{/tikz/every x tick scale label}},
+ /pgfplots/every x tick scale label/.belongs to family=/pgfplots/style commands,
+ /pgfplots/every y tick label/.style={},
+ /pgfplots/every y tick label/.append code={\pgfplotsdeprecatedstylecheck{/tikz/every y tick label}},
+ /pgfplots/every y tick label/.belongs to family=/pgfplots/style commands,
+ /pgfplots/every extra y tick/.style={},
+ /pgfplots/every extra y tick/.append code={\pgfplotsdeprecatedstylecheck{/tikz/every extra y tick}},
+ /pgfplots/every extra y tick/.belongs to family=/pgfplots/style commands,
+ /pgfplots/extra y tick style/.belongs to family=/pgfplots/style commands,
+ /pgfplots/extra y tick style/.code={%
+ \pgfkeysalso{/pgfplots/every extra y tick/.append style={#1}}%
+ },
+ /pgfplots/every y tick scale label/.style={at={(0,1)},above right,inner sep=0pt,yshift=0.3em},
+ /pgfplots/every y tick scale label/.append code={\pgfplotsdeprecatedstylecheck{/tikz/every y tick scale label}},
+ /pgfplots/every y tick scale label/.belongs to family=/pgfplots/style commands,
+ /pgfplots/every axis legend/.style={%
+ cells={anchor=center},
+ inner xsep=3pt,inner ysep=2pt,nodes={inner sep=2pt,text depth=0.15em},
+ anchor=north east,%
+ shape=rectangle,%
+ fill=white,%
+ draw=black,
+ at={(0.98,0.98)},
+ },
+ /pgfplots/every axis legend/.append code={\pgfplotsdeprecatedstylecheck{/tikz/every axis legend}},
+ /pgfplots/every axis legend/.belongs to family=/pgfplots/style commands,
+% tick options:
+ /pgfplots/xticklabel/.store in= \pgfplots@xticklabel,
+ /pgfplots/xticklabel/.belongs to family=/pgfplots/tick,
+ /pgfplots/xticklabel=,
+ /pgfplots/xticklabels/.belongs to family=/pgfplots/tick,
+ /pgfplots/xticklabels/.code={%
+ \pgfplots@foreach@to@list{#1}\to\pgfplots@xticklabels
+ \let\pgfplots@xticklabel=\pgfplots@user@ticklabel@list@x
+ },
+ /pgfplots/yticklabels/.belongs to family=/pgfplots/tick,
+ /pgfplots/yticklabels/.code={%
+ \pgfplots@foreach@to@list{#1}\to\pgfplots@yticklabels
+ \let\pgfplots@yticklabel=\pgfplots@user@ticklabel@list@y
+ },
+ /pgfplots/yticklabel/.store in= \pgfplots@yticklabel,
+ /pgfplots/yticklabel/.belongs to family=/pgfplots/tick,
+ /pgfplots/yticklabel=,
+ /pgfplots/x tick label as interval/.is if=pgfplots@xticklabel@interval,
+ /pgfplots/x tick label as interval/.default=true,
+ /pgfplots/x tick label as interval/.belongs to family=/pgfplots/tick,
+ /pgfplots/y tick label as interval/.is if=pgfplots@yticklabel@interval,
+ /pgfplots/y tick label as interval/.default=true,
+ /pgfplots/y tick label as interval/.belongs to family=/pgfplots/tick,
+ /pgfplots/extra x tick label/.store in= \pgfplots@extra@xticklabel,
+ /pgfplots/extra x tick label/.belongs to family=/pgfplots/tick,
+ /pgfplots/extra x tick label=,
+ /pgfplots/extra x tick labels/.belongs to family=/pgfplots/tick,
+ /pgfplots/extra x tick labels/.code={%
+ \pgfplots@foreach@to@list{#1}\to\pgfplots@extra@xticklabels
+ \let\pgfplots@extra@xticklabel=\pgfplots@user@extra@ticklabel@list@x
+ },
+ /pgfplots/extra y tick labels/.code={%
+ \pgfplots@foreach@to@list{#1}\to\pgfplots@extra@yticklabels
+ \let\pgfplots@extra@yticklabel=\pgfplots@user@extra@ticklabel@list@y
+ },
+ /pgfplots/xtick/.store in= \pgfplots@xtick,
+ /pgfplots/xtick/.belongs to family=/pgfplots/tick,
+ /pgfplots/xtick=,
+ /pgfplots/extra x ticks/.store in=\pgfplots@extra@xtick,
+ /pgfplots/extra x ticks/.belongs to family=/pgfplots/tick,
+ /pgfplots/extra x ticks=,
+ /pgfplots/xtickten/.store in= \pgfplots@xtickten,
+ /pgfplots/xtickten/.belongs to family=/pgfplots/tick,
+ /pgfplots/xtickten=,
+ /pgfplots/extra y tick label/.store in= \pgfplots@extra@yticklabel,
+ /pgfplots/extra y tick label/.belongs to family=/pgfplots/tick,
+ /pgfplots/extra y tick label=,
+ /pgfplots/ytick/.store in= \pgfplots@ytick,
+ /pgfplots/ytick/.belongs to family=/pgfplots/tick,
+ /pgfplots/ytick=,
+ /pgfplots/extra y ticks/.store in=\pgfplots@extra@ytick,
+ /pgfplots/extra y ticks/.belongs to family=/pgfplots/tick,
+ /pgfplots/extra y ticks=,
+ /pgfplots/ytickten/.store in= \pgfplots@ytickten,
+ /pgfplots/ytickten/.belongs to family=/pgfplots/tick,
+ /pgfplots/ytickten=,
+ /pgfplots/tick scale label code/.code={$\cdot 10^{#1}$},
+ /pgfplots/tick scale label code/.belongs to family=/pgfplots/tick,
+ /pgfplots/scaled ticks/.is if=pgfplots@scaled@ticks,
+ /pgfplots/scaled ticks/.default=false,
+ /pgfplots/scaled ticks/.belongs to family=/pgfplots/tick,
+ /pgfplots/scaled ticks=true,
+ /pgfplots/scale ticks above exponent/.store in= \pgfplots@scale@ticks@above@exponent,
+ /pgfplots/scale ticks above exponent/.belongs to family=/pgfplots/tick,
+ /pgfplots/scale ticks above exponent=3,
+ /pgfplots/scale ticks below exponent/.store in= \pgfplots@scale@ticks@below@exponent,
+ /pgfplots/scale ticks below exponent/.belongs to family=/pgfplots/tick,
+ /pgfplots/scale ticks below exponent=-1,
+ /pgfplots/subtickwidth/.store in= \pgfplots@subtickwidth,
+ /pgfplots/subtickwidth/.belongs to family=/pgfplots/tick,
+ /pgfplots/subtickwidth=0.1cm,
+ /pgfplots/tickwidth/.store in= \pgfplots@tickwidth,
+ /pgfplots/tickwidth/.belongs to family=/pgfplots/tick,
+ /pgfplots/tickwidth=0.15cm,
+ /pgfplots/minor x tick num/.initial=0,
+ /pgfplots/minor x tick num/.belongs to family=/pgfplots/tick,
+ /pgfplots/minor y tick num/.initial=0,
+ /pgfplots/minor y tick num/.belongs to family=/pgfplots/tick,
+ /pgfplots/minor tick num/.style={/pgfplots/minor x tick num=#1,/pgfplots/minor y tick num=#1},
+ /pgfplots/minor tick num/.belongs to family=/pgfplots/tick,
+ /pgfplots/minor tick length/.estore in=\pgfplots@subtickwidth,
+ /pgfplots/minor tick length/.belongs to family=/pgfplots/tick,
+ /pgfplots/major tick length/.estore in=\pgfplots@tickwidth,
+ /pgfplots/major tick length/.belongs to family=/pgfplots/tick,
+ /pgfplots/max space between ticks/.estore in=\axisdefaulttickwidth,
+ /pgfplots/max space between ticks/.belongs to family=/pgfplots/tick,
+ /pgfplots/max space between ticks=35,% the maximum space between adjacent ticks (in pt, but don't specify the unit 'pt')
+ /pgfplots/try min ticks/.estore in= \axisdefaulttryminticks,
+ /pgfplots/try min ticks/.belongs to family=/pgfplots/tick,
+ /pgfplots/try min ticks=4,
+ /pgfplots/try min ticks log/.estore in= \pgfplots@default@try@minticks@log,
+ /pgfplots/try min ticks log/.belongs to family=/pgfplots/tick,
+ /pgfplots/try min ticks log=3,
+ /pgfplots/log plot exponent style/.style={/pgf/number format/fixed,/pgf/number format/precision=2},
+ /pgfplots/log plot exponent style/.belongs to family=/pgfplots/tick,
+ /pgfplots/log identify minor tick positions/.is if=pgfplots@identify@log@minor@tick@pos,
+ /pgfplots/log identify minor tick positions/.belongs to family=/pgfplots/tick,
+ /pgfplots/log identify minor tick positions=true,
+ /pgfplots/log number format code/.code={{%
+ \pgfmathlogtologten@{#1}%
+ \ifpgfplots@identify@log@minor@tick@pos
+ \expandafter\pgfplots@is@log@tick@a@minor@tick@pos\pgfmathresult\relax%
+ \else
+ \pgfplots@log@tick@isminor@tick@posfalse
+ \fi
+ \ifpgfplots@log@tick@isminor@tick@pos
+ \pgfmathprintnumber[sci]{\pgfmathresult}%
+ \else
+ \pgfkeysalso{/pgfplots/log plot exponent style,/pgfplots/log base 10 number format code=\pgfmathresult}%
+ \fi
+ }},
+ /pgfplots/log number format code/.belongs to family=/pgfplots/tick,
+ /pgfplots/log base 10 number format code/.code={$10^{\pgfmathprintnumber{#1}}$},
+ /pgfplots/log base 10 number format code/.belongs to family=/pgfplots/tick,
+% sets \pgfplots@tickposnum to
+% left=0
+% right=1
+% both=2
+ /pgfplots/tickpos/.is choice,
+ /pgfplots/tickpos/.belongs to family=/pgfplots/tick,
+ /pgfplots/tickpos/left/.code ={\def\pgfplots@xtickposnum{1}\def\pgfplots@ytickposnum{1}},
+ /pgfplots/tickpos/left/.belongs to family=/pgfplots/tick,
+ /pgfplots/tickpos/right/.code ={\def\pgfplots@xtickposnum{3}\def\pgfplots@ytickposnum{3}},
+ /pgfplots/tickpos/right/.belongs to family=/pgfplots/tick,
+ /pgfplots/tickpos/both/.code ={\def\pgfplots@xtickposnum{0}\def\pgfplots@ytickposnum{0}},
+ /pgfplots/tickpos/both/.belongs to family=/pgfplots/tick,
+ /pgfplots/tickpos=both,
+% sets \pgfplots@{x,y}tickalignnum to
+% inside=0
+% outside=1
+% center=2
+ /pgfplots/tick align/.is choice,
+ /pgfplots/tick align/.belongs to family=/pgfplots/tick,
+ /pgfplots/tick align/inside/.code ={\def\pgfplots@xtickalignnum{0}\def\pgfplots@ytickalignnum{0}},
+ /pgfplots/tick align/inside/.belongs to family=/pgfplots/tick,
+ /pgfplots/tick align/outside/.code ={\def\pgfplots@xtickalignnum{1}\def\pgfplots@ytickalignnum{1}},
+ /pgfplots/tick align/outside/.belongs to family=/pgfplots/tick,
+ /pgfplots/tick align/center/.code ={\def\pgfplots@xtickalignnum{2}\def\pgfplots@ytickalignnum{2}},
+ /pgfplots/tick align/center/.belongs to family=/pgfplots/tick,
+ /pgfplots/tick align=inside,
+% 'axis' options:
+ /pgfplots/anchor/.belongs to family=/pgfplots,
+ /pgfplots/anchor/.store in= \pgfplots@anchorname,
+ /pgfplots/anchor=south west,
+% tick options:
+ /pgfplots/ticks/.is choice,
+ /pgfplots/ticks/.belongs to family=/pgfplots/tick,
+ /pgfplots/ticks/none/.belongs to family=/pgfplots/tick,
+ /pgfplots/ticks/none/.code={%
+ \pgfplots@xminorticksfalse
+ \pgfplots@yminorticksfalse
+ \pgfplots@xmajorticksfalse
+ \pgfplots@ymajorticksfalse
+ },
+ /pgfplots/ticks/major/.belongs to family=/pgfplots/tick,
+ /pgfplots/ticks/major/.code={%
+ \pgfplots@xminorticksfalse
+ \pgfplots@yminorticksfalse
+ \pgfplots@xmajortickstrue
+ \pgfplots@ymajortickstrue
+ },
+ /pgfplots/ticks/minor/.belongs to family=/pgfplots/tick,
+ /pgfplots/ticks/minor/.code={%
+ \pgfplots@xminortickstrue
+ \pgfplots@yminortickstrue
+ \pgfplots@xmajorticksfalse
+ \pgfplots@ymajorticksfalse
+ },
+ /pgfplots/ticks/both/.belongs to family=/pgfplots/tick,
+ /pgfplots/ticks/both/.code={%
+ \pgfplots@xminortickstrue
+ \pgfplots@yminortickstrue
+ \pgfplots@xmajortickstrue
+ \pgfplots@ymajortickstrue
+ },
+ /pgfplots/ticks=both,
+ /pgfplots/grid/.is choice,
+ /pgfplots/grid/.belongs to family=/pgfplots/tick,
+ /pgfplots/grid/none/.belongs to family=/pgfplots/tick,
+ /pgfplots/grid/none/.code={%
+ \pgfplots@xminorgridsfalse
+ \pgfplots@yminorgridsfalse
+ \pgfplots@xmajorgridsfalse
+ \pgfplots@ymajorgridsfalse
+ },
+ /pgfplots/grid/major/.belongs to family=/pgfplots/tick,
+ /pgfplots/grid/major/.code={%
+ \pgfplots@xminorgridsfalse
+ \pgfplots@yminorgridsfalse
+ \pgfplots@xmajorgridstrue
+ \pgfplots@ymajorgridstrue
+ },
+ /pgfplots/grid/minor/.belongs to family=/pgfplots/tick,
+ /pgfplots/grid/minor/.code={%
+ \pgfplots@xminorgridstrue
+ \pgfplots@yminorgridstrue
+ \pgfplots@xmajorgridsfalse
+ \pgfplots@ymajorgridsfalse
+ },
+ /pgfplots/grid/both/.belongs to family=/pgfplots/tick,
+ /pgfplots/grid/both/.code={%
+ \pgfplots@xminorgridstrue
+ \pgfplots@yminorgridstrue
+ \pgfplots@xmajorgridstrue
+ \pgfplots@ymajorgridstrue
+ },
+ /pgfplots/grid=none,
+ /pgfplots/grid/.default=major,
+ /pgfplots/xminorticks/.is if=pgfplots@xminorticks,
+ /pgfplots/xminorticks/.default=true,
+ /pgfplots/xminorticks/.belongs to family=/pgfplots/tick,
+ /pgfplots/xmajorticks/.is if=pgfplots@xmajorticks,
+ /pgfplots/xmajorticks/.default=true,
+ /pgfplots/xmajorticks/.belongs to family=/pgfplots/tick,
+ /pgfplots/yminorticks/.is if=pgfplots@yminorticks,
+ /pgfplots/yminorticks/.default=true,
+ /pgfplots/yminorticks/.belongs to family=/pgfplots/tick,
+ /pgfplots/ymajorticks/.is if=pgfplots@ymajorticks,
+ /pgfplots/ymajorticks/.default=true,
+ /pgfplots/ymajorticks/.belongs to family=/pgfplots/tick,
+ /pgfplots/xminorgrids/.is if=pgfplots@xminorgrids,
+ /pgfplots/xminorgrids/.default=true,
+ /pgfplots/xminorgrids/.belongs to family=/pgfplots/tick,
+ /pgfplots/xmajorgrids/.is if=pgfplots@xmajorgrids,
+ /pgfplots/xmajorgrids/.default=true,
+ /pgfplots/xmajorgrids/.belongs to family=/pgfplots/tick,
+ /pgfplots/yminorgrids/.is if=pgfplots@yminorgrids,
+ /pgfplots/yminorgrids/.default=true,
+ /pgfplots/yminorgrids/.belongs to family=/pgfplots/tick,
+ /pgfplots/ymajorgrids/.is if=pgfplots@ymajorgrids,
+ /pgfplots/ymajorgrids/.default=true,
+ /pgfplots/ymajorgrids/.belongs to family=/pgfplots/tick,
+% legend options:
+ /pgfplots/legend columns/.store in=\pgfplots@legend@columns,
+ /pgfplots/legend columns/.belongs to family=/pgfplots/legend,
+ /pgfplots/legend columns=1,
+ /pgfplots/legend plot pos/.is choice,
+ /pgfplots/legend plot pos/.belongs to family=/pgfplots/legend,
+ /pgfplots/legend plot pos/left/.code= {\def\pgfplots@legend@plot@pos{0}},
+ /pgfplots/legend plot pos/left/.belongs to family=/pgfplots/legend,
+ /pgfplots/legend plot pos/right/.code= {\def\pgfplots@legend@plot@pos{1}},
+ /pgfplots/legend plot pos/right/.belongs to family=/pgfplots/legend,
+ /pgfplots/legend plot pos/none/.code= {\def\pgfplots@legend@plot@pos{2}},
+ /pgfplots/legend plot pos/none/.belongs to family=/pgfplots/legend,
+ /pgfplots/legend plot pos=left,
+ /pgfplots/legend image code/.code={%
+ \draw[#1,mark repeat=2,mark phase=2]
+ plot coordinates {
+ (0cm,0cm)
+ (0.3cm,0cm)
+ (0.6cm,0cm)%
+ };%
+ },
+ /pgfplots/legend image code/.belongs to family=/pgfplots/legend,
+% axis description options:
+ /pgfplots/title/.store in= \pgfplots@title,
+ /pgfplots/title/.belongs to family=/pgfplots/descriptions,
+ /pgfplots/title=,
+ /pgfplots/xlabel/.store in= \pgfplots@xlabel,
+ /pgfplots/xlabel/.belongs to family=/pgfplots/descriptions,
+ /pgfplots/xlabel=,
+ /pgfplots/ylabel/.store in= \pgfplots@ylabel,
+ /pgfplots/ylabel/.belongs to family=/pgfplots/descriptions,
+ /pgfplots/ylabel=,
+ /pgfplots/before end axis/.code=,
+ /pgfplots/after end axis/.code=,
+ /pgfplots/extra description/.code=,
+ /pgfplots/extra description/.belongs to family=/pgfplots/descriptions,
+% axis options:
+ /pgfplots/at/.code={\tikz@scan@one@point\pgfplots@set@at#1},
+ /pgfplots/at/.belongs to family=/pgfplots,
+ /pgfplots/clip limits/.is if=pgfplots@clip@limits,
+ /pgfplots/clip limits/.default=true,
+ /pgfplots/clip limits=true,
+ /pgfplots/clip limits/.belongs to family=/pgfplots,
+ /pgfplots/xmin/.belongs to family=/pgfplots,
+ /pgfplots/xmin/.initial=,
+ /pgfplots/xmax/.belongs to family=/pgfplots,
+ /pgfplots/xmax/.initial=,
+ /pgfplots/ymin/.belongs to family=/pgfplots,
+ /pgfplots/ymin/.initial=,
+ /pgfplots/ymax/.belongs to family=/pgfplots,
+ /pgfplots/ymax/.initial=,
+ /pgfplots/stack plots/.is choice,
+ /pgfplots/stack plots/.belongs to family=/pgfplots,
+ /pgfplots/stack plots/x/.code={\pgfplots@stacked@xtrue\pgfplots@stackedmodetrue},
+ /pgfplots/stack plots/x/.belongs to family=/pgfplots,
+ /pgfplots/stack plots/y/.code={\pgfplots@stacked@xfalse\pgfplots@stackedmodetrue},
+ /pgfplots/stack plots/y/.belongs to family=/pgfplots,
+ /pgfplots/stack plots/false/.code={\pgfplots@stackedmodefalse},
+ /pgfplots/stack plots/false/.belongs to family=/pgfplots,
+ /pgfplots/stack plots=false,
+ /pgfplots/reverse stacked plots/.is if=pgfplots@stacked@reverse,
+ /pgfplots/reverse stacked plots/.belongs to family=/pgfplots,
+ /pgfplots/reverse stacked plots/.default=true,
+ /pgfplots/reverse stacked plots=true,
+ /pgfplots/stack dir/.is choice,
+ /pgfplots/stack dir/.belongs to family=/pgfplots,
+ /pgfplots/stack dir/plus/.code={\pgfplots@stacked@plustrue},
+ /pgfplots/stack dir/plus/.belongs to family=/pgfplots,
+ /pgfplots/stack dir/minus/.code={\pgfplots@stacked@plusfalse},
+ /pgfplots/stack dir/minus/.belongs to family=/pgfplots,
+ /pgfplots/stack dir=plus,
+ /pgfplots/filter discard warning/.is if=pgfplots@warn@for@filter@discards,
+ /pgfplots/filter discard warning=true,
+ /pgfplots/x filter/.code={},
+ /pgfplots/x filter/.belongs to family=/pgfplots,
+ /pgfplots/y filter/.code={},
+ /pgfplots/y filter/.belongs to family=/pgfplots,
+ /pgfplots/skip coords between index/.style 2 args={%
+ /pgfplots/x filter/.append code={%
+ \ifnum\coordindex<#1\relax
+ \else
+ \ifnum\coordindex<#2\relax
+ \let\pgfmathresult=\pgfutil@empty
+ \fi
+ \fi}
+ },
+ /pgfplots/xfilter/.initial=,% DEPRECATED
+ /pgfplots/xfilter/.belongs to family=/pgfplots,
+ /pgfplots/yfilter/.initial=,% DEPRECATED
+ /pgfplots/yfilter/.belongs to family=/pgfplots,
+ /pgfplots/width/.store in= \pgfplots@width,
+ /pgfplots/width/.belongs to family=/pgfplots,
+ /pgfplots/width=,
+ /pgfplots/height/.store in= \pgfplots@height,
+ /pgfplots/height/.belongs to family=/pgfplots,
+ /pgfplots/height=,
+ /pgfplots/execute at begin plot/.store in=\pgfplots@execute@at@begin@plot,
+ /pgfplots/execute at begin plot/.belongs to family=/pgfplots,
+ /pgfplots/execute at begin plot=,
+ /pgfplots/execute at end plot/.store in= \pgfplots@execute@at@end@plot,
+ /pgfplots/execute at end plot/.belongs to family=/pgfplots,
+ /pgfplots/execute at end plot=,
+ /pgfplots/enlargelimits/.store in= \pgfplots@enlargelimits,
+ /pgfplots/enlargelimits/.belongs to family=/pgfplots,
+ /pgfplots/enlargelimits=auto,
+ /pgfplots/enlargelimits/.default=true,
+ /pgfplots/x/.store in= \pgfplots@x,
+ /pgfplots/x/.belongs to family=/pgfplots,
+ /pgfplots/x=,% is implicitly set by 'width' and/or '\axisdefaultwidth'
+ /pgfplots/y/.store in= \pgfplots@y,
+ /pgfplots/y/.belongs to family=/pgfplots,
+ /pgfplots/y=,% is implicitly set by 'width' and/or '\axisdefaultwidth'
+ /pgfplots/cycle list/.code={\pgfplots@assign@list\autoplotspeclist{#1}},
+ /pgfplots/cycle list/.belongs to family=/pgfplots,
+ /pgfplots/cycle list name/.code={\let\autoplotspeclist=#1\relax},
+ /pgfplots/cycle list name/.belongs to family=/pgfplots,
+ /pgfplots/cycle list name=\coloredplotspeclist,
+ /pgfplots/legend style/.belongs to family=/pgfplots/style commands,
+ /pgfplots/legend style/.code={%
+ \pgfkeysalso{/pgfplots/every axis legend/.append style={#1}}%
+ },
+ /pgfplots/label style/.belongs to family=/pgfplots/style commands,
+ /pgfplots/label style/.code={%
+ \pgfkeysalso{/pgfplots/every axis label/.append style={#1}}%
+ },%
+ /pgfplots/x label style/.belongs to family=/pgfplots/style commands,
+ /pgfplots/x label style/.code={%
+ \pgfkeysalso{/pgfplots/every axis x label/.append style={#1}}%
+ },
+ /pgfplots/y label style/.belongs to family=/pgfplots/style commands,
+ /pgfplots/y label style/.code={%
+ \pgfkeysalso{/pgfplots/every axis y label/.append style={#1}}%
+ },
+ /pgfplots/title style/.belongs to family=/pgfplots/style commands,
+ /pgfplots/title style/.code={%
+ \pgfkeysalso{/pgfplots/every axis title/.append style={#1}}%
+ },
+ /pgfplots/tick label style/.belongs to family=/pgfplots/style commands,
+ /pgfplots/tick label style/.code={%
+ \pgfkeysalso{/pgfplots/every tick label/.append style={#1}}%
+ },
+ /pgfplots/x tick label style/.belongs to family=/pgfplots/style commands,
+ /pgfplots/x tick label style/.code={%
+ \pgfkeysalso{/pgfplots/every x tick label/.append style={#1}}%
+ },
+ /pgfplots/y tick label style/.belongs to family=/pgfplots/style commands,
+ /pgfplots/y tick label style/.code={%
+ \pgfkeysalso{/pgfplots/every y tick label/.append style={#1}}%
+ },
+ /pgfplots/x tick scale label style/.belongs to family=/pgfplots/style commands,
+ /pgfplots/x tick scale label style/.code={%
+ \pgfkeysalso{/pgfplots/every x scale tick label/.append style={#1}}%
+ },
+ /pgfplots/y tick scale label style/.belongs to family=/pgfplots/style commands,
+ /pgfplots/y tick scale label style/.code={%
+ \pgfkeysalso{/pgfplots/every y scale tick label/.append style={#1}}%
+ },
+ /pgfplots/tick style/.belongs to family=/pgfplots/style commands,
+ /pgfplots/tick style/.code={%
+ \pgfkeysalso{/pgfplots/every tick/.append style={#1}}%
+ },
+ /pgfplots/minor tick style/.belongs to family=/pgfplots/style commands,
+ /pgfplots/minor tick style/.code={%
+ \pgfkeysalso{/pgfplots/every minor tick/.append style={#1}}%
+ },
+ /pgfplots/major tick style/.belongs to family=/pgfplots/style commands,
+ /pgfplots/major tick style/.code={%
+ \pgfkeysalso{/pgfplots/every major tick/.append style={#1}}%
+ },
+ /pgfplots/x tick style/.belongs to family=/pgfplots/style commands,
+ /pgfplots/x tick style/.code={%
+ \pgfkeysalso{/pgfplots/every x tick/.append style={#1}}%
+ },
+ /pgfplots/minor x tick style/.belongs to family=/pgfplots/style commands,
+ /pgfplots/minor x tick style/.code={%
+ \pgfkeysalso{/pgfplots/every minor x tick/.append style={#1}}%
+ },
+ /pgfplots/major x tick style/.belongs to family=/pgfplots/style commands,
+ /pgfplots/major x tick style/.code={%
+ \pgfkeysalso{/pgfplots/every major x tick/.append style={#1}}%
+ },
+ /pgfplots/y tick style/.belongs to family=/pgfplots/style commands,
+ /pgfplots/y tick style/.code={%
+ \pgfkeysalso{/pgfplots/every y tick/.append style={#1}}%
+ },
+ /pgfplots/minor y tick style/.belongs to family=/pgfplots/style commands,
+ /pgfplots/minor y tick style/.code={%
+ \pgfkeysalso{/pgfplots/every minor y tick/.append style={#1}}%
+ },
+ /pgfplots/major y tick style/.belongs to family=/pgfplots/style commands,
+ /pgfplots/major y tick style/.code={%
+ \pgfkeysalso{/pgfplots/every major y tick/.append style={#1}}%
+ },
+ /pgfplots/grid style/.belongs to family=/pgfplots/style commands,
+ /pgfplots/grid style/.code={%
+ \pgfkeysalso{/pgfplots/every axis grid/.append style={#1}}%
+ },
+ /pgfplots/minor grid style/.belongs to family=/pgfplots/style commands,
+ /pgfplots/minor grid style/.code={%
+ \pgfkeysalso{/pgfplots/every minor grid/.append style={#1}}%
+ },
+ /pgfplots/major grid style/.belongs to family=/pgfplots/style commands,
+ /pgfplots/major grid style/.code={%
+ \pgfkeysalso{/pgfplots/every major grid/.append style={#1}}%
+ },
+ /pgfplots/x grid style/.belongs to family=/pgfplots/style commands,
+ /pgfplots/x grid style/.code={%
+ \pgfkeysalso{/pgfplots/every axis x grid/.append style={#1}}%
+ },
+ /pgfplots/minor x grid style/.belongs to family=/pgfplots/style commands,
+ /pgfplots/minor x grid style/.code={%
+ \pgfkeysalso{/pgfplots/every minor x grid/.append style={#1}}%
+ },
+ /pgfplots/major x grid style/.belongs to family=/pgfplots/style commands,
+ /pgfplots/major x grid style/.code={%
+ \pgfkeysalso{/pgfplots/every major x grid/.append style={#1}}%
+ },
+ /pgfplots/y grid style/.belongs to family=/pgfplots/style commands,
+ /pgfplots/y grid style/.code={%
+ \pgfkeysalso{/pgfplots/every axis y grid/.append style={#1}}%
+ },
+ /pgfplots/minor y grid style/.belongs to family=/pgfplots/style commands,
+ /pgfplots/minor y grid style/.code={%
+ \pgfkeysalso{/pgfplots/every minor y grid/.append style={#1}}%
+ },
+ /pgfplots/major y grid style/.belongs to family=/pgfplots/style commands,
+ /pgfplots/major y grid style/.code={%
+ \pgfkeysalso{/pgfplots/every major y grid/.append style={#1}}%
+ },
+ /pgfplots/disablelogfilter/.is if=pgfplots@disablelogfilter,
+ /pgfplots/disablelogfilter/.default=true,
+ /pgfplots/disablelogfilter/.belongs to family=/pgfplots,
+ /pgfplots/disablelogfilter=false,
+ /pgfplots/disabledatascaling/.is if=pgfplots@disabledatascaling,
+ /pgfplots/disabledatascaling/.default=true,
+ /pgfplots/disabledatascaling/.belongs to family=/pgfplots,
+ /pgfplots/disabledatascaling=false,
+ /pgfplots/hide axis/.is if=pgfplots@hide,
+ /pgfplots/hide axis/.default=true,
+ /pgfplots/hide axis/.belongs to family=/pgfplots,
+ /pgfplots/hide axis=false,
+% sets \pgfplots@xaxislinesnum to
+% box=0
+% bottom=1
+% middle=2
+% top=3
+ /pgfplots/axis x line/.is choice,
+ /pgfplots/axis x line/.belongs to family=/pgfplots, %/axis,
+ /pgfplots/axis x line/box/.code ={\def\pgfplots@xaxislinesnum{0}\def\pgfplots@xtickposnum{0}},
+ /pgfplots/axis x line/box/.belongs to family=/pgfplots, %/axis,
+ /pgfplots/axis x line/bottom/.code ={\def\pgfplots@xaxislinesnum{1}\def\pgfplots@xtickposnum{1}},
+ /pgfplots/axis x line/bottom/.belongs to family=/pgfplots, %/axis,
+ /pgfplots/axis x line/middle/.code ={\def\pgfplots@xaxislinesnum{2}\def\pgfplots@xtickposnum{2}},
+ /pgfplots/axis x line/middle/.belongs to family=/pgfplots, %/axis,
+ /pgfplots/axis x line/top/.code ={\def\pgfplots@xaxislinesnum{3}\def\pgfplots@xtickposnum{3}},
+ /pgfplots/axis x line/top/.belongs to family=/pgfplots, %/axis,
+ /pgfplots/axis x line/none/.code ={\def\pgfplots@xaxislinesnum{4}\def\pgfplots@xtickposnum{4}},
+ /pgfplots/axis x line/none/.belongs to family=/pgfplots, %/axis,
+ /pgfplots/axis x line=box,
+% sets \pgfplots@yaxislinesnum to
+% box=0
+% left=1
+% center=2
+% right=3
+ /pgfplots/axis y line/.is choice,
+ /pgfplots/axis y line/.belongs to family=/pgfplots, %/axis,
+ /pgfplots/axis y line/box/.code ={\def\pgfplots@yaxislinesnum{0}\def\pgfplots@ytickposnum{0}},
+ /pgfplots/axis y line/box/.belongs to family=/pgfplots, %/axis,
+ /pgfplots/axis y line/left/.code ={\def\pgfplots@yaxislinesnum{1}\def\pgfplots@ytickposnum{1}},
+ /pgfplots/axis y line/left/.belongs to family=/pgfplots, %/axis,
+ /pgfplots/axis y line/center/.code ={\def\pgfplots@yaxislinesnum{2}\def\pgfplots@ytickposnum{2}},
+ /pgfplots/axis y line/center/.belongs to family=/pgfplots, %/axis,
+ /pgfplots/axis y line/right/.code ={\def\pgfplots@yaxislinesnum{3}\def\pgfplots@ytickposnum{3}},
+ /pgfplots/axis y line/right/.belongs to family=/pgfplots, %/axis,
+ /pgfplots/axis y line/none/.code ={\def\pgfplots@yaxislinesnum{4}\def\pgfplots@ytickposnum{4}},
+ /pgfplots/axis y line/none/.belongs to family=/pgfplots, %/axis,
+ /pgfplots/axis y line=box,
+% set \pgfplots@xaxisdiscontnum
+% none = 0
+% crunch = 1
+% open = 2
+ /pgfplots/axis x discontinuity/.is choice,
+ /pgfplots/axis x discontinuity/.belongs to family=/pgfplots, %/axis,
+ /pgfplots/axis x discontinuity/none/.code ={\def\pgfplots@xaxisdiscontnum{0}},
+ /pgfplots/axis x discontinuity/none/.belongs to family=/pgfplots, %/axis,
+ /pgfplots/axis x discontinuity/crunch/.code ={\def\pgfplots@xaxisdiscontnum{1}},
+ /pgfplots/axis x discontinuity/crunch/.belongs to family=/pgfplots, %/axis,
+ /pgfplots/axis x discontinuity/parallel/.code ={\def\pgfplots@xaxisdiscontnum{2}},
+ /pgfplots/axis x discontinuity/parallel/.belongs to family=/pgfplots, %/axis,
+ /pgfplots/axis x discontinuity=none,
+% set \pgfplots@yaxisdiscontnum
+% none = 0
+% crunch = 1
+% open = 2
+ /pgfplots/axis y discontinuity/.is choice,
+ /pgfplots/axis y discontinuity/.belongs to family=/pgfplots, %/axis,
+ /pgfplots/axis y discontinuity/none/.code ={\def\pgfplots@yaxisdiscontnum{0}},
+ /pgfplots/axis y discontinuity/none/.belongs to family=/pgfplots, %/axis,
+ /pgfplots/axis y discontinuity/crunch/.code ={\def\pgfplots@yaxisdiscontnum{1}},
+ /pgfplots/axis y discontinuity/crunch/.belongs to family=/pgfplots, %/axis,
+ /pgfplots/axis y discontinuity/parallel/.code ={\def\pgfplots@yaxisdiscontnum{2}},
+ /pgfplots/axis y discontinuity/parallel/.belongs to family=/pgfplots, %/axis,
+ /pgfplots/axis y discontinuity=none,
+ /pgfplots/scale only axis/.is if=pgfplots@scale@only@axis,
+ /pgfplots/scale only axis/.default=true,
+ /pgfplots/scale only axis/.belongs to family=/pgfplots,
+ /pgfplots/scale only axis=false,
+% sets \pgfplots@xislinear to
+% normal=true
+% log=false
+ /pgfplots/xmode/.is choice,
+ /pgfplots/xmode/.belongs to family=/pgfplots/scale,
+ /pgfplots/xmode/normal/.code={\pgfplots@xislineartrue},
+ /pgfplots/xmode/normal/.belongs to family=/pgfplots/scale,
+ /pgfplots/xmode/linear/.code={\pgfplots@xislineartrue},
+ /pgfplots/xmode/linear/.belongs to family=/pgfplots/scale,
+ /pgfplots/xmode/log/.code={\pgfplots@xislinearfalse},
+ /pgfplots/xmode/log/.belongs to family=/pgfplots/scale,
+ /pgfplots/xmode=linear,
+ /pgfplots/ymode/.is choice,
+ /pgfplots/ymode/.belongs to family=/pgfplots/scale,
+ /pgfplots/ymode/normal/.code={\pgfplots@yislineartrue},
+ /pgfplots/ymode/normal/.belongs to family=/pgfplots/scale,
+ /pgfplots/ymode/linear/.code={\pgfplots@yislineartrue},
+ /pgfplots/ymode/linear/.belongs to family=/pgfplots/scale,
+ /pgfplots/ymode/log/.code={\pgfplots@yislinearfalse},
+ /pgfplots/ymode/log/.belongs to family=/pgfplots/scale,
+ /pgfplots/ymode=linear,
+ /pgfplots/error bars/x fixed/.code= \def\pgfplots@errorbars@xfixed{#1}\def\pgfplots@errorbars@xmode{0},
+ /pgfplots/error bars/x fixed relative/.code= \def\pgfplots@errorbars@xrel{#1}\def\pgfplots@errorbars@xmode{1},
+ /pgfplots/error bars/x explicit/.code= \def\pgfplots@errorbars@xmode{2},
+ /pgfplots/error bars/x explicit relative/.code= \def\pgfplots@errorbars@xmode{3},
+ /pgfplots/error bars/x fixed relative=0,
+ /pgfplots/error bars/x fixed=0,
+ /pgfplots/error bars/y fixed/.code= \def\pgfplots@errorbars@yfixed{#1}\def\pgfplots@errorbars@ymode{0},
+ /pgfplots/error bars/y fixed relative/.code= \def\pgfplots@errorbars@yrel{#1}\def\pgfplots@errorbars@ymode{1},
+ /pgfplots/error bars/y explicit/.code= \def\pgfplots@errorbars@ymode{2},
+ /pgfplots/error bars/y explicit relative/.code= \def\pgfplots@errorbars@ymode{3},
+ /pgfplots/error bars/y fixed relative=0,
+ /pgfplots/error bars/y fixed=0,
+ /pgfplots/error bars/x dir/.is choice,
+ /pgfplots/error bars/x dir/none/.code={%
+ \def\pgfplots@errorbars@xdirection{0}%
+ \ifnum\pgfplots@errorbars@ydirection=0
+ \pgfplots@errorbars@enabledfalse
+ \fi
+ },
+ /pgfplots/error bars/x dir/plus/.code= \def\pgfplots@errorbars@xdirection{1}\pgfplots@errorbars@enabledtrue,
+ /pgfplots/error bars/x dir/minus/.code= \def\pgfplots@errorbars@xdirection{2}\pgfplots@errorbars@enabledtrue,
+ /pgfplots/error bars/x dir/both/.code= \def\pgfplots@errorbars@xdirection{3}\pgfplots@errorbars@enabledtrue,
+ /pgfplots/error bars/x dir=none,
+ /pgfplots/error bars/y dir/.is choice,
+ /pgfplots/error bars/y dir/none/.code={%
+ \def\pgfplots@errorbars@ydirection{0}%
+ \ifnum\pgfplots@errorbars@xdirection=0
+ \pgfplots@errorbars@enabledfalse
+ \fi
+ },
+ /pgfplots/error bars/y dir/plus/.code= \def\pgfplots@errorbars@ydirection{1}\pgfplots@errorbars@enabledtrue,
+ /pgfplots/error bars/y dir/minus/.code= \def\pgfplots@errorbars@ydirection{2}\pgfplots@errorbars@enabledtrue,
+ /pgfplots/error bars/y dir/both/.code= \def\pgfplots@errorbars@ydirection{3}\pgfplots@errorbars@enabledtrue,
+ /pgfplots/error bars/y dir=none,
+ /pgfplots/error bars/error mark/.initial={-},
+ /pgfplots/error bars/error mark options/.initial={rotate=90},
+ /pgfplots/error bars/error bar style/.code={%
+ \pgfkeysalso{/pgfplots/every error bar/.append style={#1}}%
+ },
+ /pgfplots/every error bar/.style={thin},
+ /pgfplots/every error bar/.append code={\pgfplotsdeprecatedstylecheck{/tikz/every error bar}},
+ /pgfplots/error bars/draw error bar/.code 2 args={%
+%\message{/pgfplots/error bars/draw error bar: working with '#1' -- '#2'.}%
+ \pgfkeysgetvalue{/pgfplots/error bars/error mark}{\pgfplotserrorbarsmark}%
+ \pgfkeysgetvalue{/pgfplots/error bars/error mark options}{\pgfplotserrorbarsmarkopts}%
+ \draw #1 -- #2 node[pos=1,sloped,allow upside down] {%
+ \expandafter\tikz\expandafter[\pgfplotserrorbarsmarkopts]{%
+ \expandafter\pgfuseplotmark\expandafter{\pgfplotserrorbarsmark}%
+ \pgfusepath{stroke}}%
+ };
+ },
+ /pgfplots/bar cycle list/.style={/pgfplots/cycle list={%
+ {blue,fill=blue!30!white,mark=none},%
+ {red,fill=red!30!white,mark=none},%
+ {brown!60!black,fill=brown!30!white,mark=none},%
+ {black,fill=gray,mark=none},%
+ }
+ },
+ /pgfplots/area cycle list/.style={bar cycle list},
+ /pgfplots/ybar/.style={
+ bar cycle list,
+ tick align=outside,
+ /pgfplots/legend image code/.code={\draw[##1,bar width=3pt,yshift=-0.2em,bar shift=0pt] plot coordinates {(0cm,0.8em) (2*\pgfplotbarwidth,0.6em)};},
+ /pgf/bar shift={%
+ % total width = n*w + (n-1)*skip
+ % -> subtract half for centering
+ -0.5*(\numplots*\pgfplotbarwidth + (\numplots-1)*#1) +
+ % the '0.5*w' is for centering
+ (.5+\plotnum)*\pgfplotbarwidth + \plotnum*#1},%
+ /tikz/ybar,
+ },
+ /pgfplots/ybar/.default=2pt,
+ /pgfplots/ybar/.belongs to family=/pgfplots,
+ /pgfplots/xbar/.style={
+ bar cycle list,
+ tick align=outside,
+ /pgfplots/legend image code/.code={\draw[##1,bar width=3pt,yshift=-0.2em,bar shift=0pt] plot coordinates {(0cm,0.8em) (2*\pgfplotbarwidth,0.6em)};},
+ /pgf/bar shift={%
+ % total width = n*w + (n-1)*skip
+ % -> subtract half for centering
+ -0.5*(\numplots*\pgfplotbarwidth + (\numplots-1)*#1) +
+ % the '0.5*w' is for centering
+ (.5+\plotnum)*\pgfplotbarwidth + \plotnum*#1},%
+ /tikz/xbar,
+ },
+ /pgfplots/xbar/.default=2pt,
+ /pgfplots/xbar/.belongs to family=/pgfplots,
+ /pgfplots/ybar interval/.style={%
+ bar cycle list,
+ x tick label as interval,
+ xmajorgrids,
+ % xtick=data,
+ /pgfplots/legend image code/.code={\draw[##1,yshift=-0.2em,bar interval width=0.7,bar interval shift=0.5] plot coordinates {(0cm,0.8em) (5pt,0.6em) (10pt,0.6em)};},
+ bar interval width={#1/\numplots},
+ bar interval shift={(\plotnum+0.5)/\numplots},
+ /tikz/ybar interval,
+ },
+ /pgfplots/ybar interval/.default=1,
+ /pgfplots/ybar interval/.belongs to family=/pgfplots,
+ /pgfplots/xbar interval/.style={%
+ bar cycle list,
+ y tick label as interval,
+ % ytick=data,
+ ymajorgrids,
+ /pgfplots/legend image code/.code={\draw[##1,yshift=-0.2em,bar interval width=0.7,bar interval shift=0.5] plot coordinates {(0cm,0.8em) (5pt,0.6em) (10pt,0.6em)};},
+ bar interval width={#1/\numplots},
+ bar interval shift={(\plotnum+0.5)/\numplots},
+ /tikz/xbar interval,
+ },
+ /pgfplots/xbar interval/.default=1,
+ /pgfplots/xbar interval/.belongs to family=/pgfplots,
+ /pgfplots/xbar stacked/.style={
+ bar cycle list,
+ stack plots=x,
+ stack dir=#1,
+ /tikz/xbar,
+ },
+ /pgfplots/xbar stacked/.default=plus,
+ /pgfplots/xbar stacked/.belongs to family=/pgfplots,
+ /pgfplots/ybar stacked/.style={
+ bar cycle list,
+ stack plots=y,
+ stack dir=#1,
+ /tikz/ybar,
+ },
+ /pgfplots/ybar stacked/.default=plus,
+ /pgfplots/ybar stacked/.belongs to family=/pgfplots,
+ /pgfplots/xbar interval stacked/.style={
+ bar cycle list,
+ stack plots=x,
+ stack dir=#1,
+ /tikz/xbar interval,
+ },
+ /pgfplots/xbar interval stacked/.default=plus,
+ /pgfplots/xbar interval stacked/.belongs to family=/pgfplots,
+ /pgfplots/ybar interval stacked/.style={
+ bar cycle list,
+ stack plots=y,
+ stack dir=#1,
+ /tikz/ybar interval,
+ },
+ /pgfplots/ybar interval stacked/.default=plus,
+ /pgfplots/ybar interval stacked/.belongs to family=/pgfplots,
+ /pgfplots/yticklabel interval boundaries/.style={%
+ y tick label as interval,
+ yticklabel={$\pgfmathprintnumber{\tick}$ -- $\pgfmathprintnumber{\nexttick}$}
+ },
+ /pgfplots/xticklabel interval boundaries/.style={%
+ x tick label as interval,
+ xticklabel={$\pgfmathprintnumber{\tick}$ -- $\pgfmathprintnumber{\nexttick}$}
+ },
+}
+
+\newif\ifpgfplots@log@tick@isminor@tick@pos
+% Checks whether the tick position given as #1.#2=log10(T) belongs to
+% T=i*10^j with an integer i>1.
+%
+% If T=i*10^j, \ifpgfplots@log@tick@isminor@tick@pos will be set to true and
+% \pgfmathresult will contain T.
+%
+% Otherwise, \ifpgfplots@log@tick@isminor@tick@pos will be set to false and
+% pgfmathresult to #1.#2
+%
+% Arguments:
+% #1.#2 the value log10(T)
+%
+% Implementation:
+% if T = i*10^j, log10(T) = log10(i) + j.
+% That means if log10(T) in \Z, we have T = 10^j. If not, we need to
+% check wether i is an integer. Please note that log10(i) < 1.
+%
+% Further note: log(T) < 0 <=> j<0.
+% In case j<0, we have
+% #1.#2 = j + log(i)
+% = - ( -j - log(i) )
+% = - ( -j - 1 + (1-log(i)) )
+% = #1 '.' #2 [ up to the '0.'
+% that means #1 = j-1 and #2 = 1-log(i).
+\def\pgfplots@is@log@tick@a@minor@tick@pos#1.#2\relax{%
+ \pgfmathapproxequalto@{#1.#2}{#1.0}%
+ \ifpgfmathcomparison
+ % in MOST cases, this here will be true:
+ \pgfplots@log@tick@isminor@tick@posfalse
+ \def\pgfmathresult{#1.#2}%
+ \else
+ % I guess this won't happen too often. In fact, it's a very
+ % special case.
+ \begingroup
+ \c@pgf@counta=#1\relax
+ \ifnum\c@pgf@counta<0
+ \advance\c@pgf@counta by-1
+ \pgfmathsubtract@{1}{0.#2}%
+ \expandafter\pgfplots@is@log@tick@a@minor@tick@pos@IDENTIFY@LOGi\pgfmathresult\relax
+ \ifpgfplots@log@tick@isminor@tick@pos
+ \aftergroup\pgfplots@log@tick@isminor@tick@postrue
+ \edef\pgfmathresult{\pgfmathresult e\the\c@pgf@counta}%
+ \else
+ \aftergroup\pgfplots@log@tick@isminor@tick@posfalse
+ \def\pgfmathresult{#1.#2}%
+ \fi
+ \else
+ \pgfplots@is@log@tick@a@minor@tick@pos@IDENTIFY@LOGi0.#2\relax
+ \ifpgfplots@log@tick@isminor@tick@pos
+ \aftergroup\pgfplots@log@tick@isminor@tick@postrue
+ \edef\pgfmathresult{\pgfmathresult e\the\c@pgf@counta}%
+ \else
+ \aftergroup\pgfplots@log@tick@isminor@tick@posfalse
+ \def\pgfmathresult{#1.#2}%
+ \fi
+ \fi
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
+ \fi
+}
+
+% expects a positive number.
+\def\pgfplots@is@log@tick@a@minor@tick@pos@IDENTIFY@LOGi0.#1\relax{%
+ \pgfplots@log@tick@isminor@tick@postrue
+ \pgfmathapproxequalto@{0.#1}{0.3010299956639}%
+ \ifpgfmathcomparison
+ \def\pgfmathresult{2}%
+ \else
+ \pgfmathapproxequalto@{0.#1}{0.4771212547196}%
+ \ifpgfmathcomparison
+ \def\pgfmathresult{3}%
+ \else
+ \pgfmathapproxequalto@{0.#1}{0.6020599913279}%
+ \ifpgfmathcomparison
+ \def\pgfmathresult{4}%
+ \else
+ \pgfmathapproxequalto@{0.#1}{0.698970004}%
+ \ifpgfmathcomparison
+ \def\pgfmathresult{5}%
+ \else
+ \pgfmathapproxequalto@{0.#1}{0.7781512503}%
+ \ifpgfmathcomparison
+ \def\pgfmathresult{6}%
+ \else
+ \pgfmathapproxequalto@{0.#1}{0.8450980400}%
+ \ifpgfmathcomparison
+ \def\pgfmathresult{7}%
+ \else
+ \pgfmathapproxequalto@{0.#1}{0.9030899869}%
+ \ifpgfmathcomparison
+ \def\pgfmathresult{8}%
+ \else
+ \pgfmathapproxequalto@{0.#1}{0.954242509439}%
+ \ifpgfmathcomparison
+ \def\pgfmathresult{9}%
+ \else
+ \pgfplots@log@tick@isminor@tick@posfalse
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+}
+
+
+\def\pgfplots@set@at#1{\def\pgfplots@at{#1}}%
+
+
+
+% converts a comma-separated list (PGF foreach) to my internal list
+% structure.
+\long\def\pgfplots@foreach@to@list#1\to#2{%
+ \pgfplotslistnewempty\pgfplots@TMP
+ \begingroup
+ \foreach \i in {#1} {%
+ \globaldefs=1
+ \expandafter\pgfplotslistpushback\i\to\pgfplots@TMP
+ \globaldefs=0
+ }%
+ \endgroup
+ \pgfplotslistcopy\pgfplots@TMP\to#2\relax
+}
+
+% Several tick options:
+\long\def\axispreset#1{%
+ \pgfplotsset{every axis/.append style={#1}}%
+}
+\long\def\legendpreset#1{%
+ \pgfplots@error{Sorry, legendpreset is now deprecated, along with the legend options text width and font. Legends are now TikZ-matrizes which provide better alignment and can be placed horizontally. See the manual for details.}%
+}
+
+% Checks whether we need to create a separate 'tick scale label',
+% a node with ' * 10^3' on the side of the axis:
+%
+% PRECONDITION:
+% Axis limits for #1 are given. I need their values before any data
+% scale transformation has been applied.
+% If
+% \pgfplots@#1min@unscaled@as@float
+% and
+% \pgfplots@#1max@unscaled@as@float
+% exist; I will use these macros.
+% Otherwise, I will use \pgfplots@#1min and \pgfplots@#1max;
+% assuming that no data scale transformation is active.
+% FIXME : does that need further attention?
+\def\pgfplots@init@scaled@tick@for#1{%
+ \begingroup
+ % the \pgfplots@xmin@unscaled@as@float is set just before the data
+ % scale transformation is initialised.
+ %
+ % The variables are empty if there is no datascale transformation.
+ \expandafter\let\expandafter\pgfplots@cur@min@unscaled\csname pgfplots@#1min@unscaled@as@float\endcsname
+ \expandafter\let\expandafter\pgfplots@cur@max@unscaled\csname pgfplots@#1max@unscaled@as@float\endcsname
+ %
+ \ifx\pgfplots@cur@min@unscaled\pgfutil@empty
+ \xdef\pgfplots@TMP{\csname pgfplots@#1min\endcsname}%
+ \expandafter\pgfmathfloatparsenumber\expandafter{\pgfplots@TMP}%
+ \let\pgfplots@cur@min@unscaled=\pgfmathresult
+ \xdef\pgfplots@TMP{\csname pgfplots@#1max\endcsname}%
+ \expandafter\pgfmathfloatparsenumber\expandafter{\pgfplots@TMP}%
+ \let\pgfplots@cur@max@unscaled=\pgfmathresult
+ \fi
+ %
+ \expandafter\pgfmathfloat@decompose@E\pgfplots@cur@min@unscaled\relax\pgfmathfloat@a@E
+ \expandafter\pgfmathfloat@decompose@E\pgfplots@cur@max@unscaled\relax\pgfmathfloat@b@E
+ \ifnum\pgfmathfloat@b@E<\pgfmathfloat@a@E
+ \pgfmathfloat@b@E=\pgfmathfloat@a@E
+ \fi
+ \xdef\pgfplots@TMP{\pgfplots@scale@ticks@above@exponent}%
+ \expandafter\ifnum\pgfplots@TMP<\pgfmathfloat@b@E
+ % ok, scale it:
+ \multiply\pgfmathfloat@b@E by-1
+ \xdef\pgfplots@TMP{\the\pgfmathfloat@b@E}%
+ \else
+ \xdef\pgfplots@TMP{\pgfplots@scale@ticks@below@exponent}%
+ \expandafter\ifnum\pgfplots@TMP>\pgfmathfloat@b@E
+ % ok, scale it:
+ \multiply\pgfmathfloat@b@E by-1
+ \xdef\pgfplots@TMP{\the\pgfmathfloat@b@E}%
+ \else
+ % no scaling necessary:
+ \xdef\pgfplots@TMP{0}%
+ \fi
+ \fi
+ \endgroup
+ \expandafter\let\csname pgfplots@tick@scale@#1\endcsname=\pgfplots@TMP%
+}
+
+% x-axis tick labels for #1th tick
+% #1: options
+% #2: the axis (x or y)
+% #3: the value
+% #4,#5: coordinates for tikz
+% #6: ticknumber
+\def\pgfplots@show@ticklabel[#1]#2#3(#4,#5)#6{{%
+ \csname ifpgfplots@#2ticklabel@interval\endcsname
+ \pgfmathparse{#4}%
+ \edef\pgfplots@show@ticklabel@coord@x@new{\pgfmathresult pt}%
+ \pgfmathparse{#5}%
+ \edef\pgfplots@show@ticklabel@coord@y@new{\pgfmathresult pt}%
+ %
+ \pgfplots@show@ticklabel@{#2}{#3}%
+ \let\nexttick=\tick
+ \ifx\pgfplots@show@ticklabel@LASTTICK\pgfutil@empty
+ % its the first call. Simply remember arguments and wait
+ % for interval boundary before proceeding.
+ \else
+ % acquire options of first interval boundary:
+ \pgfplots@show@ticklabel@LASTTICK
+ % compute new node position:
+ \pgfmathparse{0.5*(\csname pgfplots@show@ticklabel@coord@#2\endcsname + \csname pgfplots@show@ticklabel@coord@#2@new\endcsname)}%
+ \expandafter\edef\csname pgfplots@show@ticklabel@coord@#2\endcsname{\pgfmathresult pt}%
+ \let\ticknum=\pgfplots@show@ticklabel@num\relax%
+ \let\tick=\pgfplots@show@ticklabel@tick%
+ \pgfplots@toka=\expandafter{\pgfplots@show@ticklabel@opts}%
+ \xdef\pgfplots@TMP{at (\pgfplots@show@ticklabel@coord@x,\pgfplots@show@ticklabel@coord@y) [\the\pgfplots@toka]}%
+ \expandafter\node\pgfplots@TMP
+ {\csname pgfplots@#2ticklabel\endcsname};%
+ \fi
+ \xdef\pgfplots@show@ticklabel@LASTTICK{%
+ \noexpand\def\noexpand\pgfplots@show@ticklabel@opts{#1}%
+ \noexpand\def\noexpand\pgfplots@show@ticklabel@tick{\nexttick}%
+ \noexpand\def\noexpand\pgfplots@show@ticklabel@coord@x{\pgfplots@show@ticklabel@coord@x@new}%
+ \noexpand\def\noexpand\pgfplots@show@ticklabel@coord@y{\pgfplots@show@ticklabel@coord@y@new}%
+ \noexpand\def\noexpand\pgfplots@show@ticklabel@num{\the#6}%
+ }%
+ \else
+ \let\ticknum=#6\relax%
+ \pgfplots@show@ticklabel@{#2}{#3}%
+ \node at (#4,#5) [#1] {\csname pgfplots@#2ticklabel\endcsname};%
+ \fi
+}}
+
+% Defines \tick by applying any necessary math to the (possibly
+% transformed) tick value #2.
+%
+% #1: axis (x or y)
+% #2: tick value.
+\def\pgfplots@show@ticklabel@#1#2{%
+ \csname ifpgfplots@apply@datatrafo@#1\endcsname
+ \csname pgfplots@inverse@datascaletrafo@#1\endcsname{#2}%
+ % FIXME: do that for any linear axis, also if no datascale is
+ % applied!
+ \ifpgfplots@scaled@ticks
+ \expandafter\pgfmathfloatshift@\expandafter{\pgfmathresult}{\csname pgfplots@tick@scale@#1\endcsname}%
+ \fi
+ % .. and this here provides \tick as fixed point repr:
+ \expandafter\pgfmathfloattofixed\expandafter{\pgfmathresult}%
+ \let\tick=\pgfmathresult
+ \else
+ \edef\tick{#2}%
+ \fi
+}%
+
+\def\pgfplots@user@ticklabel@list@x{%
+ \pgfplotslistselect\ticknum\of\pgfplots@xticklabels\to\tick
+ \tick
+}
+\def\pgfplots@user@ticklabel@list@y{%
+ \pgfplotslistselect\ticknum\of\pgfplots@yticklabels\to\tick
+ \tick
+}
+\def\pgfplots@user@extra@ticklabel@list@x{%
+ \pgfplotslistselect\ticknum\of\pgfplots@extra@xticklabels\to\tick
+ \tick
+}
+\def\pgfplots@user@extra@ticklabel@list@y{%
+ \pgfplotslistselect\ticknum\of\pgfplots@extra@yticklabels\to\tick
+ \tick
+}
+
+\def\axisdefaultticklabel{%
+ $\pgfmathprintnumber{\tick}$%
+}
+
+\def\axisdefaultticklabellog{%
+ \pgfkeysgetvalue{/pgfplots/log number format code/.@cmd}\pgfplots@log@label@style
+ \expandafter\pgfplots@log@label@style\tick\pgfeov
+}
+
+
+\def\pgfplots@show@label#1{%
+ \node
+ [/pgfplots/every axis label,%
+ /pgfplots/every axis #1 label]
+ {\csname pgfplots@#1label\endcsname};
+}
+
+\def\pgfplots@show@title{%
+ \node%
+ [/pgfplots/every axis title]
+ {\pgfplots@title};
+}
+
+% Check if a label does not cross the x-axis
+\def\pgfplots@ytick@check@tickshow{%
+ \pgfplots@tickshowtrue
+ \ifnum\pgfplots@yaxislinesnum=2\relax
+ \ifcase\pgfplots@xaxislinesnum\relax
+ \ifdim\pgfplots@tmpa=\pgfplots@ycoordminTEX\relax
+ \pgfplots@tickshowfalse
+ \fi
+ \ifdim\pgfplots@tmpa=\pgfplots@ycoordmaxTEX\relax
+ \pgfplots@tickshowfalse
+ \fi
+ \or
+ \ifdim\pgfplots@tmpa=\pgfplots@ycoordminTEX\relax
+ \pgfplots@tickshowfalse
+ \fi
+ \or
+ \ifdim\pgfplots@tmpa=\pgfplots@ZERO@y\relax
+ \pgfplots@tickshowfalse
+ \fi
+ \or
+ \ifdim\pgfplots@tmpa=\pgfplots@ycoordmaxTEX\relax
+ \pgfplots@tickshowfalse
+ \fi
+ \fi
+ \fi
+}
+
+\def\pgfplots@drawyaxis@placecomputedtick#1[#2]{%
+ \ifcase\pgfplots@ytickalignnum\relax
+ \def\pgfplots@ytick@offset{0pt}
+ \or
+ \def\pgfplots@ytick@offset{#1}
+ \or
+ \def\pgfplots@ytick@offset{.5*#1}
+ \fi
+ %\pgfplots@ytick@check@tickshow
+ %\ifpgfplots@tickshow
+ \draw[#2]
+ \ifcase\pgfplots@ytickposnum
+ (\pgfplots@xcoordminTEX-\pgfplots@ytick@offset, \pgfplots@tmpa) -- ++( #1, 0pt)
+
+ (\pgfplots@xcoordmaxTEX+\pgfplots@ytick@offset, \pgfplots@tmpa) -- ++(-#1, 0pt)
+ \or
+ (\pgfplots@xcoordminTEX-\pgfplots@ytick@offset, \pgfplots@tmpa) -- ++( #1, 0pt)
+ \or
+ (\pgfplots@ZERO@x -\pgfplots@ytick@offset, \pgfplots@tmpa) -- ++( #1, 0pt)
+ \or
+ (\pgfplots@xcoordmaxTEX+\pgfplots@ytick@offset, \pgfplots@tmpa) -- ++(-#1, 0pt)
+ \fi
+ ;
+ %\fi
+}%
+\def\pgfplots@drawyaxis@placecomputedgridline[#1]{%
+ \draw[#1]
+ (\pgfplots@xcoordminTEX\pgfplots@leftover, \pgfplots@tmpa)
+ -- (\pgfplots@xcoordmaxTEX\pgfplots@rightover, \pgfplots@tmpa)
+ ;
+}%
+
+% Y-Achsen und Achsenbeschriftung LOG:
+% 1: Ticks
+\newif\ifpgfplots@needsminorloop
+\def\pgfplots@drawyaxis#1{%
+ \ifpgfplots@yislinear
+ \ifpgfplots@scaled@ticks
+ \pgfplots@init@scaled@tick@for y%
+ \fi
+ \fi
+ \begingroup
+ \global\pgfplots@ticknum=0
+ \edef\pgfplots@TMP{#1}%
+ \ifx\pgfplots@TMP\pgfutil@empty
+ \else
+ \ifpgfplots@yminorticks
+ \pgfplots@needsminorlooptrue
+ \fi
+ \ifpgfplots@yminorgrids
+ \pgfplots@needsminorlooptrue
+ \fi
+ \ifpgfplots@needsminorloop
+ \ifpgfplots@yislinear
+ \begingroup
+ \c@pgf@counta=\pgfplots@minor@ytick@num\relax
+ \advance\c@pgf@counta by1\relax
+ \pgfplots@tmpb=\pgfplots@tick@distance@y pt
+ \divide\pgfplots@tmpb by\c@pgf@counta
+ \edef\pgfmathresult{\pgf@sys@tonumber{\pgfplots@tmpb}}%
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
+ \let\pgfplots@minor@tick@dist=\pgfmathresult
+ \else
+ \def\pgfplots@minor@ytick@num{9}%
+ \fi
+ \fi
+ \xdef\pgfplots@show@ticklabel@LASTTICK{}%
+ \foreach \y in {#1} {
+ \pgfextracty{\pgfplots@tmpa}{\pgfpointxy{0}{\y}}%
+ \pgfplots@ytick@check@tickshow
+ %
+ \ifpgfplots@tickshow
+ \ifdim\pgfplots@tmpa<\pgfplots@ycoordminTEX
+ \else
+ \ifdim\pgfplots@tmpa>\pgfplots@ycoordmaxTEX
+ \else
+ \ifcase\pgfplots@ytickalignnum\relax
+ \def\pgfplots@ytick@offset{0pt}%
+ \or
+ \def\pgfplots@ytick@offset{\pgfplots@tickwidth}%
+ \or
+ \def\pgfplots@ytick@offset{.5*\pgfplots@tickwidth}%
+ \fi
+ \ifcase\pgfplots@ytickposnum
+ \def\pgfplots@ytick@origin{\pgfplots@xcoordminTEX}%
+ \or
+ \def\pgfplots@ytick@origin{\pgfplots@xcoordminTEX}%
+ \or
+ \def\pgfplots@ytick@origin{\pgfplots@ZERO@x}%
+ \or
+ \def\pgfplots@ytick@origin{\pgfplots@xcoordmaxTEX}%
+ \fi
+ % Axis tick labels:`
+ \ifnum\pgfplots@ytickposnum=3\relax
+ \pgfplots@show@ticklabel
+ [right,/pgfplots/every tick label,/pgfplots/every y tick label]%
+ {y}{\y}%
+ (\pgfplots@ytick@origin+\pgfplots@ytick@offset,\pgfplots@tmpa)%
+ {\pgfplots@ticknum}%
+ \else
+ \pgfplots@show@ticklabel
+ [left,/pgfplots/every tick label,/pgfplots/every y tick label]%
+ {y}{\y}%
+ (\pgfplots@ytick@origin-\pgfplots@ytick@offset,\pgfplots@tmpa)%
+ {\pgfplots@ticknum}%
+ \fi
+ \fi
+ \fi
+ \fi
+ \global\advance\pgfplots@ticknum by1
+ \scope
+ %\clip (\pgfplots@xcoordminTEX\pgfplots@leftover, \pgfplots@ycoordminTEX\pgfplots@leftover)
+ % rectangle (\pgfplots@xcoordmaxTEX\pgfplots@rightover, \pgfplots@ycoordmaxTEX\pgfplots@rightover);
+ \pgfinterruptboundingbox%
+ \clip (\pgfplots@xcoordminTEX-5cm, \pgfplots@ycoordminTEX)
+ rectangle (\pgfplots@xcoordmaxTEX+5cm, \pgfplots@ycoordmaxTEX);
+ \endpgfinterruptboundingbox%
+ % Y-ticks left and/or right
+ % in log:
+ % log( i*10^k ) = log\i + k\log10 -> draw ticks for i=1..9
+ \ifpgfplots@needsminorloop
+ \foreach \i in {1,...,\pgfplots@minor@ytick@num} {
+ % this code here is scoped inside of \foreach.
+ \ifpgfplots@yislinear
+ \pgfextracty{\pgfplots@tmpb}{\pgfpointxy{0}{\i*\pgfplots@minor@tick@dist}}%
+ \else
+ \pgfextracty{\pgfplots@tmpb}{\pgfpointxy{0}{\logi\i}}%
+ \fi
+ \advance\pgfplots@tmpa by\pgfplots@tmpb
+ \ifdim\pgfplots@tmpa<\pgfplots@ycoordminTEX
+ \else
+ \ifdim\pgfplots@tmpa>\pgfplots@ycoordmaxTEX
+ \else
+ \ifpgfplots@yminorgrids
+ \pgfplots@drawyaxis@placecomputedgridline[/pgfplots/every axis grid,/pgfplots/every minor grid,/pgfplots/every axis y grid,/pgfplots/every minor y grid]%
+ \fi
+ \ifpgfplots@yminorticks
+ \pgfplots@drawyaxis@placecomputedtick\pgfplots@subtickwidth[/pgfplots/every tick,/pgfplots/every minor tick,/pgfplots/every tick,/pgfplots/every minor y tick]%
+ \fi
+ \fi
+ \fi
+ }%
+ \fi
+ \ifdim\pgfplots@tmpa<\pgfplots@ycoordminTEX
+ \else
+ \ifdim\pgfplots@tmpa>\pgfplots@ycoordmaxTEX
+ \else
+ \ifpgfplots@ymajorgrids
+ \pgfplots@drawyaxis@placecomputedgridline[/pgfplots/every axis grid,/pgfplots/every major grid, /pgfplots/every axis y grid,/pgfplots/every major y grid]%
+ \fi
+ \ifpgfplots@tickshow
+ \ifpgfplots@ymajorticks
+ \pgfplots@drawyaxis@placecomputedtick\pgfplots@tickwidth[/pgfplots/every tick,/pgfplots/every major tick,/pgfplots/every y tick,/pgfplots/every major y tick]%
+ \fi
+ \fi
+ \fi
+ \fi
+ \endscope
+ }%
+ \fi
+ \pgfplots@draw@tick@scale@label@for y%
+ \endgroup
+}
+
+\def\pgfplots@draw@tick@scale@label@for#1{%
+ \csname ifpgfplots@#1islinear\endcsname
+ \ifpgfplots@scaled@ticks
+ \begingroup
+ \xdef\pgfplots@TMP{\csname pgfplots@tick@scale@#1\endcsname}%
+ \expandafter\c@pgf@counta\pgfplots@TMP\relax
+ \multiply\c@pgf@counta by-1
+ \ifnum\c@pgf@counta=0\relax
+ \global\let\pgfplots@TMP=\pgfutil@empty
+ \else
+ \xdef\pgfplots@TMP{\the\c@pgf@counta}%
+ \fi
+ \endgroup
+ \ifx\pgfplots@TMP\pgfutil@empty
+ \else
+ \edef\pgfplots@tick@scale@labels{\noexpand\pgfplots@invoke@pgfkeyscode{/pgfplots/tick scale label code/.@cmd}{\pgfplots@TMP}}%
+ \node
+ [%
+ xshift=\pgfplots@xcoordminTEX,%
+ yshift=\pgfplots@ycoordminTEX,%
+ x=\pgfplots@xcoordmaxTEX-\pgfplots@xcoordminTEX,%
+ y=\pgfplots@ycoordmaxTEX-\pgfplots@ycoordminTEX,%
+ /pgfplots/every tick label,%
+ /pgfplots/every #1 tick label,%
+ /pgfplots/every #1 tick scale label]
+ {\pgfplots@tick@scale@labels};
+ \fi
+ \fi
+ \fi
+}
+
+% Simply invokes the code of PGF key #1 with value #2, that means
+% #1#2\pgfeov
+\def\pgfplots@invoke@pgfkeyscode#1#2{%
+ \pgfkeysgetvalue{#1}\pgfplots@invoke@pgfkeyscode@CODE
+ \pgfplots@invoke@pgfkeyscode@CODE#2\pgfeov
+}
+
+% Check if it does not cross the y-axis
+\def\pgfplots@xtick@check@tickshow{%
+ \pgfplots@tickshowtrue
+ \ifnum\pgfplots@xaxislinesnum=2\relax
+ \ifcase\pgfplots@yaxislinesnum\relax
+ \ifdim\pgfplots@tmpa=\pgfplots@xcoordminTEX\relax
+ \pgfplots@tickshowfalse
+ \fi
+ \ifdim\pgfplots@tmpa=\pgfplots@xcoordmaxTEX\relax
+ \pgfplots@tickshowfalse
+ \fi
+ \or
+ \ifdim\pgfplots@tmpa=\pgfplots@xcoordminTEX\relax
+ \pgfplots@tickshowfalse
+ \fi
+ \or
+ \ifdim\pgfplots@tmpa=\pgfplots@ZERO@x\relax
+ \pgfplots@tickshowfalse
+ \fi
+ \or
+ \ifdim\pgfplots@tmpa=\pgfplots@xcoordmaxTEX\relax
+ \pgfplots@tickshowfalse
+ \fi
+ \fi
+ \fi
+}
+
+\def\pgfplots@drawxaxis@placecomputedtick#1[#2]{%
+ \ifcase\pgfplots@xtickalignnum\relax
+ \def\pgfplots@xtick@offset{0pt}
+ \or
+ \def\pgfplots@xtick@offset{#1}
+ \or
+ \def\pgfplots@xtick@offset{.5*#1}
+ \fi
+ %\pgfplots@xtick@check@tickshow
+ %\ifpgfplots@tickshow
+ \draw[#2]
+ \ifcase\pgfplots@xtickposnum
+ (\pgfplots@tmpa, \pgfplots@ycoordminTEX-\pgfplots@xtick@offset) -- ++(0pt, #1)
+
+ (\pgfplots@tmpa, \pgfplots@ycoordmaxTEX+\pgfplots@xtick@offset) -- ++(0pt,-#1)
+ \or
+ (\pgfplots@tmpa, \pgfplots@ycoordminTEX-\pgfplots@xtick@offset) -- ++(0pt, #1)
+ \or
+ (\pgfplots@tmpa, \pgfplots@ZERO@y -\pgfplots@xtick@offset) -- ++(0pt, #1)
+ \or
+ (\pgfplots@tmpa, \pgfplots@ycoordmaxTEX+\pgfplots@xtick@offset) -- ++(0pt,-#1)
+ \fi
+ ;
+ %\fi
+}%
+\def\pgfplots@drawxaxis@placecomputedgridline[#1]{%
+ \draw[#1]
+ (\pgfplots@tmpa, \pgfplots@ycoordminTEX\pgfplots@leftover)
+ -- (\pgfplots@tmpa, \pgfplots@ycoordmaxTEX\pgfplots@rightover)
+ ;
+}%
+
+% #1: axis (x or y)
+% #2: tick position list
+\def\pgfplots@draw@extra@ticks@for#1#2{%
+ \begingroup
+ \edef\pgfplots@TMP{#2}%
+ \ifx\pgfplots@TMP\pgfutil@empty
+ \else
+ \pgfplots@scaled@ticksfalse
+ \csname pgfplots@#1minorticksfalse\endcsname
+ \csname pgfplots@#1minorgridsfalse\endcsname
+ \expandafter\let\expandafter\axis@TMP\csname pgfplots@extra@#1ticklabel\endcsname
+ \expandafter\let\csname pgfplots@#1ticklabel\endcsname=\axis@TMP
+ % FIXME: that search path - thing is far from perfect.
+ % In fact, it doesn't even work for choice keys... with
+ % unexpected results.
+ % I have fixed that in PGF CVS - but PGF 2.0 does not yet work
+ % here!
+ \pgfqkeys{/pgfplots/search path for tikz}{/pgfplots/every extra #1 tick}%
+ \csname pgfplots@draw#1axis\endcsname{#2}%
+ \fi
+ \endgroup
+}
+
+\def\pgfplots@drawaxis@innerlines{%
+ \ifnum\pgfplots@yaxislinesnum=2
+ \draw[decorate,ydiscont,decoration={pre length=\ydisstart, post length=\ydisend}] (\pgfplots@ZERO@x, \pgfplots@ycoordminTEX) -- (\pgfplots@ZERO@x, \pgfplots@ycoordmaxTEX);
+ \fi
+ \ifnum\pgfplots@xaxislinesnum=2
+ \draw[decorate,xdiscont,decoration={pre length=\xdisstart, post length=\xdisend}] (\pgfplots@xcoordminTEX, \pgfplots@ZERO@y) -- (\pgfplots@xcoordmaxTEX, \pgfplots@ZERO@y);
+ \fi
+}%
+
+\def\pgfplots@drawaxis@outerlines{%
+ \draw
+ (\pgfplots@xcoordminTEX, \pgfplots@ycoordminTEX)
+ \ifcase\pgfplots@yaxislinesnum
+ decorate [ydiscont,decoration={pre length=\ydisstart, post length=\ydisend}] { -- (\pgfplots@xcoordminTEX, \pgfplots@ycoordmaxTEX) }
+ \or decorate [ydiscont,decoration={pre length=\ydisstart, post length=\ydisend}] { -- (\pgfplots@xcoordminTEX, \pgfplots@ycoordmaxTEX) }
+ \or { (\pgfplots@xcoordminTEX, \pgfplots@ycoordmaxTEX) }
+ \or { (\pgfplots@xcoordminTEX, \pgfplots@ycoordmaxTEX) }
+ \fi
+ \ifcase\pgfplots@xaxislinesnum
+ decorate [xdiscont,decoration={pre length=\xdisstart, post length=\xdisend}] { -- (\pgfplots@xcoordmaxTEX, \pgfplots@ycoordmaxTEX) }
+ \or { (\pgfplots@xcoordmaxTEX, \pgfplots@ycoordmaxTEX) }
+ \or { (\pgfplots@xcoordmaxTEX, \pgfplots@ycoordmaxTEX) }
+ \or decorate [xdiscont,decoration={pre length=\xdisstart, post length=\xdisend}] { -- (\pgfplots@xcoordmaxTEX, \pgfplots@ycoordmaxTEX) }
+ \fi
+ \ifcase\pgfplots@yaxislinesnum
+ decorate [ydiscont,decoration={pre length=\ydisend, post length=\ydisstart}] { -- (\pgfplots@xcoordmaxTEX, \pgfplots@ycoordminTEX) }
+ \or { (\pgfplots@xcoordmaxTEX, \pgfplots@ycoordminTEX) }
+ \or { (\pgfplots@xcoordmaxTEX, \pgfplots@ycoordminTEX) }
+ \or decorate [ydiscont,decoration={pre length=\ydisend, post length=\ydisstart}] { -- (\pgfplots@xcoordmaxTEX, \pgfplots@ycoordminTEX) }
+ \fi
+ \ifcase\pgfplots@xaxislinesnum
+ decorate [xdiscont,decoration={pre length=\xdisend, post length=\xdisstart}] { -- (\pgfplots@xcoordminTEX, \pgfplots@ycoordminTEX) }
+ \or decorate [xdiscont,decoration={pre length=\xdisend, post length=\xdisstart}] { -- (\pgfplots@xcoordminTEX, \pgfplots@ycoordminTEX) }
+ \or { (\pgfplots@xcoordminTEX, \pgfplots@ycoordminTEX) }
+ \or { (\pgfplots@xcoordminTEX, \pgfplots@ycoordminTEX) }
+ \fi
+ ; % -- cycle;
+}%
+
+\def\pgfplots@drawaxis@lines{%
+ \begingroup
+ \begingroup
+ % this group employs several temporary dimension registers
+ % and is therefor scoped:
+ \let\ydisstart=\pgf@xa
+ \let\ydisend=\pgf@xb
+ \let\xdisstart=\pgf@ya
+ \let\xdisend=\pgf@yb
+ \ydisend=\pgfplots@ycoordmaxTEX
+ \advance \ydisend by -\pgfplots@ycoordminTEX
+ \ifcase\pgfplots@yaxisdiscontnum\relax
+ \let\ydiscontstyle=\pgfutil@empty
+ \or
+ \def\ydiscontstyle{decoration={zigzag,segment length=12pt, amplitude=4pt}}%
+ \advance \ydisend by -16pt
+ \or
+ \def\ydiscontstyle{decoration={ticks,segment length=4pt, amplitude=8pt}}%
+ \advance \ydisend by -8pt
+ \fi
+ \ifpgfplots@apply@datatrafo@y
+ \advance \pgfplots@ycoordmaxTEX by\pgfplots@data@scale@trafo@SHIFT@y pt
+ \fi
+ \ifdim\pgfplots@ycoordmaxTEX<0pt
+ \ydisstart=\ydisend
+ \ydisend=4pt
+ \else
+ \ydisstart=4pt
+ \fi
+ \ifpgfplots@apply@datatrafo@y
+ \advance \pgfplots@ycoordmaxTEX by-\pgfplots@data@scale@trafo@SHIFT@y pt
+ \fi
+ \xdisend=\pgfplots@xcoordmaxTEX
+ \advance \xdisend by -\pgfplots@xcoordminTEX
+ \ifcase\pgfplots@xaxisdiscontnum\relax
+ \let\xdiscontstyle=\pgfutil@empty
+ \or
+ \def\xdiscontstyle{decoration={zigzag,segment length=12pt, amplitude=4pt}}%
+ \advance \xdisend by -16pt
+ \or
+ \def\xdiscontstyle{decoration={ticks,segment length=4pt, amplitude=8pt}}%
+ \advance \xdisend by -8pt
+ \fi
+ \ifpgfplots@apply@datatrafo@x
+ \advance \pgfplots@xcoordmaxTEX by\pgfplots@data@scale@trafo@SHIFT@x pt
+ \fi
+ \ifdim\pgfplots@xcoordmaxTEX<0pt
+ \xdisstart=\xdisend
+ \xdisend=4pt
+ \else
+ \xdisstart=4pt
+ \fi
+ \ifpgfplots@apply@datatrafo@x
+ \advance \pgfplots@xcoordmaxTEX by-\pgfplots@data@scale@trafo@SHIFT@x pt
+ \fi
+ % carry local computations outside of group:
+ \xdef\pgfplots@TMP{%
+ \noexpand\def\noexpand\xdisstart{\the\xdisstart}%
+ \noexpand\def\noexpand\xdisend{\the\xdisend}%
+ \noexpand\def\noexpand\ydisstart{\the\ydisstart}%
+ \noexpand\def\noexpand\ydisend{\the\ydisend}%
+ \noexpand\pgfkeys{%
+ /tikz/xdiscont/.style={\xdiscontstyle},%
+ /tikz/ydiscont/.style={\ydiscontstyle}}%
+ }%
+ \endgroup
+ \pgfplots@TMP
+ \pgfplots@drawaxis@outerlines%
+ \pgfplots@drawaxis@innerlines%
+ \endgroup
+}%
+
+% X-Achsen und Achsenbeschriftung
+% 1: Ticks
+\def\pgfplots@drawxaxis#1{%
+ \ifpgfplots@xislinear
+ \ifpgfplots@scaled@ticks
+ \pgfplots@init@scaled@tick@for{x}%
+ \fi
+ \fi
+ \begingroup
+ \global\pgfplots@ticknum=0
+ \edef\pgfplots@TMP{#1}%
+ \ifx\pgfplots@TMP\pgfutil@empty
+ \else
+ \ifpgfplots@xminorticks
+ \pgfplots@needsminorlooptrue
+ \fi
+ \ifpgfplots@xminorgrids
+ \pgfplots@needsminorlooptrue
+ \fi
+ \ifpgfplots@needsminorloop
+ \ifpgfplots@xislinear
+ \begingroup
+ \c@pgf@counta=\pgfplots@minor@xtick@num\relax
+ \advance\c@pgf@counta by1\relax
+ \pgfplots@tmpb=\pgfplots@tick@distance@x pt
+ \divide\pgfplots@tmpb by\c@pgf@counta
+ \edef\pgfmathresult{\pgf@sys@tonumber{\pgfplots@tmpb}}%
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
+ \let\pgfplots@minor@tick@dist=\pgfmathresult
+ \else
+ \def\pgfplots@minor@xtick@num{9}%
+ \fi
+ \fi
+ \xdef\pgfplots@show@ticklabel@LASTTICK{}%
+ \foreach \x in {#1} {
+ \pgfextractx{\pgfplots@tmpa}{\pgfpointxy{\x}{0}}%
+ \pgfplots@xtick@check@tickshow
+ %
+ \ifpgfplots@tickshow
+ \ifdim\pgfplots@tmpa<\pgfplots@xcoordminTEX
+ \else
+ \ifdim\pgfplots@tmpa>\pgfplots@xcoordmaxTEX
+ \else
+ \ifcase\pgfplots@xtickalignnum\relax
+ \def\pgfplots@xtick@offset{0pt}
+ \or
+ \def\pgfplots@xtick@offset{\pgfplots@tickwidth}
+ \or
+ \def\pgfplots@xtick@offset{.5*\pgfplots@tickwidth}
+ \fi
+ \ifcase\pgfplots@xtickposnum
+ \def\pgfplots@xtick@origin{\pgfplots@ycoordminTEX}
+ \or
+ \def\pgfplots@xtick@origin{\pgfplots@ycoordminTEX}
+ \or
+ \def\pgfplots@xtick@origin{\pgfplots@ZERO@y}
+ \or
+ \def\pgfplots@xtick@origin{\pgfplots@ycoordmaxTEX}
+ \fi
+ % Axis tick labels:
+ \ifnum\pgfplots@xtickposnum=3
+ \pgfplots@show@ticklabel
+ [above,/pgfplots/every tick label,/pgfplots/every x tick label]%
+ {x}{\x}(\pgfplots@tmpa,\pgfplots@xtick@origin+\pgfplots@xtick@offset)%
+ {\pgfplots@ticknum}%
+ \else
+ \pgfplots@show@ticklabel
+ [below,/pgfplots/every tick label,/pgfplots/every x tick label]%
+ {x}{\x}(\pgfplots@tmpa,\pgfplots@xtick@origin-\pgfplots@xtick@offset)%
+ {\pgfplots@ticknum}%
+ \fi
+ \fi
+ \fi
+ \fi
+ \global\advance\pgfplots@ticknum by1
+ %
+ \scope
+ %\clip (\pgfplots@xcoordminTEX\pgfplots@leftover, \pgfplots@ycoordminTEX\pgfplots@leftover)
+ % rectangle (\pgfplots@xcoordmaxTEX\pgfplots@rightover, \pgfplots@ycoordmaxTEX\pgfplots@rightover);
+ \pgfinterruptboundingbox%
+ \clip (\pgfplots@xcoordminTEX, \pgfplots@ycoordminTEX-5cm)
+ rectangle (\pgfplots@xcoordmaxTEX, \pgfplots@ycoordmaxTEX+5cm);
+ \endpgfinterruptboundingbox%
+ % X-Axis ticks bottom and top
+ % in log:
+ % log( i*10^k ) = log\i + k\log10 -> draw ticks for i=1..9
+ \ifpgfplots@needsminorloop
+ \foreach \i in {1,...,\pgfplots@minor@xtick@num} {
+ % \pgfextractx{\pgfplots@tmpb}{\pgfpointxy{\logi\i}{0}}%
+ \ifpgfplots@xislinear
+ \pgfextractx{\pgfplots@tmpb}{\pgfpointxy{\i*\pgfplots@minor@tick@dist}{0}}%
+ \else
+ \pgfextractx{\pgfplots@tmpb}{\pgfpointxy{\logi\i}{0}}%
+ \fi
+ \advance\pgfplots@tmpa by\pgfplots@tmpb
+ \ifdim\pgfplots@tmpa<\pgfplots@xcoordminTEX
+ \else
+ \ifdim\pgfplots@tmpa>\pgfplots@xcoordmaxTEX
+ \else
+ \ifpgfplots@xminorgrids
+ \pgfplots@drawxaxis@placecomputedgridline[/pgfplots/every axis grid,/pgfplots/every minor grid]%
+ \fi
+ \ifpgfplots@xminorticks
+ \pgfplots@drawxaxis@placecomputedtick\pgfplots@subtickwidth[/pgfplots/every tick,/pgfplots/every minor tick,/pgfplots/every x tick,/pgfplots/every minor x tick]%
+ \fi
+ \fi
+ \fi
+ }%
+ \fi
+ \ifdim\pgfplots@tmpa<\pgfplots@xcoordminTEX
+ \else
+ \ifdim\pgfplots@tmpa>\pgfplots@xcoordmaxTEX
+ \else
+ \ifpgfplots@xmajorgrids
+ \pgfplots@drawxaxis@placecomputedgridline[/pgfplots/every axis grid,/pgfplots/every major grid,/pgfplots/every axis x grid,/pgfplots/every major x grid]%
+ \fi
+ \ifpgfplots@tickshow
+ \ifpgfplots@xmajorticks
+ \pgfplots@drawxaxis@placecomputedtick\pgfplots@tickwidth[/pgfplots/every tick,/pgfplots/every major tick, /pgfplots/every x tick,/pgfplots/every major x tick]%
+ \fi
+ \fi
+ \fi
+ \fi
+ \endscope
+ }%
+ \fi
+ \pgfplots@draw@tick@scale@label@for x%
+ \endgroup
+}
+
+\def\pgfplots@rememberplotspec#1{%
+ \begingroup
+ \globaldefs=1
+ \pgfplotslistpushback#1\to\pgfplots@plotspeclist
+ \endgroup
+}
+
+\def\pgfplots@getautoplotspec into#1{%
+ \pgfplotslistsize\autoplotspeclist\to\c@pgf@counta
+ \ifnum\c@pgf@counta=0
+ \let#1=\pgfutil@empty
+ \else
+ \c@pgf@countb=\pgfplots@numplots
+ % offset modulo size:
+ \loop
+ \ifnum\c@pgf@countb<\c@pgf@counta
+ \pgfplots@loop@CONTINUEfalse
+ \else
+ \pgfplots@loop@CONTINUEtrue
+ \fi
+ \ifpgfplots@loop@CONTINUE
+ \advance\c@pgf@countb by-\c@pgf@counta
+ \repeat
+ \pgfplotslistselect\c@pgf@countb\of\autoplotspeclist\to#1
+%\pgfplots@message{pgfplots.sty: using \string\autoplotspeclist\ specification no\#\the\c@pgf@countb (of \the\c@pgf@counta): #1}%
+ \fi
+}
+
+% The main interface to draw a plot into an axis.
+%
+% Usage:
+% \addplot
+% plot coordinates {
+% (0,0)
+% (1,1)
+% };
+%
+% or
+%
+% \addplot[color=blue,mark=*]
+% plot coordinates {
+% (0,0)
+% (1,1)
+% };
+%
+% The first syntax will use the next plot specification in the list
+% \autoplotspeclist
+% and the first will use blue color and * markers.
+%
+% The linespec. will be used in the legend.
+%
+% Low-level implementation:
+%
+% \pgfplots@addplot
+% \pgfplots@addplotimpl
+% \pgfplots@start@plot@with@options <--- \begingroup
+% ...
+% ... remember options GLOBALLY
+% ... update limits GLOBALLY
+% ... \pgfplots@addplot@enqueue@coords GLOBALLY
+% ...
+% \pgfplots@end@plot <--- \endgroup
+\long\def\pgfplots@addplot{%
+ \pgfutil@ifnextchar+{%
+ \pgfplots@getautoplotspec into\nextplotspec
+ \pgfplots@addplotimplAPPEND
+ }{%
+ \pgfutil@ifnextchar[{%
+ \pgfplots@addplotimpl%
+ }{%
+ \pgfplots@getautoplotspec into\nextplotspec
+ % the space after ']' is required here:
+ % FIXME:
+ % - \addplot[]plot coordinates is NOT allowed!?
+ \expandafter\pgfplots@addplotimpl\expandafter[\nextplotspec]
+ }%
+ }%
+}
+
+\long\def\pgfplots@addplotimplAPPEND+[{%
+ \expandafter\pgfplots@addplotimpl\expandafter[\nextplotspec,
+}
+
+\long\def\pgfplots@addplotimpl[#1]{%
+ \pgfutil@ifnextchar p{%
+ \pgfplots@addplotimpl@plot{#1}%
+ }{%
+ \pgfplots@addplotimpl@plot{#1}plot
+ }%
+}
+
+\def\pgfplots@addplotimpl@plot#1plot{%
+ \pgfutil@ifnextchar[{%
+ \pgfplots@addplotimpl@plot@withoptions{#1}%
+ }{%
+ \pgfplots@addplotimpl@plot@withoptions{#1}[]%
+ }%
+}
+
+\def\pgfplots@addplotimpl@plot@withoptions#1[#2]{
+ \pgfplots@start@plot@with@options{#1}{#2}%
+ \pgfutil@ifnextchar c{%
+ \pgfplots@addplotimpl@coordinates{#1}plot
+ }{%
+ \pgfutil@ifnextchar f{%
+ \pgfplots@addplotimpl@f{#1}%
+ }{%
+ \pgfutil@ifnextchar t{%
+ \pgfplots@addplotimpl@table{#1}%
+ }{%
+ \pgfutil@ifnextchar ({%
+ \pgfplots@addplotimpl@expression{#1}%
+ }{%
+ \pgfplots@error{Sorry, the supplied plot command is unknown or unsupported by pgfplots!}%
+ }%
+ }%
+ }%
+ }%
+}
+
+% Currently, plot expression is really inefficient:
+%
+% 1. it invokes the math parser to get all coordinates. Ok, that's
+% what one expects.
+%
+% 2. It collects the result into one large list instead of calling
+% pgfplots' stream methods. That's because \foreach encapsulates its
+% code in at least one TeX-group.
+%
+% 3. It processes the collected list; applying any floating point
+% parser routines - it does NOT know that any numbers are already in
+% TeX-precision!
+%
+% FIXME : configure pgfplots to finish the data scaling trafo! It's
+% perfectly ok if it is simply the identity!
+\long\def\pgfplots@addplotimpl@expression#1(#2,#3)#4;{%
+ \pgfplots@PREPARE@COORD@STREAM{#1}{#4}%
+ \edef\pgfplots@plot@data{\noexpand\foreach\expandafter\noexpand\tikz@plot@var in {\tikz@plot@samplesat}}%
+ \global\let\pgfplots@TMP=\pgfutil@empty
+ \pgfplots@plot@data{%
+ \pgfmathparse{#2}%
+ \let\pgfplots@current@point@x=\pgfmathresult
+ \pgfmathparse{#3}%
+ \let\pgfplots@current@point@y=\pgfmathresult
+ \pgfplots@toka=\expandafter{\pgfplots@TMP}%
+ \xdef\pgfplots@TMP{\the\pgfplots@toka(\pgfplots@current@point@x,\pgfplots@current@point@y)}%
+ }%
+ \expandafter\pgfplots@coord@stream@foreach\expandafter{\pgfplots@TMP}%
+}%
+
+\def\pgfplots@addplotimpl@expression@limits#1{%
+ %--------------------------------------------------
+ %FIXME
+ % \pgfkeysinstallkeyfilter{/pgf/key filters/equals}{/tikz/domain}%
+ % \pgfkeysinstallkeyfilterhandler{/pgf/key filter handlers/ignore}%
+ % \pgfqkeysfiltered
+ % {/tikz}%
+ % {#1}%
+ %--------------------------------------------------
+ \expandafter\pgfplots@addplotimpl@expression@limits@domain\tikz@plot@domain\relax
+}%
+
+\def\pgfplots@addplotimpl@expression@limits@domain#1:#2\relax{%
+ \ifpgfplots@autocompute@xlim
+ \ifpgfplots@float@numerics@mode@x
+ \pgfmathfloatparsenumber{#1}%
+ \let\pgfplots@current@point@x=\pgfmathresult
+ \pgfmathfloatmin{\pgfplots@xmin}{\pgfplots@current@point@x}%
+ \global\let\pgfplots@xmin=\pgfmathresult
+ \pgfmathfloatmax{\pgfplots@xmax}{\pgfplots@current@point@x}%
+ \global\let\pgfplots@xmax=\pgfmathresult
+ %
+ \pgfmathfloatparsenumber{#2}%
+ \let\pgfplots@current@point@x=\pgfmathresult
+ \pgfmathfloatmin{\pgfplots@xmin}{\pgfplots@current@point@x}%
+ \global\let\pgfplots@xmin=\pgfmathresult
+ \pgfmathfloatmax{\pgfplots@xmax}{\pgfplots@current@point@x}%
+ \global\let\pgfplots@xmax=\pgfmathresult
+ \else
+ \pgfmathmin{\pgfplots@xmin}{#1}%
+ \global\let\pgfplots@xmin=\pgfmathresult
+ \pgfmathmax{\pgfplots@xmax}{#1}%
+ \global\let\pgfplots@xmax=\pgfmathresult
+ \pgfmathmin{\pgfplots@xmin}{#2}%
+ \global\let\pgfplots@xmin=\pgfmathresult
+ \pgfmathmax{\pgfplots@xmax}{#2}%
+ \global\let\pgfplots@xmax=\pgfmathresult
+ \fi
+ \fi
+}
+
+\def\pgfplots@addplotimpl@f#1f{%
+ \pgfutil@ifnextchar i{\pgfplots@addplotimpl@file{#1}}{\pgfplots@addplotimpl@function{#1}}%
+}%
+
+\let\pgfplots@backupof@pgfplotxyfile=\pgfplotxyfile
+
+% #1: args of \addplot[...]
+% #2: file name
+% #3: trailing path commands until ';'
+\def\pgfplots@addplotimpl@function#1unction#2#3;{%
+ \def\tikz@plot@filename{\tikz@plot@prefix\tikz@plot@id}%
+ \iftikz@plot@raw@gnuplot%
+ \def\tikz@plot@data{\pgfplotgnuplot[\tikz@plot@filename]{#2}}%
+ \else%
+ \iftikz@plot@parametric%
+ \def\tikz@plot@data{\pgfplotgnuplot[\tikz@plot@filename]{%
+ set format "\%.7e";
+ set samples \tikz@plot@samples;
+ set parametric;
+ plot [t=\tikz@plot@domain] #2}}%
+ \else%
+ \def\tikz@plot@data{\pgfplotgnuplot[\tikz@plot@filename]{%
+ set format "\%.7e";
+ set samples \tikz@plot@samples;
+ plot [x=\tikz@plot@domain] #2}}%
+ \fi%
+ \fi%
+ \def\pgfplotxyfile{\pgfplots@addplotimpl@gnuplotresult{#1}{#3}}%
+ \tikz@plot@data
+ \let\pgfplotxyfile=\pgfplots@backupof@pgfplotxyfile
+}%
+
+\def\pgfplots@addplotimpl@gnuplotresult#1#2#3{%
+ \begingroup
+ \openin1=#3
+ \ifeof1
+ \pgfplots@error{Sorry, the gnuplot-result file '#3' could not be found. Maybe you need to enable the shell-escape feature? For pdflatex, this is '>> pdflatex -shell-escape'. You can also invoke '>> gnuplot #3' manually.}%
+ \aftergroup\pgfplots@loop@CONTINUEfalse
+ \else
+ \aftergroup\pgfplots@loop@CONTINUEtrue
+ \fi
+ \closein1
+ \endgroup
+ \ifpgfplots@loop@CONTINUE
+ \pgfplots@addplotimpl@file{#1}ile{#3}#2;%
+ \fi
+}
+
+\def\pgfplots@addplotimpl@file#1ile{%
+ \pgfplots@addplotimpl@table{#1}table[x index=0,y index=1,header=false]%
+}%
+
+\def\pgfplots@addplotimpl@table#1table{%
+ \pgfutil@ifnextchar[{%
+ \pgfplots@addplotimpl@table@getopts{#1}%
+ }{%
+ \pgfplots@addplotimpl@table@getopts{#1}[x index=0,y index=1]%
+ }%
+}%
+
+\def\pgfplots@addplotimpl@table@f#1#2from{%
+ \pgfplots@addplot@table@from@macrotrue
+ \pgfplots@addplotimpl@table@START{#1}{#2}%
+}
+
+\def\pgfplots@addplotimpl@table@getopts#1[#2]{%
+ \pgfutil@ifnextchar f{%
+ \pgfplots@addplotimpl@table@f{#1}{#2}%
+ }{%
+ \pgfplots@addplot@table@from@macrofalse
+ \pgfplots@addplotimpl@table@START{#1}{#2}%
+ }%
+}
+
+% #1: arguments to \addplot[...]
+% #2: arguments to table[...]
+% #3: the argument of plot table{...}
+% #4: trailing path arguments after plot table{...}#4;
+\long\def\pgfplots@addplotimpl@table@START#1#2#3#4;{%
+ \begingroup
+ \pgfplotstableset{#2}%
+ \ifpgfplots@addplot@table@from@macro
+ \pgfplotstablecopy#3\to\pgfplots@table
+ \else
+ \pgfplotstableread{#3} to \pgfplots@table
+ \fi
+ \ifx\pgfplots@plot@tbl@x\pgfutil@empty
+ \pgfplotstablegetcolumnbyindex\pgfplots@plot@tbl@xindex\of\pgfplots@table\to\addplot@tbl@x
+ \else
+ \pgfplotstablegetcolumnbyname\pgfplots@plot@tbl@x\of\pgfplots@table\to\addplot@tbl@x
+ \fi
+ \ifx\pgfplots@plot@tbl@y\pgfutil@empty
+ \pgfplotstablegetcolumnbyindex\pgfplots@plot@tbl@yindex\of\pgfplots@table\to\addplot@tbl@y
+ \else
+ \pgfplotstablegetcolumnbyname\pgfplots@plot@tbl@y\of\pgfplots@table\to\addplot@tbl@y
+ \fi
+ %
+ \ifpgfplots@errorbars@enabled
+ \let\addplot@tbl@error@x=\pgfutil@empty
+ \let\addplot@tbl@error@y=\pgfutil@empty
+ \pgfkeysgetvalue{/pgfplots/table/x error index}\pgfplots@plot@tbl@error@xindex
+ \pgfkeysgetvalue{/pgfplots/table/x error}\pgfplots@plot@tbl@error@x
+ \pgfkeysgetvalue{/pgfplots/table/y error index}\pgfplots@plot@tbl@error@yindex
+ \pgfkeysgetvalue{/pgfplots/table/y error}\pgfplots@plot@tbl@error@y
+ \ifx\pgfplots@plot@tbl@error@x\pgfutil@empty
+ \ifx\pgfplots@plot@tbl@error@xindex\pgfutil@empty
+ \else
+ \pgfplotstablegetcolumnbyindex\pgfplots@plot@tbl@error@xindex\of\pgfplots@table\to\addplot@tbl@error@x
+ \fi
+ \else
+ \pgfplotstablegetcolumnbyname\pgfplots@plot@tbl@error@x\of\pgfplots@table\to\addplot@tbl@error@x
+ \fi
+ \ifx\pgfplots@plot@tbl@error@y\pgfutil@empty
+ \ifx\pgfplots@plot@tbl@error@yindex\pgfutil@empty
+ \else
+ \pgfplotstablegetcolumnbyindex\pgfplots@plot@tbl@error@yindex\of\pgfplots@table\to\addplot@tbl@error@y
+ \fi
+ \else
+ \pgfplotstablegetcolumnbyname\pgfplots@plot@tbl@error@y\of\pgfplots@table\to\addplot@tbl@error@y
+ \fi
+ \fi
+ %
+ \pgfplots@PREPARE@COORD@STREAM{#1}{#4}%
+ \pgfplots@coord@stream@start
+ \loop
+ \pgfplotslistcheckempty\addplot@tbl@x
+ \ifpgfplotslistempty
+ \pgfplots@loop@CONTINUEfalse
+ \else
+ \pgfplots@loop@CONTINUEtrue
+ \fi
+ \ifpgfplots@loop@CONTINUE
+ \pgfplotslistpopfront\addplot@tbl@x\to\addplot@tbl@cur@x
+ \pgfplotslistpopfront\addplot@tbl@y\to\addplot@tbl@cur@y
+ \ifpgfplots@errorbars@enabled
+ \ifx\addplot@tbl@error@x\pgfutil@empty
+ \let\addplot@tbl@error@cur@x=\pgfutil@empty
+ \else
+ \pgfplotslistpopfront\addplot@tbl@error@x\to\addplot@tbl@error@cur@x
+ \fi
+ \ifx\addplot@tbl@error@y\pgfutil@empty
+ \let\addplot@tbl@error@cur@y=\pgfutil@empty
+ \else
+ \pgfplotslistpopfront\addplot@tbl@error@y\to\addplot@tbl@error@cur@y
+ \fi
+ \edef\pgfplots@TMP{{\addplot@tbl@cur@x}{\addplot@tbl@cur@y}{\addplot@tbl@error@cur@x}{\addplot@tbl@error@cur@y}}%
+ \expandafter\pgfplots@coord@stream@coord\pgfplots@TMP
+ \else
+ \edef\pgfplots@TMP{{\addplot@tbl@cur@x}{\addplot@tbl@cur@y}{}{}}%
+ \expandafter\pgfplots@coord@stream@coord\pgfplots@TMP
+ \fi
+ \repeat
+ \pgfplots@coord@stream@end
+ \endgroup
+}
+
+% #1: arguments to \addplot[] (these are used for legend images as well)
+% #2: arguments to \addplot plot[] (these are set directly in \addplot)
+\def\pgfplots@start@plot@with@options#1#2{%
+ \begingroup
+ \def\pgfplots@current@point@coordindex{0}% can be used inside of coordinate filters.
+ \def\coordindex{\pgfplots@current@point@coordindex}% valid inside of \addplot
+ \ifx\pgfplots@execute@at@begin@plot\pgfutil@empty
+ \else
+ \pgfplots@execute@at@begin@plot
+ \fi
+ \ifpgfplots@stackedmode
+ \pgfplots@stacked@beginplot
+ \fi
+ \pgfplots@rememberplotspec{#1}%
+ \def\pgfplots@addplot@nonlegend@options{#2}%
+ \ifx\pgfplots@addplot@nonlegend@options\pgfutil@empty
+ \else
+ \pgfqkeys{/tikz}{#2}%
+ \fi
+}
+
+% Initialises
+% \pgfplots@coord@stream@start
+% \pgfplots@coord@stream@coord
+% \pgfplots@coord@stream@end
+% such that a following coordinate stream is processed properly. The
+% following coordinate stream may come from different input methods.
+%
+% Arguments:
+% #1: all options of \addplot[...] (the plot style)
+% #2: any trailing path commands after the 'plot' command as such,
+% for example \addplot plot coordinates {...} -- (0,0);
+% would yield #2 =' -- (0,0)'
+%
+\long\def\pgfplots@PREPARE@COORD@STREAM#1#2{%
+ \ifpgfplots@errorbars@enabled
+ \pgfplots@streamerrorbar@recordto{\pgfplots@recordederrorbar}%
+ \pgfplots@streamerrorbarstart
+ \else
+ \let\pgfplots@recordederrorbar=\pgfutil@empty
+ \fi
+ \pgfplots@coord@stream@INIT\pgfplots@coord@stream@recorded
+ %
+ % make sure that \pgfplots@coord@stream@end@@ is called at the end
+ % of the lately prepare end-stream method.
+ \expandafter\def\expandafter\pgfplots@coord@stream@end@\expandafter{%
+ \pgfplots@coord@stream@end@
+ \pgfplots@coord@stream@end@@
+ \pgfplots@end@plot
+ }%
+ \def\pgfplots@coord@stream@end@@{%
+ \ifpgfplots@errorbars@enabled
+ \pgfplots@streamerrorbarend
+ \fi
+ % Idea: use
+ % \scope[plot specification]
+ % <any paths for error bars>
+ % \endscope
+ % \draw plot coordinates {...};
+ % to share plot specifications between error bars and plot
+ % coordinates. Unfortunately, it is NOT sufficient to use
+ % \tikzset{#1}
+ \edef\pgfplots@TMP{/pgfplots/every axis plot,/pgfplots/every axis plot no \the\pgfplots@numplots/.try}%
+ \pgfplotslist@TOK@a=\expandafter{\pgfplots@TMP,#1,/pgfplots/every axis plot post}%
+ % Assemble a
+ % \pgfplots@addplot@enqueue@coords{}{}...{}
+ % statement with correct arguments:
+ \ifx\pgfplots@recordederrorbar\pgfutil@empty
+ \let\pgfplots@TMPB=\pgfutil@empty%
+ \else
+ \pgfplotslist@TOK@b=\expandafter{\pgfplots@recordederrorbar}%
+ \def\pgfplots@TMPB{%
+ \noexpand\pgfplots@errorbars@finishwithstyleoptions[\the\pgfplotslist@TOK@a]{\the\pgfplotslist@TOK@b}%
+ }%
+ \fi
+ \ifpgfplots@datascaletrafo@initialised
+ \pgfplots@addplot@get@named@startendpoints@command\pgfplots@TMP
+ \pgfplots@toka=\expandafter{\pgfplots@TMP}%
+ \else
+ \pgfplots@toka={}%
+ \fi
+ \edef\pgfplots@TMP{%
+ \noexpand\pgfplots@addplot@enqueue@coords
+ {
+ \noexpand\def\noexpand\plotnum{\the\pgfplots@numplots}%
+ \noexpand\pgfplots@initzerolevelhandler
+ \the\pgfplots@toka% named start/end points
+ \noexpand\tikzstyle{current plot style}=[\the\pgfplotslist@TOK@a]%
+ \pgfplots@TMPB% error bar commands
+ }%
+ {%
+ \noexpand\draw[current plot style]%
+ }%
+ }%
+ \expandafter\pgfplots@TMP\expandafter{\pgfplots@coord@stream@recorded #2;}%
+ {}%
+ }%
+}%
+
+\def\pgfplots@end@plot{%
+ \global\advance\pgfplots@numplots by1\relax%
+ \ifpgfplots@stackedmode
+ \pgfplots@stacked@endplot
+ \fi
+ \ifx\pgfplots@execute@at@end@plot\pgfutil@empty
+ \else
+ \pgfplots@execute@at@end@plot
+ \fi
+ \global\let\pgfplots@TMP=\relax
+ \ifpgfplots@collect@firstplot@astick
+ \ifnum\pgfplots@numplots=1\relax
+ \pgfplotslist@TOK@a=\expandafter{\pgfplots@firstplot@coords@x}%
+ \pgfplotslist@TOK@b=\expandafter{\pgfplots@firstplot@coords@y}%
+ \xdef\pgfplots@TMP{%
+ \noexpand\def\noexpand\pgfplots@firstplot@coords@x{\the\pgfplotslist@TOK@a}%
+ \noexpand\def\noexpand\pgfplots@firstplot@coords@y{\the\pgfplotslist@TOK@b}%
+ }%
+ \fi
+ \fi
+ \endgroup
+ \pgfplots@TMP% see above
+}
+
+% #1: arguments to \addplot[...]
+% #2: the plot coordinates
+% #3: any trailing path command before the final ';'. It will be used as-is.
+\long\def\pgfplots@addplotimpl@coordinates#1plot coordinates#2#3;{%
+%\tracingmacros=2\tracingcommands=2
+%\pgfplots@message{processing plots coords with trailing path '#3'}%
+ \pgfplots@PREPARE@COORD@STREAM{#1}{#3}%
+ \pgfplots@coord@stream@foreach{#2}%
+}%
+
+\newif\ifpgfplots@update@limits@for@one@point@ISCLIPPED
+\def\pgfplots@math@ONE{1.0}%
+
+\def\pgfplots@streamerrorbarstart{%
+}%
+\def\pgfplots@streamerrorbarend{%
+}%
+\def\pgfplots@streamerrorbarcoords#1#2{%
+}%
+
+\def\pgfplots@streamerrorbar@recordto#1{%
+ \def\pgfplots@streamerrorbarstart{\let#1=\pgfutil@empty}%
+ \def\pgfplots@streamerrorbarend{}%
+ \def\pgfplots@streamerrorbarcoords##1##2{%
+ \expandafter\def\expandafter#1\expandafter{#1%
+ \pgfplots@errorbar@draw{##1}{##2}%
+ }%
+ }%
+}
+\def\pgfplots@streamerrorbar@directdraw{%
+ \def\pgfplots@streamerrorbarstart{}%
+ \def\pgfplots@streamerrorbarend{}%
+ \def\pgfplots@streamerrorbarcoords##1##2{%
+ \pgfplots@errorbar@draw{##1}{##2}%
+ }%
+}
+
+
+
+% Updates the current x and y limits for point (#1,#2).
+%
+% The point coordinates may be given in floating point format, see
+% below.
+%
+% Please note that if user specified limits are given, automatic
+% limits are only applied to points which fall into the user specified
+% clipping region.
+%
+% PRECONDITIONS:
+% - 'floating point numerics active'
+% => coordinate filtering is active
+% => #1 and/or #2 are in floating point format
+% - no coordinate filters active
+% => #1 and #2 MAY be macros, but they must be valid TeX
+% length (without unit).
+% #3= error for x coord (or empty)
+% #4= error for y coord (or empty)
+\long\def\pgfplots@update@limits@for@one@point#1#2#3#4{%
+%\tracingmacros=2\tracingcommands=2
+%\pgfplots@message{Updating limits for (#1,#2) ...}%
+ \pgfplots@update@limits@for@one@point@ISCLIPPEDfalse
+ \ifpgfplots@clip@limits
+ \ifpgfplots@autocompute@xlim
+ \else
+ \ifpgfplots@float@numerics@mode@x
+ \pgfmathfloatlessthan@{#1}{\pgfplots@xmin}%
+ \ifpgfmathfloatcomparison
+ \pgfplots@update@limits@for@one@point@ISCLIPPEDtrue
+ \fi
+ \pgfmathfloatlessthan@{\pgfplots@xmax}{#1}%
+ \ifpgfmathfloatcomparison
+ \pgfplots@update@limits@for@one@point@ISCLIPPEDtrue
+ \fi
+ \else
+ \pgfmathlessthan@{#1}{\pgfplots@xmin}%
+ \ifx\pgfmathresult\pgfplots@math@ONE
+ \pgfplots@update@limits@for@one@point@ISCLIPPEDtrue
+ \fi
+ \pgfmathlessthan@{\pgfplots@xmax}{#1}%
+ \ifx\pgfmathresult\pgfplots@math@ONE
+ \pgfplots@update@limits@for@one@point@ISCLIPPEDtrue
+ \fi
+ \fi
+ \fi
+ \ifpgfplots@autocompute@ylim
+ \else
+ \ifpgfplots@float@numerics@mode@y
+ \pgfmathfloatlessthan@{#2}{\pgfplots@ymin}%
+ \ifpgfmathfloatcomparison
+ \pgfplots@update@limits@for@one@point@ISCLIPPEDtrue
+ \fi
+ \pgfmathfloatlessthan@{\pgfplots@ymax}{#2}%
+ \ifpgfmathfloatcomparison
+ \pgfplots@update@limits@for@one@point@ISCLIPPEDtrue
+ \fi
+ \else
+ \pgfmathlessthan@{#2}{\pgfplots@ymin}%
+ \ifx\pgfmathresult\pgfplots@math@ONE
+ \pgfplots@update@limits@for@one@point@ISCLIPPEDtrue
+ \fi
+ \pgfmathlessthan@{\pgfplots@ymax}{#2}%
+ \ifx\pgfmathresult\pgfplots@math@ONE
+ \pgfplots@update@limits@for@one@point@ISCLIPPEDtrue
+ \fi
+ \fi
+ \fi
+ \fi
+ \ifpgfplots@update@limits@for@one@point@ISCLIPPED
+ \else
+ \ifpgfplots@autocompute@xlim
+ \ifpgfplots@float@numerics@mode@x
+ \pgfmathfloatmin@{\pgfplots@xmin}{#1}%
+ \global\let\pgfplots@xmin=\pgfmathresult
+ \pgfmathfloatmax@{\pgfplots@xmax}{#1}%
+ \global\let\pgfplots@xmax=\pgfmathresult
+ \else
+ \pgfmathmin@{\pgfplots@xmin}{#1}%
+ \global\let\pgfplots@xmin=\pgfmathresult
+ \pgfmathmax@{\pgfplots@xmax}{#1}%
+ \global\let\pgfplots@xmax=\pgfmathresult
+ \fi
+ \fi
+ \ifpgfplots@autocompute@ylim
+ \ifpgfplots@float@numerics@mode@y
+ \pgfmathfloatmin@{\pgfplots@ymin}{#2}%
+ \global\let\pgfplots@ymin=\pgfmathresult
+ \pgfmathfloatmax@{\pgfplots@ymax}{#2}%
+ \global\let\pgfplots@ymax=\pgfmathresult
+ \else
+ \pgfmathmin@{\pgfplots@ymin}{#2}%
+ \global\let\pgfplots@ymin=\pgfmathresult
+ \pgfmathmax@{\pgfplots@ymax}{#2}%
+ \global\let\pgfplots@ymax=\pgfmathresult
+ \fi
+ \fi
+ \global\pgfplots@limits@are@computedtrue
+ \fi
+%\pgfplots@message{Updated limits: (\pgfplots@xmin,\pgfplots@ymin) rectangle (\pgfplots@xmax,\pgfplots@ymax).}%
+%\tracingmacros=0\tracingcommands=0
+}
+
+\def\pgfplots@invoke@filter#1#2{%
+ \pgfkeysvalueof{/pgfplots/#2 filter/.@cmd}#1\pgfeov%
+}%
+
+% #3= error for x coord (or empty)
+% #4= error for y coord (or empty)
+\def\pgfplots@process@one@point#1#2#3#4{%
+ \pgfplots@prepare@xcoord{#1}%
+ \expandafter\pgfplots@invoke@filter\expandafter{\pgfmathresult}{x}%
+ \let\pgfplots@current@point@x=\pgfmathresult
+ %
+ \pgfplots@prepare@ycoord{#2}%
+ \expandafter\pgfplots@invoke@filter\expandafter{\pgfmathresult}{y}%
+ \let\pgfplots@current@point@y=\pgfmathresult
+ %
+ \ifx\pgfplots@current@point@x\pgfutil@empty
+ \ifpgfplots@warn@for@filter@discards
+ \pgfplots@message{NOTE: coordinate (#1,#2) has been dropped because of the x-coordinate filter.}%
+ \fi
+ \else
+ \ifx\pgfplots@current@point@y\pgfutil@empty
+ \ifpgfplots@warn@for@filter@discards
+ \pgfplots@message{NOTE: coordinate (#1,#2) has been dropped because of the y-coordinate filter.}%
+ \fi
+ \else
+ \ifpgfplots@apply@datatrafo
+ \ifpgfplots@apply@datatrafo@x
+ \pgfmathfloatparsenumber{\pgfplots@current@point@x}%
+ \let\pgfplots@current@point@x=\pgfmathresult
+ \fi
+ \ifpgfplots@apply@datatrafo@y
+ \pgfmathfloatparsenumber{\pgfplots@current@point@y}%
+ \let\pgfplots@current@point@y=\pgfmathresult
+ \fi
+ \ifpgfplots@datascaletrafo@initialised
+ % apply data transformation directly.
+ \ifpgfplots@apply@datatrafo@x
+ \pgfplots@datascaletrafo@x\pgfplots@current@point@x
+ \let\pgfplots@current@point@x=\pgfmathresult
+ \fi
+ \ifpgfplots@apply@datatrafo@y
+ \pgfplots@datascaletrafo@y\pgfplots@current@point@y
+ \let\pgfplots@current@point@y=\pgfmathresult
+ \fi
+ \fi
+ \fi
+ % All following routines (limit updating/stacking/error
+ % bars) will use float numerics if necessary (controlled
+ % by ifs).
+ \ifpgfplots@stackedmode
+ \pgfplots@stacked@preparepoint@inmacro{\pgfplots@current@point@x}{\pgfplots@current@point@y}%
+ \ifpgfplots@datascaletrafo@initialised% is also true if there is no scale trafo.
+ \pgfplots@stacked@finishpoint{\pgfplots@current@point@x}{\pgfplots@current@point@y}%
+ \fi
+ \fi
+ \ifpgfplots@autocomputelimits
+ % update also axis limits:
+ \pgfplots@update@limits@for@one@point{\pgfplots@current@point@x}{\pgfplots@current@point@y}{}{}%
+ \fi
+ \ifpgfplots@errorbars@enabled
+ \pgfplots@process@errorbar@for{\pgfplots@current@point@x}{\pgfplots@current@point@y}{#3}{#4}{#1}{#2}%
+ \fi
+ \pgfplots@toka=\expandafter{\pgfplots@coord@stream@recorded}%
+ \edef\pgfplots@coord@stream@recorded{\the\pgfplots@toka (\pgfplots@current@point@x,\pgfplots@current@point@y)}%
+ \ifpgfplots@collect@firstplot@astick
+ \ifnum\pgfplots@numplots=0
+ \ifx\pgfplots@firstplot@coords@x\pgfutil@empty
+ \pgfplots@toka=\expandafter{}%
+ \else
+ \pgfplots@toka=\expandafter{\pgfplots@firstplot@coords@x,}%
+ \fi
+ \edef\pgfplots@firstplot@coords@x{\the\pgfplots@toka\pgfplots@current@point@x}%
+ \ifx\pgfplots@firstplot@coords@y\pgfutil@empty
+ \pgfplots@toka=\expandafter{}%
+ \else
+ \pgfplots@toka=\expandafter{\pgfplots@firstplot@coords@y,}%
+ \fi
+ \edef\pgfplots@firstplot@coords@y{\the\pgfplots@toka\pgfplots@current@point@y}%
+ \fi
+ \fi
+%\pgfplots@message{FILTERING: appended \pgfplots@current@point@x,\pgfplots@current@point@y}% -> results in \pgfplots@coord@stream@recorded}%
+ \fi
+ \fi
+ %
+ % increase \pgfplots@current@point@coordindex:
+ \begingroup
+ \c@pgf@counta=\pgfplots@current@point@coordindex
+ \advance\c@pgf@counta by1\relax
+ \edef\pgfmathresult{\the\c@pgf@counta}%
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
+ \let\pgfplots@current@point@coordindex=\pgfmathresult
+}
+
+% Internal stream methods.
+%
+% Please overwrite \pgfplots@coord@stream@start@,
+% \pgfplots@coord@stream@end@ and \pgfplots@coord@stream@coord@
+% if you implement streams.
+%
+% FIXME: REPLACE THIS HERE WITH METHODS OF THE VISUALIZATION FRAMEWORK
+\newif\ifpgfplots@coord@stream@isfirst
+\def\pgfplots@coord@stream@start{
+ \pgfplots@coord@stream@isfirsttrue
+ \pgfplots@coord@stream@start@}
+\def\pgfplots@coord@stream@end{\pgfplots@coord@stream@end@}
+
+% Will be invoked for every point coordinate.
+%
+% It invokes \pgfplots@coord@stream@coord@.
+% It is expected to assign \pgfplots@current@point@x and
+% \pgfplots@current@point@y
+%
+% It is expected to
+% (#1,#2) : x, y coordinates
+% (#3,#4) : any x, y errors (or empty)
+\def\pgfplots@coord@stream@coord#1#2#3#4{%
+ \pgfplots@coord@stream@coord@{#1}{#2}{#3}{#4}%
+ \ifpgfplots@coord@stream@isfirst
+ \let\pgfplots@currentplot@firstcoord@x=\pgfplots@current@point@x
+ \let\pgfplots@currentplot@firstcoord@y=\pgfplots@current@point@y
+ \pgfplots@coord@stream@isfirstfalse
+ \fi
+ \let\pgfplots@currentplot@lastcoord@x=\pgfplots@current@point@x
+ \let\pgfplots@currentplot@lastcoord@y=\pgfplots@current@point@y
+}%
+
+% A looping method which applies
+% \pgfplots@coord@stream@start
+% for each coordinate '(x,y)' or '(x,y) +- (ex,ey)', call
+% \pgfplots@coord@stream@coord{x}{y}{ex}{ey}
+% \pgfplots@coord@stream@end
+%
+% #1 a sequence of coordinates of the form
+% '(x,y)'
+% or
+% '(x,y) +- (ex,ey)'
+% separated by white-space.
+\long\def\pgfplots@coord@stream@foreach#1{%
+ \pgfplots@coord@stream@start
+ \pgfplots@foreach@plot@coord@do%
+ \pgfplots@coord@stream@coord
+ \for
+ plot coordinates {#1};%
+ \pgfplots@EOI
+ \pgfplots@coord@stream@end
+}%
+
+% Processes coordinates and writes a new, modified 'plot coordinates'
+% command to macro #1.
+% #1: macro name for processed coordinates.
+%
+% Please note that it may be necessary to process the same coordinates
+% once more at the end of an axis - see
+% pgfplots@coord@stream@finalize@storedcoords@START
+\def\pgfplots@coord@stream@INIT#1{%
+ \def\pgfplots@coord@stream@start@{%
+ \let\pgfplots@coord@stream@recorded=\pgfutil@empty
+ }%
+ \def\pgfplots@coord@stream@end@{%
+ \pgfplots@toka=\expandafter{\pgfplots@coord@stream@recorded}%
+ \edef#1{plot coordinates {\the\pgfplots@toka}}%
+ }%
+ \let\pgfplots@coord@stream@coord@=\pgfplots@process@one@point
+}
+
+% Takes a sequence of PREPARED coordinates which are given in floating
+% point representation and applies the data scaling trafo.
+%
+% This stream is designed to be done at the end of an axis.
+% See \pgfplots@coord@stream@finalize@storedcoords@START
+\def\pgfplots@coord@stream@INIT@finalize@storedcoords#1{%
+ \def\pgfplots@coord@stream@start@{%
+ \let\pgfplots@data@scaletrafo@result=\pgfutil@empty
+ }%
+ \def\pgfplots@coord@stream@end@{%
+ \let#1=\pgfplots@data@scaletrafo@result
+ }%
+ \let\pgfplots@coord@stream@coord@=\pgfplots@apply@data@scaletrafo@to@one@point
+}
+
+\def\pgfplots@addplot@get@named@startendpoints@command#1{%
+ \edef#1{%
+ \noexpand\path
+ (\pgfplots@currentplot@firstcoord@x,\pgfplots@currentplot@firstcoord@y) coordinate (current plot begin)
+ (\pgfplots@currentplot@lastcoord@x,\pgfplots@currentplot@lastcoord@y) coordinate (current plot end)
+ ;
+ }%
+}%
+
+% INPUT:
+% a sequence of points (SMeE,SMeE) (terminated with ';')
+% where S=sign, M=mantisse, E = exponent.
+% Such input is generated in the case pgfplots@apply@datatrafotrue
+% by the coordinate filters.
+% OUTPUT:
+% proper sequence of fixed point coordinates which are the result of the
+% data scaling transformation (\pgfplots@datascaletrafo@x).
+%
+% The output will be written into the macro #3
+\long\def\pgfplots@coord@stream@finalize@storedcoords@START plot coordinates #1#2;\to#3{%
+ \pgfplots@coord@stream@finalize@storedcoords@START@ plot coordinates {#1}#2;\to#3
+ \ifpgfplots@errorbars@enabled
+ \pgfplots@errorbars@finishwithstyleoptions[current plot style]{\pgfplots@recordederrorbar}%
+ \fi
+ \pgfplots@addplot@get@named@startendpoints@command\pgfplots@TMP
+ \pgfplots@TMP
+}%
+\long\def\pgfplots@coord@stream@finalize@storedcoords@START@ plot coordinates #1#2;\to#3{%
+ \ifpgfplots@stackedmode
+ \pgfplots@stacked@beginplot
+ \fi
+ \pgfplots@coord@stream@INIT@finalize@storedcoords#3
+ \ifpgfplots@errorbars@enabled
+ \pgfplots@streamerrorbar@recordto{\pgfplots@recordederrorbar}%
+ \pgfplots@streamerrorbarstart
+ \fi
+ \pgfplots@coord@stream@foreach{#1}%
+ \ifpgfplots@stackedmode
+ \pgfplots@stacked@endplot
+ \fi
+ \pgfplots@toka=\expandafter{#3}%
+ \pgfplotslist@TOK@a={#2}%
+ \edef#3{plot coordinates {\the\pgfplots@toka}\the\pgfplotslist@TOK@a;}%
+ \ifpgfplots@errorbars@enabled
+ \pgfplots@streamerrorbarend
+ \fi
+}%
+
+% does the same job, but it does not execute any drawing commands.
+%
+% Instead, it generates a macro #4 which - if used as "precommand"
+% befor a draw operation - restores all required options and performs
+% pre-drawing.
+\long\def\pgfplots@coord@stream@finalize@storedcoords@START@dryrun plot coordinates #1#2;\to#3#4{%
+ \pgfplots@coord@stream@finalize@storedcoords@START@ plot coordinates {#1}#2;\to#3
+ \ifpgfplots@stackedmode
+ \pgfplots@stacked@savestateto\pgfplots@TMP
+ \pgfplotslist@TOK@a=\expandafter{\pgfplots@TMP}%
+ \else
+ \pgfplotslist@TOK@a={}%
+ \fi
+ \pgfplots@addplot@get@named@startendpoints@command\pgfplots@TMP
+ \pgfplots@toka=\expandafter{\pgfplots@TMP}%
+ \ifpgfplots@errorbars@enabled
+ \pgfplotslist@TOK@b=\expandafter{\pgfplots@recordederrorbar}%
+ \edef#4{%
+ \the\pgfplots@toka
+ \the\pgfplotslist@TOK@a
+ \noexpand\pgfplots@errorbars@finishwithstyleoptions[current plot style]{\the\pgfplotslist@TOK@b}%
+ }%
+ \else
+ \edef#4{%
+ \the\pgfplots@toka
+ \the\pgfplotslist@TOK@a
+ }%
+ \fi
+}%
+
+% A looping command to loop through plot coordinates.
+% For every point, #1{X}{Y} will be invoked.
+%
+% No scoping is used during this operation, so you can access outer
+% variables.
+\long\def\pgfplots@foreach@plot@coord@do#1\for plot coordinates #2;\pgfplots@EOI{%
+ \def\pgfplots@foreach@plot@coord@do@CMD{#1}%
+ \pgfplots@foreach@plot@coord@ITERATE#2\pgfplots@EOI%
+}
+
+\def\pgfplots@foreach@plot@coord@ITERATE{%
+ \pgfutil@ifnextchar\pgfplots@EOI{%
+ \pgfplots@foreach@plot@coord@FINISH%
+ }{%
+ \pgfplots@foreach@plot@coord@NEXT%
+ }%
+}
+
+\def\pgfplots@foreach@plot@coord@NEXT(#1,#2){%
+ \pgfutil@ifnextchar+{%
+ \pgfplots@foreach@plot@coord@NEXT@WITH@ERRORRANGE{#1}{#2}%
+ }{%
+ \pgfplots@foreach@plot@coord@do@CMD{#1}{#2}{}{}%
+ \pgfplots@foreach@plot@coord@ITERATE
+ }%
+}
+
+% processing something like '(x,y) +- (error_x,error_y)'
+\def\pgfplots@foreach@plot@coord@NEXT@WITH@ERRORRANGE#1#2+-#3({%
+ \pgfplots@foreach@plot@coord@NEXT@WITH@ERRORRANGE@{#1}{#2}%
+}
+\def\pgfplots@foreach@plot@coord@NEXT@WITH@ERRORRANGE@#1#2#3,#4){%
+ \pgfplots@foreach@plot@coord@do@CMD{#1}{#2}{#3}{#4}%
+ \pgfplots@foreach@plot@coord@ITERATE
+}
+
+\def\pgfplots@foreach@plot@coord@FINISH\pgfplots@EOI{}
+
+
+% for use in \ifx:
+\def\pgfplots@EOI{\pgfplots@EOI}%
+
+% #1= x coord
+% #2= y coord
+% #3= error for x coord (or empty)
+% #4= error for y coord (or empty)
+\def\pgfplots@apply@data@scaletrafo@to@one@point#1#2#3#4{%
+ \ifpgfplots@apply@datatrafo@x
+ \pgfplots@datascaletrafo@x{#1}%
+ \let\pgfplots@current@point@x=\pgfmathresult
+ \else
+ \def\pgfplots@current@point@x{#1}%
+ \fi
+ \ifpgfplots@apply@datatrafo@y
+ \pgfplots@datascaletrafo@y{#2}%
+ \let\pgfplots@current@point@y=\pgfmathresult
+ \else
+ \def\pgfplots@current@point@y{#2}%
+ \fi
+ \ifpgfplots@stackedmode
+ % all these calls work with pgfmath; no more floating point
+ % arithmetics are applied.
+ \pgfplots@stacked@getnextzerolevelpoint
+ \pgfplots@stacked@finishpoint{\pgfplots@current@point@x}{\pgfplots@current@point@y}%
+ \pgfplots@stacked@rememberzerolevelpoint@for@next@plot{(\pgfplots@current@point@x,\pgfplots@current@point@y)}%
+ \fi
+ \pgfplots@toka=\expandafter{\pgfplots@data@scaletrafo@result}%
+ \edef\pgfplots@data@scaletrafo@result{\the\pgfplots@toka(\pgfplots@current@point@x,\pgfplots@current@point@y)}%
+}
+
+% This thing here shall draw all error bar commands listed in '#2'.
+%
+% It will be invoked when any plotting commands take effect (that
+% means all limits are computed; the axis has been drawn,
+% transformations are set up...)
+\def\pgfplots@errorbars@finishwithstyleoptions[#1]#2{%
+ \scope[%/pgfplots/search path for tikz/.cd,
+ #1,/pgfplots/every error bar]%
+ #2%
+ \endscope
+}
+
+\def\pgfplots@errorbar@draw@float(#1,#2)(#3,#4){%
+ \ifpgfplots@apply@datatrafo@x
+ \pgfplots@datascaletrafo@x{#1}%
+ \let\pgfplots@xarg=\pgfmathresult%
+ \pgfplots@datascaletrafo@x{#3}%
+ \let\pgfplots@error@xarg=\pgfmathresult%
+ \else
+ \def\pgfplots@xarg{#1}%
+ \def\pgfplots@error@xarg{#3}%
+ \fi
+ \ifpgfplots@apply@datatrafo@y
+ \pgfplots@datascaletrafo@y{#2}%
+ \let\pgfplots@yarg=\pgfmathresult%
+ \pgfplots@datascaletrafo@y{#4}%
+ \let\pgfplots@error@yarg=\pgfmathresult%
+ \else
+ \def\pgfplots@yarg{#2}%
+ \def\pgfplots@error@yarg{#4}%
+ \fi
+ \edef\pgfplots@TMP{{(\pgfplots@xarg,\pgfplots@yarg)}{(\pgfplots@error@xarg,\pgfplots@error@yarg)}}%
+ \def\pgfplots@TMPB{\pgfkeysvalueof{/pgfplots/error bars/draw error bar/.@cmd}}%
+ \expandafter\pgfplots@TMPB\pgfplots@TMP\pgfeov
+}
+
+\def\pgfplots@errorbar@draw#1#2{%
+ \begingroup
+ \ifpgfplots@apply@datatrafo
+ \pgfplots@errorbar@draw@float#1#2
+ \else
+ \pgfkeysvalueof{/pgfplots/error bars/draw error bar/.@cmd}{#1}{#2}\pgfeov%
+ \fi
+ \endgroup
+}%
+
+% Also provides UNFILTERED arguments x (#5) and y (#6). These are use
+% in case of logplots, because we may need to compute log( x + e_x )
+% or log( y + e_y ).
+\def\pgfplots@process@errorbar@for#1#2#3#4#5#6{%
+% \begingroup
+ \edef\pgfplots@xarg{#1}%
+ \edef\pgfplots@yarg{#2}%
+ \def\pgfplots@xarg@unfiltered{#5}%
+ \def\pgfplots@yarg@unfiltered{#6}%
+ \edef\pgfplots@error@xarg{#3}%
+ \edef\pgfplots@error@yarg{#4}%
+ \def\pgfplots@TMP{0}%
+ \ifx\pgfplots@TMP\pgfplots@error@xarg
+ \let\pgfplots@error@xarg=\pgfutil@empty
+ \fi
+ \ifx\pgfplots@TMP\pgfplots@error@yarg
+ \let\pgfplots@error@yarg=\pgfutil@empty
+ \fi
+ % FIXME : INEFFICIENT! This code here does every computation
+ % multiple times!
+ \ifcase\pgfplots@errorbars@xdirection
+ \or
+ \pgfplots@process@errorbar@@for{x}{+}1%
+ \or
+ \pgfplots@process@errorbar@@for{x}{-}2%
+ \or
+ \pgfplots@process@errorbar@@for{x}{+}1%
+ \pgfplots@process@errorbar@@for{x}{-}2%
+ \fi
+ \ifcase\pgfplots@errorbars@ydirection
+ \or
+ \pgfplots@process@errorbar@@for{y}{+}1%
+ \or
+ \pgfplots@process@errorbar@@for{y}{-}2%
+ \or
+ \pgfplots@process@errorbar@@for{y}{+}1%
+ \pgfplots@process@errorbar@@for{y}{-}2%
+ \fi
+% \endgroup
+}
+
+% #1: either 'x' or 'y'
+% #2: either '+' or '-'
+% #3: an integer representing the argument #2. It is '1' if #2='+'
+% and '2' is #2 = '-'.
+\def\pgfplots@process@errorbar@@for#1#2#3{%
+ \expandafter\let\expandafter\ifpgfplots@is@datascaled\csname ifpgfplots@float@numerics@mode@#1\endcsname
+ \csname ifpgfplots@#1islinear\endcsname
+ \edef\pgfplots@error@src{\csname pgfplots@#1arg\endcsname}%
+ \ifcase\csname pgfplots@errorbars@#1mode\endcsname
+ % fixed absolute error.
+ \ifpgfplots@is@datascaled
+ \edef\pgfplots@error@coord{\csname pgfplots@errorbars@#1fixed\endcsname}%
+ \pgfmathfloatparsenumber{\pgfplots@error@coord}%
+ \let\pgfplots@error@coord=\pgfmathresult
+ \ifnum#3=1
+ \pgfmathfloatadd@{\pgfplots@error@src}{\pgfplots@error@coord}%
+ \else
+ \pgfmathfloatsubtract@{\pgfplots@error@src}{\pgfplots@error@coord}%
+ \fi
+ \else
+ \edef\pgfplots@error@coord{\csname pgfplots@errorbars@#1fixed\endcsname}%
+ \pgfmathparse{\pgfplots@error@src#2 \pgfplots@error@coord}%
+ \fi
+ \let\pgfplots@error@coord=\pgfmathresult
+ \or% fixed relative error:
+ \ifpgfplots@is@datascaled
+ \pgfmathparse{(1#2\csname pgfplots@errorbars@#1rel\endcsname)}%
+ \let\pgfplots@error@coord=\pgfmathresult
+ \pgfmathfloatmultiplyfixed@{\pgfplots@error@src}{\pgfplots@error@coord}%
+ \else
+ \pgfmathparse{\pgfplots@error@src*(1#2\csname pgfplots@errorbars@#1rel\endcsname)}%
+ \fi
+ \let\pgfplots@error@coord=\pgfmathresult
+ \or% explicit absolute:
+ \edef\pgfplots@error@coord{\csname pgfplots@error@#1arg\endcsname}%
+ \ifx\pgfplots@error@coord\pgfutil@empty
+ \else
+ \ifpgfplots@is@datascaled
+ \pgfmathfloatparsenumber{\pgfplots@error@coord}%
+ \let\pgfplots@error@coord=\pgfmathresult
+ \ifnum#3=1
+ \pgfmathfloatadd@{\pgfplots@error@src}{\pgfplots@error@coord}%
+ \else
+ \pgfmathfloatsubtract@{\pgfplots@error@src}{\pgfplots@error@coord}%
+ \fi
+ \else
+ \pgfmathparse{\pgfplots@error@src#2 \pgfplots@error@coord}%
+ \fi
+ \let\pgfplots@error@coord=\pgfmathresult
+ \fi
+ \or% explicit relative:
+ \edef\pgfplots@error@coord{\csname pgfplots@error@#1arg\endcsname}%
+ \ifx\pgfplots@error@coord\pgfutil@empty
+ \else
+ \ifpgfplots@is@datascaled
+ \pgfmathparse{(1#2\pgfplots@error@coord)}%
+ \let\pgfplots@error@coord=\pgfmathresult
+ \pgfmathfloatmultiplyfixed@{\pgfplots@error@src}{\pgfplots@error@coord}%
+ \else
+ \pgfmathparse{\pgfplots@error@src*(1#2\pgfplots@error@coord)}%
+ \fi
+ \let\pgfplots@error@coord=\pgfmathresult
+ \fi
+ \fi
+ \else
+ % LOGARITHMIC scaling. All errors are interpreted as
+ % log(x +- e_x)
+ % or
+ % log( x*(1+-e_x) )
+ \ifcase\csname pgfplots@errorbars@#1mode\endcsname
+ % fixed absolute, log( x +- e_x )
+ \edef\pgfplots@error@src{\csname pgfplots@#1arg@unfiltered\endcsname}%
+ \edef\pgfplots@error@coord{\csname pgfplots@errorbars@#1fixed\endcsname}%
+ \pgfmathfloatparsenumber{\pgfplots@error@coord}%
+ \let\pgfplots@error@coord=\pgfmathresult
+ \pgfmathfloatparsenumber{\pgfplots@error@src}%
+ \let\pgfplots@error@src=\pgfmathresult
+ \ifnum#3=1
+ \pgfmathfloatadd@{\pgfplots@error@src}{\pgfplots@error@coord}%
+ \else
+ \pgfmathfloatsubtract@{\pgfplots@error@src}{\pgfplots@error@coord}%
+ \fi
+ \pgfmathlog@float{\pgfmathresult}%
+ \let\pgfplots@error@coord=\pgfmathresult
+ \or% fixed relative, log( x ( 1+-e_x ) ) = log(x) + log(1+-e_x)
+ \edef\pgfplots@error@src{\csname pgfplots@#1arg\endcsname}%
+ \pgfmathparse{\pgfplots@error@src + ln(1#2\csname pgfplots@errorbars@#1rel\endcsname)}%
+ \let\pgfplots@error@coord=\pgfmathresult%
+ \or% explicit absolute
+ \edef\pgfplots@error@src{\csname pgfplots@#1arg@unfiltered\endcsname}%
+ \edef\pgfplots@error@coord{\csname pgfplots@error@#1arg\endcsname}%
+ \ifx\pgfplots@error@coord\pgfutil@empty
+ \else
+ \pgfmathfloatparsenumber{\pgfplots@error@coord}%
+ \let\pgfplots@error@coord=\pgfmathresult
+ \pgfmathfloatparsenumber{\pgfplots@error@src}%
+ \let\pgfplots@error@src=\pgfmathresult
+ \ifnum#3=1
+ \pgfmathfloatadd@{\pgfplots@error@src}{\pgfplots@error@coord}%
+ \else
+ \pgfmathfloatsubtract@{\pgfplots@error@src}{\pgfplots@error@coord}%
+ \fi
+ \pgfmathlog@float{\pgfmathresult}%
+ \let\pgfplots@error@coord=\pgfmathresult
+ \fi
+ \or% explicit relative:
+ \edef\pgfplots@error@src{\csname pgfplots@#1arg\endcsname}%
+ \edef\pgfplots@error@coord{\csname pgfplots@error@#1arg\endcsname}%
+ \ifx\pgfplots@error@coord\pgfutil@empty
+ \else
+ \pgfmathparse{\pgfplots@error@src + ln(1#2 \pgfplots@error@coord)}%
+ \let\pgfplots@error@coord=\pgfmathresult%
+ \fi
+ \fi
+ \fi
+ \ifx\pgfplots@error@coord\pgfutil@empty
+ \else
+ \def\pgfplots@TMP{#1}%
+ \def\pgfplots@TMPB{x}%
+ \ifx\pgfplots@TMP\pgfplots@TMPB
+ \ifpgfplots@autocomputelimits
+ \pgfplots@update@limits@for@one@point{\pgfplots@error@coord}{\pgfplots@yarg}{}{}%
+ \fi
+ \edef\pgfplots@TMP{%
+ {(\pgfplots@xarg,\pgfplots@yarg)}%
+ {(\pgfplots@error@coord,\pgfplots@yarg)}%
+ }%
+ \else
+ \ifpgfplots@autocomputelimits
+ \pgfplots@update@limits@for@one@point{\pgfplots@xarg}{\pgfplots@error@coord}{}{}%
+ \fi
+ \edef\pgfplots@TMP{%
+ {(\pgfplots@xarg,\pgfplots@yarg)}%
+ {(\pgfplots@xarg,\pgfplots@error@coord)}%
+ }%
+ \fi
+ \expandafter\pgfplots@streamerrorbarcoords\pgfplots@TMP
+ \fi
+}
+
+\long\def\pgfplots@path#1;{%
+ \pgfplots@path@enqueue{#1;}%
+}
+
+% This thing here shall be used to replace any '\path' where \axispath
+% shall be used.
+\long\def\pgfplots@replacement@for@tikz@path#1;{%
+ \axispath\path#1;%
+}
+
+
+% Will be available as \closedcycle command inside of an axis.
+%
+% It closes the current plot by drawing lines to the last "zero
+% level".
+%
+% That means the current plot is connected orthogonally with the
+% x-axis, allowing fill commands.
+%
+% For stacked plots, \closedcycle is special (it connects with the
+% previous \addplot command).
+%
+% Example:
+% \addplot coordinates {(3,0.5) (4,2) (5,1)} \closedcycle;
+\def\pgfplots@path@closed@cycle{%
+ \ifpgfplots@stackedmode
+ \pgfplots@stacked@path@closed@cycle
+ \else
+ \pgfplots@path@closed@cycle@std
+ \fi
+}
+\def\pgfplots@path@closed@cycle@std{%
+ |- (perpendicular cs:
+ vertical line through={(current plot begin)},
+ horizontal line through={(\pgfplots@ZERO@x,\pgfplots@ZERO@y)})
+ -- cycle
+}%
+
+% Remembers the plotting command #2 and '#3=plot coordinates {...} ...';
+% for later postprocessing of the coordinates.
+%
+% #1: commands which should be executed before issueing the plotting
+% command #2 #3.
+% #2:
+% the command which is responsable for drawing.
+% - If #2 is NOT '\pgfutil@empty', we expect #3 to contain only
+% EXPANDABLE DATA.
+% That's important for postponed floating point arithmetics in #3.
+% - If #2='\pgfutil@empty', we don't make any assumption about #3
+% and process it as-is.
+%
+% #3: see above.
+%
+% #4: commands which should be executed after '#2 #3'.
+%
+\long\def\pgfplots@path@enqueue@coords#1#2#3#4{%
+ \ifpgfplots@draw@at@end
+ \begingroup
+ \globaldefs=1
+ \pgfplotslistpushback{#1}{#2}{#3}{#4}\to\pgfplots@stored@plotlist
+ \endgroup
+ \else
+ \begingroup
+ #1#2#3#4%
+ \endgroup
+ \fi
+}
+
+% The same as \pgfplots@path@enqueue@coords, but this here also stores
+% \pgfplots@addplot@nonlegend@options
+\long\def\pgfplots@addplot@enqueue@coords#1#2#3#4{%
+ \ifpgfplots@draw@at@end
+ \ifx\pgfplots@addplot@nonlegend@options\pgfutil@empty
+ \pgfplots@path@enqueue@coords{#1}{#2}{#3}{#4}%
+ \else
+ \expandafter
+ \pgfplots@path@enqueue@coords
+ \expandafter{%
+ \expandafter\tikzset\expandafter{\pgfplots@addplot@nonlegend@options}%
+ #1}{#2}{#3}{#4}%
+ \fi
+ \else
+ \pgfplots@path@enqueue@coords{#1}{#2}{#3}{#4}%
+ \fi
+}
+
+
+% Remembers the plotting command #1.
+\long\def\pgfplots@path@enqueue#1{%
+ \pgfplots@path@enqueue@coords{}{}{#1}{}%
+}
+
+
+% Assigns a legend.
+% Syntax:
+% \legend{entry 1\\entry2\\entry3}
+\def\pgfplots@command@legend{
+ \pgfutil@ifnextchar[{%
+ \pgfplots@error{Sorry, legend options are now deprecated. Legends are now TikZ-matrizes which provide better alignment and can be placed horizontally. See the manual for details.}%
+ }{%
+ \pgfplots@command@legend@impl
+ }%
+}
+
+\def\pgfplots@command@legend@impl#1{%
+ \pgfplots@assign@list\pgfplots@TMPC{#1}%
+ \global\let\pgfplots@legend=\pgfplots@TMPC
+}
+
+
+\def\pgfplots@addlegendentry{%
+ \pgfutil@ifnextchar[{%
+ \pgfplots@addlegendentry@opts
+ }{%
+ \pgfplots@addlegendentry@opts[]%
+ }%
+}
+\def\pgfplots@addlegendentry@opts[#1]#2{%
+ {%
+ \globaldefs=1% this will ONLY store the options and the legend into global variables
+ \pgfplotslistpushback[#1]#2\to\pgfplots@legend
+ }%
+}
+
+\def\pgfplots@pop@next@legend{{%
+ \globaldefs=1
+ \pgfplotslistcheckempty\pgfplots@plotspeclist
+ \ifpgfplotslistempty
+ \let\pgfplots@curplotlist=\pgfutil@empty
+ \else
+ \pgfplotslistpopfront\pgfplots@plotspeclist\to\pgfplots@curplotlist
+ \fi
+ %
+ \pgfplotslistcheckempty\pgfplots@legend
+ \ifpgfplotslistempty
+ \let\pgfplots@curlegend=\pgfutil@empty
+ \else
+ \pgfplotslistpopfront\pgfplots@legend\to\pgfplots@curlegend
+ \fi
+ \advance\pgfplots@numplots by-1
+}}
+
+% This routine is called at the begin of every plot.
+% It initialised a zero level stream.
+%
+% The default is to use '0' as zero level streams.
+%
+% This method is called as "precommand"; before any Tikz drawing
+% commands have been started.
+\def\pgfplots@initzerolevelhandler{%
+ \ifpgfplots@stackedmode
+ % ATTENTION: this thing here says:
+ % "draw zero level coordinates from list XYZ."
+ % But at the time of this initialisation, the list will be EMPTY!
+ %
+ % It will be filled later. That's ok, because
+ % \pgfplots@initzerolevelhandler will be
+ % used as 'precommand', that means before Tikz sees any
+ % coordinates.
+ \pgfplots@stacked@initzerolevelhandler
+ \else
+ \pgfplotxzerolevelstreamconstant{\pgfplots@ZERO@x}%
+ \pgfplotyzerolevelstreamconstant{\pgfplots@ZERO@y}%
+ \fi
+}
+
+\def\pgfplots@try@mirror@plot@handler{%
+ \pgfutil@ifundefined{tikz@plot@handler}{}{%
+ \ifx\tikz@plot@handler\pgfplothandlerconstantlineto
+ \let\tikz@plot@handler=\pgfplothandlerconstantlinetomarkright
+ \else
+ \ifx\tikz@plot@handler\pgfplothandlerconstantlinetomarkright
+ \let\tikz@plot@handler=\pgfplothandlerconstantlineto
+ \fi
+ \fi
+ }%
+}
+
+\long\def\pgfplots@show@small@legendplots#1#2{
+ \begingroup
+ \def\pgfplots@TMPB{#1}%
+ \ifx\pgfplots@TMPB\pgfutil@empty
+ \else
+ \pgfqkeys{/pgfplots/search path for tikz}{#1}%
+ \fi
+ \pgfkeysvalueof{/pgfplots/legend image code/.@cmd}#2\pgfeov
+ \endgroup
+}
+
+\def\pgfplots@split@opts{%
+ \pgfutil@ifnextchar[{%
+ \pgfplots@split@opts@opts
+ }{%
+ \pgfplots@split@opts@opts[]%
+ }%
+}
+\def\pgfplots@split@opts@opts[#1]#2\pgfplots@result@to#3#4{%
+ \def#3{#2}%
+ \def#4{#1}%
+}
+
+% Typesets a legend node.
+%
+% It will either typeset a previously computed legend (which needs to be
+% stored in the macro \pgfplots@already@computed@legend@node)
+%
+% or it creates a legend, stores the commands into the macro named
+% above and typesets it.
+\def\pgfplots@createlegend{%
+ \ifx\pgfplots@already@computed@legend@node\pgfutil@empty
+ \pgfplotslistcheckempty\pgfplots@legend
+ \ifpgfplotslistempty
+ \else
+ %
+ %
+ \begingroup
+ % assemble a
+ % \matrix {
+ % small plot & legend1\\
+ % small plot & legend2\\
+ % ...
+ % };
+ % command [and using the 'legend columns' option]
+ %
+ % \pgfplotslist@TOK@a={
+ % small plot & legend1\\
+ % small plot & legend2\\
+ % ...
+ % }
+ % ( I have allocated the token registers in my
+ % liststructure.sty)
+ %
+ % \global\def\pgfplots@TMP{
+ % \matrix {
+ % \TOKL@TA
+ % };
+ % }
+ % -> finally, \pgfplots@TMP will contain the complete command.
+ \pgfplotslist@TOK@a={}%
+ \let\curcolumnNum=\c@pgf@counta
+ \let\maxcolumnCount=\c@pgf@countb
+ \let\legendplotpos=\c@pgf@countc
+ \legendplotpos\expandafter=\pgfplots@legend@plot@pos
+ \curcolumnNum=0
+ \maxcolumnCount=\pgfplots@legend@columns\relax
+ %
+ \loop
+ \ifnum0<\pgfplots@numplots\relax
+ \pgfplots@pop@next@legend
+ \ifx\pgfplots@curlegend\pgfutil@empty
+ \else
+ \advance\curcolumnNum by1
+ \begingroup
+ \expandafter\pgfplots@split@opts\pgfplots@curlegend\pgfplots@result@to{\pgfplots@curlegend}{\pgfplots@curlegend@opts}%
+ \ifcase\legendplotpos
+ % legend plot pos=left
+ \pgfplotslist@TOK@b=\expandafter{%
+ \expandafter\pgfplots@show@small@legendplots
+ \expandafter{\pgfplots@curlegend@opts}}%
+ \pgfplotslist@TOK@b=\expandafter\expandafter\expandafter{\expandafter\the\expandafter\pgfplotslist@TOK@b\expandafter{\pgfplots@curplotlist}%
+ \pgfmatrixnextcell\node}%
+ \pgfplotslist@TOK@b=\expandafter\expandafter\expandafter{%
+ \expandafter\the\expandafter\pgfplotslist@TOK@b
+ \expandafter{\pgfplots@curlegend};}%
+ \or
+ % legend plot pos=right
+ \pgfplotslist@TOK@b=\expandafter{%
+ \expandafter\node
+ \expandafter{\pgfplots@curlegend};%
+ \pgfmatrixnextcell
+ \pgfplots@show@small@legendplots}%
+ \pgfplotslist@TOK@b=\expandafter\expandafter\expandafter{\expandafter\the\expandafter\pgfplotslist@TOK@b\expandafter{\pgfplots@curlegend@opts}}%
+ \pgfplotslist@TOK@b=\expandafter\expandafter\expandafter{\expandafter\the\expandafter\pgfplotslist@TOK@b\expandafter{\pgfplots@curplotlist}}%
+ \or
+ % legend plot pos=none
+ \pgfplotslist@TOK@b=\expandafter{\expandafter\node\expandafter{\pgfplots@curlegend};}%
+ \fi
+ \ifnum\curcolumnNum=\maxcolumnCount
+ \pgfplotslist@TOK@b=\expandafter{\the\pgfplotslist@TOK@b\\}%
+ \else
+ \ifnum\pgfplots@numplots=0
+ \pgfplotslist@TOK@b=\expandafter{\the\pgfplotslist@TOK@b\\}%
+ \else
+ \pgfplotslist@TOK@b=\expandafter{\the\pgfplotslist@TOK@b\pgfmatrixnextcell}%
+ \fi
+ \fi
+ \xdef\pgfplots@TMP{%
+ \the\pgfplotslist@TOK@a
+ \the\pgfplotslist@TOK@b
+ }%
+ \endgroup
+ \ifnum\curcolumnNum=\maxcolumnCount
+ \curcolumnNum=0
+ \fi
+ \expandafter\pgfplotslist@TOK@a\expandafter{\pgfplots@TMP}%
+ \fi
+ \repeat
+ \pgfplotslist@TOK@b={\matrix[/pgfplots/every axis legend]}%
+ \xdef\pgfplots@TMP{%
+ \noexpand\def\noexpand\plotnum{0}%
+ \the\pgfplotslist@TOK@b {%
+ \the\pgfplotslist@TOK@a
+ };%
+ }%
+ \endgroup
+ \let\pgfplots@already@computed@legend@node=\pgfplots@TMP
+ \fi
+ \fi
+%\pgfplots@message{Vor legende: \meaning\pgfplots@already@computed@legend@node}%
+ \pgfplots@already@computed@legend@node
+}
+
+\newif\ifpgfplots@checkuniform@isfirst
+% Checks whether the argument to xtick or ytick is a UNIFORM tick
+% sequence.
+%
+% A uniform tick sequence is 0,...,10 and 3,4,5 and -5,-4,-2 but
+% NOT 0,2,4 or 4,10.
+%
+% Furthermore, any NON-integer tick arguments are also assumed to be
+% NOT uniform.
+%
+% INPUT:
+% #1: a tick argument (i.e. something which can be put to
+% \foreach \x in {#1})
+%
+% OUTPUT:
+% \pgfplots@isuniformticktrue
+% or
+% \pgfplots@isuniformtickfalse
+% depending on the check.
+% This variable will be set globally.
+\def\pgfplots@checkisuniformLOGtick#1{%
+ \begingroup
+ \global\pgfplots@isuniformticktrue
+ \pgfplots@checkuniform@isfirsttrue
+ \foreach \x in {#1}{%
+ \pgfmathmultiply@\x\reciproclogten
+ \let\cur=\pgfmathresult
+ % check whether
+ % \cur - last == 1 (last = \pgfplots@TMPB)
+ \ifpgfplots@checkuniform@isfirst
+ \global\pgfplots@checkuniform@isfirstfalse
+ \else
+ \pgfmathsubtract@\cur\pgfplots@TMPB%
+ \pgfmathapproxequalto@\pgfmathresult{1.0}%
+ \ifpgfmathcomparison
+ \else
+ \global\pgfplots@isuniformtickfalse
+ \breakforeach
+ \fi
+ \fi
+ \global\let\pgfplots@TMPB=\cur
+ }%
+ \endgroup
+}
+
+% Checks whether the linear tick sequence #1 is a uniform tick.
+%
+% It also assigns pgfplots@tick@distance@#1 as the distance.
+%
+% see \pgfplots@checkisuniformLOGtick for details.
+\def\pgfplots@checkisuniformLINEARtick#1{%
+ \begingroup
+ \global\pgfplots@isuniformticktrue
+ \pgfplots@checkuniform@isfirsttrue
+ \global\let\pgfplots@TMPB=\pgfutil@empty
+ \global\let\pgfplots@TMP=\relax
+ \foreach \x in {#1}{%
+ \ifx\pgfplots@TMPB\pgfutil@empty
+ \else
+ \pgfmathsubtract@\x\pgfplots@TMPB
+ \ifpgfplots@checkuniform@isfirst
+ % remember first distance h = x_1 - x_0
+ \global\let\pgfplots@TMP=\pgfmathresult
+ \global\pgfplots@checkuniform@isfirstfalse
+ \else
+ % check whether x_i - x_{i-1} = h
+ \pgfmathapproxequalto@\pgfmathresult\pgfplots@TMP%
+ \ifpgfmathcomparison
+ \else
+ \global\pgfplots@isuniformtickfalse
+ \breakforeach
+ \fi
+ \fi
+ \fi
+ \global\let\pgfplots@TMPB=\x%
+ }%
+ \endgroup
+ \expandafter\let\csname pgfplots@tick@distance@#1\endcsname=\pgfplots@TMP
+}
+
+\def\skipsuffixzero#1.#2|{
+ {%
+ \def\pgfplots@TMP{#2}%
+ \def\pgfplots@TMPB{0}%
+ \ifx\pgfplots@TMP\pgfplots@TMPB
+ \global\def\pgfmathresult{#1}%
+ \else
+ \global\def\pgfmathresult{#1.#2}%
+ \fi
+ }%
+}
+
+\def\pgfmathlogtologten#1{%
+ \pgfmathparse{#1}%
+ \expandafter\pgfmathlogtologten@\expandafter{\pgfmathresult}%
+}
+
+% Simply divides #1 by log(10).
+\def\pgfmathlogtologten@#1{%
+ \pgfmathmultiply@{#1}\reciproclogten%
+}%
+
+% DEPRECATED.
+\def\logtologtentomacro#1#2{%
+ \pgfmathmultiply@{#1}\reciproclogten%
+ \expandafter\skipsuffixzero\pgfmathresult|%
+ \let#2=\pgfmathresult
+}
+
+% DEPRECATED.
+\def\logtologten#1{%
+ \pgfmathmultiply@{#1}\reciproclogten%
+ \expandafter\skipsuffixzero\pgfmathresult|%
+ \pgfmathresult
+}
+
+% helper method which computes log10*\x foreach \x in {#1}.
+% The result will be \xdef'ed into #2.
+\def\pgfplots@compute@tick@times@logten#1\to#2{%
+ \global\let#2=\pgfutil@empty
+ \foreach \pgfplots@TMPB in {#1} {%
+ \pgfmathmultiply@\pgfplots@TMPB\logten%
+ \ifx#2\pgfutil@empty
+ \xdef#2{\pgfmathresult}%
+ \else
+ \xdef#2{#2,\pgfmathresult}%
+ \fi
+ }%
+}
+
+\def\pgfplots@init@enlarge@limit@booleans{%
+ \pgfplots@enlargelimits@autofalse
+ \pgfplots@enlargelimitsfalse
+ \pgfplots@enlargelimits@rel@threshfalse
+ \edef\pgfplots@TMP{\pgfplots@enlargelimits}%
+ %
+ \def\pgfplots@TMPB{true}%
+ \ifx\pgfplots@TMP\pgfplots@TMPB
+ \pgfplots@enlargelimitstrue
+ \else
+ \def\pgfplots@TMPB{false}%
+ \ifx\pgfplots@TMP\pgfplots@TMPB
+ \else
+ \def\pgfplots@TMPB{auto}%
+ \ifx\pgfplots@TMP\pgfplots@TMPB
+ \pgfplots@enlargelimits@autotrue
+ \else
+ \begingroup
+ % try to read it as number:
+ \expandafter\pgf@xa\pgfplots@enlargelimits pt\relax
+ \endgroup
+ \pgfplots@enlargelimitstrue
+ \pgfplots@enlargelimits@rel@threshtrue
+ \fi
+ \fi
+ \fi
+}
+
+\def\pgfplots@enlarge@limit@for#1{%
+ \begingroup
+ \expandafter\let\expandafter\min\expandafter=\csname pgfplots@#1min\endcsname
+ \expandafter\let\expandafter\max\expandafter=\csname pgfplots@#1max\endcsname
+ \ifpgfplots@enlargelimits@rel@thresh
+ \edef\enlargepercent{\pgfplots@enlargelimits}%
+ \else
+ \def\enlargepercent{0.1}% FIXME : pack 10% as default into option 'enlargelimits' or so
+ \fi
+ \pgfmathsubtract@\max\min%
+ \pgf@xa\pgfmathresult pt
+ \pgf@xb\enlargepercent\pgf@xa
+ \ifdim\pgf@xb>0.001pt
+ % the case with
+ % enlargeabsolute ~= 0
+ % means that \min ~= \max.
+ % It is handled in another method.
+ \edef\enlargeabsolute{\pgf@sys@tonumber{\pgf@xb}}%
+ %
+ % compute xmin := xmin - enlargeabsolute
+ \pgfmathsubtract@\min\enlargeabsolute%
+ \let\min=\pgfmathresult
+ \pgfmathadd@\max\enlargeabsolute%
+ \let\max=\pgfmathresult
+ \fi
+ \xdef\pgfplots@TMP{\min}%
+ \xdef\pgfplots@TMPB{\max}%
+ \endgroup
+ \expandafter\global\expandafter\let\csname pgfplots@#1min\endcsname=\pgfplots@TMP
+ \expandafter\global\expandafter\let\csname pgfplots@#1max\endcsname=\pgfplots@TMPB
+}
+
+% Computes tick positions using the current axis limits.
+%
+% Parameters:
+% /pgfplots/max space between ticks
+% Determines the maximum space which is not filled by at least one
+% tick label (approximate, there is some rounding internally)
+% /pgfplots/try min ticks
+% see manual
+%
+% Idea:
+% We want ticks at each
+% { i*H, i in \Z }.
+% Of course, there shouldn't be TOO MUCH ticks.
+%
+% Our heuristics is to set
+% desirednumticks = round(ACTUAL WIDTH / (max space between ticks) )
+% and generate H = (axis range) / (desirednumticks).
+%
+% Since not all step sizes H look well, restrict H to a set of allowed
+% step sizes such as
+% { 1, 1/2, 1/5, 1/10 },
+% or, to be more precise:
+% { 1*10^e, 2*10^e, 5*10^e }
+% -> round to the nearest matching number!
+%
+% For log-plots,
+% H in { j*log(10), j=1,2,3,... }
+% where the usual case should be j = 1.
+%
+% Then, the resulting tick is
+% TICK={MIN,MIN+H,...,MAX}
+% where
+% MIN = I*H
+% is chosen such that
+% axis minimum limit = I*H + rest; |rest| < H.
+%
+% Again, log plots follow a slightly different approach: here,
+% MIN = I * log(10)
+% is chosen such that
+% axis minimum limit = I*log(10) + rest; |rest| < log(10)
+% while H = j*log(10), j>=1.
+%
+%
+% PRECONDITION:
+% - limits are correct
+% - axis width/height is set correctly
+%
+% POSTCONDITION:
+% - Tick for axis #1 is assigned
+% - \ifpgfplots@determinedefaultvalues@needs@check@uniformtick is set
+%
+% REMARKS:
+% - this algorithms works also if the data range has been transformed
+% with a LINEAR transformation.
+% ATTENTION: as of 2008-05-15, the scaling trafo is AFFINE LINEAR.
+% That means we have to eliminate the 'affine' shifting before the
+% algorithms works correctly.
+\def\pgfplots@assign@default@tick@foraxis#1{%
+ \begingroup
+ % Shortcut-names:
+ \expandafter\let\expandafter\ifpgfplots@is@datascaled\csname ifpgfplots@apply@datatrafo@#1\endcsname
+ % Attention here: use UNSHIFTET scalings, see remark above
+ \expandafter\let\expandafter\pgfplots@data@scale@trafo\csname pgfplots@datascaletrafo@#1@noshift\endcsname
+ \expandafter\let\expandafter\pgfplots@data@scale@inverse@trafo\csname pgfplots@inverse@datascaletrafo@#1@noshift\endcsname
+ \expandafter\let\expandafter\ifpgfplots@cur@is@linear\csname ifpgfplots@#1islinear\endcsname
+ %
+ \let\desirednumticks=\c@pgf@countd
+ \let\Wr=\pgf@xc
+ \Wr=\csname pgfplots@#1coordmaxTEX\endcsname
+ \advance\Wr by-\csname pgfplots@#1coordminTEX\endcsname
+ % r = max place without ticks in pt -> choose desirednumticks >= W/r
+ \expandafter\expandafter\divide\Wr\axisdefaulttickwidth
+ \pgfmathsetcount{\desirednumticks}{\Wr}%
+ \advance\desirednumticks by1
+ \csname ifpgfplots@#1islinear\endcsname
+ \expandafter\ifnum\axisdefaulttryminticks>\desirednumticks
+ \expandafter\desirednumticks\axisdefaulttryminticks
+ \fi
+ \else
+ \expandafter\ifnum\pgfplots@default@try@minticks@log>\desirednumticks
+ \expandafter\desirednumticks\pgfplots@default@try@minticks@log\relax
+ \fi
+ \expandafter\ifx\csname pgfplots@#1tickten\endcsname\pgfutil@empty
+ \else
+ % log plot and tickten-option: provide special processing.
+ \edef\pgfplots@TMP{\csname pgfplots@#1tickten\endcsname}%
+ \expandafter\pgfplots@compute@tick@times@logten\pgfplots@TMP\to\pgfplots@TMP
+ \expandafter\let\csname pgfplots@#1tick\endcsname=\pgfplots@TMP
+ \aftergroup\pgfplots@determinedefaultvalues@needs@check@uniformticktrue
+ \fi
+ \fi
+ %
+ \expandafter\ifx\csname pgfplots@#1tick\endcsname\pgfutil@empty
+ % Ok, we have either log or linear axis and need default
+ % ticks MIN,MIN+H,...,MAX.
+ \let\MINH=\pgf@xa
+ \let\H=\pgf@xb
+ \let\MAX=\pgfplots@tmpa
+ \let\MIN=\pgfplots@tmpb
+ % compute step size 'H':
+ \expandafter\MAX\csname pgfplots@#1max\endcsname pt
+ \advance\MAX by0.001pt% avoid round errors
+ %\expandafter\MIN\the\c@pgf@counta pt
+ \expandafter\MIN\csname pgfplots@#1min\endcsname pt
+ \H=\MAX
+ \advance\H by-\MIN
+ \c@pgf@counta=\desirednumticks
+ \advance\c@pgf@counta by-1
+ \divide\H by\c@pgf@counta
+%\message{determining ticks for #1-axis: Wr := (width/max space between ticks) = \the\Wr, desirednumticks=max(\axisdefaulttryminticks, trunc(Wr)) = \the\desirednumticks, H#1=(axis range/(desirednumticks-1)) = \the\H}%
+ %
+ % SEARCH for the NEXT FEASABLE H.
+ \edef\Hmacro{\pgf@sys@tonumber\H}%
+ \ifpgfplots@cur@is@linear
+ % CASE LINEAR AXIS
+ \ifpgfplots@is@datascaled
+ % This here works if the scaling trafo is linear.
+ \expandafter\pgfplots@data@scale@inverse@trafo\expandafter{\Hmacro}%
+ \let\Hmacro=\pgfmathresult
+ \else
+ \pgfmathfloatparsenumber{\Hmacro}%
+ \let\Hmacro=\pgfmathresult
+ \fi
+ \expandafter\pgfmathfloat@decompose\pgfmathresult\relax\pgfmathfloat@a@S\H\pgfmathfloat@a@E
+%\message{Got T^{-1}(H#1) = \Hmacro}%
+ % modify the mantisse:
+ \ifdim\H<2pt
+ \ifdim\H<1.5pt
+ \H=1.0pt
+ \else
+ \H=2.0pt
+ \fi
+ \else
+ \ifdim\H<4.9999pt
+ \ifdim\H<3.5pt
+ \H=2.0pt\relax
+ \else
+ \H=5.0pt\relax
+ \fi
+ \else
+ \ifdim\H<7.5pt
+ \H=5.0pt\relax
+ \else
+ \H=1.0pt\relax
+ \advance\pgfmathfloat@a@E by1
+ \fi
+ \fi
+ \fi
+%\message{Computed H#1=\the\H [unscaled]; transforming ... }%
+ \pgfmathfloatcreate{\the\pgfmathfloat@a@S}{\pgf@sys@tonumber{\H}}{\the\pgfmathfloat@a@E}%
+ \let\Hmacro=\pgfmathresult
+ \ifpgfplots@is@datascaled
+ \pgfplots@data@scale@trafo\Hmacro
+ \else
+ \pgfmathfloattofixed\Hmacro
+ \fi
+ \let\Hmacro=\pgfmathresult
+%\message{got H#1=\Hmacro\ [transformed]}%
+ \expandafter\H\Hmacro pt
+ \expandafter\aftergroup\csname pgfplots@determinedefaultvalues@#1isuniformtrue\endcsname
+ %
+ % Now, we want to activate the Tick set {i*H, i in \Z}
+ % compute I such that
+ % xmin = I * H + rest; |rest| < H
+ % -> I = round(xmin/H)
+ % -> MIN = I * H
+ %
+ % but first: eliminate any 'affine' data scaling!
+ \ifpgfplots@is@datascaled
+ \advance\MIN by\csname pgfplots@data@scale@trafo@SHIFT@#1\endcsname pt
+ \fi
+ \pgfmathlog@invoke@expanded\pgfmathdivide@{%
+ {\pgf@sys@tonumber\MIN}%
+ {\pgf@sys@tonumber\H}%
+ }%
+ \pgfmathsetcount{\c@pgf@counta}{\pgfmathresult}%
+ \ifdim\MIN<0pt
+ % the truncation rounds TOWARDS 0 which is not what I want.
+ \advance\c@pgf@counta by-1
+ \fi
+ \MIN=\H
+ \multiply\MIN by\c@pgf@counta
+ \ifpgfplots@is@datascaled
+ \advance\MIN by-\csname pgfplots@data@scale@trafo@SHIFT@#1\endcsname pt
+ \fi
+ \else
+ % CASE LOG AXIS
+ %
+ % search for the "best" H= j* log(10), j an integer.
+ %
+ % And prefer j=1 if that is possible (otherwise minor
+ % ticks are not useful).
+ \pgfmathmultiply@{\Hmacro}{\reciproclogten}%
+ \expandafter\H\pgfmathresult pt
+%\message{ [ H / log(10) = \pgfmathresult}%
+ \ifdim\H<2pt
+ \H=1pt
+ \else
+ \ifnum\H<1pt
+ \H=1pt
+ \else
+ \expandafter\pgfmathfloor\expandafter{\pgfmathresult}%
+ \expandafter\H\pgfmathresult pt
+ \fi
+ \fi
+ \ifdim\H=1pt
+ \expandafter\aftergroup\csname pgfplots@determinedefaultvalues@#1isuniformtrue\endcsname
+ \pgfplots@isuniformticktrue
+ \else
+ \expandafter\aftergroup\csname pgfplots@determinedefaultvalues@#1isuniformfalse\endcsname
+ \pgfplots@isuniformtickfalse
+ \fi
+%\message{final H=\pgf@sys@tonumber{\H} * log(10)}%
+ \H=\logten\H\relax
+ % Now, we want to activate the Tick set
+ % {lowest, lowest+H, ..., highest}
+ %
+ % Where
+ % lowest = I * log(10) + rest, |rest| < log(10).
+ % this is conceptionally different from the approach for
+ % linear axes, because H = j*log(10).
+ %
+ % remember the original xmin in MINH:
+ \MINH=\MIN
+ %
+ % and compute I and I*log(10) here:
+ \expandafter\MIN\reciproclogten\MIN\relax
+ \edef\pgfmathresult{\pgf@sys@tonumber{\MIN}}%
+ \pgfmathsetcount{\c@pgf@counta}{\pgfmathresult}%
+ \ifdim\MIN<0pt
+ % the truncation rounds TOWARDS 0 which is not what I want.
+ \advance\c@pgf@counta by-1
+ \fi
+ \expandafter\MIN\logten pt
+ \multiply\MIN by\c@pgf@counta
+ \ifpgfplots@isuniformtick
+ \else
+ % This here is a special case to move the first tick
+ % near the lower axis limit.
+ %
+ % "Near" means either directly above or directly below ymin.
+ %
+ % My application example is as follows:
+ % Let H = 2*log(10).
+ % Furthermore, ymin = 3e-6, ymax= 8e-2. That means we can choose either
+ % 10^{-5}, 10^{-3}, 10^{-1}
+ % or
+ % 10^{-4}, 10^{-2}
+ % as ticks. Well, I prefer the first one.
+ %
+ % HEURISTICS: start as near to ymin as possible!
+ %
+ % We check here if we can come nearer to ymin if we
+ % shift the current tick by log(10):
+ % if( ymin - I * log(10) < 0.5*H -> use I+1, that means add log(10).
+ %
+ % that's equivalent to
+ % 2*(ymin - I * log(10)) - H < 0.
+ \advance\MINH by-\MIN
+ \multiply\MINH by2
+ \advance\MINH by-\H
+ %
+ \ifdim\MINH<0pt
+ \expandafter\advance\expandafter\MIN\logten pt
+ \fi
+ \fi
+ \fi
+ \MINH=\MIN
+ \advance\MINH by\H
+%\pgfplots@message{final H=\the\H}%
+ \xdef\pgfplots@TMP{\pgf@sys@tonumber{\MIN},\pgf@sys@tonumber{\MINH},...,\pgf@sys@tonumber{\MAX}}%
+ \xdef\pgfplots@TMPB{\pgf@sys@tonumber{\H}}%
+ \aftergroup\pgfplots@determinedefaultvalues@needs@check@uniformtickfalse
+ \fi
+ \endgroup
+ \expandafter\let\csname pgfplots@#1tick\endcsname=\pgfplots@TMP
+ \expandafter\let\csname pgfplots@tick@distance@#1\endcsname=\pgfplots@TMPB
+%\pgfplots@message{pgfplots.sty: #1tick set to \csname pgfplots@#1tick\endcsname [#1mode=\the\csname pgfplots@#1mode\endcsname, #1min=\csname pgfplots@#1min\endcsname, #1max=\csname pgfplots@#1max\endcsname].}%
+}
+
+% Helper method for
+% \pgfplots@apply@data@scale@trafo@to@options@for
+% #1: the ticks
+% #2: the trafo macro name
+% #3: the output macro name
+\long\def\pgfplots@apply@data@scale@trafo@to@user@ticks#1#2\to#3{%
+ \let#3=\pgfutil@empty
+ \foreach \pgfplots@TMPB in {#1} {%
+ \pgfmathfloatparsenumber{\pgfplots@TMPB}%
+ \expandafter#2\expandafter{\pgfmathresult}%
+ \ifx#3\pgfutil@empty
+ \xdef#3{\pgfmathresult}%
+ \else
+ \xdef#3{#3,\pgfmathresult}%
+ \fi
+ }%
+ %
+}%
+
+% Helper method for
+% \pgfplots@apply@data@scale@trafo@to@options@for
+% #1: the ticks ALREADY IN FLOAT FORMAT
+% #2: the trafo macro name
+% #3: the output macro name
+\long\def\pgfplots@apply@data@scale@trafo@to@user@ticks@isfloat#1#2\to#3{%
+ \let#3=\pgfutil@empty
+ \foreach \pgfplots@TMPB in {#1} {%
+ #2{\pgfplots@TMPB}%
+ \ifx#3\pgfutil@empty
+ \xdef#3{\pgfmathresult}%
+ \else
+ \xdef#3{#3,\pgfmathresult}%
+ \fi
+ }%
+ %
+}%
+
+% helper for \pgfplots@apply@data@scale@trafo@to@options@for.
+\def\pgfplots@compute@number@order@for@trafo@isdimen#1\tocount#2{%
+ \edef\pgfplots@TMP{\pgf@sys@tonumber{#1}}%
+ \pgfmathfloatparsenumber{\pgfplots@TMP}%
+ \expandafter\pgfmathfloat@decompose@E\pgfmathresult\relax#2
+ \advance#2 by1
+}
+
+% helper for \pgfplots@apply@data@scale@trafo@to@options@for.
+%
+\def\pgfplots@compute@number@order@for@trafo@isfloat#1\tocount#2{%
+ \expandafter\pgfmathfloat@decompose@E#1\relax#2
+ \advance#2 by1
+}
+
+% Initialises the data scale transformation and applies it to any
+% user specified options.
+%
+% PRECONDITION:
+% - all axis limits are available in float representation
+% - \pgfplots@set@default@size@options has been called before
+% POSTCONDITION:
+% - the scaling transformation is set up,
+% - all axis limits are transformed,
+% - any user input (like ticks and tick labels)
+% will reflect the changes.
+\def\pgfplots@apply@data@scale@trafo@to@options@for#1{%
+ % initialise data scale transformation
+ % T(x) = 10^{q-m} * x
+ %
+ \begingroup
+ \let\data@max@order=\c@pgf@counta
+ \let\data@cur@order=\c@pgf@countb
+ \let\data@dimen=\pgf@xa
+ \let\data@tmp=\pgf@xb
+ \let\data@dimen@order=\c@pgf@countc
+ \let\data@EXPONENT=\c@pgf@countd
+ \expandafter\let\expandafter\pgfplots@min@float\csname pgfplots@#1min\endcsname
+ \expandafter\let\expandafter\pgfplots@max@float\csname pgfplots@#1max\endcsname
+ \expandafter\let\expandafter\pgfplots@actual@trafo\csname pgfplots@datascaletrafo@#1\endcsname
+ %
+ % Step 1: compute 'm', the data order
+ \pgfplots@compute@number@order@for@trafo@isfloat
+ \pgfplots@min@float
+ \tocount\data@cur@order
+ %
+ \data@max@order=\data@cur@order
+ %
+ \pgfplots@compute@number@order@for@trafo@isfloat
+ \pgfplots@max@float
+ \tocount\data@cur@order
+ %
+ \ifnum\data@cur@order>\data@max@order
+ \data@max@order=\data@cur@order
+ \fi
+ %
+ % Step 2: compute 'q', the #1-size of the axis.
+ \expandafter\ifx\csname pgfplots@#1\endcsname\pgfutil@empty
+ % We have 'width' or 'height'.
+ %
+ % Use the order of these parameters.
+ \def\pgfplots@TMP{#1}%
+ \def\pgfplots@TMPB{x}%
+ \ifx\pgfplots@TMP\pgfplots@TMPB
+ \expandafter\data@dimen\pgfplots@width\relax
+ \else
+ \def\pgfplots@TMPB{y}%
+ \ifx\pgfplots@TMP\pgfplots@TMPB
+ \expandafter\data@dimen\pgfplots@height\relax
+ \fi
+ \fi
+ \pgfplots@compute@number@order@for@trafo@isdimen
+ \data@dimen
+ \tocount\data@dimen@order
+ % This here is to avoid inaccuracies in the final
+ % axis rectangle size, see \pgfplots@initsizes:
+ %\advance\data@dimen@order by-1
+ \else
+ % FIXME:
+ % we have either the 'x=1cm' or 'y=1cm' option!
+ % How should I initialise the trafo!?
+ \data@dimen@order=3
+ \fi
+ %
+%\message{Direction #1: data max order=\the\data@max@order; data dimen order=\the\data@dimen@order. }%
+ \data@EXPONENT=\data@dimen@order
+ \advance\data@EXPONENT by-\data@max@order
+ % Now, I introduce a loop which shall avoid cancellation of
+ % significant digits.
+ %
+ % Harmless Example:
+ % if we have data shift = -3 and
+ % max = 2e6, min = 1e6, then max-min = 1e6; T(max)-T(min) = 1e3 which is ok.
+ % In this case, the loop won't change anything.
+ %
+ % Critical Example:
+ % if we have data shift = -3 and
+ % max = 1980, min = 1930 then
+ % T(max) = 1.98 and T(min) = 1.93
+ % and thus T(max)-T(min) = 0.05 .
+ % Considering that this is the axis range
+ % in which tick labels and plot points need to be computed, we
+ % only have two or three digits left! That happens because the
+ % prefix '19' is common and is cancelled in the subtraction.
+ % Idea: while T(max)-T(min) < O(10^2) -> increase shift by +1
+ % (and make sure that T(max) < MAX_VALID_TEX_NUMBER).
+ %
+ \pgfplots@loop@CONTINUEtrue
+ \expandafter\edef\csname pgfplots@data@scale@trafo@SHIFT@#1\endcsname{0}%
+ \loop
+ \expandafter\edef\csname pgfplots@data@scale@trafo@EXPONENT@#1\endcsname{\the\data@EXPONENT}%
+ \pgfplots@actual@trafo{\pgfplots@min@float}%
+ \let\pgfplots@min@fixed=\pgfmathresult
+ \ifpgfplots@loop@CONTINUE
+ \pgfplots@actual@trafo{\pgfplots@max@float}%
+ \let\pgfplots@max@fixed=\pgfmathresult
+ \expandafter\data@tmp\pgfplots@max@fixed pt
+%\message{Current trafo SHIFT for #1 direction: \the\data@EXPONENT; original #1 limits: [\pgfplots@min@float:\pgfplots@max@float]; current transformed #1 limits: [\pgfplots@min@fixed:\pgfplots@max@fixed]; cancellation check max-min running...}%
+ \ifdim\data@tmp<0pt
+ % I need absolute values here:
+ \multiply\data@tmp by-1\relax
+ \fi
+ \pgfplots@loop@CONTINUEfalse
+ \ifdim\data@tmp<1500pt% a multiplication with '10' results in max = 15000 which is the upper limit.
+ \pgfmathsubtract@{\pgfplots@max@fixed}{\pgfplots@min@fixed}%
+ \expandafter\data@dimen\pgfmathresult pt
+ \ifdim\data@dimen<100pt% I guess if max-min = O(100), we have quite good accuracy
+ \ifdim\data@dimen<0.0001pt
+ \else
+ \advance\data@EXPONENT by1
+ \pgfplots@loop@CONTINUEtrue
+ \fi
+ \fi
+ \fi
+ \repeat
+ \xdef\pgfplots@TMP{\csname pgfplots@data@scale@trafo@EXPONENT@#1\endcsname}%
+ \xdef\pgfplots@TMPB{\pgfplots@min@fixed}%
+ \endgroup
+%\message{Initialising the data scale transformation in direction #1 to 10^\pgfplots@TMP*#1 - \pgfplots@TMPB...}%
+ % COMPLETE INITIALISATION:
+ \ifpgfplots@EMERGENCY@FORCE@DATA@TRAFO@TO@IDENTITY
+ \pgfplots@warning{WARNING: the automatic scaling of input data has been DISABLED to allow unscalable commands. DISABLING THE DATA SCALING LIMITS THE DATA RANGE! I hope I can fix this issue as soon as possible. Please take a look at the manual for more information. If you get 'OVERFLOW' or 'UNDERFLOW' errors, you may need to disable the axispath.}%
+ \def\pgfplots@TMP{0}%
+ \def\pgfplots@TMPB{0}%
+ \fi
+ \expandafter\let\csname pgfplots@data@scale@trafo@EXPONENT@#1\endcsname\pgfplots@TMP
+ \expandafter\let\csname pgfplots@data@scale@trafo@SHIFT@#1\endcsname\pgfplots@TMPB%
+ %
+ % ... and apply transformation to any user input
+ %
+ % Transform axis limits:
+%\message{#1-limits BEFORE data transformation: [\csname pgfplots@#1min\endcsname:\csname pgfplots@#1max\endcsname]}%
+ \expandafter\expandafter\csname pgfplots@datascaletrafo@#1\endcsname\expandafter{\csname pgfplots@#1min\endcsname}%
+ \expandafter\global\expandafter\let\csname pgfplots@#1min\endcsname=\pgfmathresult
+ %
+ \expandafter\expandafter\csname pgfplots@datascaletrafo@#1\endcsname\expandafter{\csname pgfplots@#1max\endcsname}%
+ \expandafter\global\expandafter\let\csname pgfplots@#1max\endcsname=\pgfmathresult
+%\message{#1-limits after data transformation: [\csname pgfplots@#1min\endcsname:\csname pgfplots@#1max\endcsname]}%
+ %
+ % Convert any user-specified ticks:
+ \edef\pgfplots@TMP{\csname pgfplots@#1tick\endcsname}%
+ % this here should also work with 'xtick=\pgfutil@empty', the "No tick" command.
+ \ifx\pgfplots@TMP\pgfutil@empty
+ \else
+ \pgfplots@toka=\expandafter{\csname pgfplots@datascaletrafo@#1\endcsname}%
+ \def\pgfplots@TMPB{data}%
+ \ifx\pgfplots@TMP\pgfplots@TMPB
+ % we have #1tick = data
+ %
+ % Since we have entered this method, we know that these
+ % coordinate ARE ALREADY in floating point representation.
+ \expandafter\let\expandafter\pgfplots@TMP\csname pgfplots@firstplot@coords@#1\endcsname
+ \pgfplotslist@TOK@a=\expandafter{\pgfplots@TMP}%
+ \edef\pgfplots@TMP{{\the\pgfplotslist@TOK@a}\the\pgfplots@toka}%
+ \expandafter\pgfplots@apply@data@scale@trafo@to@user@ticks@isfloat\pgfplots@TMP\to\pgfplots@TMPC
+ \else
+ \pgfplotslist@TOK@a=\expandafter{\pgfplots@TMP}%
+%\message{Converting #1tick='\csname pgfplots@#1tick\endcsname'}%
+ \edef\pgfplots@TMP{{\the\pgfplotslist@TOK@a}\the\pgfplots@toka}%
+ \expandafter\pgfplots@apply@data@scale@trafo@to@user@ticks\pgfplots@TMP\to\pgfplots@TMPC
+ \fi
+ \expandafter\let\csname pgfplots@#1tick\endcsname=\pgfplots@TMPC
+ \fi
+ %
+ % Convert any extra-ticks, see above.
+ \edef\pgfplots@TMP{\csname pgfplots@extra@#1tick\endcsname}%
+ \ifx\pgfplots@TMP\pgfutil@empty
+ \else
+ \pgfplots@toka=\expandafter{\csname pgfplots@datascaletrafo@#1\endcsname}%
+ \edef\pgfplots@TMP{{\csname pgfplots@extra@#1tick\endcsname}\the\pgfplots@toka}%
+ \expandafter\pgfplots@apply@data@scale@trafo@to@user@ticks\pgfplots@TMP\to\pgfplots@TMPC
+ \expandafter\let\csname pgfplots@extra@#1tick\endcsname=\pgfplots@TMPC
+ \fi
+ %
+ % Transform any explicit axis unit scalings:
+ \expandafter\ifx\csname pgfplots@#1\endcsname\pgfutil@empty
+ \else
+%\message{Converting #1 unit scale='\csname pgfplots@#1\endcsname' ... }%
+ \expandafter\pgfmathparse\expandafter{\csname pgfplots@#1\endcsname}%
+ \expandafter\expandafter\csname pgfplots@inverse@datascaletrafo@tofixed@#1@noshift\endcsname\expandafter{\pgfmathresult}%
+ \expandafter\edef\csname pgfplots@#1\endcsname{\pgfmathresult pt}%
+%\message{to #1='\csname pgfplots@#1\endcsname'.}%
+ \fi
+}
+
+\newif\ifpgfplots@determinedefaultvalues@xisuniform
+\newif\ifpgfplots@determinedefaultvalues@yisuniform
+\newif\ifpgfplots@determinedefaultvalues@needs@check@uniformtick
+
+\def\pgfplots@determinedefaultvalues{%
+ \ifpgfplots@limits@are@computed
+ \else
+ % EMPTY AXIS:
+ \pgfplots@warning{WARNING: You have a plot with empty range. This may produce errors!}%
+ \fi
+ %
+ \pgfplots@set@default@size@options
+ %
+ \ifpgfplots@apply@datatrafo@x
+ \let\pgfplots@xmin@unscaled@as@float=\pgfplots@xmin
+ \let\pgfplots@xmax@unscaled@as@float=\pgfplots@xmax
+ \pgfplots@apply@data@scale@trafo@to@options@for x%
+ \else
+ \def\pgfplots@TMPB{data}%
+ \ifx\pgfplots@xtick\pgfplots@TMPB
+ \let\pgfplots@xtick=\pgfplots@firstplot@coords@x
+ \fi
+ \let\pgfplots@xmin@unscaled@as@float=\pgfutil@empty
+ \let\pgfplots@xmax@unscaled@as@float=\pgfutil@empty
+ \fi
+ \ifpgfplots@apply@datatrafo@y
+ \let\pgfplots@ymin@unscaled@as@float=\pgfplots@ymin
+ \let\pgfplots@ymax@unscaled@as@float=\pgfplots@ymax
+ \pgfplots@apply@data@scale@trafo@to@options@for y%
+ \else
+ \def\pgfplots@TMPB{data}%
+ \ifx\pgfplots@ytick\pgfplots@TMPB
+ \let\pgfplots@ytick=\pgfplots@firstplot@coords@y
+ \fi
+ \let\pgfplots@ymin@unscaled@as@float=\pgfutil@empty
+ \let\pgfplots@ymax@unscaled@as@float=\pgfutil@empty
+ \fi
+ \pgfplots@datascaletrafo@initialisedtrue
+ %
+ % From now on, we can always work with pgfmath.
+ % We simply need to apply the data scaling trafo before doing so.
+ \pgfplots@float@numerics@mode@xfalse
+ \pgfplots@float@numerics@mode@yfalse
+ %
+ \pgfkeysgetvalue{/pgfplots/minor x tick num}\pgfplots@minor@xtick@num
+ \pgfkeysgetvalue{/pgfplots/minor y tick num}\pgfplots@minor@ytick@num
+ \ifpgfplots@xislinear
+ \ifnum\pgfplots@minor@xtick@num=0\relax
+ \pgfplots@xminorticksfalse
+ \pgfplots@xminorgridsfalse
+ \else
+ \pgfplots@xminortickstrue
+ \fi
+ \fi
+ \ifpgfplots@yislinear
+ \ifnum\pgfplots@minor@ytick@num=0\relax
+ \pgfplots@yminorticksfalse
+ \pgfplots@yminorgridsfalse
+ \else
+ \pgfplots@yminortickstrue
+ \fi
+ \fi
+ %
+ \pgfplots@init@enlarge@limit@booleans
+ \ifpgfplots@enlargelimits
+ % relax the sizes.
+ %
+ % Idea: if the user chose his xmin,xmax tight to his data,
+ % this here will look better.
+ \pgfplots@enlarge@limit@for x
+ \pgfplots@enlarge@limit@for y
+ \else
+ \ifpgfplots@enlargelimits@auto
+ \ifpgfplots@hide
+ % there is no axis, so skip this enlargement (unless
+ % the user explizitly requests it)
+ \else
+ % FIXME : this here should be user-configurable!
+ \ifpgfplots@autocompute@xlim
+ \pgfplots@enlarge@limit@for x
+ \fi
+ \ifpgfplots@autocompute@ylim
+ \pgfplots@enlarge@limit@for y
+ \fi
+ \fi
+ \fi
+ \fi
+ %
+ \pgfplots@avoid@empty@axis@range@for x%
+ \pgfplots@avoid@empty@axis@range@for y%
+ %
+ \pgfplots@initsizes
+ %
+ \pgfplots@determinedefaultvalues@xisuniformtrue
+ \pgfplots@determinedefaultvalues@yisuniformtrue
+ \pgfplots@determinedefaultvalues@needs@check@uniformticktrue
+ \ifx\pgfplots@xtick\pgfutil@empty
+ \pgfplots@assign@default@tick@foraxis{x}%
+ \fi
+ \ifpgfplots@determinedefaultvalues@needs@check@uniformtick
+ \ifpgfplots@xislinear
+ \expandafter\pgfplots@checkisuniformLINEARtick\expandafter{\pgfplots@xtick}%
+ \ifpgfplots@isuniformtick
+ \pgfplots@determinedefaultvalues@xisuniformtrue
+ \else
+ \pgfplots@determinedefaultvalues@xisuniformfalse
+ \fi
+ \else
+ \expandafter\pgfplots@checkisuniformLOGtick\expandafter{\pgfplots@xtick}%
+ \ifpgfplots@isuniformtick
+ \pgfplots@determinedefaultvalues@xisuniformtrue
+ \else
+ \pgfplots@determinedefaultvalues@xisuniformfalse
+ \fi
+ \fi
+ \fi
+ \ifpgfplots@determinedefaultvalues@xisuniform
+ \else
+ \pgfplots@xminorticksfalse
+ \fi
+ %
+ %
+ %
+ \pgfplots@determinedefaultvalues@needs@check@uniformticktrue
+ \ifx\pgfplots@ytick\pgfutil@empty
+ \pgfplots@assign@default@tick@foraxis{y}%
+ \fi
+ \ifpgfplots@determinedefaultvalues@needs@check@uniformtick
+ \ifpgfplots@yislinear
+ \expandafter\pgfplots@checkisuniformLINEARtick\expandafter{\pgfplots@ytick}%
+ \ifpgfplots@isuniformtick
+ \pgfplots@determinedefaultvalues@yisuniformtrue
+ \else
+ \pgfplots@determinedefaultvalues@yisuniformfalse
+ \fi
+ \else
+ \expandafter\pgfplots@checkisuniformLOGtick\expandafter{\pgfplots@ytick}%
+ \ifpgfplots@isuniformtick
+ \pgfplots@determinedefaultvalues@yisuniformtrue
+ \else
+ \pgfplots@determinedefaultvalues@yisuniformfalse
+ \fi
+ \fi
+ \fi
+ \ifpgfplots@determinedefaultvalues@yisuniform
+ \else
+ \pgfplots@yminorticksfalse
+ \fi
+ %
+ \ifx\pgfplots@xticklabel\pgfutil@empty
+ \ifpgfplots@xislinear
+ \def\pgfplots@xticklabel{\axisdefaultticklabel}%
+ \else
+ \def\pgfplots@xticklabel{\axisdefaultticklabellog}%
+ \fi
+ \fi
+ \ifx\pgfplots@extra@xticklabel\pgfutil@empty
+ \let\pgfplots@extra@xticklabel=\pgfplots@xticklabel
+ \fi
+ \ifx\pgfplots@yticklabel\pgfutil@empty
+ \ifpgfplots@yislinear
+ \def\pgfplots@yticklabel{\axisdefaultticklabel}%
+ \else
+ \def\pgfplots@yticklabel{\axisdefaultticklabellog}%
+ \fi
+ \fi
+ \ifx\pgfplots@extra@yticklabel\pgfutil@empty
+ \let\pgfplots@extra@yticklabel=\pgfplots@yticklabel
+ \fi
+ %
+ %
+ \pgfplots@prepare@ZERO@coordinates
+}
+
+% This code is mainly interesting for bar plots.
+%
+% It precomputes x = 0 and y = 0 - which is not necessarily
+% trivial in case of data scaling. Furthermore, it applies
+% coordinate clipping to the resulting values and multiplies them
+% with x- and y scale vectors.
+\def\pgfplots@prepare@ZERO@coordinates{%
+ \ifpgfplots@apply@datatrafo@x
+ \pgfplots@datascaletrafo@fromfixed@x{0}%
+ \global\let\pgfplots@ZERO@x=\pgfmathresult
+ \else
+ \gdef\pgfplots@ZERO@x{0}%
+ \fi
+ \pgfmathmax@{\pgfplots@ZERO@x}{\pgfplots@xmin}%
+ \global\let\pgfplots@ZERO@x=\pgfmathresult
+ %
+ \ifpgfplots@apply@datatrafo@y
+ \pgfplots@datascaletrafo@fromfixed@y{0}%
+ \global\let\pgfplots@ZERO@y=\pgfmathresult
+ \else
+ \gdef\pgfplots@ZERO@y{0}%
+ \fi
+ \pgfmathmax@{\pgfplots@ZERO@y}{\pgfplots@ymin}%
+ \global\let\pgfplots@ZERO@y=\pgfmathresult
+ \pgfinterruptboundingbox%
+ \pgfpointxy{\pgfplots@ZERO@x}{\pgfplots@ZERO@y}%
+ \xdef\pgfplots@ZERO@x{\the\pgf@x}%
+ \xdef\pgfplots@ZERO@y{\the\pgf@y}%
+ \endpgfinterruptboundingbox%
+}%
+
+
+% Helper method for initsizes.
+%
+% It computes a scaling such that \pgfplots@width = SCALE * ACTUAL WIDTH.
+%
+% The actual width is
+% c + x*(xmax-xmin)
+% based on
+% - x*xmax = \pgfplots@xcoordmaxTEX
+% - x*xmin = \pgfplots@xcoordminTEX
+% - c = estimated, a constant for the axis label/tick labels
+%
+% Arguments:
+% #1: the output argument for the SCALE.
+\def\pgfplots@initsizes@getXscale\into#1{%
+ \expandafter\pgfplots@tmpa\pgfplots@width\relax
+ % EXPECTED WIDTH = X = \pgfplots@width
+ % ACTUAL WIDTH = c + x * (xmax-xmin)
+ % where c is a CONSTANT (for the axis labels/tick labels).
+ % -> \pgfplots@tmpXscale = (X - c) / (x *(xmax-xmin))
+ %
+ % \pgfplots@tmpa := X-c:
+ \ifpgfplots@scale@only@axis
+ \else
+ \advance\pgfplots@tmpa by-45pt% FIXME determine 'c' correctly!
+ \fi
+ \ifdim\pgfplots@tmpa<0pt
+ \pgfplots@error{Error: Plot width `\pgfplots@width' is too small. This can't be realised while maintaining constant width for y-labels. Sorry, label width are only approximate. You will need to adjust your width.}%
+ \pgfplots@tmpa=0pt
+ \fi
+ % \pgfplots@tmpb := x*(xmax-xmin):
+ \pgfplots@tmpb=\pgfplots@xcoordmaxTEX
+ \advance\pgfplots@tmpb by-\pgfplots@xcoordminTEX
+ \pgfmathlog@invoke@expanded\pgfmathdivide@{%
+ {\pgf@sys@tonumber\pgfplots@tmpa}%
+ {\pgf@sys@tonumber\pgfplots@tmpb}%
+ }%
+ \let#1=\pgfmathresult
+%\pgfplots@message{pgfplots.sty: Computing 'x' such that 'width = c + x*(xmax-xmin)';
+% c=estimated,
+% width-c =\the\pgfplots@tmpa,
+% x*(xmax[=\the\pgfplots@xcoordmaxTEX] - xmin[=\the\pgfplots@xcoordminTEX)]) = \the\pgfplots@tmpb
+% -> x-scale =#1 }%
+}
+
+% The same as \pgfplots@initsizes@getXscale, just for the height.
+\def\pgfplots@initsizes@getYscale\into#1{%
+ \expandafter\pgfplots@tmpa\pgfplots@height\relax
+ % EXPECTED WIDTH = X = \pgfplots@width
+ % ACTUAL WIDTH = c + x * (xmax-xmin)
+ % where c is a CONSTANT (for the axis labels/tick labels).
+ % -> \pgfplots@tmpXscale = (X - c) / (x *(xmax-xmin))
+ %
+ % \pgfplots@tmpa := X-c:
+ \ifpgfplots@scale@only@axis
+ \else
+ \advance\pgfplots@tmpa by-45pt\relax% FIXME determine 'c' correctly!
+ \fi
+ \ifdim\pgfplots@tmpa<0pt
+ \pgfplots@error{Error: Plot height `\pgfplots@height' is too small. This can't be realised while maintaining constant height for x-labels. Sorry, label heights are only approximate. You will need to adjust your height.}%
+ \pgfplots@tmpa=0pt
+ \fi
+ % \pgfplots@tmpb := x*(xmax-xmin):
+ \pgfplots@tmpb=\pgfplots@ycoordmaxTEX
+ \advance\pgfplots@tmpb by-\pgfplots@ycoordminTEX
+ \pgfmathlog@invoke@expanded\pgfmathdivide@{%
+ {\pgf@sys@tonumber\pgfplots@tmpa}%
+ {\pgf@sys@tonumber\pgfplots@tmpb}%
+ }%
+ \let#1=\pgfmathresult
+%\pgfplots@message{pgfplots.sty: Computing 'y' such that 'height = c + y*(ymax-ymin)';
+% height=\pgfplots@height,
+% c=estimated,
+% height-c =\the\pgfplots@tmpa,
+% y*(ymax[=\the\pgfplots@ycoordmaxTEX] - ymin[=\the\pgfplots@ycoordminTEX)]) = \the\pgfplots@tmpb
+% -> y-scale =#1 }%
+}
+
+
+\newif\ifpgfplots@avoid@emptyrange@@range@is@approx@equal
+% Checks whether axis limits in coordinate #1 are approximately equal.
+%
+% If that is the case, force a non-zero width of the range.
+%
+\def\pgfplots@avoid@empty@axis@range@for#1{%
+ % Check if axis limits are empty:
+ \begingroup
+ \expandafter\let\expandafter\if@cur@is@scaled\csname ifpgfplots@apply@datatrafo@#1\endcsname
+ \expandafter\let\expandafter\min\csname pgfplots@#1min\endcsname
+ \expandafter\let\expandafter\max\csname pgfplots@#1max\endcsname
+ \let\min@d=\pgf@xa
+ \let\max@d=\pgf@xb
+ \let\diff=\pgf@xc
+ \expandafter\min@d\min pt
+ \expandafter\max@d\max pt
+ \diff=\max@d
+ \advance\diff by-\min@d
+ % FIXME : I need a RELATIVE check here!
+ % but: real number point division is expensive
+ \if@cur@is@scaled
+ % this here should be sufficient because the axis
+ % has absolute values of order O( 10^3 ) or so.
+ \ifdim\diff<0.01pt
+ \pgfplots@avoid@emptyrange@@range@is@approx@equaltrue
+ \fi
+ \else
+ % there is no data scaling, so I should be much more defensive
+ % with absolute thresholds...
+ \ifdim\diff<0.01pt
+ \pgfplots@avoid@emptyrange@@range@is@approx@equaltrue
+ \fi
+ \fi
+ \ifpgfplots@avoid@emptyrange@@range@is@approx@equal
+ \pgfplots@warning{WARNING: Axis range for axis #1 (transformed: [\min:\max]) is approximately equal; enlargeing it.}%
+ % the case \min ~= \max
+ %
+ % enlarge \max and shrink \min:
+ \ifdim\max@d<0pt
+ \ifdim\max@d<-1pt
+ \max@d=0.8\max@d
+ \min@d=1.2\min@d
+ \else
+ \advance\max@d by-1pt
+ \advance\min@d by1pt
+ \fi
+ \else
+ \ifdim\max@d>1pt
+ \max@d=1.2\max@d
+ \min@d=0.8\min@d
+ \else
+ \ifdim\max@d=0pt
+ \if@cur@is@scaled
+ % we can't simply add a constant in the
+ % transformed range.
+ %
+ % So: set limits to [-1,1] = [-1.0e0,+1.0e0]
+ \pgfmathfloatcreate{2}{1.0}{0}%
+ \csname pgfplots@datascaletrafo@#1\endcsname{\pgfmathresult}%
+ \let\min=\pgfmathresult
+ \pgfmathfloatcreate{1}{1.0}{0}%
+ \csname pgfplots@datascaletrafo@#1\endcsname{\pgfmathresult}%
+ \let\max=\pgfmathresult
+%\pgfplots@message{[trafo shift = \csname pgfplots@data@scale@trafo@EXPONENT@#1\endcsname; setting limits -1:1]}%
+ \expandafter\min@d\min pt
+ \expandafter\max@d\max pt
+ \else
+ \advance\max@d by1pt
+ \advance\min@d by-1pt
+ \fi
+ \else
+ \advance\max@d by1pt
+ \advance\min@d by-1pt
+ \fi
+ \fi
+ \fi
+ \xdef\pgfplots@TMP{\pgf@sys@tonumber{\min@d}}%
+ \xdef\pgfplots@TMPB{\pgf@sys@tonumber{\max@d}}%
+%\pgfplots@message{ -> #1 = \pgfplots@TMP : \pgfplots@TMPB;}%
+ \else
+ \global\let\pgfplots@TMP=\min%
+ \global\let\pgfplots@TMPB=\max%
+ \fi
+ \endgroup
+ \expandafter\global\expandafter\let\csname pgfplots@#1min\endcsname=\pgfplots@TMP
+ \expandafter\global\expandafter\let\csname pgfplots@#1max\endcsname=\pgfplots@TMPB
+}
+
+% PRECONDITION:
+% none
+% POSTCONDITION:
+% \pgfplots@default@aspect@ratio is set.
+\def\pgfplots@compute@default@aspect@ratio{%
+ \expandafter\pgfmath@x\axisdefaultwidth
+ \expandafter\pgfmath@y\axisdefaultheight
+ \pgfmathlog@invoke@expanded\pgfmathdivide@{%
+ {\pgf@sys@tonumber{\pgfmath@x}}%
+ {\pgf@sys@tonumber{\pgfmath@y}}%
+ }%
+ \let\pgfplots@default@aspect@ratio=\pgfmathresult
+}
+
+\def\pgfplots@set@default@size@options{%
+ % The axes 'x' and 'y' vectors will be scaled such that the total
+ % size is (\axisdefaultwidth, \axisdefaultheight).
+ %
+ % If the user specifies ONE of width OR height,
+ % the plot will be resized; keeping the aspect ratio.
+ %
+ \let\pgfplots@default@aspect@ratio=\pgfutil@empty
+ % CASES:
+ % hasx := 'x' option non-empty
+ % hasy := 'y' option non-empty
+ % W := 'width' option non-empty
+ % H := 'height' option non-empty
+ %
+ % hasx = 1 -> width is not interesting; we use 'x' option.
+ % hasx = 0 -> determine final width:
+ % W H
+ % 0 0 -> \axisdefaultwidth
+ % 0 1 -> determine width out of H and the default aspect ratio
+ % 1 X -> ok, use the user parameter.
+ %
+ % hasy = 1 -> height is not interesting, we use 'y' option.
+ % hasy = 0 -> determine final height:
+ % W H
+ % 0 0 -> \axisdefaultheight
+ % X 1 -> ok, use the user parameter
+ % 1 0 -> determine height out of W and the default aspect ratio
+ %
+ \ifx\pgfplots@x\pgfutil@empty
+ \ifx\pgfplots@y\pgfutil@empty
+ % hasx=0, hasy=0
+ %
+ % -> KEEP ASPECT RATIO if just one W, or H is given!
+ \ifx\pgfplots@width\pgfutil@empty
+ \ifx\pgfplots@height\pgfutil@empty
+ % The case hasx=0, hasy=0, W=0 H=0:
+ \let\pgfplots@width=\axisdefaultwidth
+ \let\pgfplots@height=\axisdefaultheight
+ \else
+ % The case hasx=0, hasy=0, W=0 H=1:
+ \pgfplots@compute@default@aspect@ratio
+ \expandafter\pgfmath@y\pgfplots@height
+ \pgfmathlog@invoke@expanded\pgfmathmultiply@{%
+ {\pgf@sys@tonumber{\pgfmath@y}}%
+ {\pgfplots@default@aspect@ratio}%
+ }%
+ \edef\pgfplots@width{\pgfmathresult pt}%
+ \fi
+ \else
+ \ifx\pgfplots@height\pgfutil@empty
+ % The case hasx=0, hasy=0, W=1 H=0:
+ \pgfplots@compute@default@aspect@ratio
+ \expandafter\pgfmath@x\pgfplots@width
+ \pgfmathlog@invoke@expanded\pgfmathdivide@{%
+ {\pgf@sys@tonumber{\pgfmath@x}}%
+ {\pgfplots@default@aspect@ratio}%
+ }%
+ \edef\pgfplots@height{\pgfmathresult pt}%
+ \else
+ % The case hasx=0, hasy=0, W=1 H=1:
+ \fi
+ \fi
+ \else
+ % hasx=0, hasy=1, W=0:
+ \ifx\pgfplots@width\pgfutil@empty
+ \let\pgfplots@width=\axisdefaultwidth
+ \fi
+ \fi
+ \else
+ \ifx\pgfplots@y\pgfutil@empty
+ % hasx=1, hasy=0, H=0
+ \ifx\pgfplots@height\pgfutil@empty
+ \let\pgfplots@height=\axisdefaultheight
+ \fi
+ \fi
+ \fi
+}
+
+% PRECONDITION:
+% - final axis limits are given in transformed range
+% - \pgfplots@set@default@size@options has been invoked before
+% POSTCONDITION:
+% - the current x- and y unit vectors are changed;
+% - \pgfplots@[xy]coord{min,max}TEX are set
+%
+\def\pgfplots@initsizes{%
+ % INIT.
+ %
+ %
+ \pgfpointxy{\pgfplots@xmin}{\pgfplots@ymin}%
+ \pgfplots@xcoordminTEX=\pgf@x
+ \pgfplots@ycoordminTEX=\pgf@y
+ \pgfpointxy{\pgfplots@xmax}{\pgfplots@ymax}%
+ \pgfplots@xcoordmaxTEX=\pgf@x
+ \pgfplots@ycoordmaxTEX=\pgf@y
+ %
+ %
+ %-----------------------------------------
+ % PROCESS THE 'width' and 'height' options
+ %-----------------------------------------
+ %
+ % FIXME: make these variables LOCAL:
+ %
+ \let\pgfplots@rectangle@width=\pgfutil@empty
+ \let\pgfplots@rectangle@height=\pgfutil@empty
+ %
+ \ifx\pgfplots@x\pgfutil@empty
+ \ifx\pgfplots@width\pgfutil@empty
+ \pgfplots@error{INTERNAL LOGIC ERROR! WIDTH NOT SET}%
+ \fi
+ \pgfplots@initsizes@getXscale\into\pgfplots@tmpXscale
+ \ifpgfplots@scale@only@axis
+ \let\pgfplots@rectangle@width=\pgfplots@width
+ \fi
+ \else
+ \def\pgfplots@tmpXscale{1}%
+ \fi
+ %
+ \ifx\pgfplots@y\pgfutil@empty
+ \ifx\pgfplots@height\pgfutil@empty
+ \pgfplots@error{INTERNAL LOGIC ERROR! HEIGHT NOT SET}%
+ \fi
+ \pgfplots@initsizes@getYscale\into\pgfplots@tmpYscale
+ \ifpgfplots@scale@only@axis
+ \let\pgfplots@rectangle@height=\pgfplots@height
+ \fi
+ \else
+ \def\pgfplots@tmpYscale{1}%
+ \fi
+ %
+ %
+ % assert( \pgfplots@tmpXscale != \pgfutil@empty && \pgfplots@tmpYscale != \pgfutil@empty )
+ %
+ % Apply scaling:
+ \pgfpointxy{\pgfplots@tmpXscale}{\pgfplots@tmpYscale}%
+ \pgfplots@tmpa=\pgf@x
+ \pgfplots@tmpb=\pgf@y
+%\message{initscaling: got x-scaling \the\pgfplots@tmpa, and y-scaling \the\pgfplots@tmpb}%
+ \ifx\pgfplots@x\pgfutil@empty
+ \pgfsetxvec{\pgfqpoint{\pgfplots@tmpa}{0pt}}%
+ \else
+ \pgfsetxvec{\pgfpoint{\pgfplots@x}{0pt}}%
+ \fi
+ \ifx\pgfplots@y\pgfutil@empty
+ \pgfsetyvec{\pgfqpoint{0pt}{\pgfplots@tmpb}}%
+ \else
+ \pgfsetyvec{\pgfpoint{0pt}{\pgfplots@y}}%
+ \fi
+ %
+ % Determine final rectangle dimensions.
+ % There are the following cases:
+ % 1. the user really wants a fixed dimension,
+ % i.e. he used 'scale only axis'.
+ % Then, we have to work to get the correct dimension!
+ %
+ % Up to now, the scaling mechanism looses to many significant
+ % digits such that the final width/height differs by 1-2 pt.
+ %
+ % If I am not mistaken, this does ONLY affect the final size,
+ % not the relative plot precision.
+ %
+ % FIXME : really compute the plot precision!
+ %
+ % 2. The use specified width and/or height, but not 'scale only
+ % axis'. Accept inaccurate final widths/heights (see above).
+ %
+ % 3. The user supplied 'x' and or 'y'. Simply use them, its
+ % accurate.
+ %
+ \pgfpointxy{\pgfplots@xmin}{\pgfplots@ymin}%
+ \pgfplots@xcoordminTEX=\pgf@x
+ \pgfplots@ycoordminTEX=\pgf@y
+ \pgfpointxy{\pgfplots@xmax}{\pgfplots@ymax}%
+ \ifx\pgfplots@rectangle@width\pgfutil@empty
+ \pgfplots@xcoordmaxTEX=\pgf@x
+ \else
+ % this 'if' here should only make a difference of about
+ % 1-2pt, not more.
+ %
+ % and I am quite sure that this inaccuracy (and this
+ % work-around) only affects the
+ % final size, not the relative plot accuracy.
+ \pgfplots@xcoordmaxTEX=\pgfplots@xcoordminTEX
+ \expandafter\advance\expandafter\pgfplots@xcoordmaxTEX\pgfplots@width
+ \fi
+ \ifx\pgfplots@rectangle@height\pgfutil@empty
+ \pgfplots@ycoordmaxTEX=\pgf@y
+ \else
+ \pgfplots@ycoordmaxTEX=\pgfplots@ycoordminTEX
+ \expandafter\advance\expandafter\pgfplots@ycoordmaxTEX\pgfplots@height
+ \fi
+%--------------------------------------------------
+% \begingroup
+% \pgf@x=\pgfplots@xcoordmaxTEX\advance\pgf@x by-\pgfplots@xcoordminTEX
+% \pgf@y=\pgfplots@ycoordmaxTEX\advance\pgf@y by-\pgfplots@ycoordminTEX
+% \message{Axis scaling x=\pgfplots@tmpXscale, y=\pgfplots@tmpYscale\ yields lower-left-corner (\pgfplots@xmin,\pgfplots@ymin) = (\the\pgfplots@xcoordminTEX,\the\pgfplots@ycoordminTEX) and upper right (\pgfplots@xmax,\pgfplots@ymax) = (\the\pgfplots@xcoordmaxTEX,\the\pgfplots@ycoordmaxTEX). Axis dimensions are width=\the\pgf@x, height=\the\pgf@y.}%
+% \endgroup
+%--------------------------------------------------
+}
+
+
+% This is the main axis shape.
+%
+% It has one node part, which is the complete image. It provides a lot
+% of anchors.
+\pgfdeclareshape{pgfplots@low@level@shape}{%
+ \savedanchor\upperrightcorner{
+ \pgf@x=\wd\pgfnodepartimagebox
+ \pgf@y=\ht\pgfnodepartimagebox
+ }%
+ \savedanchor\lowerleftinnercorner{%
+ \pgfpoint{\pgfplots@savedanchor@inner@lowerleft@x}{\pgfplots@savedanchor@inner@lowerleft@y}%
+ }%
+ \savedanchor\upperrightinnercorner{%
+ \pgfpoint{\pgfplots@savedanchor@inner@upperright@x}{\pgfplots@savedanchor@inner@upperright@y}%
+ }%
+ %
+ \nodeparts{image}%
+ \anchor{image}{%
+ \pgf@x=0pt
+ \pgf@y=0pt
+ }%
+ %
+ \anchor{outer north}{%
+ \upperrightcorner
+ \pgf@x=.5\pgf@x
+ }%
+ \anchor{outer north east}{\upperrightcorner}%
+ \anchor{outer east}{%
+ \upperrightcorner
+ \pgf@y=.5\pgf@y
+ }%
+ \anchor{outer south east}{%
+ \upperrightcorner
+ \pgf@y=0pt
+ }%
+ \anchor{outer south}{%
+ \upperrightcorner
+ \pgf@x=.5\pgf@x
+ \pgf@y=0pt
+ }%
+ \anchor{outer south west}{%
+ \pgf@x=0pt
+ \pgf@y=0pt
+ }%
+ \anchor{outer west}{%
+ \upperrightcorner
+ \pgf@x=0pt
+ \pgf@y=.5\pgf@y
+ }%
+ \anchor{outer north west}{%
+ \upperrightcorner
+ \pgf@x=0pt
+ }%
+ \anchor{outer center}{%
+ \upperrightcorner
+ \pgf@x=.5\pgf@x
+ \pgf@y=.5\pgf@y
+ }%
+ %
+ %
+ \anchor{center}{%
+ \lowerleftinnercorner
+ \pgf@xa=\pgf@x
+ \pgf@xb=\pgf@y
+ \upperrightinnercorner
+ \advance\pgf@xa by\pgf@x
+ \pgf@x=.5\pgf@xa
+ \advance\pgf@xb by\pgf@y
+ \pgf@y=.5\pgf@xb
+ }%
+ \anchor{north}{%
+ \lowerleftinnercorner
+ \pgf@xa=\pgf@x
+ \pgf@xb=\pgf@y
+ \upperrightinnercorner
+ \advance\pgf@xa by\pgf@x
+ \pgf@x=.5\pgf@xa
+ }%
+ \anchor{north east}{\upperrightinnercorner}%
+ \anchor{east}{%
+ \lowerleftinnercorner
+ \pgf@xa=\pgf@x
+ \pgf@xb=\pgf@y
+ \upperrightinnercorner
+ \advance\pgf@xb by\pgf@y
+ \pgf@y=.5\pgf@xb
+ }%
+ \anchor{south east}{%
+ \lowerleftinnercorner
+ \pgf@xa=\pgf@x
+ \pgf@xb=\pgf@y
+ \upperrightinnercorner
+ \pgf@y=\pgf@xb
+ }%
+ \anchor{south}{%
+ \lowerleftinnercorner
+ \pgf@xa=\pgf@x
+ \pgf@xb=\pgf@y
+ \upperrightinnercorner
+ \advance\pgf@xa by\pgf@x
+ \pgf@x=.5\pgf@xa
+ \pgf@y=\pgf@xb
+ }%
+ \anchor{south west}{\lowerleftinnercorner}%
+ \anchor{west}{%
+ \lowerleftinnercorner
+ \pgf@xa=\pgf@x
+ \pgf@xb=\pgf@y
+ \upperrightinnercorner
+ \pgf@x=\pgf@xa
+ \advance\pgf@xb by\pgf@y
+ \pgf@y=.5\pgf@xb
+ }%
+ \anchor{north west}{%
+ \lowerleftinnercorner
+ \pgf@xa=\pgf@x
+ \pgf@xb=\pgf@y
+ \upperrightinnercorner
+ \pgf@x=\pgf@xa
+ }%
+ %%
+ %%
+ \anchor{above north}{%
+ \upperrightcorner
+ \pgf@xa=\pgf@y
+ \lowerleftinnercorner
+ \pgf@xb=\pgf@x
+ \upperrightinnercorner
+ \advance\pgf@xb by\pgf@x
+ \pgf@x=.5\pgf@xb
+ \pgf@y=\pgf@xa
+ }%
+ \anchor{above north east}{%
+ \upperrightcorner
+ \pgf@xa=\pgf@y
+ \upperrightinnercorner
+ \pgf@y=\pgf@xa
+ }%
+ \anchor{right of north east}{%
+ \upperrightcorner
+ \pgf@xa=\pgf@x
+ \upperrightinnercorner
+ \pgf@x=\pgf@xa
+ }%
+ \anchor{right of east}{%
+ \upperrightcorner
+ \pgf@xa=\pgf@x
+ \upperrightinnercorner
+ \pgf@xb=\pgf@y
+ \lowerleftinnercorner
+ \advance\pgf@xb by\pgf@y
+ \pgf@x=\pgf@xa
+ \pgf@y=.5\pgf@xb
+ }%
+ \anchor{right of south east}{%
+ \upperrightcorner
+ \pgf@xa=\pgf@x
+ \lowerleftinnercorner
+ \pgf@x=\pgf@xa
+ }%
+ \anchor{below south east}{%
+ \upperrightinnercorner
+ \pgf@y=0pt
+ }%
+ \anchor{below south}{%
+ \lowerleftinnercorner
+ \pgf@xa=\pgf@x
+ \upperrightinnercorner
+ \pgf@y=0pt
+ \advance\pgf@xa by\pgf@x
+ \pgf@x=.5\pgf@xa
+ }%
+ \anchor{below south west}{%
+ \lowerleftinnercorner
+ \pgf@y=0pt
+ }%
+ \anchor{left of south west}{%
+ \lowerleftinnercorner
+ \pgf@x=0pt
+ }%
+ \anchor{left of west}{%
+ \lowerleftinnercorner
+ \pgf@xa=\pgf@y
+ \upperrightinnercorner
+ \advance\pgf@xa by\pgf@y
+ \pgf@y=.5\pgf@xa
+ \pgf@x=0pt
+ }%
+ \anchor{left of north west}{%
+ \upperrightinnercorner
+ \pgf@x=0pt
+ }%
+ \anchor{above north west}{%
+ \upperrightcorner
+ \pgf@xa=\pgf@y
+ \lowerleftinnercorner
+ \pgf@y=\pgf@xa
+ }%
+ %%
+ %%
+ %%
+ \anchorborder{%
+ % Call a function that computes a border point. Since this
+ % function will modify dimensions like \pgf@x, we must move them to
+ % other dimensions.
+ \@tempdima=\pgf@x
+ \@tempdimb=\pgf@y
+ \pgfpointborderrectangle%
+ {\pgfpoint{\@tempdima}{\@tempdimb}}%
+ {\pgfpointadd{\upperrightcorner}{\pgfpoint{\width}{\height}}}
+ }%
+ \backgroundpath{\pgfpathrectangle{\pgfpointorigin}{\upperrightcorner}}%
+ \foregroundpath{}%
+ \behindbackgroundpath{}%
+ \beforebackgroundpath{}%
+ \behindforegroundpath{}%
+ \beforeforegroundpath{}%
+}
+
+\def\pgfplots@BEGIN@init@and@draw@axis{%
+ \pgfplots@determinedefaultvalues
+ \setbox\pgfnodepartimagebox=\hbox\bgroup\bgroup
+ \pgfinterruptpicture
+ \tikzpicture[/pgfplots/every axis]%
+ %\pgfqkeys{/tikz}{every axis}%
+ % set baseline for sub-picture to default value.
+ % the baseline option will be applied to the OUTER picture.
+ \pgfsetbaseline{\pgf@picminy}%
+ %
+ \scope
+ \ifpgfplots@hide
+ \else
+ \pgfplots@drawaxis@lines
+ \expandafter\pgfplots@drawxaxis\expandafter{\pgfplots@xtick}%
+ \expandafter\pgfplots@draw@extra@ticks@for\expandafter x\expandafter{\pgfplots@extra@xtick}%
+ \expandafter\pgfplots@drawyaxis\expandafter{\pgfplots@ytick}%
+ \expandafter\pgfplots@draw@extra@ticks@for\expandafter y\expandafter{\pgfplots@extra@ytick}%
+ \fi
+ \clip
+ (\pgfplots@xcoordminTEX, \pgfplots@ycoordminTEX)
+ rectangle (\pgfplots@xcoordmaxTEX, \pgfplots@ycoordmaxTEX);
+}
+
+
+\def\pgfplots@END@init@and@draw@axis{%
+ \endscope%
+}
+
+% Writes output to \pgfplots@TMP
+\def\pgfplots@filter@input@ticks@with@log#1{%
+ \let\pgfplots@TMP=\pgfutil@empty
+ \foreach \pgfplots@TMPB in {#1} {%
+ \expandafter\pgfmathlog@\expandafter{\pgfplots@TMPB}%
+ \ifx\pgfplots@TMP\pgfutil@empty
+ \xdef\pgfplots@TMP{\pgfmathresult}%
+ \else
+ \xdef\pgfplots@TMP{\pgfplots@TMP,\pgfmathresult}%
+ \fi
+ }%
+}
+
+\tikzdeclarecoordinatesystem{axis}{\pgfplots@evalute@tikz@coord@system@interface#1\pgfplots@coord@end}
+
+
+% Assigns \pgfmathresult := canvas coordinate (#2) for axis #1.
+\long\def\pgfplots@evalute@tikz@coord@system@interface@for#1#2{%
+ \expandafter\let\expandafter\if@datascaled@cur\csname ifpgfplots@apply@datatrafo@#1\endcsname
+ \csname ifpgfplots@#1islinear\endcsname
+ \if@datascaled@cur
+ \csname pgfplots@datascaletrafo@fromfixed@#1\endcsname{#2}%
+ \else
+ \def\pgfmathresult{#2}%
+ \fi
+ \else
+ \pgfmathlog@{#2}%
+ \fi
+}
+
+\long\def\pgfplots@evalute@tikz@coord@system@interface#1,#2\pgfplots@coord@end{%
+ \begingroup
+ \pgfplots@evalute@tikz@coord@system@interface@for{x}{#1}%
+ \let\pgfplots@evaluate@tikz@coord@x=\pgfmathresult
+ \pgfplots@evalute@tikz@coord@system@interface@for{y}{#2}%
+ \xdef\pgfplots@TMP{\pgfplots@evaluate@tikz@coord@x pt}%
+ \xdef\pgfplots@TMPB{\pgfmathresult pt}%
+ \endgroup
+ \pgfpointxy{\pgfplots@TMP}{\pgfplots@TMPB}%
+}
+
+% In case of (semi-) logplots, this command will
+% - assign a filter which invokes \pgfmathlog@{} for each coordinate
+% - replace any user-specified coordinate by its log.
+%
+% All subsequent commands will then work with logarithmic coordinates.
+%
+% @see pgfmathlog.sty for details about the implementation of log().
+%
+% PRECONDITION:
+% - The user input options have been set correctly,
+% - the option processing has not yet begun
+%
+% POSTCONDITION:
+% - any user input for log-axis has been replaced by its log
+% - coordinate filters to compute logs are installed
+%
+% See also:
+% \pgfplots@apply@data@scale@trafo@to@options@for
+\def\pgfplots@prepare@coord@filtering@for#1{%
+ \expandafter\def\csname pgfplots@prepare@#1coord\endcsname##1{%
+ \def\pgfmathresult{##1}%
+ }%
+ \pgfkeysgetvalue{/pgfplots/#1filter}\pgfplots@TMP
+ \ifx\pgfplots@TMP\pgfutil@empty
+ \else
+ \expandafter\let\csname pgfplots@#1filter@backwcompat\endcsname=\pgfplots@TMP
+ \pgfplots@toka={WARNING: /pgfplots/#1filter is deprecated. Please use /pgfplots/#1 filter/.code={\def\pgfmathresult{\#1}}}%
+ \pgfplots@warning{\the\pgfplots@toka}%
+ \pgfkeys{/pgfplots/#1 filter/.code={\csname pgfplots@#1filter@backwcompat\endcsname{##1}\to\pgfmathresult}}%
+ \fi
+ \csname pgfplots@float@numerics@mode@#1false\endcsname
+ \csname ifpgfplots@#1islinear\endcsname
+ \ifpgfplots@disabledatascaling
+ \csname pgfplots@apply@datatrafo@#1false\endcsname
+ \pgfplots@apply@datatrafofalse
+ \else
+ \csname pgfplots@apply@datatrafo@#1true\endcsname
+ \csname pgfplots@float@numerics@mode@#1true\endcsname
+ \pgfplots@apply@datatrafotrue
+ \fi
+ \ifpgfplots@apply@datatrafo
+ % Check for any existing axis limits:
+ \expandafter\let\expandafter\pgfplots@TMP\csname pgfplots@#1min\endcsname
+ \ifx\pgfplots@TMP\pgfutil@empty
+ \else
+ \expandafter\pgfmathfloatparsenumber\expandafter{\pgfplots@TMP}%
+ \expandafter\global\expandafter\let\csname pgfplots@#1min\endcsname=\pgfmathresult
+ \fi
+ \expandafter\let\expandafter\pgfplots@TMP\csname pgfplots@#1max\endcsname
+ \ifx\pgfplots@TMP\pgfutil@empty
+ \else
+ \expandafter\pgfmathfloatparsenumber\expandafter{\pgfplots@TMP}%
+ \expandafter\global\expandafter\let\csname pgfplots@#1max\endcsname=\pgfmathresult
+ \fi
+ \fi
+ \else
+ \ifpgfplots@disablelogfilter
+ \else
+ % any user-specified axis limits:
+ \expandafter\let\expandafter\pgfplots@TMP\csname pgfplots@#1min\endcsname
+ \ifx\pgfplots@TMP\pgfutil@empty
+ \else
+ \expandafter\pgfmathlog@\expandafter{\pgfplots@TMP}%
+ \expandafter\global\expandafter\let\csname pgfplots@#1min\endcsname=\pgfmathresult
+ \fi
+ \expandafter\let\expandafter\pgfplots@TMP\csname pgfplots@#1max\endcsname
+ \ifx\pgfplots@TMP\pgfutil@empty
+ \else
+ \expandafter\pgfmathlog@\expandafter{\pgfplots@TMP}%
+ \expandafter\global\expandafter\let\csname pgfplots@#1max\endcsname=\pgfmathresult
+ \fi
+ %
+ % any user specified axis ticks:
+ \expandafter\let\expandafter\pgfplots@TMP\csname pgfplots@#1tick\endcsname
+ \ifx\pgfplots@TMP\pgfutil@empty
+ \else
+ \def\pgfplots@TMPB{data}%
+ \ifx\pgfplots@TMP\pgfplots@TMPB
+ \else
+ \expandafter\pgfplots@filter@input@ticks@with@log\expandafter{\pgfplots@TMP}%
+ \expandafter\edef\csname pgfplots@#1tick\endcsname{\pgfplots@TMP}%
+ \fi
+ \fi
+ \expandafter\let\expandafter\pgfplots@TMP\csname pgfplots@extra@#1tick\endcsname
+ \ifx\pgfplots@TMP\pgfutil@empty
+ \else
+ \expandafter\pgfplots@filter@input@ticks@with@log\expandafter{\pgfplots@TMP}%
+ \expandafter\edef\csname pgfplots@extra@#1tick\endcsname{\pgfplots@TMP}%
+ \fi
+ %
+ \expandafter\def\csname pgfplots@prepare@#1coord\endcsname##1{%
+ \pgfmathlog@{##1}%
+ }%
+ %--------------------------------------------------
+ % \expandafter\let\expandafter\pgfplots@TMP\csname pgfplots@#1filter\endcsname
+ % \ifx\pgfplots@TMP\pgfutil@empty
+ % \expandafter\def\csname addplot@log@compute@#1filter\endcsname##1\to##2{%
+ % \pgfmathlog@{##1}%
+ % \let##2=\pgfmathresult
+ % }%
+ % \else
+ % \expandafter\let\csname pgfplots@#1filter@orig\endcsname=\pgfplots@TMP
+ % \expandafter\def\csname addplot@log@compute@#1filter\endcsname##1\to##2{%
+ % \pgfmathlog@{##1}%
+ % \ifx\pgfmathresult\pgfutil@empty
+ % \let##2=\pgfutil@empty
+ % \else
+ % \expandafter\expandafter\csname pgfplots@#1filter@orig\endcsname\pgfmathresult\to##2\relax
+ % \fi
+ % }%
+ % \fi
+ % \expandafter\let\expandafter\pgfplots@TMP\csname addplot@log@compute@#1filter\endcsname
+ % \expandafter\let\csname pgfplots@#1filter\endcsname\pgfplots@TMP
+ %--------------------------------------------------
+ \fi
+ \fi
+}
+
+\def\pgfplots@create@axis@descriptions{%
+ \ifpgfplots@hide
+ \else
+ \ifx\pgfplots@xlabel\pgfutil@empty
+ \else
+ \pgfplots@show@label{x}%
+ \fi
+ \ifx\pgfplots@ylabel\pgfutil@empty
+ \else
+ \pgfplots@show@label{y}%
+ \fi
+ \fi
+ \ifx\pgfplots@title\pgfutil@empty
+ \else
+ \pgfplots@show@title
+ \fi
+ \pgfplots@createlegend
+}
+
+\def\pgfplots@datascaletrafo@undoshift@x#1{%
+ \pgfmathsubtract@{#1}{\pgfplots@data@scale@trafo@SHIFT@x}%
+}%
+\def\pgfplots@datascaletrafo@redoshift@x#1{%
+ \pgfmathadd@{#1}{\pgfplots@data@scale@trafo@SHIFT@x}%
+}%
+\def\pgfplots@datascaletrafo@undoshift@y#1{%
+ \pgfmathsubtract@{#1}{\pgfplots@data@scale@trafo@SHIFT@y}%
+}%
+\def\pgfplots@datascaletrafo@redoshift@y#1{%
+ \pgfmathadd@{#1}{\pgfplots@data@scale@trafo@SHIFT@y}%
+}%
+
+% DATA TRANSFORMATION T(x) = X - xmin
+%
+% Input:
+% a number in the original data range, given in **floating** point representation
+% Output:
+% a fixed point number in transformed range
+% stored in \pgfmathresult
+% @see
+% \pgfplots@datascaletrafo@fromfixed@x
+\def\pgfplots@datascaletrafo@x#1{%
+ \pgfmathfloatshift{#1}{\pgfplots@data@scale@trafo@EXPONENT@x}%
+ \expandafter\pgfmathfloattofixed\expandafter{\pgfmathresult}%
+ \expandafter\pgfmathsubtract@\expandafter{\pgfmathresult}{\pgfplots@data@scale@trafo@SHIFT@x}%
+}
+\def\pgfplots@datascaletrafo@x@noshift#1{%
+ \pgfmathfloatshift{#1}{\pgfplots@data@scale@trafo@EXPONENT@x}%
+ \expandafter\pgfmathfloattofixed\expandafter{\pgfmathresult}%
+}
+
+% Overloaded function.
+% Input:
+% a FIXED point number instead of a floating point one.
+% @see \pgfplots@datascaletrafo@x
+\def\pgfplots@datascaletrafo@fromfixed@x#1{%
+ \pgfmathfloatparsenumber{#1}%
+ \expandafter\pgfplots@datascaletrafo@x\expandafter{\pgfmathresult}%
+}
+
+\def\pgfplots@datascaletrafo@y#1{%
+ \pgfmathfloatshift{#1}{\pgfplots@data@scale@trafo@EXPONENT@y}%
+ \expandafter\pgfmathfloattofixed\expandafter{\pgfmathresult}%
+ \expandafter\pgfmathsubtract@\expandafter{\pgfmathresult}{\pgfplots@data@scale@trafo@SHIFT@y}%
+}
+\def\pgfplots@datascaletrafo@fromfixed@y#1{%
+ \pgfmathfloatparsenumber{#1}%
+ \expandafter\pgfplots@datascaletrafo@y\expandafter{\pgfmathresult}%
+}
+\def\pgfplots@datascaletrafo@y@noshift#1{%
+ \pgfmathfloatshift{#1}{\pgfplots@data@scale@trafo@EXPONENT@y}%
+ \expandafter\pgfmathfloattofixed\expandafter{\pgfmathresult}%
+}
+
+% INVERSE transformation x = T^{-1}( X )
+% Input:
+% a fixed point number in transformed domain
+% Output:
+% a number in the data domain, given in floating point
+% representation
+%
+% If the input number is approximately X=0, we will return x=0 as
+% well.
+%
+% This allows to handle rounding inaccuracies and should not pose any
+% problems.
+\def\pgfplots@inverse@datascaletrafo@x#1{%
+ \begingroup
+ \pgfmathadd@{#1}{\pgfplots@data@scale@trafo@SHIFT@x}%
+ \let\pgfplots@inverse@datascaletrafo@@shifted=\pgfmathresult
+ \pgfmathapproxequalto@{\pgfplots@inverse@datascaletrafo@@shifted}{0.0}%
+ \ifpgfmathcomparison
+ \pgfmathfloatcreate{0}{0.0}{0}%
+ \else
+ \pgfmathfloatparsenumber{\pgfplots@inverse@datascaletrafo@@shifted}%
+ \edef\pgfplots@data@scale@trafo@EXPONENT@x{-\pgfplots@data@scale@trafo@EXPONENT@x}%
+ \expandafter\pgfmathfloatshift\expandafter{\pgfmathresult}{\pgfplots@data@scale@trafo@EXPONENT@x}%
+ \fi
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
+}
+\def\pgfplots@inverse@datascaletrafo@x@noshift#1{%
+ \begingroup
+ \pgfmathapproxequalto@{#1}{0.0}%
+ \ifpgfmathcomparison
+ \pgfmathfloatcreate{0}{0.0}{0}%
+ \else
+ \pgfmathfloatparsenumber{#1}%
+ \edef\pgfplots@data@scale@trafo@EXPONENT@x{-\pgfplots@data@scale@trafo@EXPONENT@x}%
+ \expandafter\pgfmathfloatshift\expandafter{\pgfmathresult}{\pgfplots@data@scale@trafo@EXPONENT@x}%
+ \fi
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
+}
+
+\def\pgfplots@inverse@datascaletrafo@y#1{%
+ \begingroup
+ \pgfmathadd@{#1}{\pgfplots@data@scale@trafo@SHIFT@y}%
+ \let\pgfplots@inverse@datascaletrafo@@shifted=\pgfmathresult
+ \pgfmathapproxequalto@{\pgfplots@inverse@datascaletrafo@@shifted}{0.0}%
+ \ifpgfmathcomparison
+ \pgfmathfloatcreate{0}{0.0}{0}%
+ \else
+ \pgfmathfloatparsenumber{\pgfplots@inverse@datascaletrafo@@shifted}%
+ \edef\pgfplots@data@scale@trafo@EXPONENT@y{-\pgfplots@data@scale@trafo@EXPONENT@y}%
+ \expandafter\pgfmathfloatshift\expandafter{\pgfmathresult}{\pgfplots@data@scale@trafo@EXPONENT@y}%
+ \fi
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
+}
+% Overloaded function. This one does only apply the scaling, no shift.
+\def\pgfplots@inverse@datascaletrafo@y@noshift#1{%
+ \begingroup
+ \pgfmathapproxequalto@{#1}{0.0}%
+ \ifpgfmathcomparison
+ \pgfmathfloatcreate{0}{0.0}{0}%
+ \else
+ \pgfmathfloatparsenumber{#1}%
+ \edef\pgfplots@data@scale@trafo@EXPONENT@y{-\pgfplots@data@scale@trafo@EXPONENT@y}%
+ \expandafter\pgfmathfloatshift\expandafter{\pgfmathresult}{\pgfplots@data@scale@trafo@EXPONENT@y}%
+ \fi
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
+}
+
+% Overloaded function.
+%
+% In contrast to \pgfplots@inverse@datascaletrafo@x, this method
+% returns a number in FIXED point representation.
+% @see \pgfplots@inverse@datascaletrafo@x
+\def\pgfplots@inverse@datascaletrafo@tofixed@x#1{%
+ \pgfplots@inverse@datascaletrafo@x{#1}%
+ \expandafter\pgfmathfloattofixed\expandafter{\pgfmathresult}%
+}
+\def\pgfplots@inverse@datascaletrafo@tofixed@y#1{%
+ \pgfplots@inverse@datascaletrafo@y{#1}%
+ \expandafter\pgfmathfloattofixed\expandafter{\pgfmathresult}%
+}
+
+% Overloaded function.
+%
+% This one does only apply the scale, no shift.
+\def\pgfplots@inverse@datascaletrafo@tofixed@x@noshift#1{%
+ \pgfplots@inverse@datascaletrafo@x@noshift{#1}%
+ \expandafter\pgfmathfloattofixed\expandafter{\pgfmathresult}%
+}
+\def\pgfplots@inverse@datascaletrafo@tofixed@y@noshift#1{%
+ \pgfplots@inverse@datascaletrafo@y@noshift{#1}%
+ \expandafter\pgfmathfloattofixed\expandafter{\pgfmathresult}%
+}
+
+% Parses all options in #1 which are known in the currently active families.
+%
+% The result will be stored back into the TikZ-style named #1 without
+% further processing.
+%
+% Example:
+% \tikzstyle{every axis}=[xmin=0,xmax=1,line width=1pt
+% \pgfplots@set@keys@from@tikz@style\tmpmacro{every axis}{/pgfplots}
+%
+% - sets axis options 'xmin' and 'xmax'
+% - calls \tikzstyle{every axis}={line width=1pt}
+%
+% I assume that this method is called within local TeX groups so
+% nothing will be destroyed outside.
+%
+% #1: A style name.
+\def\pgfplots@set@keys@from@tikz@style#1{%
+ \let\pgfplots@rmopts=\pgfutil@empty
+ \pgfqkeysfiltered{/pgfplots}{/pgfplots/#1}%
+ \pgfplots@set@keymacro@to@style\pgfplots@rmopts{#1}%
+}
+
+% The same as \pgfplots@set@keys@from@tikz@style but this one appends
+% unmatched options to style #2.
+%
+% #1: A style name.
+% #2: A style name which will be filled with unprocessed options.
+\def\pgfplots@set@keys@from@tikz@style@append@to#1#2{%
+ \let\pgfplots@rmopts=\pgfutil@empty
+ \pgfqkeysfiltered{/pgfplots}{/pgfplots/#1}%
+ \pgfplots@append@keymacro@to@style\pgfplots@rmopts{#2}%
+}
+
+% #1: A sequence of options.
+% #2: A style name which will be filled with unprocessed options.
+\def\pgfplots@set@keys@and@append@remaining@to@style#1#2{%
+ \let\pgfplots@rmopts=\pgfutil@empty
+ \pgfqkeysfiltered{/pgfplots}{#1}%
+ \pgfplots@append@keymacro@to@style\pgfplots@rmopts{#2}%
+}%
+
+% #1: input macro
+\def\pgfplots@setkeys@from@macro#1{%
+ \let\pgfplots@rmopts=\pgfutil@empty
+ \def\pgfplots@TMP{\pgfqkeysfiltered{/pgfplots}}%
+ \expandafter\pgfplots@TMP\expandafter{#1}%
+}
+
+% #1: macro
+% #2: style name
+\long\def\pgfplots@append@keymacro@to@style#1#2{%
+ \pgfplotslist@TOK@a={#2/.append style=}%
+ \pgfplotslist@TOK@b=\expandafter{#1}%
+ \edef\pgfplots@setkeys@TMP{\the\pgfplotslist@TOK@a{\the\pgfplotslist@TOK@b}}%
+ \expandafter\pgfplotsset\expandafter{\pgfplots@setkeys@TMP}%
+%\pgfplots@message{tikzstyle{#2}+=[#1]}%
+}
+
+% #1: macro
+% #2: style name
+\long\def\pgfplots@set@keymacro@to@style#1#2{%
+ \pgfplotslist@TOK@a={#2/.style=}%
+ \pgfplotslist@TOK@b=\expandafter{#1}%
+ \edef\pgfplots@setkeys@TMP{\the\pgfplotslist@TOK@a{\the\pgfplotslist@TOK@b}}%
+ \expandafter\pgfplotsset\expandafter{\pgfplots@setkeys@TMP}%
+%\pgfplots@message{tikzstyle{#2}=[#1]}%
+}
+
+\def\pgfplots@preset@keys{%
+ \def\pgfplots@at{\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}%
+}
+
+% backwards compatibility:
+\let\prettyprintnumber=\pgfmathprintnumber%
+
+\def\pgfplots@set@options#1{%
+ \pgfplots@preset@keys
+ %
+ % Temporarily assign families to 'name' and 'alias' options.
+ % This allows to get the names - they should not be appended to
+ % 'every axis'!
+ \pgfkeys{%
+ /tikz/domain/.belongs to family=/pgfplots,
+ /pgfplots/domain/.code={\pgfkeysalso{/tikz/domain=##1}},
+ /tikz/name/.belongs to family=/pgfplots/naming commands,
+ /tikz/alias/.belongs to family=/pgfplots/naming commands,
+ % and provide aliases in the '/pgfplots/' tree to avoid
+ % search path problems just for these two options:
+ /pgfplots/name/.belongs to family=/pgfplots/naming commands,
+ /pgfplots/alias/.belongs to family=/pgfplots/naming commands,
+ /pgfplots/name/.code={\pgfkeysalso{/tikz/name=##1}},
+ /pgfplots/alias/.code={\pgfkeysalso{/tikz/alias=##1}},
+ %
+ %
+ /pgf/key filter handlers/append filtered to/.install key filter handler=\pgfplots@rmopts,
+ }%
+ \let\tikz@alias=\pgfutil@empty
+ \let\tikz@fig@name=\pgfutil@empty
+ %
+ % Step 1: acquire ONLY 'xmode' and 'ymode' (necessary to decide
+ % which axis style shall be loaded):
+ \let\pgfplots@rmopts=\pgfutil@empty
+ \pgfkeysinstallkeyfilter
+ {/pgf/key filters/active families or no family}
+ {{/pgf/key filters/false}{/pgf/key filters/false}}
+ %
+ \pgfqkeysactivatesinglefamilyandfilteroptions{/pgfplots/scale}%
+ {/pgfplots}
+ {#1}%
+ \let\pgfplots@remaining@input=\pgfplots@rmopts
+ %
+ % Step 2: parse any pgfplots options out of styles.
+ \pgfkeysactivatefamily{/pgfplots/style commands}%
+ \pgfkeysinstallkeyfilter
+ {/pgf/key filters/active families or no family}% DEBUG}
+ {{/pgf/key filters/is descendant of=/pgfplots}% for keys without family
+ {/pgf/key filters/false}% for unknown keys
+ }%
+ %
+ \pgfkeysactivatefamilies
+ {/pgfplots,/pgfplots/naming commands,/pgfplots/tick,/pgfplots/legend,/pgfplots/descriptions,/pgfplots/scale}
+ {\pgfplots@deactivefamiliescmd}%
+ \pgfplots@set@keys@from@tikz@style{every axis}%
+ \pgfkeysdeactivatefamily{/pgfplots/scale}%
+ %
+ \ifpgfplots@xislinear
+ \ifpgfplots@yislinear
+ \pgfplots@set@keys@from@tikz@style@append@to{every linear axis}{every axis}%
+ \else
+ \pgfplots@set@keys@from@tikz@style@append@to{every semilogy axis}{every axis}%
+ \fi
+ \else
+ \ifpgfplots@yislinear
+ \pgfplots@set@keys@from@tikz@style@append@to{every semilogx axis}{every axis}%
+ \else
+ \pgfplots@set@keys@from@tikz@style@append@to{every loglog axis}{every axis}%
+ \fi
+ \fi
+ \pgfplots@deactivefamiliescmd
+ %
+ % Acquire style commands and nameing commands from direct input
+ % options '#1' BEFORE the 'every' styles are processed:
+ \pgfkeysactivatefamily{/pgfplots/naming commands}%
+ \pgfplots@setkeys@from@macro\pgfplots@remaining@input%
+ \let\pgfplots@remaining@input=\pgfplots@rmopts
+ \pgfkeysdeactivatefamily{/pgfplots/naming commands}%
+ %
+ % Now, any 'name' and 'alias' options have been processed.
+ %
+ % Remember their current meaning and reset the tikz options!
+ \let\pgfplots@fig@name=\tikz@fig@name
+ \let\pgfplots@fig@alias=\tikz@alias
+ \let\tikz@alias=\pgfutil@empty
+ \let\tikz@fig@name=\pgfutil@empty
+ %
+ % And protocol all named sub-nodes! Their positions need to be
+ % updated later.
+ \let\pgfplots@named@child@node@list=\pgfutil@empty
+ \pgfkeysgetvalue{/tikz/name/.@cmd}\pgfplots@old@name@impl
+ \pgfkeysgetvalue{/tikz/alias/.@cmd}\pgfplots@old@alias@impl
+ \pgfkeysdef{/tikz/name}{%
+ \xdef\pgfplots@named@child@node@list{\pgfplots@named@child@node@list,{##1}}%
+ \pgfplots@old@name@impl##1\pgfeov
+ }%
+ \pgfkeysdef{/tikz/alias}{%
+ \xdef\pgfplots@named@child@node@list{\pgfplots@named@child@node@list,{##1}}%
+ \pgfplots@old@alias@impl##1\pgfeov
+ }%
+ %
+ % Now, continue to process the 'every' styles. Please note that
+ % the 'legend style={}' like options have already been processed;
+ % their values are already inside of the associated 'every'
+ % styles.
+ %
+ % What I am doing here is: set every pgfplots-option directly, and
+ % discard it from the every-style. Any non-pgfplots-option will
+ % be set in its context.
+ %
+ \pgfkeysactivatefamily{/pgfplots/legend}%
+ \pgfplots@set@keys@from@tikz@style{every axis legend}%
+ \pgfkeysdeactivatefamily{/pgfplots/legend}%
+ %
+ %
+ \pgfkeysactivatefamily{/pgfplots/descriptions}%
+ \pgfplots@set@keys@from@tikz@style{every axis label}%
+ \pgfplots@set@keys@from@tikz@style{every axis x label}%
+ \pgfplots@set@keys@from@tikz@style{every axis y label}%
+ \pgfplots@set@keys@from@tikz@style{every axis title}%
+ \pgfkeysdeactivatefamily{/pgfplots/descriptions}%
+ %
+ \pgfkeysactivatefamily{/pgfplots/tick}%
+ \pgfplots@set@keys@from@tikz@style{every tick}%
+ \pgfplots@set@keys@from@tikz@style{every minor tick}%
+ \pgfplots@set@keys@from@tikz@style{every major tick}%
+ \pgfplots@set@keys@from@tikz@style{every axis grid}%
+ \pgfplots@set@keys@from@tikz@style{every minor grid}%
+ \pgfplots@set@keys@from@tikz@style{every major grid}%
+ \pgfkeysdeactivatefamily{/pgfplots/tick}%
+ %
+ \pgfkeysactivatefamily{/pgfplots}%
+ \pgfplots@set@keys@from@tikz@style{every axis plot}%
+ \pgfkeysdeactivatefamily{/pgfplots}%
+ %
+ \pgfkeysactivatefamily{/pgfplots/descriptions}%
+ \pgfkeysactivatefamily{/pgfplots/tick}%
+ \pgfplots@set@keys@from@tikz@style{every x tick label}%
+ \pgfplots@set@keys@from@tikz@style{every y tick label}%
+ \pgfplots@set@keys@from@tikz@style{every tick label}%
+ \pgfkeysdeactivatefamily{/pgfplots/tick}%
+ \pgfkeysdeactivatefamily{/pgfplots/descriptions}%
+ %
+ % Step 3: Set all remaining options of '#1'. They should have
+ % highest precedence.
+ \pgfkeysactivatefamilies
+ {/pgfplots,/pgfplots/tick,/pgfplots/legend,/pgfplots/descriptions}%
+ {\pgfplots@deactivefamiliescmd}%
+ \expandafter
+ \pgfplots@set@keys@and@append@remaining@to@style
+ \expandafter
+ {\pgfplots@remaining@input}%
+ {every axis}%
+ \pgfplots@deactivefamiliescmd
+%\pgfkeysgetvalue{/tikz/every axis/.@cmd}\pgfplots@TMP
+%\message{every axis is now '\meaning\pgfplots@TMP'}%
+ %
+ \pgfkeysdeactivatefamily{/pgfplots/style commands}%
+ \global\pgfkeysgetvalue{/pgfplots/xmin}{\pgfplots@xmin}%
+ \global\pgfkeysgetvalue{/pgfplots/xmax}{\pgfplots@xmax}%
+ \global\pgfkeysgetvalue{/pgfplots/ymin}{\pgfplots@ymin}%
+ \global\pgfkeysgetvalue{/pgfplots/ymax}{\pgfplots@ymax}%
+ %
+ \def\pgfplots@TMP{data}%
+ \pgfplots@collect@firstplot@astickfalse
+ \ifx\pgfplots@xtick\pgfplots@TMP
+ \pgfplots@collect@firstplot@asticktrue
+ \fi
+ \ifx\pgfplots@ytick\pgfplots@TMP
+ \pgfplots@collect@firstplot@asticktrue
+ \fi
+ \ifpgfplots@collect@firstplot@astick
+ \let\pgfplots@firstplot@coords@x=\pgfutil@empty
+ \let\pgfplots@firstplot@coords@y=\pgfutil@empty
+ \fi
+}
+
+\def\pgfplots@install@abbrev@commands{
+ \let\pgfplots@orig@path=\path
+ \let\pgfplots@orig@plot=\plot
+ %
+ \let\axispath=\pgfplots@path
+ %
+ \let\addplot=\pgfplots@addplot
+ \let\plot=\addplot
+ %
+ \def\logten{2.3025851}%
+ \def\reciproclogten{0.434294}%
+ %
+ \def\logi##1{%
+ \ifcase##1
+ \or0
+ \or0.693147
+ \or1.098612
+ \or1.386294
+ \or1.60943791
+ \or1.7917594
+ \or1.94591014
+ \or2.07944154
+ \or2.197224
+ \fi
+ }%
+ %
+ \let\legend=\pgfplots@command@legend
+ \let\addlegendentry=\pgfplots@addlegendentry
+}
+
+\def\pgfplots@environment{%
+ \pgfutil@ifnextchar[{%
+ \pgfplots@environment@opt
+ }{%
+ \pgfplots@environment@opt[]%
+ }%
+}%
+
+% temporary (local) variables inside of axis
+\newif\ifpgfplots@autocomputelimits
+\newif\ifpgfplots@autocompute@xlim
+\newif\ifpgfplots@autocompute@ylim
+\newif\ifpgfplots@apply@datatrafo@x
+\newif\ifpgfplots@apply@datatrafo@y
+\newif\ifpgfplots@apply@datatrafo
+\newif\ifpgfplots@float@numerics@mode@x
+\newif\ifpgfplots@float@numerics@mode@y
+\newif\ifpgfplots@datascaletrafo@initialised
+\newif\ifpgfplots@draw@at@end
+\newif\ifpgfplots@limits@are@computed
+\newif\ifpgfplots@EMERGENCY@FORCE@DATA@TRAFO@TO@IDENTITY
+
+% Extracts single components of an entry of
+% \pgfplots@stored@plotlist
+%
+% They are defined as
+% \pgfplots@stored@current@precmd
+% \pgfplots@stored@current@cmd
+% \pgfplots@stored@current@data
+% \pgfplots@stored@current@postcmd
+\def\pgfplots@stored@plotlist@EXTRACTENTRY#1#2#3#4{%
+ \def\pgfplots@stored@current@precmd{#1}%
+ \def\pgfplots@stored@current@cmd{#2}%
+ \def\pgfplots@stored@current@data{#3}%
+ \def\pgfplots@stored@current@postcmd{#4}%
+}
+
+\def\pgfplots@environment@opt[#1]{%
+ \begingroup
+ \pgfplots@install@abbrev@commands
+ \pgfplots@stacked@initialise
+ %
+ %
+ % The explicit specification of 'x' and 'y' as 1pt is to avoid
+ % numeric overflow/underflow during scale computations:
+ %
+ % The scaling (i.e. proper values for 'x' and 'y') will be
+ % determined later-on, dependend on the axis limits. Since axis
+ % limits are implicitly in units of 1pt, it is reasonable to use
+ % '1pt' here as well.
+ \pgfsetxvec{\pgfqpoint{1pt}{0pt}}%
+ \pgfsetyvec{\pgfqpoint{0pt}{1pt}}%
+ %
+ \pgfplots@set@options{#1}%
+ %
+ % --------------------
+ % Allocations:
+ % --------------------
+ \global\pgfplots@EMERGENCY@FORCE@DATA@TRAFO@TO@IDENTITYfalse
+ \global\pgfplotslistnewempty\pgfplots@plotspeclist
+ \global\pgfplotslistnewempty\pgfplots@legend
+ \global\pgfplotslistnewempty\pgfplots@stored@plotlist
+ \global\pgfplots@numplots=0
+ \let\pgfplots@already@computed@legend@node=\pgfutil@empty
+ %
+ % --------------------
+ % Option preprocessing
+ % --------------------
+ \pgfplots@prepare@coord@filtering@for x
+ \pgfplots@prepare@coord@filtering@for y
+ \ifpgfplots@apply@datatrafo
+ \pgfplots@datascaletrafo@initialisedfalse
+ \else
+ \pgfplots@datascaletrafo@initialisedtrue% there is no trafo.
+ \fi
+ %
+ \ifx\pgfplots@xmin\pgfutil@empty
+ \pgfplots@autocompute@xlimtrue
+ \gdef\pgfplots@xmin{16300}%
+ \ifpgfplots@float@numerics@mode@x
+ \pgfmathfloatcreate{1}{1.0}{324}%
+ \global\let\pgfplots@xmin=\pgfmathresult
+ \fi
+ \fi
+ \ifx\pgfplots@xmax\pgfutil@empty
+ \pgfplots@autocompute@xlimtrue
+ \gdef\pgfplots@xmax{-16300}%
+ \ifpgfplots@float@numerics@mode@x
+ \pgfmathfloatcreate{2}{1.0}{324}%
+ \global\let\pgfplots@xmax=\pgfmathresult
+ \fi
+ \fi
+ \ifx\pgfplots@ymin\pgfutil@empty
+ \pgfplots@autocompute@ylimtrue
+ \gdef\pgfplots@ymin{16300}%
+ \ifpgfplots@float@numerics@mode@y
+ \pgfmathfloatcreate{1}{1.0}{324}%
+ \global\let\pgfplots@ymin=\pgfmathresult
+ \fi
+ \fi
+ \ifx\pgfplots@ymax\pgfutil@empty
+ \pgfplots@autocompute@ylimtrue
+ \gdef\pgfplots@ymax{-16300}%
+ \ifpgfplots@float@numerics@mode@y
+ \pgfmathfloatcreate{2}{1.0}{324}%
+ \global\let\pgfplots@ymax=\pgfmathresult
+ \fi
+ \fi
+ %
+ \global\pgfplots@limits@are@computedtrue
+ \ifpgfplots@autocompute@xlim
+ \pgfplots@draw@at@endtrue
+ \pgfplots@autocomputelimitstrue
+ \global\pgfplots@limits@are@computedfalse
+ \fi
+ \ifpgfplots@autocompute@ylim
+ \pgfplots@draw@at@endtrue
+ \pgfplots@autocomputelimitstrue
+ \global\pgfplots@limits@are@computedfalse
+ \fi
+ %
+ %
+ % --------------------
+ % Start axis:
+ % either postponed to \end or directly.
+ % --------------------
+ %
+ % Since I've introduced a public \numplots macro, I should
+ % make sure it's filled correctly:
+ \pgfplots@draw@at@endtrue
+ %
+ \ifpgfplots@collect@firstplot@astick
+ \pgfplots@draw@at@endtrue
+ \fi
+ \ifpgfplots@apply@datatrafo
+ % ALWAYS TRUE. This allows to use inline plots because the data
+ % scale transformation will be applied after I know that it should
+ % be disabled.
+ \pgfplots@draw@at@endtrue
+ \fi
+ \ifpgfplots@stackedmode
+ % Stacked plots require special attention: they are drawn in
+ % REVERSE order.
+ \pgfplots@draw@at@endtrue
+ \else
+ % we have no stacked plots and thus no reversing.
+ \pgfplots@stacked@reversefalse
+ \fi
+ %
+ % any \path command is invalid inside of an axis.
+ % Use \axispath instead:
+ \def\numplots{\the\pgfplots@numplots}%
+ \let\path=\pgfplots@replacement@for@tikz@path
+ \let\closedcycle=\pgfplots@path@closed@cycle
+ \ifpgfplots@draw@at@end
+ \let\pgfplots@nextcommand=\relax
+ \else
+ \def\pgfplots@nextcommand{\pgfplots@BEGIN@init@and@draw@axis}%
+ \fi
+ \pgfplots@nextcommand
+}
+\def\endpgfplots@environment@opt{%
+ \pgfkeysvalueof{/pgfplots/before end axis/.@cmd}\pgfeov%
+ \xdef\numplots{\the\pgfplots@numplots}%
+ %
+ % restore old \path command:
+ \let\path=\pgfplots@orig@path
+ \let\plot=\pgfplots@orig@plot
+ %
+ %\end{axis}:
+ % --------------------
+ % All plotting commands have been read.
+ % -> apply postponed drawing commands!
+ % --------------------
+ \ifpgfplots@draw@at@end
+ \def\pgfplots@nextcommand{%
+ \pgfplots@BEGIN@init@and@draw@axis
+ \pgfplots@stacked@initialise
+ \ifpgfplots@stacked@reverse
+ % This here applies any scaling trafos and assembles a
+ % NEW \pgfplots@stored@plotlist!
+ \pgfplots@stacked@finalize@stored@plots
+ \fi
+ \pgfplotslistforeach\pgfplots@stored@plotlist\as\pgfplots@TMP{%
+ \expandafter\pgfplots@stored@plotlist@EXTRACTENTRY\pgfplots@TMP
+%\message{Processing stored plot with precommand '\meaning\pgfplots@stored@current@precmd'; pgfplots@plotcmd '\meaning\pgfplots@stored@current@cmd' postcommand '\meaning\pgfplots@stored@current@postcmd'}%
+ \pgfplots@stored@current@precmd
+ \ifx\pgfplots@stored@current@cmd\pgfutil@empty
+ \pgfplots@stored@current@data%
+ \else
+ % this code here means we REALLY have a plotting
+ % command!
+ \ifpgfplots@stacked@reverse
+ % has already been processed above, in \pgfplots@stacked@finalize@stored@plots.
+ \else
+ \ifpgfplots@apply@datatrafo
+ % Apply the data scaling transformation
+ \expandafter\pgfplots@coord@stream@finalize@storedcoords@START\pgfplots@stored@current@data\to\pgfplots@stored@current@data%
+ \fi
+ \fi
+%\message{calling plotcmd and plotdata: pgfplots@plotcmd '\meaning\pgfplots@stored@current@cmd' data '\meaning\pgfplots@stored@current@data'}%
+ \expandafter\pgfplots@stored@current@cmd\pgfplots@stored@current@data
+ \fi
+ \pgfplots@stored@current@postcmd
+ }%
+ \global\pgfplotslistnewempty\pgfplots@stored@plotlist% delete contents.
+ }%
+ \else
+ \let\pgfplots@nextcommand=\relax
+ \fi
+ \pgfplots@nextcommand
+ \pgfplots@END@init@and@draw@axis
+ %
+ \begingroup
+ \pgfkeysvalueof{/pgfplots/after end axis/.@cmd}\pgfeov%
+ \endgroup
+ %
+ \begingroup
+ % set coordinate system to (0,0) rectangle (1,1) for descriptions:
+ \pgftransformxshift{\pgfplots@xcoordminTEX}%
+ \pgftransformyshift{\pgfplots@ycoordminTEX}%
+ %
+ \pgfplots@tmpa=\pgfplots@xcoordmaxTEX
+ \advance\pgfplots@tmpa by-\pgfplots@xcoordminTEX
+ \pgfsetxvec{\pgfqpoint{\pgfplots@tmpa}{0cm}}%
+ %
+ \pgfplots@tmpa=\pgfplots@ycoordmaxTEX
+ \advance\pgfplots@tmpa by-\pgfplots@ycoordminTEX
+ \pgfsetyvec{\pgfqpoint{0cm}{\pgfplots@tmpa}}%
+ %
+ \pgfplots@create@axis@descriptions
+ \pgfkeysvalueof{/pgfplots/extra description/.@cmd}\pgfeov%
+ \endgroup
+ \endtikzpicture%
+ \begingroup
+ % Protocol sizes for the axis-shape.
+ % I fear that needs to be done globally, do avoid all those
+ % \endgroup's in and after \endpgfinterruptpicture ...
+ \ifdim\pgf@picmaxx=-16000pt\relax%
+ \pgf@picmaxx=0pt\relax%
+ \pgf@picminx=0pt\relax%
+ \pgf@picmaxy=0pt\relax%
+ \pgf@picminy=0pt\relax%
+ \fi%
+ %
+ \xdef\pgfplots@saveddimen@picminx{\the\pgf@picminx}%
+ \xdef\pgfplots@saveddimen@picminy{\the\pgf@picminy}%
+ %
+ \pgf@xa=\pgfplots@xcoordmaxTEX
+ \advance\pgf@xa by-\pgf@picminx
+ \xdef\pgfplots@savedanchor@inner@upperright@x{\the\pgf@xa}%
+ %
+ \pgf@xa=\pgfplots@xcoordminTEX
+ \advance\pgf@xa by-\pgf@picminx
+ \xdef\pgfplots@savedanchor@inner@lowerleft@x{\the\pgf@xa}%
+ %
+ \pgf@xa=\pgfplots@ycoordmaxTEX
+ \advance\pgf@xa by-\pgf@picminy
+ \xdef\pgfplots@savedanchor@inner@upperright@y{\the\pgf@xa}%
+ %
+ \pgf@xa=\pgfplots@ycoordminTEX
+ \advance\pgf@xa by-\pgf@picminy
+ \xdef\pgfplots@savedanchor@inner@lowerleft@y{\the\pgf@xa}%
+ \endgroup
+ \endpgfinterruptpicture
+ \egroup\egroup% end of pgfnodepartimagebox
+ %
+ \let\tikz@fig@name=\pgfplots@fig@name
+ \tikz@fig@mustbenamed
+ \pgftransformshift{\pgfplots@at}%
+ \pgfmultipartnode{pgfplots@low@level@shape}{\pgfplots@anchorname}{\tikz@fig@name}{\pgfusepath{discard}}%
+ \pgfplots@fig@alias
+ %
+ \pgfplots@finally@correct@child@node@positions
+ \pgfplots@stacked@finalize
+ \endgroup
+}
+
+% Now, we need to process all named nodes inside of our
+% axis-image.
+%
+% The situation at this point is as follows:
+% 1. the complete axis image has been "typeset" into a box. That
+% means its coordinate system is LOST up to those variables
+% which have been saved explicitly.
+%
+% 2. the \pgfmultipartnode above knows about all axis anchors and
+% saved dimensions.
+%
+% 3. All sub-nodes don't know about their position any more. Any
+% saved anchors are wrong.
+%
+% The approach:
+% 1. we shift each named node's saved anchors such that it's
+% coordinate is valid inside of the TeX box.
+%
+% 2. we also shift each named node's saved anchors to reflect the
+% axis' anchor.
+%
+% Afterwards, everything should be fine.
+\def\pgfplots@finally@correct@child@node@positions{%
+ \ifx\pgfplots@named@child@node@list\pgfutil@empty%
+ \else%
+ \begingroup
+ \pgftransformreset% FIXME: what's that for!? Copied from matrix code...
+ %
+ % Use the 'image' anchor here - the internal anchor
+ % transformation matrix already has the shift for
+ % \pgfplots@anchorname.
+ \pgfpointanchor{\tikz@fig@name}{image}%
+ \pgf@xa=\pgf@x
+ \pgf@xb=\pgf@y
+ \pgf@process{\pgfqpoint{\pgfplots@saveddimen@picminx}{\pgfplots@saveddimen@picminy}}%
+ \advance\pgf@xa by-\pgf@x
+ \advance\pgf@xb by-\pgf@y
+ \pgf@x=\pgf@xa
+ \pgf@y=\pgf@xb
+ \edef\pgfplots@offset{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}%
+ %
+ \pgfutil@for\pgfplots@child@node@name:=\pgfplots@named@child@node@list\do{%
+ \ifx\pgfplots@child@node@name\pgfutil@empty
+ \else
+ \expandafter\ifx\csname pgfplots@child@node@visited@\pgfplots@child@node@name\endcsname\relax%
+ \pgfutil@ifundefined{pgf@sh@nt@\pgfplots@child@node@name}{%
+ \pgfplots@warning{Package pgfplots WARNING: could not adjust coordinates of named node '\pgfplots@child@node@name' for reasons I do not understand! After finishing the image, it did no longer exist!? Sorry.}%
+ }{%
+ \pgf@shift@node{\pgfplots@child@node@name}{\pgfplots@offset}%
+ \expandafter\let\csname pgfplots@child@node@visited@\pgfplots@child@node@name\endcsname=\pgfutil@empty%
+ }%
+ \fi
+ \fi
+ }%
+ \endgroup
+ \fi%
+}%
+
+\def\pgfplots@environment@axis{%
+ \pgfutil@ifnextchar[{\pgfplots@@environment@axis}{\pgfplots@@environment@axis[]}%
+}
+\let\endpgfplots@environment@axis=\endpgfplots@environment@opt
+\def\pgfplots@@environment@axis[#1]{%
+ \pgfplots@environment@opt[/pgfplots/xmode=linear,/pgfplots/ymode=linear,#1]%
+}
+
+\def\pgfplots@environment@semilogxaxis{%
+ \pgfutil@ifnextchar[{\pgfplots@@environment@semilogxaxis}{\pgfplots@@environment@semilogxaxis[]}%
+}
+\let\endpgfplots@environment@semilogxaxis=\endpgfplots@environment@opt
+\def\pgfplots@@environment@semilogxaxis[#1]{%
+ \pgfplots@environment@opt[/pgfplots/xmode=log,/pgfplots/ymode=linear,#1]%
+}
+
+\def\pgfplots@environment@semilogyaxis{%
+ \pgfutil@ifnextchar[{\pgfplots@@environment@semilogyaxis}{\pgfplots@@environment@semilogyaxis[]}%
+}
+\let\endpgfplots@environment@semilogyaxis=\endpgfplots@environment@opt
+\def\pgfplots@@environment@semilogyaxis[#1]{%
+ \pgfplots@environment@opt[/pgfplots/xmode=linear,/pgfplots/ymode=log,#1]%
+}
+
+\def\pgfplots@environment@loglogaxis{%
+ \pgfutil@ifnextchar[{\pgfplots@@environment@loglogaxis}{\pgfplots@@environment@loglogaxis[]}%
+}
+\let\endpgfplots@environment@loglogaxis=\endpgfplots@environment@opt
+\def\pgfplots@@environment@loglogaxis[#1]{%
+ \pgfplots@environment@opt[/pgfplots/xmode=log,/pgfplots/ymode=log,#1]%
+}
+
+
+\pgfutil@ifundefined{tikzaddtikzonlycommandshortcutlet}{%
+ \def\tikzaddtikzonlycommandshortcutlet#1#2{%
+ \expandafter\def\expandafter\tikz@installcommands\expandafter{\tikz@installcommands
+ \let#1=#2
+ }%
+ }%
+}{}
+
+\tikzaddtikzonlycommandshortcutlet\axis\pgfplots@environment@axis
+\tikzaddtikzonlycommandshortcutlet\endaxis\endpgfplots@environment@axis
+
+\tikzaddtikzonlycommandshortcutlet\semilogxaxis\pgfplots@environment@semilogxaxis
+\tikzaddtikzonlycommandshortcutlet\endsemilogxaxis\endpgfplots@environment@semilogxaxis
+
+\tikzaddtikzonlycommandshortcutlet\semilogyaxis\pgfplots@environment@semilogyaxis
+\tikzaddtikzonlycommandshortcutlet\endsemilogyaxis\endpgfplots@environment@semilogyaxis
+
+\tikzaddtikzonlycommandshortcutlet\loglogaxis\pgfplots@environment@loglogaxis
+\tikzaddtikzonlycommandshortcutlet\endloglogaxis\endpgfplots@environment@loglogaxis
diff --git a/Master/texmf-dist/tex/generic/pgfplots/pgfplots/pgfplots.stackedplots.code.tex b/Master/texmf-dist/tex/generic/pgfplots/pgfplots/pgfplots.stackedplots.code.tex
new file mode 100644
index 00000000000..1612ca8c7f5
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgfplots/pgfplots/pgfplots.stackedplots.code.tex
@@ -0,0 +1,365 @@
+%--------------------------------------------
+%
+% Package pgfplots
+%
+% Provides a user-friendly interface to create function plots (normal
+% plots, semi-logplots and double-logplots).
+%
+% It is based on Till Tantau's PGF package.
+%
+% Copyright 2007/2008 by Christian Feuersänger.
+%
+% This program is free software: you can redistribute it and/or modify
+% it under the terms of the GNU General Public License as published by
+% the Free Software Foundation, either version 3 of the License, or
+% (at your option) any later version.
+%
+% This program is distributed in the hope that it will be useful,
+% but WITHOUT ANY WARRANTY; without even the implied warranty of
+% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+% GNU General Public License for more details.
+%
+% You should have received a copy of the GNU General Public License
+% along with this program. If not, see <http://www.gnu.org/licenses/>.
+%
+%--------------------------------------------
+
+%
+% This file contains the implementation for stacked plots.
+%
+% Stacked plots always keep record of the last plotted coordinates.
+% Any new plot will be ADDED on top of the last plotted coordinates.
+%
+% Terminology: "last plotted coordinates" are called "zero levels"
+% because they actually work like shifts.
+%
+% Programming Structure:
+%
+% 1. We keep TWO lists of coordinates: a list of CURRENT zero level
+% coordinates and a list of NEXT zero level coordinates.
+%
+% The first one will be queried whenever a zero level coordinate is
+% requested.
+%
+% The second one will be used to form zero levels for the next plot.
+%
+% 2. At the beginning and end of each plot, the lists in 1.) are
+% initialised properly.
+%
+% 3. While plot coordinates are processed, the following methods
+% interact with the stacked API:
+% \pgfplots@stacked@preparepoint@inmacro
+% -> compute the 'stacked' sum.
+% This may need to be done with floating point arithmetics because
+% the data scaling trafo is not yet initialised
+%
+% \pgfplots@stacked@finishpoint
+% -> takes coordinates as they will be given to Tikz. This method is
+% used to
+% - communicate zero level coordinates to Tikz
+% - implement the 'closed paths' option (allows filled stacked plots).
+%
+% \pgfplots@stacked@rememberzerolevelpoint@for@next@plot
+% \pgfplots@stacked@getnextzerolevelpoint
+%
+% 4. Zero levels are communicated to Tikz by
+% \pgfplots@stacked@initzerolevelhandler. This routine initialises an
+% input stream for Tikz plot handlers which produces a sequence of
+% zero levels. It is used by [xy]comb and [xy]bar.
+%
+%
+% REMARK:
+% the state of the boolean \ifpgfplots@datascaletrafo@initialised
+% determines whether these routines expect and return floating point
+% numbers or fixed point numbers.
+
+\let\pgfplots@stacked@zerolevelpoint@x=\pgfutil@empty
+\let\pgfplots@stacked@zerolevelpoint@y=\pgfutil@empty
+\newif\ifpgfplots@stacked@isfirstplot
+\newif\ifpgfplots@stacked@isinitialised
+
+% Pre-initialisation.
+% Needs to be called before the first call to
+% \pgfplots@stacked@beginplot.
+\def\pgfplots@stacked@initialise{%
+ \pgfplots@stacked@isfirstplottrue
+ \pgfplots@stacked@isinitialisedtrue
+}%
+
+% Cleanup method. Truncates any global variables to reduce string
+% space.
+\def\pgfplots@stacked@finalize{%
+ \global\pgfplotslistnewempty\pgfplots@stacked@zerolevellist
+ \global\pgfplotslistnewempty\pgfplots@stacked@nextzerolevellist
+ \pgfplots@stacked@isinitialisedfalse
+}%
+
+% (Re)defines the macro \pgfplots@stacked@getnextzerolevelpoint
+% at the beginning of each plot.
+%
+% The macro \pgfplots@stacked@getnextzerolevelpoint fills
+% \pgfplots@stacked@zerolevelpoint@[xy].
+%
+% ATTENTION: call \pgfplots@stacked@initialise before the first call
+% to beginplot!
+\def\pgfplots@stacked@beginplot{%
+%\message{pgfplots@stacked@beginplot: PLOT STARTED.}%
+ \ifpgfplots@stacked@isinitialised
+ \else
+ \pgfplots@error{LOGIC ERROR: please call \string\pgfplots@stacked@initialise.}%
+ \fi
+ \global\pgfplotslistnewempty\pgfplots@stacked@PGFzerolevels
+ % accumulate this command here for \closedcycle:
+ \let\pgfplots@stacked@closedcycle@impl=\pgfutil@empty
+ \ifpgfplots@stacked@isfirstplot
+ \global\pgfplotslistnewempty\pgfplots@stacked@zerolevellist
+ \def\pgfplots@stacked@zerolevelpoint@x{0}%
+ \def\pgfplots@stacked@zerolevelpoint@y{0}%
+ \ifpgfplots@datascaletrafo@initialised
+ % work with pgfmath if possible - its faster.
+ \else
+ % only work with float if its really necessary - for
+ % example if the scaling trafo which maps to pgfmath is
+ % not yet initialised.
+ \ifpgfplots@float@numerics@mode@x
+ \pgfmathfloatcreate{0}{0.0}{0}%
+ \let\pgfplots@stacked@zerolevelpoint@x=\pgfmathresult
+ \fi
+ \ifpgfplots@float@numerics@mode@y
+ \pgfmathfloatcreate{0}{0.0}{0}%
+ \let\pgfplots@stacked@zerolevelpoint@y=\pgfmathresult
+ \fi
+ \fi
+ \def\pgfplots@stacked@getnextzerolevelpoint{}% will remain constant anyway.
+ \else
+ {\globaldefs=1
+ \pgfplotslistcopy\pgfplots@stacked@nextzerolevellist\to\pgfplots@stacked@zerolevellist
+ }%
+ \def\pgfplots@stacked@getnextzerolevelpoint{%
+ {\globaldefs=1
+ \pgfplotslistpopfront\pgfplots@stacked@zerolevellist\to\pgfmathresult
+ }%
+ \expandafter\pgfplots@stacked@parsezerolevelpoint\pgfmathresult
+ }%
+ \fi
+ \global\pgfplotslistnewempty\pgfplots@stacked@nextzerolevellist
+}%
+
+\def\pgfplots@stacked@parsezerolevelpoint(#1,#2){%
+ \def\pgfplots@stacked@zerolevelpoint@x{#1}%
+ \def\pgfplots@stacked@zerolevelpoint@y{#2}%
+}
+
+\def\pgfplots@stacked@endplot{%
+ \ifpgfplots@stacked@isfirstplot
+ \let\pgfplots@stacked@closedcycle@impl=\pgfplots@path@closed@cycle@std
+ \else
+ \pgfplots@toka=\expandafter{\pgfplots@stacked@closedcycle@impl}%
+ \edef\pgfplots@stacked@closedcycle@impl{%
+ [mark=none,/utils/exec=\noexpand\pgfplots@try@mirror@plot@handler]
+ --plot coordinates{\the\pgfplots@toka}
+ --cycle
+ }%
+ \fi
+ \global\pgfplots@stacked@isfirstplotfalse
+%\message{pgfplots@stacked@endplot: PLOT ENDED}%
+}%
+
+% WARNING: when this method is called, NEITHER
+% \ifpgfplots@stacked@isfirstplot NOR the zero level lists are
+% initialised!
+\def\pgfplots@stacked@initzerolevelhandler{%
+ \ifpgfplots@stacked@x
+ \pgfplotxzerolevelstream@@list
+ \pgfplotyzerolevelstreamconstant{\pgfplots@ZERO@y}%
+ \else
+ \pgfplotxzerolevelstreamconstant{\pgfplots@ZERO@x}%
+ \pgfplotyzerolevelstream@@list
+ \fi
+}%
+
+\def\pgfplots@stacked@rememberzerolevelpoint@for@next@plot#1{%
+ \edef\pgfplots@TMP{#1}%
+ {\globaldefs=1
+ \expandafter\pgfplotslistpushback\pgfplots@TMP\to\pgfplots@stacked@nextzerolevellist
+ }%
+}
+
+\def\pgfplots@stacked@finishpoint#1#2{%
+ \ifpgfplots@stacked@isfirstplot
+ \else
+ \pgfpointxy{\pgfplots@stacked@zerolevelpoint@x}{\pgfplots@stacked@zerolevelpoint@y}%
+ \ifpgfplots@stacked@x
+ \edef\pgfplots@TMP{\the\pgf@x}%
+ \else
+ \edef\pgfplots@TMP{\the\pgf@y}%
+ \fi
+ {\globaldefs=1
+ \expandafter\pgfplotslistpushback\pgfplots@TMP\to\pgfplots@stacked@PGFzerolevels
+ }%
+ \pgfplotslist@TOK@a=\expandafter{\pgfplots@stacked@closedcycle@impl}%
+ \edef\pgfplots@stacked@closedcycle@impl{%
+ (\pgfplots@stacked@zerolevelpoint@x,\pgfplots@stacked@zerolevelpoint@y)%
+ \the\pgfplotslist@TOK@a}%
+ \fi
+}%
+
+\def\pgfplots@stacked@preparepoint@inmacro#1#2{%
+ \pgfplots@stacked@getnextzerolevelpoint
+ \ifpgfplots@stacked@x
+ \ifpgfplots@stacked@plus
+ \let\pgfplots@stacked@op=\pgfmathadd@
+ \else
+ \let\pgfplots@stacked@op=\pgfmathsubtract@
+ \fi
+ \ifpgfplots@float@numerics@mode@x
+ \ifpgfplots@datascaletrafo@initialised
+ \else
+ \ifpgfplots@stacked@plus
+ \let\pgfplots@stacked@op=\pgfmathfloatadd@
+ \else
+ \let\pgfplots@stacked@op=\pgfmathfloatsubtract@
+ \fi
+ \fi
+ \fi
+ \pgfplots@stacked@op{\pgfplots@stacked@zerolevelpoint@x}{#1}%
+ \let#1=\pgfmathresult
+ \else
+ \ifpgfplots@stacked@plus
+ \let\pgfplots@stacked@op=\pgfmathadd@
+ \else
+ \let\pgfplots@stacked@op=\pgfmathsubtract@
+ \fi
+ \ifpgfplots@float@numerics@mode@y
+ \ifpgfplots@datascaletrafo@initialised
+ \else
+ \ifpgfplots@stacked@plus
+ \let\pgfplots@stacked@op=\pgfmathfloatadd@
+ \else
+ \let\pgfplots@stacked@op=\pgfmathfloatsubtract@
+ \fi
+ \fi
+ \fi
+ \pgfplots@stacked@op{\pgfplots@stacked@zerolevelpoint@y}{#2}%
+ \let#2=\pgfmathresult
+ \fi
+ \pgfplots@stacked@rememberzerolevelpoint@for@next@plot{(#1,#2)}%
+}
+
+% This here is a re-implementation of the stored plot processing.
+%
+% The idea is simply, although it requires quite some work:
+%
+% If we stack plots on top of each other, early drawing commands
+% (early plots) will be OVERDRAWN by later drawing commands (later
+% plots). This is especially unfortunate if we use filled bar plots
+% or comb plots.
+%
+% IDEA: draw plots in REVERSE order. The positioning, styles and
+% whatever must not be affected, only the sequence of drawing commands
+% shall change.
+%
+% So, this command here does all numerics which is to be done and
+% assembles a NEW, REVERSED STORED PLOT LIST.
+\def\pgfplots@stacked@finalize@stored@plots{%
+ \pgfplotslistnewempty\pgfplots@stored@plotlist@reversed
+ \begingroup
+ \pgfplotslistforeachungrouped\pgfplots@stored@plotlist\as\pgfplots@TMP{%
+ \expandafter\pgfplots@stored@plotlist@EXTRACTENTRY\pgfplots@TMP
+ \ifx\pgfplots@stored@current@cmd\pgfutil@empty
+ \else
+ \ifpgfplots@apply@datatrafo
+ % Apply the data scaling transformation, but do NOT
+ % issue any drawing commands (-> use the ...@dryrun
+ % version)
+ \expandafter\pgfplots@coord@stream@finalize@storedcoords@START@dryrun\pgfplots@stored@current@data\to\pgfplots@stored@current@data\pgfplots@stored@current@precmdapp%
+ % save any intermediate results as "precmd":
+ \pgfplotslist@TOK@b=\expandafter{\pgfplots@stored@current@precmd}%
+ \pgfplotslist@TOK@a=\expandafter{\pgfplots@stored@current@precmdapp}%
+ \edef\pgfplots@stored@current@precmd{\the\pgfplotslist@TOK@b\the\pgfplotslist@TOK@a}%
+ \fi
+ \fi
+ % Now, we need to insert all stored entities into the new,
+ % reversed list. We only expand them ONCE.
+ \pgfplotslist@TOK@a=\expandafter{\pgfplots@stored@current@precmd}%
+ \pgfplotslist@TOK@b=\expandafter{\pgfplots@stored@current@cmd}%
+ \edef\pgfplots@TMP{%
+ {\the\pgfplotslist@TOK@a}{\the\pgfplotslist@TOK@b}}%
+ \pgfplots@toka=\expandafter{\pgfplots@TMP}%
+ \pgfplotslist@TOK@a=\expandafter{\pgfplots@stored@current@data}%
+ \pgfplotslist@TOK@b=\expandafter{\pgfplots@stored@current@postcmd}%
+ \edef\pgfplots@TMP{%
+ \the\pgfplots@toka
+ {\the\pgfplotslist@TOK@a}{\the\pgfplotslist@TOK@b}}%
+ % Reverse sequence:
+ \expandafter\pgfplotslistpushfront\pgfplots@TMP\to\pgfplots@stored@plotlist@reversed
+ }%
+ % Now, overwrite the original list:
+ \global\let\pgfplots@stored@plotlist=\pgfplots@stored@plotlist@reversed
+ \endgroup
+}%
+
+\def\pgfplots@stacked@path@closed@cycle{%
+ \pgfplots@stacked@closedcycle@impl
+}
+
+% Saves the finalized variables into macro #1 such that a call to #1
+% restores them.
+%
+% This affects pgf zero level handlers and whether this here is the
+% first plot or not..
+\def\pgfplots@stacked@savestateto#1{%
+ \pgfplotslist@TOK@a=\expandafter{\pgfplots@stacked@PGFzerolevels}%
+ \ifpgfplots@stacked@isfirstplot
+ \pgfplotslist@TOK@b={\pgfplots@stacked@isfirstplottrue}%
+ \else
+ \pgfplotslist@TOK@b={\pgfplots@stacked@isfirstplotfalse}%
+ \fi
+ \pgfplots@toka=\expandafter{\pgfplots@stacked@closedcycle@impl}%
+ \edef#1{%
+ \noexpand\gdef\noexpand\pgfplots@stacked@PGFzerolevels{\the\pgfplotslist@TOK@a}%
+ \the\pgfplotslist@TOK@b
+ \noexpand\def\noexpand\pgfplots@stacked@closedcycle@impl{\the\pgfplots@toka}%
+ }%
+}
+
+% PGF interfaces:
+\def\pgfplotxzerolevelstream@@list{%
+ \def\pgf@plotxzerolevelstreamstart{%
+ \global\let\pgfplotxzerolevelstream@@list@@backup=\pgfplots@stacked@PGFzerolevels
+ \gdef\pgf@plotxzerolevelstreamnext{%
+ \pgfplotslistcheckempty\pgfplots@stacked@PGFzerolevels
+ \ifpgfplotslistempty
+ \global\pgf@x=\pgfplots@ZERO@x\relax
+ \else
+ {\globaldefs=1\relax
+ \pgfplotslistpopfront\pgfplots@stacked@PGFzerolevels\to\pgfmathresult
+ }%
+ \global\pgf@x=\pgfmathresult\relax
+ \fi
+ }%
+ }%
+ \def\pgf@plotxzerolevelstreamend{%
+ \global\let\pgfplots@stacked@PGFzerolevels=\pgfplotxzerolevelstream@@list@@backup
+ }%
+}%
+
+\def\pgfplotyzerolevelstream@@list{%
+ \def\pgf@plotyzerolevelstreamstart{%
+ \global\let\pgfplotyzerolevelstream@@list@@backup=\pgfplots@stacked@PGFzerolevels
+ \gdef\pgf@plotyzerolevelstreamnext{%
+ \pgfplotslistcheckempty\pgfplots@stacked@PGFzerolevels
+ \ifpgfplotslistempty
+ \global\pgf@x=\pgfplots@ZERO@y\relax
+ \else
+ {\globaldefs=1\relax
+ \pgfplotslistpopfront\pgfplots@stacked@PGFzerolevels\to\pgfmathresult
+ }%
+ \global\pgf@x=\pgfmathresult\relax
+ \fi
+ }%
+ }%
+ \def\pgf@plotyzerolevelstreamend{%
+ \global\let\pgfplots@stacked@PGFzerolevels=\pgfplotyzerolevelstream@@list@@backup
+ }%
+}%
diff --git a/Master/texmf-dist/tex/latex/pgfplots/liststructure.sty b/Master/texmf-dist/tex/latex/pgfplots/liststructure.sty
deleted file mode 100644
index c5930374f7d..00000000000
--- a/Master/texmf-dist/tex/latex/pgfplots/liststructure.sty
+++ /dev/null
@@ -1,196 +0,0 @@
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% This is a helper package with an elementary list datastructure.
-%
-% Its implementation is based on Knuth's list macros in "The TeXbook".
-%
-% The following macros are supplied:
-%
-% \listnewempty
-% \listnew
-% \listcopy
-% \listpopfront
-% \listpushback
-% \listpushfront
-% \listsize
-% \listselect
-% \listcheckempty
-% \listforeach
-%
-% Copyright 2007/2008 by Christian Feuersänger.
-%
-% This program is free software: you can redistribute it and/or modify
-% it under the terms of the GNU General Public License as published by
-% the Free Software Foundation, either version 3 of the License, or
-% (at your option) any later version.
-%
-% This program is distributed in the hope that it will be useful,
-% but WITHOUT ANY WARRANTY; without even the implied warranty of
-% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-% GNU General Public License for more details.
-%
-% You should have received a copy of the GNU General Public License
-% along with this program. If not, see <http://www.gnu.org/licenses/>.
-%
-%
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{liststructure}[2008/02/17 Version 0.9.4]
-
-\newtoks\TOKL@ta
-\newtoks\TOKL@tb
-\newif\iflistempty
-
-% Creates a new, empty list.
-\long\def\listnewempty#1{\let#1=\empty}
-
-% Creates a new list with an abirtrary number of elements.
-% Arguments:
-% #1: the list's name (a macro name)
-% #2: the elements in the form
-% first\\second\\third\\ ...\\
-% like in tabular with one column.
-%
-% Example:
-% \listnew\foolist{First Element\\Second Element\\Third Element\\}
-%
-% WARNING: do NOT forget the final '\\'!
-\long\def\listnew#1#2{%
- \listnewempty{#1}%
- \long\def\listnew@impl@rest{#2}%
- \loop
- \ifx\listnew@impl@rest\empty
- \else
- \expandafter\listnew@impl\listnew@impl@rest\tolist#1\relax
- \repeat
-}
-
-% Copies list #1 to list #2.
-\def\listcopy#1\to#2{\let#2=#1}
-
-
-% helper macro for \listnew
-\long\def\listnew@impl#1\\#2\tolist#3{%
- \listpushback#1\to#3\relax%
- \def\listnew@impl@rest{#2}%
-}
-
-
-% #1: the item to prepend
-% #2: the list as macro name
-% Example:
-% \listpushfront Next first Element\to\foolist
-\long\def\listpushfront#1\to#2{%
- \TOKL@ta={\list@sep{#1}}%
- \TOKL@tb=\expandafter{#2}%
- \edef#2{\the\TOKL@ta\the\TOKL@tb}%
-}
-
-% #1: the item to append
-% #2: the list as macro name
-% Example:
-% \listpushback Next last element\to\foolist
-\long\def\listpushback#1\to#2{%
- \TOKL@ta={\list@sep{#1}}%
- \TOKL@tb=\expandafter{#2}%
- \edef#2{\the\TOKL@tb\the\TOKL@ta}%
-}
-
-% Concatenates two lists #2 and #3 into #1
-% Example:
-% \listconcat\result=\foolist&\bar
-\long\def\listconcat#1=#2&#3{%
- \TOKL@ta=\expandafter{#2}%
- \TOKL@tb=\expandafter{#3}%
- \edef#1{\the\TOKL@ta\the\TOKL@tb}%
-}
-
-% implements #2 := pop_front(#1)
-% Example:
-% \listpopfront\foolist\to\poppedfirstelem
-\long\def\listpopfront#1\to#2{%
- \listcheckempty#1\relax
- \iflistempty
- \errmessage{ERROR: \string\listpopfront\ from \string#1\ although list is EMPTY}%
- \else
- \expandafter\listpopfront@impl#1\listpopfront@macronames#1#2%
- \fi
-}
-
-% implementation helper for listpopfront
-\long\def\listpopfront@impl\list@sep#1#2\listpopfront@macronames#3#4{%
- \def#4{#1}%
- \def#3{#2}%
-}
-
-% Counts the number of elements in list #1, storing it into the count
-% register #2.
-% Example:
-% \listsize\foo\to{\count0}%
-% \the\count0
-\long\def\listsize#1\to#2{%
- #2=0%
- \long\def\list@sep##1{\advance#2 by 1 }%
- #1%
-}
-
-% Returns the #1th element of list #2 into macro #3
-% Arguments:
-% #1: a count 0,...,N-1 where N is the list size.
-% You may specify a number of a count.
-% #2: a list
-% #3: a macro name
-% Example:
-% Element 0:
-% \listselect0\of\foo\to\elem
-% \elem
-% Element \count1:
-% \listselect\count1\of\foo\to\elem
-\long\def\listselect#1\of#2\to#3{%
- \def#3{\errmessage{The requested item #1 of \string#2 is OUT OF RANGE.}}%
- \begingroup
- \count0=#1\relax
- \long\def\list@sep##1{%
- \advance\count0-1
- \ifnum\count0=-1
- \global\def\listselect@tmp{\def#3{##1}}%
- % the command \listselect@tmp will be expander AFTER
- % '\endgroup'
- \aftergroup\listselect@tmp%
- \fi%
- }%
- #2%
- \endgroup
-}
-
-% Sets the boolean \iflistempty depending on whether list #1 is empty
-% or not.
-% Example:
-%
-% \listcheckempty\foolist
-% \iflistempty
-% List foolist is empty!
-% \else
-% List is not empty.
-% \fi
-\def\listcheckempty#1{%
- \ifx#1\empty
- \listemptytrue
- \else
- \listemptyfalse
- \fi
-}
-
-
-% Iterates through each list element, names it #2 and calls code #3.
-% Example:
-% \listnew\foolist{Eins\\Zwei\\Drei\\}%
-% \listforeach\foolist\as\foo{Element \foo\par}%
-% results in
-% Element Eins
-% Element Zwei
-% Element Drei
-\long\def\listforeach#1\as#2#3{{%
- \long\def\list@sep##1{\def#2{##1}#3}%
- #1\relax
-}}
diff --git a/Master/texmf-dist/tex/latex/pgfplots/pgfmathlog.sty b/Master/texmf-dist/tex/latex/pgfplots/pgfmathlog.sty
deleted file mode 100644
index 9e9b57ea137..00000000000
--- a/Master/texmf-dist/tex/latex/pgfplots/pgfmathlog.sty
+++ /dev/null
@@ -1,215 +0,0 @@
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Package pgfmathlog.sty.
-%
-% This file provides the public functions
-%
-% \pgfmathnormalisedfloatingpoint#1\to#2\powten#3
-% like
-% \pgfmathnormalisedfloatingpoint 412.02451e-5to\M\powten\E
-%
-% and
-% \pgfmathlog
-% \pgfmathlog@
-% which both assign \pgfmathresult to the natural number of a given
-% number (without units).
-%
-% It is based on Till Tantaus pgfmath package which comes as part of
-% the PGF bundle, but it provides its own number parsing routines to
-% circumvent TeXs limited real number representations.
-%
-% Copyright 2007/2008 by Christian Feuersänger.
-%
-% This program is free software: you can redistribute it and/or modify
-% it under the terms of the GNU General Public License as published by
-% the Free Software Foundation, either version 3 of the License, or
-% (at your option) any later version.
-%
-% This program is distributed in the hope that it will be useful,
-% but WITHOUT ANY WARRANTY; without even the implied warranty of
-% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-% GNU General Public License for more details.
-%
-% You should have received a copy of the GNU General Public License
-% along with this program. If not, see <http://www.gnu.org/licenses/>.
-%
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\ProvidesPackage{pgfmathlog}[2008/02/17 Version 0.9.4]
-\RequirePackage{pgf}[2007/01/01]
-\RequirePackage{sciformat}[2008/02/17]
-\RequirePackage{pgfplotshelpers}[2008/02/17]
-
-% See \sciparse docs
-\def\pgfmathnormalisedfloatingpoint#1\to#2\powten#3{%
- \sciparse#1\to#2\powten{#3}%
-}
-
-% Evaluates the natural logarithm, log(x) for 0.1<=x<=1.
-% @see \pgfmathlog@ for the general method.
-% NON ACCURATE ENOUGH!
-\def\pgfmathlogzeroone#1{%
- \begingroup%
- \message{EVAL log(#1) STARTS:}%
- \pgfmath@x=#1pt\relax
- \pgfmath@y=\pgfmath@x
- \advance\pgfmath@x by-1pt
- \advance\pgfmath@y by 1pt
- \pgfmathdivide{\pgfmath@x}{\pgfmath@y}%
- % pgfmath@ya = tmp := (#1 -1)/ (#1+1)
- \expandafter\pgfmath@ya\pgfmathresult pt
- % pgfmath@xa := [ (#1 -1)/ (#1+1) ]^2
- \pgfmathmultiply{\pgfmathresult}{\pgfmathresult}%
- \expandafter\pgfmath@xa\pgfmathresult pt
- % returnvalue:
- \pgfmath@y=0pt
- % loop counter:
- \c@pgfmath@counta=0
- % j:
- \c@pgfmath@countb=1
- \loop
- \ifnum\c@pgfmath@counta<6
- \let\multmp=\pgfmath@ya
- \divide\pgfmath@ya by\c@pgfmath@countb
- \advance\pgfmath@y by\pgfmath@ya
- \let\pgfmath@ya=\multmp
- \advance\c@pgfmath@countb by2
- \message{[tmp *= x*x tmp =\the\pgfmath@ya, x*x=\the\pgfmath@xa]}%
- \pgfmathmultiply{\pgfmath@ya}{\pgfmath@xa}%
- \expandafter\pgfmath@ya\pgfmathresult pt
- \advance\c@pgfmath@counta by1
- \message{[cur/2 = \the\pgfmath@y]}%
- \repeat
- \multiply\pgfmath@y by2
- \message{fertiges Resultat fuer log(#1): \the\pgfmath@y}%
- \pgfmath@returnone\pgfmath@y%
- \endgroup%
-}
-
-
-% Computes a good guess for log(X.XXXX) where the input number should
-% be between 0 < x < 10.
-%
-% If it is not in this range, the returned value will be bad.
-%
-% For use in the newton implementation of log(x). Please note that we
-% first compute a normalized floating point representation of x, and
-% the mantisse is always between 0 and 10.
-\def\pgfmathlog@smaller@ten@newton@startval#1#2#3\to#4{%
- \ifnum0<#1\relax
- \def\axis@TMP{#2}%
- \def\axis@TMPB{.}%
- \ifx\axis@TMP\axis@TMPB
- \ifcase#1
- \errmessage{pgfmathlog.sty: INTERNAL ERROR: should not happen!
- [\#1=0 should have been caught before!]}%
- \or#4=0.53062825106217pt
- \or#4=0.993pt
- \or#4=1.308pt
- \or#4=1.5pt
- \or#4=1.71pt
- \or#4=1.872pt
- \or#4=2.01pt
- \or#4=2.145pt
- \or#4=2.24pt
- \fi
-% \message{Newton: Start value \the#4 assigned}%
- \else
-% \message{Kein Komma an zweiter stelle (statt dessen: #2); Nehme standardstartwert.}%
- #4=0.1pt
- \fi
- \else
-% \message{Argument #1 <= 0. Nehme standardstartwert.}%
- #4=0.1pt
- \fi
-}
-
-% Computes log(x) into \pgfmathresult.
-%
-% REMARK
-% This method does NOT use TeX Registers to represent the numbers! The
-% computation is COMPLETELY STRING BASED.
-% This allows numbers such at 10000000 or 5.23e-10 to be represented
-% properly, although TeX-registers would produce overflow/underflow
-% errors in these cases.
-%
-% The natural logarithm is computed using log(X*10^Y) = log(X) + log(10)*Y
-\def\pgfmathlog@#1{%
- \pgfmathlog@newton{#1}%
-}
-
-% Public interface method. This is expected to use \pgfmathparse but
-% it DOESN'T do that. \pgfmathparse naturally can't handle numbers
-% which exceed TeX's numerical capabilities. However, exponentials are
-% typically either too large or too small for TeX.
-%
-% @see \pgfmathnormalisedfloatingpoint for how we parse arguments.
-% @see \pgfmathlog@
-\def\pgfmathlog#1{%
- \pgfmathlog@newton{#1}%
-}
-
-% This implementation of log(X) is done with a newton method applied to x-exp(y) = 0.
-% The implementation \pgfmathexp is used for exp(y).
-%
-% see \pgfmathlog@
-\def\pgfmathlog@newton#1{%
- \begingroup%
- % compute #1 = M*10^E with normalised mantisse M = [+-]*[1-9].XXXXX
- \sciparse#1\to\newtoninput@mantisse\powten\newtoninput@exponent
- %
- % Now, compute log(#1) = log(M) + E*log(10)
-% \message{EVAL log(#1) = log(\newtoninput@mantisse) + \newtoninput@exponent*log(10) mit newton STARTS:}%
- % input argument into \pgfmath@x
- \expandafter\pgfmath@x\newtoninput@mantisse pt
- \ifdim\pgfmath@x>0pt
- % return value:
- \expandafter\pgfmathlog@smaller@ten@newton@startval\newtoninput@mantisse\to\pgfmath@y
- % loop counter:
- \c@pgfmath@counta=0
- \loop
- %\message{Newton iter \#\the\c@pgfmath@counta: log(\newtoninput@mantisse) = \the\pgfmath@y }%
- \ifnum\c@pgfmath@counta<2
- % \pgfmathexp\pgfmath@y%
- \pgfmathlog@invoke@expanded\pgfmathexp@{{\pgf@sys@tonumber{\pgfmath@y}}}%
- \let\tmp=\pgfmathresult
- %\pgfmathdivide\pgfmath@x\tmp%
- \pgfmathlog@invoke@expanded\pgfmathdivide@{{\pgf@sys@tonumber{\pgfmath@x}}{\tmp}}%
- \expandafter\pgfmath@ya\pgfmathresult pt
- \advance\pgfmath@y by\pgfmath@ya
- \advance\pgfmath@y by-1pt
- \advance\c@pgfmath@counta by1
- \repeat
- \pgfmath@x=2.302585pt% = log(10)
- \multiply\expandafter\pgfmath@x\newtoninput@exponent
- \advance\pgfmath@y by\pgfmath@x
-%\message{Newton final result: log(\newtoninput@mantisse)+\newtoninput@exponent*log(10) = \the\pgfmath@y [ nur \newtoninput@exponent * log(10) = \the\pgfmath@x]}%
- \pgfmath@returnone\pgfmath@y%
- \else
- \global\let\pgfmathresult=\empty%
- \fi
- \endgroup%
-}
-
-% Usage:
-% \pgfmathapproxequalto@macro\argone\argtwo\result
-%
-% -> will set \resulttrue or \resultfalse
-% -> check with \ifresult
-\def\pgfmathlog@approxequalto@macro#1#2#3{%
- \begingroup%
- \expandafter\pgfmath@x#1pt\relax%
- \expandafter\pgfmath@y#2pt\relax%
- \advance\pgfmath@x-\pgfmath@y%
- \ifdim\pgfmath@x<0pt
- \multiply\pgfmath@x by-1
- \fi
- \ifdim\pgfmath@x<0.0001pt\relax%
- \expandafter\aftergroup\csname #3true\endcsname
- \else%
- \expandafter\aftergroup\csname #3false\endcsname
- \fi%
- \endgroup%
-}
-
diff --git a/Master/texmf-dist/tex/latex/pgfplots/pgfplots.sty b/Master/texmf-dist/tex/latex/pgfplots/pgfplots.sty
index 114db197b55..3e63fdfa8b7 100644
--- a/Master/texmf-dist/tex/latex/pgfplots/pgfplots.sty
+++ b/Master/texmf-dist/tex/latex/pgfplots/pgfplots.sty
@@ -23,8 +23,8 @@
% along with this program. If not, see <http://www.gnu.org/licenses/>.
%
%--------------------------------------------
-\def\pgfplotsversion{0.92.4}
-\ProvidesPackage{pgfplots}[2008/02/17 Version \pgfplotsversion]
+\def\pgfplotsversion{1.0}
+\ProvidesPackage{pgfplots}[2008/06/07 Version \pgfplotsversion]
% ATTENTION:
% you MAY need one of
@@ -39,2559 +39,12 @@
% 'pdftex' for 'pdflatex'
% -> dvipdfm needs special attention.
-\RequirePackage{xkeyval}[2006/11/18]
-\RequirePackage{ifthen}
-\RequirePackage{liststructure}
-\RequirePackage{tikz}[2007/06/07]
-\RequirePackage{sciformat}
-\RequirePackage{pgfmathlog}
-\usetikzlibrary{plotmarks}
-
-\def\prefix{pgfplots}
-
-% FIXME: reduce number of variables!
-\newcount\axisticknum
-\newcount\axis@tickposnum
-\newcount\axis@xmode
-\newcount\axis@ymode
-\newcount\axis@numplots
-\newdimen\axis@xcoordminTEX
-\newdimen\axis@xcoordmaxTEX
-\newdimen\axis@ycoordminTEX
-\newdimen\axis@ycoordmaxTEX
-\newdimen\axis@tmpa
-\newdimen\axis@tmpb
-\newif\ifaxis@isuniformtick
-\newif\ifaxis@enlargelimits
-\newif\ifaxis@enlargelimits@rel@thresh
-\newif\ifaxis@enlargelimits@auto
-\let\axis@TMP=\empty
-\let\axis@TMPB=\empty
-\let\axis@TMPC=\empty
-
-\def\axis@leftover{}
-\def\axis@rightover{}
-\def\axisdefaultwidth{240pt}
-\def\axisdefaultheight{207pt}
-\def\axisdefaulttickwidth{35}% the maximum space between adjacent ticks (in pt, but don't specify the unit 'pt')
-\def\axisdefaulttryminticks{4}
-
-\listnew{\blackwhiteplotspeclist}{%
- mark options={fill=gray},mark=*\\%
- mark options={fill=gray},mark=square*\\%
- mark options={fill=gray},mark=otimes*\\%
- mark=star\\%
- mark options={fill=gray},mark=diamond*\\%
- densely dashed,mark options={solid,fill=gray},mark=*\\%
- densely dashed,mark options={solid,fill=gray},mark=square*\\%
- densely dashed,mark options={solid,fill=gray},mark=otimes*\\%
- densely dashed,mark options={solid},mark=star\\%
- densely dashed,mark options={solid,fill=gray},mark=diamond*\\%
-}
-\listnew{\coloredplotspeclist}{%
- blue,mark options={fill=blue!80!black},mark=*\\%
- red,mark options={fill=red!80!black},mark=square*\\%
- brown!60!black,mark options={fill=brown!80!black},mark=otimes*\\%
- black,mark=star\\%
- blue,mark options={fill=blue!80!black},mark=diamond*\\%
- red,densely dashed,mark options={solid,fill=red!80!black},mark=*\\%
- brown!60!black,densely dashed,mark options={solid,fill=brown!80!black},mark=square*\\%
- black,densely dashed,mark options={solid,fill=gray},mark=otimes*\\%
- blue,densely dashed,mark=star,mark options=solid\\%
- red,densely dashed,mark options={solid,fill=red!80!black},mark=diamond*\\%
-}
-
-
-\listcopy\coloredplotspeclist\to\autoplotspeclist%
-%\listcopy\blackwhiteplotspeclist\to\autoplotspeclist%
-
-\tikzstyle{every axis}=[]
-\tikzstyle{every axis plot}=[]
-\tikzstyle{every axis label}=[]
-\tikzstyle{every axis x label}=[at={(0.5,0)},below,yshift=-15pt]
-\tikzstyle{every axis y label}=[at={(0,0.5)},xshift=-35pt,rotate=90]
-\tikzstyle{every axis title}=[at={(0.5,1)},above,yshift=6pt]
-\tikzstyle{every tick}=[very thin,gray]
-\tikzstyle{every minor tick}=[]
-\tikzstyle{every major tick}=[]
-\tikzstyle{every axis grid}=[style=help lines]
-\tikzstyle{every minor grid}=[]
-\tikzstyle{every major grid}=[]
-\tikzstyle{every tick label}=[]
-\tikzstyle{every x tick label}=[]
-\tikzstyle{every y tick label}=[]
-
-% specifies how and where to draw the axis.
-% \tikzstyle{every axis legend}+=[at={(0,0)}]
-% will draw it at the lower left corner of the axis while
-% \tikzstyle{every axis legend}+=[at={(1,1)}]
-% means the upper right corner.
-%
-% The legend is a 'node' so you can use any tikz option which affects
-% nodes. The option 'text width' is set automatically, depending on
-% the \legend[textwidth=...] option.
-%
-% Examples:
-% - \tikzstyle{every axis legend}+=[at={(1.02,1)},anchor=north west]
-% draws the legend OUTSIDE TOP RIGHT.
-%
-% - \tikzstyle{every axis legend}+=[at={(1,0.5)},anchor=east,outer sep=0.5cm]
-% draws the legend INSIDE MIDDLE RIGHT, separated by 0.5cm from the axis.
-\tikzstyle{every axis legend}=[%
- cells={anchor=center},
- inner xsep=3pt,inner ysep=2pt,nodes={inner sep=2pt,text depth=0.15em},
- anchor=north east,%
- shape=rectangle,%
- fill=white,%
- draw=black,
- at={(0.98,0.98)}
- ]
-% at={(1,1)},
-% outer sep=0.1cm]
-
-
-\define@cmdkeys[\prefix]{axis}[axis@]{%
- xmin,xmax,xticklabel,xtick,xtickten,xlabel,%
- ymin,ymax,yticklabel,ytick,ytickten,ylabel,%
- subtickwidth,tickwidth,%
- xfilter,yfilter,%
- width,height,%
- title,%
- execute at begin plot,%
- execute at end plot,%
- enlargelimits,%
- legend columns,%
- x,y}%
-
-\long\def\axis@foreach@to@list#1\to#2{%
- \listnewempty\axis@TMP
- \begingroup
- \foreach \i in {#1} {%
- \globaldefs=1
- \expandafter\listpushback\i\to\axis@TMP
- \globaldefs=0
- }%
- \endgroup
- \listcopy\axis@TMP\to#2\relax
-}
-
-\define@cmdkey[\prefix]{axis}[axis@]{xticklabels}{%
- \expandafter\axis@foreach@to@list\axis@xticklabels\to\axis@xticklabels
- %\expandafter\listnew\expandafter\axis@xticklabels\expandafter{\axis@xticklabels}%
- \let\axis@xticklabel=\axis@user@ticklabel@list@x
-}
-\define@cmdkey[\prefix]{axis}[axis@]{yticklabels}{%
- \expandafter\axis@foreach@to@list\axis@yticklabels\to\axis@yticklabels
- %\expandafter\listnew\expandafter\axis@yticklabels\expandafter{\axis@yticklabels}%
- \let\axis@yticklabel=\axis@user@ticklabel@list@y
-}
-
-\define@cmdkey[\prefix]{axis}[axis@]{minor tick length}{%
- \expandafter\let\expandafter\axis@subtickwidth\csname axis@minor tick length\endcsname
-}
-\define@cmdkey[\prefix]{axis}[axis@]{major tick length}{%
- \expandafter\let\expandafter\axis@tickwidth\csname axis@major tick length\endcsname
-}
-
-% sets \axis@tickposnum to
-% left=0
-% right=1
-% both=2
-\define@choicekey[\prefix]{axis}{tickpos}[\val\nr]{left,right,both}{%
- \axis@tickposnum=\nr\relax
-}
-\define@choicekey[\prefix]{axis}{legend plot pos}[\val\nr]{left,right,none}{%
- \edef\axis@legend@plot@pos{\nr}%
-}
-
-\define@choicekey[\prefix]{axis}{anchor}[\val\nr]{north,north west,west,south west,south,south east,east,north east,center}{%
- \edef\axis@anchorchoicenum{\nr}%
-}
-
-\define@choicekey[\prefix]{axis}{ticks}[\val\nr]{none,major,minor,both}{%
- \expandafter\ifcase\nr\relax
- \axis@xminorticksfalse
- \axis@yminorticksfalse
- \axis@xmajorticksfalse
- \axis@ymajorticksfalse
- \or
- \axis@xminorticksfalse
- \axis@yminorticksfalse
- \axis@xmajortickstrue
- \axis@ymajortickstrue
- \or
- \axis@xminortickstrue
- \axis@yminortickstrue
- \axis@xmajorticksfalse
- \axis@ymajorticksfalse
- \or
- \axis@xminortickstrue
- \axis@yminortickstrue
- \axis@xmajortickstrue
- \axis@ymajortickstrue
- \fi
-}
-\define@choicekey[\prefix]{axis}{grid}[\val\nr]{none,major,minor,both}{%
- \expandafter\ifcase\nr\relax
- \axis@xminorgridsfalse
- \axis@yminorgridsfalse
- \axis@xmajorgridsfalse
- \axis@ymajorgridsfalse
- \or
- \axis@xminorgridsfalse
- \axis@yminorgridsfalse
- \axis@xmajorgridstrue
- \axis@ymajorgridstrue
- \or
- \axis@xminorgridstrue
- \axis@yminorgridstrue
- \axis@xmajorgridsfalse
- \axis@ymajorgridsfalse
- \or
- \axis@xminorgridstrue
- \axis@yminorgridstrue
- \axis@xmajorgridstrue
- \axis@ymajorgridstrue
- \fi
-}
-
-
-\define@boolkeys[\prefix]{axis}[axis@]{%
- xminorticks,%
- xmajorticks,%
- yminorticks,%
- ymajorticks,%
- xminorgrids,%
- xmajorgrids,%
- yminorgrids,%
- ymajorgrids,%
- disablelogfilter,%
- disabledatascaling,%
- hide axis,%
- scale only axis}[true]
-
-% sets \axis@xmode to
-% normal=0
-% log=1
-\define@choicekey[\prefix]{axis}{xmode}[\val\nr]{normal,log}{%
- \axis@xmode=\nr\relax
-}
-
-% sets \axis@ymode to
-% normal=0
-% log=1
-\define@choicekey[\prefix]{axis}{ymode}[\val\nr]{normal,log}{%
- \axis@ymode=\nr\relax
-}
-
-\long\def\axispreset#1{%
- \presetkeys[\prefix]{axis}{#1}{}%
-}
-\long\def\legendpreset#1{%
- \errmessage{Sorry, legendpreset is now deprecated, along with the legend options text width and font. Legends are now TikZ-matrizes which provide better alignment and can be placed horizontally. See the manual for details.}%
-}
-
-\presetkeys[\prefix]{axis}{%
- xmode=normal,
- xmin=,
- xmax=,
- xlabel=,
- xtick=,
- xtickten=,
- xticklabel=,
- xminorticks=true,
- xmajorticks=true,
- xminorgrids=false,
- xmajorgrids=false,
- ymode=normal,
- ymin=,
- ymax=,
- ylabel=,
- ytick=,
- ytickten=,
- yticklabel=,
- yminorticks=true,
- ymajorticks=true,
- yminorgrids=false,
- ymajorgrids=false,
- grid=none,%
- tickpos=both,
- xfilter=,
- yfilter=,
- title=,
- width=,
- height=,
- anchor=south west,
- subtickwidth=0.1cm,
- tickwidth=0.15cm,
- scale only axis=false,
- hide axis=false,
- legend columns=1,
- legend plot pos=left,
- x=,% is implicitly set by 'width' and/or '\axisdefaultwidth'
- y=,% is implicitly set by 'height' and/or '\axisdefaultheight'
- execute at begin plot=,%
- execute at end plot=,%
- enlargelimits=auto,
- disablelogfilter=false}{}
-
-\def\logten{2.3025851}
-\def\reciproc@logten{0.434294481903252}
-
-\newcommand{\logi}[1]{%
- \ifcase#1
- \or0
- \or0.693147
- \or1.098612
- \or1.386294
- \or1.60943791
- \or1.7917594
- \or1.94591014
- \or2.07944154
- \or2.197224
- \fi
-}
-
-\newcommand{\show@yticklabel}[2]{{%
- \let\ticknum=#1%
- \ifaxis@float@numerics@mode@y
- % this here stores \\tick@S, \\tick@M, \\tick@E
- \axis@inverse@datascaletrafo@y{#2}\to\tick
- % .. and this here provides \tick as fixed point repr:
- \scitofixedsingle\tick\tick
- \else
- \def\tick{#2}%
- \fi
- \axis@yticklabel
-}}
-
-% x-Achsenbeschriftung zum #1.ten Tick:
-% #1: die ticknum
-% #2: der x wert dafuer
-\newcommand{\show@xticklabel}[2]{{%
- \let\ticknum=#1%
- \ifaxis@float@numerics@mode@x
- % this here stores \\tick@S, \\tick@M, \\tick@E
- \axis@inverse@datascaletrafo@x{#2}\to\tick
- % .. and this here provides \tick as fixed point repr:
- \scitofixedsingle\tick\tick
- \else
- \def\tick{#2}%
- \fi
- \axis@xticklabel
-}}
-
-\def\axis@user@ticklabel@list@x{%
- \listselect\ticknum\of\axis@xticklabels\to\tick
- \tick
-}
-\def\axis@user@ticklabel@list@y{%
- \listselect\ticknum\of\axis@yticklabels\to\tick
- \tick
-}
-
-\newcommand{\axisdefaultticklabel}[0]{%
- $\prettyprintnumber{\tick}$%
-}
-
-\newcommand{\axisdefaultticklabellog}[0]{%
- \logtologtentomacro{\tick}{\roundedtick}%
- $10^{\prettyprintnumber{\roundedtick}}$%
-}
-
-
-\newcommand{\axisshowxlabel}{%
- \node
- [style=every axis label,%
- style=every axis x label]
- {\axis@xlabel};
-
-}
-\newcommand{\axisshowylabel}{%
- \node
- [style=every axis label,
- style=every axis y label]
- {\axis@ylabel};
-}
-\newcommand{\axisshowtitle}{%
- \node%
- [style=every axis title]
- {\axis@title};
-}
-
-% Y-Achsen und Achsenbeschriftung LOG:
-% 1: Ticks
-\newcommand{\axis@drawyaxis}[1]{%
- \begingroup
- \newif\ifneedsminorloop
- \axisticknum=0
- \edef\axis@TMP{#1}%
- \ifx\axis@TMP\empty
- \else
- \ifaxis@yminorticks
- \needsminorlooptrue
- \fi
- \ifaxis@yminorgrids
- \needsminorlooptrue
- \fi
- \def\axis@placecomputedtick##1[##2]{%
- \draw[##2]
- \ifcase\axis@tickposnum
- (\axis@xcoordminTEX\axis@leftover, \axis@tmpa)
- -- (\axis@xcoordminTEX+##1, \axis@tmpa)
- \or
- (\axis@xcoordmaxTEX\axis@rightover, \axis@tmpa)
- -- (\axis@xcoordmaxTEX-##1, \axis@tmpa)
- \or
- (\axis@xcoordminTEX\axis@leftover, \axis@tmpa)
- -- (\axis@xcoordminTEX+##1, \axis@tmpa)
-
- (\axis@xcoordmaxTEX\axis@rightover, \axis@tmpa)
- -- (\axis@xcoordmaxTEX-##1, \axis@tmpa)
- \fi
- ;
- }%
- \def\placecomputedgridline[##1]{%
- \draw[##1]
- (\axis@xcoordminTEX\axis@leftover, \axis@tmpa)
- -- (\axis@xcoordmaxTEX\axis@rightover, \axis@tmpa)
- ;
- }%
- \foreach \y in {#1} {
- \pgfextracty{\axis@tmpa}{\pgfpointxy{0}{\y}}%
- %
- \ifdim\axis@tmpa<\axis@ycoordminTEX
- \else
- \ifdim\axis@tmpa>\axis@ycoordmaxTEX
- \else
- % Achsenbeschriftung:
- \ifnum\axis@tickposnum=1
- \node at
- (\axis@xcoordmaxTEX\axis@leftover,\axis@tmpa)
- [right,style=every tick label,style=every y tick label]
- {\show@yticklabel\axisticknum\y};
- \else
- \node at
- (\axis@xcoordminTEX\axis@leftover,\axis@tmpa)
- [left,style=every tick label,style=every y tick label]
- {\show@yticklabel\axisticknum\y};
- \fi
- \fi
- \fi
- \global\advance\axisticknum by1
- \begin{scope}
- \clip (\axis@xcoordminTEX\axis@leftover, \axis@ycoordminTEX\axis@leftover)
- rectangle (\axis@xcoordmaxTEX\axis@rightover, \axis@ycoordmaxTEX\axis@rightover);
- % Y-ticks left and/or right
- % in log:
- % log( i*10^k ) = log\i + k\log10 -> draw ticks for i=1..9
- \ifneedsminorloop
- \foreach \i in {1,...,9} {
- % this code here is scoped inside of \foreach.
- \pgfextracty{\axis@tmpb}{\pgfpointxy{0}{\logi\i}}%
- \advance\axis@tmpa by\axis@tmpb
- \ifaxis@yminorgrids
- \placecomputedgridline[style=every axis grid,style=every minor grid]%
- \fi
- \ifaxis@yminorticks
- \axis@placecomputedtick\axis@subtickwidth[style=every tick,style=every minor tick]%
- \fi
- }%
- \fi
- \ifaxis@ymajorgrids
- \placecomputedgridline[style=every axis grid,style=every major grid]%
- \fi
- \ifaxis@ymajorticks
- \axis@placecomputedtick\axis@tickwidth[style=every tick,style=every major tick]%
- \fi
- \end{scope}
- }%
- \fi
- \endgroup
-}
-
-% X-Achsen und Achsenbeschriftung
-% 1: Ticks
-\newcommand{\axis@drawxaxis}[1]{%
- \begingroup
- \axisticknum=0
- \newif\ifneedsminorloop
- \edef\axis@TMP{#1}%
- \ifx\axis@TMP\empty
- \else
- \ifaxis@xminorticks
- \needsminorlooptrue
- \fi
- \ifaxis@xminorgrids
- \needsminorlooptrue
- \fi
- \def\axis@placecomputedtick##1[##2]{%
- \draw[##2]
- \ifcase\axis@tickposnum
- (\axis@tmpa, \axis@ycoordminTEX\axis@leftover)
- -- (\axis@tmpa, \axis@ycoordminTEX+##1)
- \or
- (\axis@tmpa, \axis@ycoordmaxTEX\axis@rightover)
- -- (\axis@tmpa, \axis@ycoordmaxTEX-##1)
- \or
- (\axis@tmpa, \axis@ycoordminTEX\axis@leftover)
- -- (\axis@tmpa, \axis@ycoordminTEX+##1)
-
- (\axis@tmpa, \axis@ycoordmaxTEX\axis@rightover)
- -- (\axis@tmpa, \axis@ycoordmaxTEX-##1)
- \fi
- ;
- }%
- \def\placecomputedgridline[##1]{%
- \draw[##1]
- (\axis@tmpa, \axis@ycoordminTEX\axis@leftover)
- -- (\axis@tmpa, \axis@ycoordmaxTEX\axis@rightover)
- ;
- }%
- \foreach \x in {#1} {
- \pgfextractx{\axis@tmpa}{\pgfpointxy{\x}{0}}%
- %
- \ifdim\axis@tmpa<\axis@xcoordminTEX
- \else
- \ifdim\axis@tmpa>\axis@xcoordmaxTEX
- \else
- % Achsenbeschriftung:
- \ifnum\axis@tickposnum=1
- \node at
- (\axis@tmpa,\axis@ycoordmaxTEX\axis@leftover)
- [above,style=every tick label,style=every x tick label]
- {\show@xticklabel\axisticknum\x};
- \else
- \node at
- (\axis@tmpa,\axis@ycoordminTEX\axis@leftover)
- [below,style=every tick label,style=every x tick label]
- {\show@xticklabel\axisticknum\x};
- \fi
- \fi
- \fi
- \global\advance\axisticknum by1
- %
- \begin{scope}
- \clip (\axis@xcoordminTEX\axis@leftover, \axis@ycoordminTEX\axis@leftover)
- rectangle (\axis@xcoordmaxTEX\axis@rightover, \axis@ycoordmaxTEX\axis@rightover);
- % X-Axis ticks bottom and top
- % in log:
- % log( i*10^k ) = log\i + k\log10 -> draw ticks for i=1..9
- \ifneedsminorloop
- \foreach \i in {1,...,9} {
- \pgfextractx{\axis@tmpb}{\pgfpointxy{\logi\i}{0}}%
- \advance\axis@tmpa by\axis@tmpb
- \ifaxis@xminorgrids
- \placecomputedgridline[style=every axis grid,style=every minor grid]%
- \fi
- \ifaxis@xminorticks
- \axis@placecomputedtick\axis@subtickwidth[style=every tick,style=every minor tick]%
- \fi
- }%
- \fi
- \ifaxis@xmajorgrids
- \placecomputedgridline[style=every axis grid,style=every major grid]%
- \fi
- \ifaxis@xmajorticks
- \axis@placecomputedtick\axis@tickwidth[style=every tick,style=every major tick]%
- \fi
- \end{scope}
- }%
- \fi
- \endgroup
-}
-
-\def\axis@rememberplotspec#1{{%
- \globaldefs=1
- \listpushback#1\to\axis@plotspeclist
- \advance\axis@numplots by1%
-}}
-
-\def\axis@getautoplotspec into#1{%
- \listsize\autoplotspeclist\to\c@pgf@counta
- \ifnum\c@pgf@counta=0
- \let#1=\empty
- \else
- \c@pgf@countb=\axis@numplots
- \loop
- \ifnum\c@pgf@countb<\c@pgf@counta
- \else
- \advance\c@pgf@countb by-\c@pgf@counta
- \repeat
- \listselect\c@pgf@countb\of\autoplotspeclist\to#1
-%\message{pgfplots.sty: using \string\autoplotspeclist\ specification no\#\the\c@pgf@countb (of \the\c@pgf@counta): #1}%
- \fi
-}
-
-% The main interface to draw a plot into an axis.
-%
-% Usage:
-% \addplot
-% plot coordinates {
-% (0,0)
-% (1,1)
-% };
-%
-% or
-%
-% \addplot[color=blue,mark=*]
-% plot coordinates {
-% (0,0)
-% (1,1)
-% };
-%
-% The first syntax will use the next plot specification in the list
-% \autoplotspeclist
-% and the first will use blue color and * markers.
-%
-% The linespec. will be used in the legend.
-\long\def\addplot{%
- \@ifnextchar+{%
- \axis@getautoplotspec into\nextplotspec
- \axis@addplotimplAPPEND
- }{%
- \@ifnextchar[{%
- \axis@addplotimpl%
- }{%
- \axis@getautoplotspec into\nextplotspec
- % the space after ']' is required here:
- % FIXME:
- % - \addplot[]plot coordinates is NOT allowed!?
- \expandafter\axis@addplotimpl\expandafter[\nextplotspec]
- }%
- }%
-}
-
-\long\def\axis@addplotimplAPPEND+[{%
- \expandafter\axis@addplotimpl\expandafter[\nextplotspec,
-}
-
-\long\def\axis@addplotimpl[#1] #2;{%
-%\tracingmacros=2\tracingcommands=2
- % #2 = plot coordinates {...}
- \ifx\csname axis@execute at begin plot\endcsname\empty
- \else
- \csname axis@execute at begin plot\endcsname
- \fi
- \axis@rememberplotspec{[#1]}%
- \ifaxis@filtercoords
- % FIXME : FREE THIS VARIABLE:
- \axis@filtercoords@and@up@limits#2;\newplotcmdto\axis@filteredcoordinateplotcmd
- \def\axis@TMP{\axispath@impl{\draw[style=every axis plot,#1]}}%
- \expandafter\axis@TMP\axis@filteredcoordinateplotcmd%
- \else
- \ifaxis@draw@at@end
- \axis@update@limits{#2;}%
- \fi
- \axispath@impl{\draw[style=every axis plot,#1]}#2;%
- \fi
- \ifx\csname axis@execute at end plot\endcsname\empty
- \else
- \csname axis@execute at end plot\endcsname
- \fi
-%\tracingmacros=0\tracingcommands=0
-}%
-
-\long\def\axis@update@limits#1{%
- \axis@foreach@plot@coord@do%
- \axis@update@limits@for@one@point
- \for
- #1%
- \EOI
-}
-
-% PRECONDITIONS:
-% - 'floating point numerics active'
-% => coordinate filtering is active
-% => #1 and #2 are MACRO names
-% => these macros are encoded with \scisetcomponents
-% - no coordinate filters active
-% => #1 and #2 MAY be macros, but they must be valid TeX
-% length (without unit).
-\long\def\axis@update@limits@for@one@point#1#2{%
-%\tracingmacros=2\tracingcommands=2
-%\message{Updating limits for (#1,#2) ...}%
- \ifaxis@autocompute@xlim
- \ifaxis@float@numerics@mode@x
-%\scitofixedsingle\axis@xmin\axis@TMP
-%\scitofixedsingle\axis@xmax\axis@TMPB
-%\message{current limits: xmin=\axis@TMP, xmax=\axis@TMPB}%
- \scigetcomponents#1\axis@tmp@S\axis@tmp@M\axis@tmp@E
- \scigetcomponents\axis@xmin\axis@lim@S\axis@lim@M\axis@lim@E
- \scimathmin%
- \axis@lim@S\axis@lim@M\axis@lim@E
- \and%
- \axis@tmp@S\axis@tmp@M\axis@tmp@E
- \to%
- \axis@lim@S\axis@lim@M\axis@lim@E
- \scisetcomponents\axis@xmin\axis@lim@S\axis@lim@M\axis@lim@E
- %
- \scigetcomponents\axis@xmax\axis@lim@S\axis@lim@M\axis@lim@E
- \scimathmax%
- \axis@lim@S\axis@lim@M\axis@lim@E
- \and%
- \axis@tmp@S\axis@tmp@M\axis@tmp@E
- \to%
- \axis@lim@S\axis@lim@M\axis@lim@E
- \scisetcomponents\axis@xmax\axis@lim@S\axis@lim@M\axis@lim@E
-%\scitofixedsingle\axis@xmin\axis@TMP
-%\scitofixedsingle\axis@xmax\axis@TMPB
-%\message{updated limits: xmin=\axis@TMP, xmax=\axis@TMPB}%
- \else
- \pgfmathmin{\axis@xmin}{#1}%
- \let\axis@xmin=\pgfmathresult
- \pgfmathmax{\axis@xmax}{#1}%
- \let\axis@xmax=\pgfmathresult
- \fi
- \fi
- \ifaxis@autocompute@ylim
- \ifaxis@float@numerics@mode@y
-%\scitofixedsingle\axis@ymin\axis@TMP
-%\scitofixedsingle\axis@ymax\axis@TMPB
-%\message{current limits: ymin=\axis@TMP, ymax=\axis@TMPB}%
- \scigetcomponents#2\axis@tmp@S\axis@tmp@M\axis@tmp@E
- \scigetcomponents\axis@ymin\axis@lim@S\axis@lim@M\axis@lim@E
- \scimathmin%
- \axis@lim@S\axis@lim@M\axis@lim@E
- \and%
- \axis@tmp@S\axis@tmp@M\axis@tmp@E
- \to%
- \axis@lim@S\axis@lim@M\axis@lim@E
- \scisetcomponents\axis@ymin\axis@lim@S\axis@lim@M\axis@lim@E
- %
- \scigetcomponents\axis@ymax\axis@lim@S\axis@lim@M\axis@lim@E
- \scimathmax%
- \axis@lim@S\axis@lim@M\axis@lim@E
- \and%
- \axis@tmp@S\axis@tmp@M\axis@tmp@E
- \to%
- \axis@lim@S\axis@lim@M\axis@lim@E
- \scisetcomponents\axis@ymax\axis@lim@S\axis@lim@M\axis@lim@E
-%\scitofixedsingle\axis@ymin\axis@TMP
-%\scitofixedsingle\axis@ymax\axis@TMPB
-%\message{updated limits: ymin=\axis@TMP, ymax=\axis@TMPB}%
- \else
- \pgfmathmin{\axis@ymin}{#2}%
- \let\axis@ymin=\pgfmathresult
- \pgfmathmax{\axis@ymax}{#2}%
- \let\axis@ymax=\pgfmathresult
- \fi
- \fi
- \axis@limits@are@computedtrue
-%\tracingmacros=0\tracingcommands=0
-}
-
-% Filters coordinates and writes a new, modified 'plot coordinates'
-% command to macro #2.
-\long\def\axis@filtercoords@and@up@limits#1\newplotcmdto#2{%
- \let#2=\empty
- \let\axis@filter@output=#2
- \axis@foreach@plot@coord@do%
- \axis@filter@one@coord@pair
- \for
- #1%
- \EOI
- \edef#2{plot coordinates {\axis@filter@output};}%
-}%
-
-\def\axis@filter@one@coord@pair#1#2{%
- \ifx\axis@xfilter\empty
- \def\axis@filter@tmp@x{#1}%
- \else
- \let\axis@filter@tmp@x=\empty
- \axis@xfilter#1\to\axis@filter@tmp@x
- \fi
- \ifx\axis@yfilter\empty
- \def\axis@filter@tmp@y{#2}%
- \else
- \let\axis@filter@tmp@y=\empty
- \axis@yfilter#2\to\axis@filter@tmp@y
- \fi
- \ifx\axis@filter@tmp@x\empty
- \message{NOTE: coordinate (#1,#2) has been dropped because of the x-coordinate filter.}%
- \else
- \ifx\axis@filter@tmp@y\empty
- \message{NOTE: coordinate (#1,#2) has been dropped because of the y-coordinate filter.}%
- \else
- \ifaxis@draw@at@end
- % update also axis limits:
- \axis@update@limits@for@one@point{\axis@filter@tmp@x}{\axis@filter@tmp@y}%
- \else
- % apply data transformation directly.
- \ifaxis@float@numerics@mode@x
- \axis@datascaletrafo@x\axis@filter@tmp@x\to\axis@filter@tmp@x
- \fi
- \ifaxis@float@numerics@mode@y
- \axis@datascaletrafo@y\axis@filter@tmp@y\to\axis@filter@tmp@y
- \fi
- \fi
- % remind:
- % \the\tokenregister
- % will yield the contents of the token register, it will
- % NOT expand recursively (like \expandafter)!
- %
- % Employ that here to maintain macros inside of
- % \axis@filter@tmp[xy]
- % (macros inside of those things are used by the floating
- % point numerics to scale input data to TeX-lengths)
- \pgfplots@toka=\expandafter{\axis@filter@output}%
- \TOKL@ta=\expandafter{\axis@filter@tmp@x}%
- \TOKL@tb=\expandafter{\axis@filter@tmp@y}%
- \edef\axis@filter@output{\the\pgfplots@toka (\the\TOKL@ta,\the\TOKL@tb)}%
-%\message{FILTERING: appended \axis@filter@tmp@x,\axis@filter@tmp@y}% -> results in \axis@filter@output}%
- \fi
- \fi
-}
-
-
-% A looping command to loop through plot coordinates.
-% For every point, #3{X}{Y} will be invoked.
-%
-% No scoping is used during this operation, so you can access outer
-% variables.
-\long\def\axis@foreach@plot@coord@do#1\for plot coordinates #2;\EOI{%
- \axis@foreach@plot@coord@ITERATE#1\n#2\EOI%
-}
-
-\def\axis@foreach@plot@coord@ITERATE#1\n{%
- \@ifnextchar;{%
- \axis@foreach@plot@coord@FINISH@SEMICOLON%
- }{%
- \@ifnextchar\EOI{%
- \axis@foreach@plot@coord@FINISH%
- }{%
- \axis@foreach@plot@coord@NEXT#1\n%
- }%
- }%
-}
-
-\def\axis@foreach@plot@coord@NEXT#1\n(#2,#3){%
- #1{#2}{#3}%
- \axis@foreach@plot@coord@ITERATE#1\n
-}
-
-\def\axis@foreach@plot@coord@FINISH\EOI{}
-\def\axis@foreach@plot@coord@FINISH@SEMICOLON;\EOI{}
-
-% INPUT:
-% a sequence of points (SMeE,SMeE) (terminated with ';')
-% where S=sign, M=mantisse, E = exponent.
-% Such input is generated in the case axis@float@numerics@modetrue
-% by the coordinate filters.
-% OUTPUT:
-% proper sequence of fixed point coordinates which are the result of the
-% data scaling transformation (\axis@datascaletrafo@x).
-%
-% The output will be written into the macro #1.
-\long\def\axis@apply@data@scaletrafo@to@plot@data#1\to#2{%
- \let#2=\empty
- \let\axis@data@scaletrafo@result=\empty
- \axis@foreach@plot@coord@do
- \axis@apply@data@scaletrafo@to@one@point
- \for
- #1%
- \EOI
- \edef#2{plot coordinates {\axis@data@scaletrafo@result};}%
- %\axis@apply@data@scaletrafo@to@plot@data@ITERATE\to#2 #1;%
-}
-
-\def\axis@apply@data@scaletrafo@to@one@point#1#2{%
- \ifaxis@float@numerics@mode@x
- \axis@decode@filtered@float@numerics#1\to\axis@filter@tmp@x
- \axis@datascaletrafo@x\axis@filter@tmp@x\to\axis@filter@tmp@x
- \else
- \def\axis@filter@tmp@x{#1}%
- \fi
- \ifaxis@float@numerics@mode@y
- \axis@decode@filtered@float@numerics#2\to\axis@filter@tmp@y
- \axis@datascaletrafo@y\axis@filter@tmp@y\to\axis@filter@tmp@y
- \else
- \def\axis@filter@tmp@y{#2}%
- \fi
- \edef\axis@data@scaletrafo@result{\axis@data@scaletrafo@result (\axis@filter@tmp@x,\axis@filter@tmp@y)}%
-}
-
-
-\def\axis@decode@filtered@float@numerics#1#2e#3\to#4{%
- \scisetcomponents#4{#1}{#2}{#3}%
-}
-
-
-\long\def\axispath#1;{%
- \axispath@impl{}#1;
-}
-
-% low-level \axispath implementation.
-% #1:
-% the command which is responsable for drawing.
-% - If #1 is NOT '\empty', we expect #2 to contain only
-% EXPANDABLE DATA.
-% That's important for postponed floating point arithmetics in #2.
-% - If #1='\empty', we don't make any assumption about #2
-% and process it as-is.
-%
-% #2: see above.
-\long\def\axispath@impl#1#2;{%
- \ifaxis@draw@at@end
- \listpushback{#1}\to\axis@stored@plot@cmds
- \listpushback{#2;}\to\axis@stored@plot@data
- \else
- #1#2;%
- \fi
-}
-
-
-% Assigns a legend.
-% Syntax:
-% \legend{entry 1\\entry2\\entry3}
-\newcommand{\legend}[2][]{
- {%
- \globaldefs=1% this will ONLY store the options and the legend into global variables
- \def\axis@TMP{#1}%
- \ifx\axis@TMP\empty
- \else
- \errmessage{Sorry, legend are now deprecated. Legends are now TikZ-matrizes which provide better alignment and can be placed horizontally. See the manual for details.}%
- \fi
- \def\axis@TMP{#2}%
- \ifx\axis@TMP\empty
- \else
- \listnew\axis@legend{#2}%
- \fi
- }
-}
-
-\newcommand{\addlegendentry}[1]{%
- {%
- \globaldefs=1% this will ONLY store the options and the legend into global variables
- \listpushback#1\to\axis@legend
- }%
-}
-
-\def\axis@pop@next@legend{{%
- \globaldefs=1
- \listcheckempty\axis@plotspeclist
- \iflistempty
- \let\axis@curplotlist=\empty
- \else
- \listpopfront\axis@plotspeclist\to\axis@curplotlist
- \fi
- %
- \listcheckempty\axis@legend
- \iflistempty
- \let\axis@curlegend=\empty
- \else
- \listpopfront\axis@legend\to\axis@curlegend
- \fi
- \advance\axis@numplots by-1
-}}
+\RequirePackage{tikz}
-\long\def\axis@show@small@legendplots#1{
- \draw#1
- [mark repeat=2,mark phase=2]
- plot coordinates {
- (0cm,0cm)
- (0.3cm,0cm)
- (0.6cm,0cm)%
- };%
-}
-% Typesets a legend node.
-%
-% It will either typeset a previously computed legend (which needs to be
-% stored in the macro \axis@already@computed@legend@node)
-%
-% or it creates a legend, stores the commands into the macro named
-% above and typesets it.
-\newcommand\axis@createlegend{%
- \ifx\axis@already@computed@legend@node\empty
- \listcheckempty\axis@legend
- \iflistempty
- \else
- %
- %
- \begingroup
- % assemble a
- % \matrix {
- % small plot & legend1\\
- % small plot & legend2\\
- % ...
- % };
- % command [and using the 'legend columns' option]
- %
- % \TOKL@ta={
- % small plot & legend1\\
- % small plot & legend2\\
- % ...
- % }
- % ( I have allocated the token register in my simplelist.sty)
- %
- % \global\def\axis@TMP{
- % \matrix {
- % \TOKL@TA
- % };
- % }
- % -> finally, \axis@TMP will contain the complete command.
- \TOKL@ta={}%
- \let\curcolumnNum=\c@pgf@counta
- \let\maxcolumnCount=\c@pgf@countb
- \let\legendplotpos=\c@pgf@countc
- \legendplotpos\expandafter=\axis@legend@plot@pos
- \curcolumnNum=0
- \maxcolumnCount\expandafter=\csname axis@legend columns\endcsname\relax
- %
- \loop
- \ifnum0<\axis@numplots\relax
- \axis@pop@next@legend
- \ifx\axis@curlegend\empty
- \else
- \advance\curcolumnNum by1
- \edef\axis@TMP{%
- \the\TOKL@ta
- \ifcase\legendplotpos
- % legend plot pos=left
- \noexpand\axis@show@small@legendplots{\axis@curplotlist}%
- \noexpand\pgfmatrixnextcell
- \noexpand\node {\axis@curlegend};
- \or
- % legend plot pos=right
- \noexpand\node {\axis@curlegend};
- \noexpand\pgfmatrixnextcell
- \noexpand\axis@show@small@legendplots{\axis@curplotlist}%
- \or
- % legend plot pos=none
- \noexpand\node {\axis@curlegend};
- \fi
- \ifnum\curcolumnNum=\maxcolumnCount
- \noexpand\\
- \else
- \ifnum\axis@numplots=0
- \noexpand\\
- \else
- \noexpand\pgfmatrixnextcell
- \fi
- \fi
- }%
- \ifnum\curcolumnNum=\maxcolumnCount
- \curcolumnNum=0
- \fi
- \expandafter\TOKL@ta\expandafter{\axis@TMP}%
- \fi
- \repeat
- \TOKL@tb={\matrix[style=every axis legend]}%
- \xdef\axis@TMP{%
- \the\TOKL@tb {%
- \the\TOKL@ta
- };%
- }%
- \endgroup
- \let\axis@already@computed@legend@node=\axis@TMP
- \fi
- \fi
- \axis@already@computed@legend@node
-}
-
-% Checks whether the argument to xtick or ytick is a UNIFORM tick
-% sequence.
-%
-% A uniform tick sequence is 0,...,10 and 3,4,5 and -5,-4,-2 but
-% NOT 0,2,4 or 4,10.
-%
-% Furthermore, any NON-integer tick arguments are also assumed to be
-% NOT uniform.
-%
-% INPUT:
-% #1: a tick argument (i.e. something which can be put to
-% \foreach \x in {#1})
-%
-% OUTPUT:
-% \axis@isuniformticktrue
-% or
-% \axis@isuniformtickfalse
-% depending on the check.
-% This variable will be set globally.
-\def\axis@checkisuniformLOGtick#1{%
- \begingroup
- \global\axis@isuniformticktrue
- \newif\ifisfirst
- \newif\iftwo@are@equal
- \isfirsttrue
- \foreach \x in {#1}{%
- \pgfmathmultiply@\x\reciproc@logten
- \let\cur=\pgfmathresult
- % check whether
- % \cur - last == 1 (last = \axis@TMPB)
- \ifisfirst
- \global\isfirstfalse
- \else
- \pgfmathsubtract@\cur\axis@TMPB%
- \pgfmathlog@approxequalto@macro\pgfmathresult{1.0}{two@are@equal}%
- \iftwo@are@equal
- \else
- \global\axis@isuniformtickfalse
- \breakforeach
- \fi
- \fi
- \global\let\axis@TMPB=\cur
- }%
- \endgroup
-}
-
-\def\skipsuffixzero#1.#2|{
- {%
- \def\axis@TMP{#2}%
- \def\axis@TMPB{0}%
- \ifx\axis@TMP\axis@TMPB
- \global\def\pgfmathresult{#1}%
- \else
- \global\def\pgfmathresult{#1.#2}%
- \fi
- }%
-}
-
-\def\logtologtentomacro#1#2{%
- \pgfmathmultiply@{#1}\reciproc@logten%
- \expandafter\skipsuffixzero\pgfmathresult|%
- \let#2=\pgfmathresult
-}
-
-% Expands to #1/log(10). It will also skip a suffix '.0'
-\def\logtologten#1{%
- \pgfmathmultiply@{#1}\reciproc@logten%
- \expandafter\skipsuffixzero\pgfmathresult|%
- \pgfmathresult
-}
-
-% helper method which computes log10*\x foreach \x in {#1}.
-% The result will be \xdef'ed into #2.
-\def\axis@compute@tick@times@logten#1\to#2{%
- \global\let#2=\empty
- \foreach \axis@TMPB in {#1} {%
- \pgfmathmultiply@\axis@TMPB\logten%
- \ifx#2\empty
- \xdef#2{\pgfmathresult}%
- \else
- \xdef#2{#2,\pgfmathresult}%
- \fi
- }%
-}
-
-\def\axis@init@enlarge@limit@booleans{%
- \axis@enlargelimits@autofalse
- \axis@enlargelimitsfalse
- \axis@enlargelimits@rel@threshfalse
- \edef\axis@TMP{\axis@enlargelimits}%
- %
- \def\axis@TMPB{true}%
- \ifx\axis@TMP\axis@TMPB
- \axis@enlargelimitstrue
- \else
- \def\axis@TMPB{false}%
- \ifx\axis@TMP\axis@TMPB
- \else
- \def\axis@TMPB{auto}%
- \ifx\axis@TMP\axis@TMPB
- \axis@enlargelimits@autotrue
- \else
- \begingroup
- % try to read it as number:
- \expandafter\pgf@xa\axis@enlargelimits pt\relax
- \endgroup
- \axis@enlargelimitstrue
- \axis@enlargelimits@rel@threshtrue
- \fi
- \fi
- \fi
-}
-
-\def\axis@enlarge@limit@for#1{%
- \begingroup
- \expandafter\let\expandafter\min\expandafter=\csname axis@#1min\endcsname
- \expandafter\let\expandafter\max\expandafter=\csname axis@#1max\endcsname
- \ifcase\csname axis@#1mode\endcsname
- \ifaxis@enlargelimits@rel@thresh
- \edef\enlargepercent{\axis@enlargelimits}%
- \else
- \def\enlargepercent{0.1}% FIXME : pack 10% as default into option 'enlargelimits' or so
- \fi
- \pgfmathsubtract@\max\min%
- \expandafter\pgf@xa\pgfmathresult pt
- \expandafter\pgf@xb\enlargepercent\pgf@xa
- \ifdim\pgf@xb>0.001pt
- % the case with
- % enlargeabsolute ~= 0
- % means that \min ~= \max.
- % It is handled in another method.
- \edef\enlargeabsolute{\pgf@sys@tonumber{\pgf@xb}}%
- %
- % compute xmin := xmin - enlargeabsolute
- \pgfmathsubtract@\min\enlargeabsolute%
- \let\min=\pgfmathresult
- \pgfmathadd@\max\enlargeabsolute%
- \let\max=\pgfmathresult
- \fi
- \or
- % compute
- % \pgfmathsetmacro{\min}{\min - 0.5*\logten}%
- % \pgfmathsetmacro{\max}{\max + 0.5*\logten}%
- % just a more efficiently (I hope so):
- \expandafter\pgfmath@x\logten pt
- \divide\pgfmath@x by2
- \pgfmathlog@invoke@expanded\pgfmathsubtract@{{\min}{\pgf@sys@tonumber{\pgfmath@x}}}%
- \let\min=\pgfmathresult
- \pgfmathlog@invoke@expanded\pgfmathadd@{{\max}{\pgf@sys@tonumber{\pgfmath@x}}}%
- \let\max=\pgfmathresult
- \fi
- \xdef\axis@TMP{\min}%
- \xdef\axis@TMPB{\max}%
- \endgroup
- \expandafter\let\csname axis@#1min\endcsname=\axis@TMP
- \expandafter\let\csname axis@#1max\endcsname=\axis@TMPB
-}
-
-% Computes tick positions using the current axis limits.
-%
-% Parameters:
-% \axisdefaulttickwidth
-% Determines the maximum space which is not filled by at least one
-% tick label (approximate, there is some rounding internally)
-% \axisdefaulttryminticks
-% see manual
-%
-% Idea:
-% We want ticks at each
-% { i*H, i in \Z }.
-% Of course, there shouldn't be TOO MUCH ticks.
-%
-% Our heuristics is to set
-% desirednumticks = round(ACTUAL WIDTH / axisdefaulttickwidth)
-% and generate H = (axis range) / desirednumticks.
-%
-% Since not all step sizes H look well, restrict H to a set of allowed
-% step sizes such as
-% { 1, 1/2, 1/5, 1/10 },
-% or, to be more precise:
-% { 1*10^e, 2*10^e, 5*10^e }
-% -> round to the nearest matching number!
-%
-% Then, the resulting tick is
-% TICK={MIN,MIN+H,...,MAX}
-% where
-% MIN = I*H
-% is chosen such that
-% axis minimum limit = I*H + rest; |rest| < H.
-%
-%
-% PRECONDITION:
-% - limits are correct
-% - axis width/height is set correctly
-%
-% POSTCONDITION:
-% - Tick for axis #1 is assigned
-% - \ifaxis@needs@check@uniformtick is set
-\def\axis@assign@default@tick@foraxis#1{%
- \begingroup
- % Shortcut-names:
- \expandafter\let\expandafter\ifaxis@is@datascaled\csname ifaxis@float@numerics@mode@#1\endcsname
- \expandafter\let\expandafter\axis@data@scale@trafo\csname axis@datascaletrafo@#1\endcsname
- \expandafter\let\expandafter\axis@data@scale@inverse@trafo\csname axis@inverse@datascaletrafo@#1\endcsname
- %
- \let\desirednumticks=\c@pgf@countd
- \let\Wr=\pgf@xc
- \Wr=\csname axis@#1coordmaxTEX\endcsname
- \advance\Wr by-\csname axis@#1coordminTEX\endcsname
- % r = max place without ticks in pt -> choose desirednumticks >= W/r
- \expandafter\expandafter\divide\Wr\axisdefaulttickwidth
- \pgfmathsetcount{\desirednumticks}{\Wr}%
- \advance\desirednumticks by1
- \expandafter\ifnum\axisdefaulttryminticks>\desirednumticks
- \expandafter\desirednumticks\axisdefaulttryminticks
- \fi
- \ifcase\csname axis@#1mode\endcsname
- % compute tick := MIN,MIN+H,....,MAX
- \let\MINH=\pgf@xa
- \let\H=\pgf@xb
- \let\MAX=\axis@tmpa
- \let\MIN=\axis@tmpb
- % compute step size 'H':
- \expandafter\MAX\csname axis@#1max\endcsname pt
- \advance\MAX by0.001pt% avoid round errors
- %\expandafter\MIN\the\c@pgf@counta pt
- \expandafter\MIN\csname axis@#1min\endcsname pt
- \H=\MAX
- \advance\H by-\MIN
- \c@pgf@counta=\desirednumticks
- \advance\c@pgf@counta by-1
- \divide\H by\c@pgf@counta
-%\message{determining ticks for #1-axis: Wr := (width/max space between ticks) = \the\Wr, desirednumticks=max(\axisdefaulttryminticks, trunc(Wr)) = \the\desirednumticks, H=(axis range/(desirednumticks-1)) = \the\H}%
- %
- % SEARCH for the NEXT FEASABLE H.
- %
- \edef\Hmacro{\pgf@sys@tonumber\H}%
- \ifaxis@is@datascaled
- \expandafter\axis@data@scale@inverse@trafo\Hmacro\to\Hmacro
- \else
- \expandafter\sciparsesignsingle\expandafter{\Hmacro}\Hmacro
- \fi
- \scigetcomponents\Hmacro\H@S\H@M\H@E
-%\message{Got T^{-1}(H) = [\H@S] \H@M * 10^\H@E}%
- % modify the mantisse:
- \expandafter\H\H@M pt
- \ifdim\H<2pt
- \ifdim\H<1.5pt
- \def\H@M{1.0}%
- \else
- \def\H@M{2.0}%
- \fi
- \else
- \ifdim\H<4.9999pt
- \ifdim\H<3.5pt
- \def\H@M{2.0}%
- \else
- \def\H@M{5.0}%
- \fi
- \else
- \ifdim\H<7.5pt
- \def\H@M{5.0}%
- \else
- \def\H@M{1.0}%
- \expandafter\c@pgf@counta\H@E
- \advance\c@pgf@counta by1
- \edef\H@E{\the\c@pgf@counta}%
- \fi
- \fi
- \fi
- \scisetcomponents\Hmacro\H@S\H@M\H@E
- \ifaxis@is@datascaled
- \axis@data@scale@trafo\Hmacro\to\Hmacro
- \else
- \scitofixedsingle\Hmacro\Hmacro
- \fi
-%\message{I have computed H=\Hmacro}%
- \expandafter\H\Hmacro pt
-%\message{final H=\the\H}%
- %
- % Now, we want to activate the Tick set {i*H, i in \Z}
- % compute I such that
- % xmin = I * H + rest; |rest| < H
- % -> I = round(xmin/H)
- % -> MIN = I * H
- \pgfmathlog@invoke@expanded\pgfmathdivide@{%
- {\pgf@sys@tonumber\MIN}%
- {\pgf@sys@tonumber\H}%
- }%
- \pgfmathsetcount{\c@pgf@counta}{\pgfmathresult}%
- \ifdim\MIN<0pt
- % the truncation rounds TOWARDS 0 which is not what I want.
- \advance\c@pgf@counta by-1
- \fi
- \MIN=\H
- \multiply\MIN by\c@pgf@counta
- \MINH=\MIN
- \advance\MINH by\H
- \xdef\axis@TMP{\pgf@sys@tonumber{\MIN},\pgf@sys@tonumber{\MINH},...,\pgf@sys@tonumber{\MAX}}%
- \aftergroup\axis@needs@check@uniformtickfalse
- \or
- \expandafter\ifx\csname axis@#1tickten\endcsname\empty
- % I want ticks at 10^k. So determine k_min and k_max.
- %
- % FIXME: optimize!
- \pgfmathsetcount{\c@pgf@counta}{\csname axis@#1min\endcsname*\reciproc@logten-1}%
- \pgfmathsetmacro{\tmp@min}{\c@pgf@counta*\logten}%
- \pgfmathsetcount{\c@pgf@counta}{\csname axis@#1max\endcsname*\reciproc@logten}%
- \pgfmathsetmacro{\tmp@max}{\c@pgf@counta*\logten}%
- \pgfmathadd\tmp@min\logten%
- \xdef\axis@TMP{\tmp@min,\pgfmathresult,...,\tmp@max}%
- \aftergroup\axis@needs@check@uniformtickfalse
- \else
- \edef\axis@TMP{\csname axis@#1tickten\endcsname}%
- \expandafter\axis@compute@tick@times@logten\axis@TMP\to\axis@TMP
- \aftergroup\axis@needs@check@uniformticktrue
- \fi
- \fi
- \endgroup
- \expandafter\let\csname axis@#1tick\endcsname=\axis@TMP
-%\message{pgfplots.sty: #1tick set to \csname axis@#1tick\endcsname [#1mode=\the\csname axis@#1mode\endcsname, #1min=\csname axis@#1min\endcsname, #1max=\csname axis@#1max\endcsname].}%
-}
-
-% Helper method for
-% \axis@apply@data@scale@trafo@to@options@for
-% #1: the ticks
-% #2: the trafo macro name (the form taking three args)
-% #3: the output macro name
-\long\def\axis@apply@data@scale@trafo@to@user@ticks#1#2\to#3{%
- \let#3=\empty
- \foreach \axis@TMPB in {#1} {%
- \expandafter\sciparsesign\expandafter{\axis@TMPB}\sci@S\sci@M\sci@E
- #2\sci@S\sci@M\sci@E\to\axis@TMPB
- \ifx#3\empty
- \xdef#3{\axis@TMPB}%
- \else
- \xdef#3{#3,\axis@TMPB}%
- \fi
- }%
- %
-}%
-
-% helper for \axis@apply@data@scale@trafo@to@options@for.
-\def\axis@compute@number@order@for@trafo@isdimen#1\tocount#2{%
- \edef\axis@TMP{\pgf@sys@tonumber{#1}}%
- \expandafter\sciparsesign\expandafter{\axis@TMP}\S\M\E
- \expandafter#2\E\relax
- \advance#2 by1
-}
-
-% helper for \axis@apply@data@scale@trafo@to@options@for.
-%
-\def\axis@compute@number@order@for@trafo@isfloat#1\tocount#2{%
- \scigetcomponents#1\S\M\E
- \expandafter#2\E\relax
- \advance#2 by1
-}
-
-% Initialises the data scale transformation and applies it to any
-% user specified options.
-%
-% PRECONDITION:
-% - all axis limits are available in float representation
-% (i.e. with \scisetcomponents)
-% - \axis@set@default@size@options has been called before
-% POSTCONDITION:
-% - the scaling transformation is set up,
-% - all axis limits are transformed,
-% - any user input (like ticks and tick labels)
-% will reflect the changes.
-\def\axis@apply@data@scale@trafo@to@options@for#1{%
- % initialise data scale transformation
- % T(x) = 10^{q-m} * x
- %
- \begingroup
- \let\data@max@order=\c@pgf@counta
- \let\data@cur@order=\c@pgf@countb
- \let\data@dimen=\pgf@xa
- \let\data@dimen@order=\c@pgf@countc
- %
- % Step 1: compute 'm', the data order
- \expandafter\axis@compute@number@order@for@trafo@isfloat
- \csname axis@#1min\endcsname
- \tocount\data@cur@order
- %
- \data@max@order=\data@cur@order
- %
- \expandafter\axis@compute@number@order@for@trafo@isfloat
- \csname axis@#1max\endcsname
- \tocount\data@cur@order
- %
- \ifnum\data@cur@order>\data@max@order
- \data@max@order=\data@cur@order
- \fi
- %
- % Step 2: compute 'q', the #1-size of the axis.
- \expandafter\ifx\csname axis@#1\endcsname\empty
- % We have 'width' or 'height'.
- %
- % Use the order of these parameters.
- \def\axis@TMP{#1}%
- \def\axis@TMPB{x}%
- \ifx\axis@TMP\axis@TMPB
- \expandafter\data@dimen\axis@width\relax
- \else
- \def\axis@TMPB{y}%
- \ifx\axis@TMP\axis@TMPB
- \expandafter\data@dimen\axis@height\relax
- \fi
- \fi
- \axis@compute@number@order@for@trafo@isdimen
- \data@dimen
- \tocount\data@dimen@order
- % This here is to avoid inaccuracies in the final
- % axis rectangle size, see \axis@initsizes:
- \advance\data@dimen@order by-1
- \else
- % FIXME:
- % we have either the 'x=1cm' or 'y=1cm' option!
- % How should I initialise the trafo!?
- \data@dimen@order=3
- \fi
- %
-%\message{Direction #1: data max order=\the\data@max@order; data dimen order=\the\data@dimen@order. }%
- \advance\data@dimen@order by-\data@max@order
- \xdef\axis@TMP{\the\data@dimen@order}%
- \endgroup
-%\message{Initialising the data scale transformation in direction #1 to \axis@TMP...}%
- % COMPLETE INITIALISATION:
- \ifaxis@EMERGENCY@FORCE@DATA@TRAFO@TO@IDENTITY
- \message{WARNING: the automatic scaling of input data has been DISABLED to allow axispath commands [otherwise, axispath commands would not know of the pgfplots scalings - leading to wrong images). DISABLING THE DATA SCALING LIMITS THE DATA RANGE! I hope I can fix this issue as soon as possible. Please take a look at the manual for more information. If you get 'OVERFLOW' or 'UNDERFLOW' errors, you may need to disable the axispath.}%
- \def\axis@TMP{0}%
- \expandafter\let\csname axis@data@scale@trafo@SHIFT@#1\endcsname\axis@TMP
- \else
- \expandafter\let\csname axis@data@scale@trafo@SHIFT@#1\endcsname\axis@TMP
- \fi
- %
- % ... and apply transformation to any user input
- %
- % Transform axis limits:
- \expandafter\expandafter\csname axis@datascaletrafo@#1\endcsname\csname axis@#1min\endcsname\to\axis@TMP
- \expandafter\let\csname axis@#1min\endcsname=\axis@TMP
- %
- \expandafter\expandafter\csname axis@datascaletrafo@#1\endcsname\csname axis@#1max\endcsname\to\axis@TMP
- \expandafter\let\csname axis@#1max\endcsname=\axis@TMP
- %
- % Convert any user-specified ticks:
- \edef\axis@TMP{\csname axis@#1tick\endcsname}%
- % this here should also work with 'xtick=\empty', the "No tick" command.
- \ifx\axis@TMP\empty
- \else
-%\message{Converting #1tick='\csname axis@#1tick\endcsname'}%
- \pgfplots@toka=\expandafter{\csname axis@datascaletrafo@#1@three\endcsname}%
- \edef\axis@TMP{{\csname axis@#1tick\endcsname}\the\pgfplots@toka}%
- \expandafter\axis@apply@data@scale@trafo@to@user@ticks\axis@TMP\to\axis@TMPC
- \expandafter\let\csname axis@#1tick\endcsname=\axis@TMPC
- \fi
- %
- % Transform any explicit axis unit scalings:
- \expandafter\ifx\csname axis@#1\endcsname\empty
- \else
-%\message{Converting #1 unit scale='\csname axis@#1\endcsname' ... }%
- \expandafter\pgfmathparse\expandafter{\csname axis@#1\endcsname}%
- \expandafter\expandafter\csname axis@inverse@datascaletrafo@tofixed@#1\endcsname\pgfmathresult\to\axis@TMP
- \edef\axis@TMP{\axis@TMP pt}%
- \expandafter\edef\csname axis@#1\endcsname{\axis@TMP}%
-%\message{to #1='\csname axis@#1\endcsname'.}%
- \fi
-}
-
-\def\axis@determinedefaultvalues{%
- \ifx\axis@xmin\empty
- \errmessage{Sorry, the argument 'xmin=NUM' is mandatory to draw axes }%
- \def\axis@xmin{0}%
- \fi
- \ifx\axis@xmax\empty
- \errmessage{Sorry, the argument 'xmax=NUM' is mandatory to draw axes }%
- \def\axis@xmax{1}%
- \fi
- \ifx\axis@ymin\empty
- \errmessage{Sorry, the argument 'ymin=NUM' is mandatory to draw axes }%
- \def\axis@ymin{0}%
- \fi
- \ifx\axis@ymax\empty
- \errmessage{Sorry, the argument 'ymax=NUM' is mandatory to draw axes }%
- \def\axis@ymax{1}%
- \fi
- %
- \axis@set@default@size@options
- %
- \ifaxis@float@numerics@mode@x
- \axis@apply@data@scale@trafo@to@options@for x%
- \fi
- \ifaxis@float@numerics@mode@y
- \axis@apply@data@scale@trafo@to@options@for y%
- \fi
- %
- \ifnum\axis@xmode=0
- \axis@xminorticksfalse
- \fi
- \ifnum\axis@ymode=0
- \axis@yminorticksfalse
- \fi
- %
- \axis@init@enlarge@limit@booleans
- \ifaxis@enlargelimits
- % relax the sizes.
- %
- % Idea: if the user chose his xmin,xmax tight to his data,
- % this here will look better.
- \axis@enlarge@limit@for x
- \axis@enlarge@limit@for y
- \else
- \ifaxis@enlargelimits@auto
- \ifaxis@hide
- % there is no axis, so skip this enlargement (unless
- % the user explizitly requests it)
- \else
- % FIXME : this here should be user-configurable!
- \ifaxis@autocompute@xlim
- \axis@enlarge@limit@for x
- \fi
- \ifaxis@autocompute@ylim
- \axis@enlarge@limit@for y
- \fi
- \fi
- \fi
- \fi
- %
- \axis@avoid@empty@axis@range@for x%
- \axis@avoid@empty@axis@range@for y%
- %
- \axis@initsizes
- %
- \newif\ifaxis@xisuniform
- \newif\ifaxis@yisuniform
- \axis@xisuniformtrue
- \axis@yisuniformtrue
- \newif\ifaxis@needs@check@uniformtick
- \axis@needs@check@uniformticktrue
- \ifx\axis@xtick\empty
- \axis@assign@default@tick@foraxis{x}%
- \fi
- \ifaxis@needs@check@uniformtick
- \ifnum\axis@xmode=1
- \expandafter\axis@checkisuniformLOGtick\expandafter{\axis@xtick}%
- \fi
- \ifaxis@isuniformtick
- \axis@xisuniformtrue
- \else
- \axis@xminorticksfalse
- \axis@xisuniformfalse
- \fi
- \fi
- %
- %
- %
- \axis@needs@check@uniformticktrue
- \ifx\axis@ytick\empty
- \axis@assign@default@tick@foraxis{y}%
- \fi
- \ifaxis@needs@check@uniformtick
- \ifnum\axis@ymode=1
- \expandafter\axis@checkisuniformLOGtick\expandafter{\axis@ytick}%
- \fi
- \ifaxis@isuniformtick
- \axis@yisuniformtrue
- \else
- \axis@yminorticksfalse
- \axis@yisuniformfalse
- \fi
- \fi
- \ifx\axis@xticklabel\empty
- \ifcase\axis@xmode
- \def\axis@xticklabel{\axisdefaultticklabel}%
- \or
- \def\axis@xticklabel{\axisdefaultticklabellog}%
- \fi
- \fi
- \ifx\axis@yticklabel\empty
- \ifcase\axis@ymode
- \def\axis@yticklabel{\axisdefaultticklabel}%
- \or
- \def\axis@yticklabel{\axisdefaultticklabellog}%
- %--------------------------------------------------
- % \def\axis@yticklabel{%
- % \pgfmathexp\tick
- % \expandafter\skipsuffixzero\pgfmathresult|%
- % $\pgfmathresult$}%
- %--------------------------------------------------
- \fi
- \fi
-}
-
-
-% Helper method for initsizes.
-%
-% It computes a scaling such that \axis@width = SCALE * ACTUAL WIDTH.
-%
-% The actual width is
-% c + x*(xmax-xmin)
-% based on
-% - x*xmax = \axis@xcoordmaxTEX
-% - x*xmin = \axis@xcoordminTEX
-% - c = estimated, a constant for the axis label/tick labels
-%
-% Arguments:
-% #1: the output argument for the SCALE.
-\def\axis@initsizes@getXscale\into#1{%
- \expandafter\axis@tmpa\axis@width\relax
- % EXPECTED WIDTH = X = \axis@width
- % ACTUAL WIDTH = c + x * (xmax-xmin)
- % where c is a CONSTANT (for the axis labels/tick labels).
- % -> \axis@tmpXscale = (X - c) / (x *(xmax-xmin))
- %
- % \axis@tmpa := X-c:
- \ifaxis@scale@only@axis
- \else
- \advance\axis@tmpa by-45pt% FIXME determine 'c' correctly!
- \fi
- \ifdim\axis@tmpa<0pt
- \errmessage{Error: Plot width `\axis@width' is too small. This can't be realised while maintaining constant width for y-labels. Sorry, label width are only approximate. You will need to adjust your width.}%
- \axis@tmpa=0pt
- \fi
- % \axis@tmpb := x*(xmax-xmin):
- \axis@tmpb=\axis@xcoordmaxTEX
- \advance\axis@tmpb by-\axis@xcoordminTEX
- \pgfmathlog@invoke@expanded\pgfmathdivide@{%
- {\pgf@sys@tonumber\axis@tmpa}%
- {\pgf@sys@tonumber\axis@tmpb}%
- }%
- \let#1=\pgfmathresult
-%\message{pgfplots.sty: Computing 'x' such that 'width = c + x*(xmax-xmin)';
-% c=estimated,
-% width-c =\the\axis@tmpa,
-% x*(xmax[=\the\axis@xcoordmaxTEX] - xmin[=\the\axis@xcoordminTEX)]) = \the\axis@tmpb
-% -> x-scale =#1 }%
-}
-
-% The same as \axis@initsizes@getXscale, just for the height.
-\def\axis@initsizes@getYscale\into#1{%
- \expandafter\axis@tmpa\axis@height\relax
- % EXPECTED WIDTH = X = \axis@width
- % ACTUAL WIDTH = c + x * (xmax-xmin)
- % where c is a CONSTANT (for the axis labels/tick labels).
- % -> \axis@tmpXscale = (X - c) / (x *(xmax-xmin))
- %
- % \axis@tmpa := X-c:
- \ifaxis@scale@only@axis
- \else
- \advance\axis@tmpa by-45pt\relax% FIXME determine 'c' correctly!
- \fi
- \ifdim\axis@tmpa<0pt
- \errmessage{Error: Plot height `\axis@height' is too small. This can't be realised while maintaining constant height for x-labels. Sorry, label heights are only approximate. You will need to adjust your height.}%
- \axis@tmpa=0pt
- \fi
- % \axis@tmpb := x*(xmax-xmin):
- \axis@tmpb=\axis@ycoordmaxTEX
- \advance\axis@tmpb by-\axis@ycoordminTEX
- \pgfmathlog@invoke@expanded\pgfmathdivide@{%
- {\pgf@sys@tonumber\axis@tmpa}%
- {\pgf@sys@tonumber\axis@tmpb}%
- }%
- \let#1=\pgfmathresult
-%\message{pgfplots.sty: Computing 'y' such that 'height = c + y*(ymax-ymin)';
-% height=\axis@height,
-% c=estimated,
-% height-c =\the\axis@tmpa,
-% y*(ymax[=\the\axis@ycoordmaxTEX] - ymin[=\the\axis@ycoordminTEX)]) = \the\axis@tmpb
-% -> y-scale =#1 }%
-}
-
-
-% Checks whether axis limits in coordinate #1 are approximately equal.
-%
-% If that is the case, force a non-zero width of the range.
-%
-\def\axis@avoid@empty@axis@range@for#1{%
- % Check if axis limits are empty:
- \begingroup
- \expandafter\let\expandafter\if@cur@is@scaled\csname ifaxis@float@numerics@mode@#1\endcsname
- \expandafter\let\expandafter\min\csname axis@#1min\endcsname
- \expandafter\let\expandafter\max\csname axis@#1max\endcsname
- \let\min@d=\pgf@xa
- \let\max@d=\pgf@xb
- \let\diff=\pgf@xc
- \newif\ifrange@is@approx@equal
- \expandafter\min@d\min pt
- \expandafter\max@d\max pt
- \diff=\max@d
- \advance\diff by-\min@d
- % FIXME : I need a RELATIVE check here!
- % but: real number point division is expensive
- \if@cur@is@scaled
- % this here should be sufficient because the axis
- % has absolute values of order O( 10^3 ) or so.
- \ifdim\diff<1pt
- \range@is@approx@equaltrue
- \fi
- \else
- % there is no data scaling, so I should be much more defensive
- % with absolute thresholds...
- \ifdim\diff<0.05pt
- \range@is@approx@equaltrue
- \fi
- \fi
- \ifrange@is@approx@equal
-%\message{avoid range is approx equal for coord #1: MODIFYING (\min,\max)...}%
- % the case \min ~= \max
- %
- % enlarge \max and shrink \min:
- \ifdim\max@d<0pt
- \ifdim\max@d<-1pt
- \max@d=0.8\max@d
- \min@d=1.2\min@d
- \else
- \advance\max@d by-1pt
- \advance\min@d by1pt
- \fi
- \else
- \ifdim\max@d>1pt
- \max@d=1.2\max@d
- \min@d=0.8\min@d
- \else
- \ifdim\max@d=0pt
- \if@cur@is@scaled
- % we can't simply add a constant in the
- % transformed range.
- %
- % So: set limits to [-1,1] = [-1.0e0,+1.0e0]
- \def\sci@S{2}%
- \def\sci@M{1.0}%
- \def\sci@E{0}%
- \csname axis@datascaletrafo@#1@three\endcsname\sci@S\sci@M\sci@E\to\min
- \def\sci@S{1}%
- \def\sci@M{1.0}%
- \def\sci@E{0}%
- \csname axis@datascaletrafo@#1@three\endcsname\sci@S\sci@M\sci@E\to\max
-%\message{[trafo shift = \csname axis@data@scale@trafo@SHIFT@#1\endcsname; setting limits -1:1]}%
- \expandafter\min@d\min pt
- \expandafter\max@d\max pt
- \else
- \advance\max@d by1pt
- \advance\min@d by-1pt
- \fi
- \else
- \advance\max@d by1pt
- \advance\min@d by-1pt
- \fi
- \fi
- \fi
- \xdef\axis@TMP{\pgf@sys@tonumber{\min@d}}%
- \xdef\axis@TMPB{\pgf@sys@tonumber{\max@d}}%
-%\message{ -> #1 = \axis@TMP : \axis@TMPB;}%
- \else
- \global\let\axis@TMP=\min%
- \global\let\axis@TMPB=\max%
- \fi
- \endgroup
- \expandafter\let\csname axis@#1min\endcsname=\axis@TMP
- \expandafter\let\csname axis@#1max\endcsname=\axis@TMPB
-}
-
-% PRECONDITION:
-% none
-% POSTCONDITION:
-% \axis@default@aspect@ratio is set.
-\def\axis@compute@default@aspect@ratio{%
- \expandafter\pgfmath@x\axisdefaultwidth
- \expandafter\pgfmath@y\axisdefaultheight
- \pgfmathlog@invoke@expanded\pgfmathdivide@{%
- {\pgf@sys@tonumber{\pgfmath@x}}%
- {\pgf@sys@tonumber{\pgfmath@y}}%
- }%
- \let\axis@default@aspect@ratio=\pgfmathresult
-}
-
-\def\axis@set@default@size@options{%
- % The axes 'x' and 'y' vectors will be scaled such that the total
- % size is (\axisdefaultwidth, \axisdefaultheight).
- %
- % If the user specifies ONE of width OR height,
- % the plot will be resized; keeping the aspect ratio.
- %
- \let\axis@default@aspect@ratio=\empty
- % CASES:
- % hasx := 'x' option non-empty
- % hasy := 'y' option non-empty
- % W := 'width' option non-empty
- % H := 'height' option non-empty
- %
- % hasx = 1 -> width is not interesting; we use 'x' option.
- % hasx = 0 -> determine final width:
- % W H
- % 0 0 -> \axisdefaultwidth
- % 0 1 -> determine width out of H and the default aspect ratio
- % 1 X -> ok, use the user parameter.
- %
- % hasy = 1 -> height is not interesting, we use 'y' option.
- % hasy = 0 -> determine final height:
- % W H
- % 0 0 -> \axisdefaultheight
- % X 1 -> ok, use the user parameter
- % 1 0 -> determine height out of W and the default aspect ratio
- %
- \ifx\axis@x\empty
- \ifx\axis@y\empty
- % hasx=0, hasy=0
- %
- % -> KEEP ASPECT RATIO if just one W, or H is given!
- \ifx\axis@width\empty
- \ifx\axis@height\empty
- % The case hasx=0, hasy=0, W=0 H=0:
- \let\axis@width=\axisdefaultwidth
- \let\axis@height=\axisdefaultheight
- \else
- % The case hasx=0, hasy=0, W=0 H=1:
- \axis@compute@default@aspect@ratio
- \expandafter\pgfmath@y\axis@height
- \pgfmathlog@invoke@expanded\pgfmathmultiply@{%
- {\pgf@sys@tonumber{\pgfmath@y}}%
- {\axis@default@aspect@ratio}%
- }%
- \edef\axis@width{\pgfmathresult pt}%
- \fi
- \else
- \ifx\axis@height\empty
- % The case hasx=0, hasy=0, W=1 H=0:
- \axis@compute@default@aspect@ratio
- \expandafter\pgfmath@x\axis@width
- \pgfmathlog@invoke@expanded\pgfmathdivide@{%
- {\pgf@sys@tonumber{\pgfmath@x}}%
- {\axis@default@aspect@ratio}%
- }%
- \edef\axis@height{\pgfmathresult pt}%
- \else
- % The case hasx=0, hasy=0, W=1 H=1:
- \fi
- \fi
- \else
- % hasx=0, hasy=1, W=0:
- \ifx\axis@width\empty
- \let\axis@width=\axisdefaultwidth
- \fi
- \fi
- \else
- \ifx\axis@y\empty
- % hasx=1, hasy=0, H=0
- \ifx\axis@height\empty
- \let\axis@height=\axisdefaultheight
- \fi
- \fi
- \fi
-}
-
-% PRECONDITION:
-% - final axis limits are given in transformed range
-% - \axis@set@default@size@options has been invoked before
-% POSTCONDITION:
-% - the current x- and y unit vectors are changed;
-% - \axis@[xy]coord{min,max}TEX are set
-%
-\def\axis@initsizes{%
- % INIT.
- %
- %
- \pgfpointxy{\axis@xmin}{\axis@ymin}%
- \axis@xcoordminTEX=\pgf@x
- \axis@ycoordminTEX=\pgf@y
- \pgfpointxy{\axis@xmax}{\axis@ymax}%
- \axis@xcoordmaxTEX=\pgf@x
- \axis@ycoordmaxTEX=\pgf@y
- %
- %
- %-----------------------------------------
- % PROCESS THE 'width' and 'height' options
- %-----------------------------------------
- %
- % FIXME: make these variables LOCAL:
- %
- \let\axis@rectangle@width=\empty
- \let\axis@rectangle@height=\empty
- %
- \ifx\axis@x\empty
- \ifx\axis@width\empty
- \errmessage{INTERNAL LOGIC ERROR! WIDTH NOT SET}%
- \fi
- \axis@initsizes@getXscale\into\axis@tmpXscale
- \ifaxis@scale@only@axis
- \let\axis@rectangle@width=\axis@width
- \fi
- \else
- \def\axis@tmpXscale{1}%
- \fi
- %
- \ifx\axis@y\empty
- \ifx\axis@height\empty
- \errmessage{INTERNAL LOGIC ERROR! HEIGHT NOT SET}%
- \fi
- \axis@initsizes@getYscale\into\axis@tmpYscale
- \ifaxis@scale@only@axis
- \let\axis@rectangle@height=\axis@height
- \fi
- \else
- \def\axis@tmpYscale{1}%
- \fi
- %
- %
- % assert( \axis@tmpXscale != \empty && \axis@tmpYscale != \empty )
- %
- % Apply scaling:
- \pgfpointxy{\axis@tmpXscale}{\axis@tmpYscale}%
- \axis@tmpa=\pgf@x
- \axis@tmpb=\pgf@y
- \ifx\axis@x\empty
- \pgfsetxvec{\pgfpoint{\axis@tmpa}{0pt}}%
- \else
- \pgfsetxvec{\pgfpoint{\axis@x}{0pt}}%
- \fi
- \ifx\axis@y\empty
- \pgfsetyvec{\pgfpoint{0pt}{\axis@tmpb}}%
- \else
- \pgfsetyvec{\pgfpoint{0pt}{\axis@y}}%
- \fi
- %
- % Determine final rectangle dimensions.
- % There are the following cases:
- % 1. the user really wants a fixed dimension,
- % i.e. he used 'scale only axis'.
- % Then, we have to work to get the correct dimension!
- %
- % Up to now, the scaling mechanism looses to many significant
- % digits such that the final width/height differs by 1-2 pt.
- %
- % If I am not mistaken, this does ONLY affect the final size,
- % not the relative plot precision.
- %
- % FIXME : really compute the plot precision!
- %
- % 2. The use specified width and/or height, but not 'scale only
- % axis'. Accept inaccurate final widths/heights (see above).
- %
- % 3. The user supplied 'x' and or 'y'. Simply use them, its
- % accurate.
- %
- \pgfpointxy{\axis@xmin}{\axis@ymin}%
- \axis@xcoordminTEX=\pgf@x
- \axis@ycoordminTEX=\pgf@y
- \pgfpointxy{\axis@xmax}{\axis@ymax}%
- \ifx\axis@rectangle@width\empty
- \axis@xcoordmaxTEX=\pgf@x
- \else
- % this 'if' here should only make a difference of about
- % 1-2pt, not more.
- %
- % and I am quite sure that this inaccuracy (and this
- % work-around) only affects the
- % final size, not the relative plot accuracy.
- \axis@xcoordmaxTEX=\axis@xcoordminTEX
- \expandafter\advance\expandafter\axis@xcoordmaxTEX\axis@width
- \fi
- \ifx\axis@rectangle@height\empty
- \axis@ycoordmaxTEX=\pgf@y
- \else
- \axis@ycoordmaxTEX=\axis@ycoordminTEX
- \expandafter\advance\expandafter\axis@ycoordmaxTEX\axis@height
- \fi
-%--------------------------------------------------
-% \begingroup
-% \pgf@x=\axis@xcoordmaxTEX\advance\pgf@x by-\axis@xcoordminTEX
-% \pgf@y=\axis@ycoordmaxTEX\advance\pgf@y by-\axis@ycoordminTEX
-% \message{Axis scaling x=\axis@tmpXscale, y=\axis@tmpYscale\ yields lower-left-corner (\axis@xmin,\axis@ymin) = (\the\axis@xcoordminTEX,\the\axis@ycoordminTEX) and upper right (\axis@xmax,\axis@ymax) = (\the\axis@xcoordmaxTEX,\the\axis@ycoordmaxTEX). Axis dimensions are width=\the\pgf@x, height=\the\pgf@y.}%
-% \endgroup
-%--------------------------------------------------
-}
-
-\def\axis@BEGIN@init@and@draw@axis{%
- \axis@determinedefaultvalues
-
- % move the anchor to (0,0):
- \expandafter\ifcase\axis@anchorchoicenum
- % north:
- \begin{scope}[
- yshift=-\axis@ycoordmaxTEX,
- xshift=-0.5\axis@xcoordminTEX-0.5\axis@xcoordmaxTEX
- ]
- \or% north west:
- \begin{scope}[
- yshift=-\axis@ycoordmaxTEX,
- xshift=-\axis@xcoordminTEX
- ]
- \or% west:
- \begin{scope}[
- yshift=-0.5\axis@ycoordminTEX-0.5\axis@ycoordmaxTEX,
- xshift=-\axis@xcoordminTEX
- ]
- \or% south west:
- \begin{scope}[
- yshift=-\axis@ycoordminTEX,
- xshift=-\axis@xcoordminTEX
- ]
- \or% south:
- \begin{scope}[
- yshift=-\axis@ycoordminTEX,
- xshift=-0.5\axis@xcoordminTEX-0.5\axis@xcoordmaxTEX
- ]
- \or% south east:
- \begin{scope}[
- yshift=-\axis@ycoordminTEX,
- xshift=-\axis@xcoordmaxTEX
- ]
- \or% east:
- \begin{scope}[
- yshift=-0.5\axis@ycoordminTEX-0.5\axis@ycoordmaxTEX,
- xshift=-\axis@xcoordmaxTEX
- ]
- \or% north east:
- \begin{scope}[
- yshift=-\axis@ycoordmaxTEX,
- xshift=-\axis@xcoordmaxTEX
- ]
- \or% center
- \begin{scope}[
- yshift=-0.5\axis@ycoordminTEX-0.5\axis@ycoordmaxTEX,
- xshift=-0.5\axis@xcoordminTEX-0.5\axis@xcoordmaxTEX
- ]
- \fi
-
- \begin{scope}
- \ifaxis@hide
- \clip
- (\axis@xcoordminTEX, \axis@ycoordminTEX)
- rectangle (\axis@xcoordmaxTEX, \axis@ycoordmaxTEX);
- \else
-
- % X-Achsenbeschriftung:
- % LADE DIE \axis@xtick -variable REIN
- \expandafter\axis@drawxaxis\expandafter{\axis@xtick}
- %
- % Y-Achsen und Achsenbeschriftung:
- \expandafter\axis@drawyaxis\expandafter{\axis@ytick}%
- \draw[clip]
- (\axis@xcoordminTEX, \axis@ycoordminTEX)
- rectangle (\axis@xcoordmaxTEX, \axis@ycoordmaxTEX);
-
- \fi
-}
-
-\def\axis@END@init@and@draw@axis{%
- \end{scope}%
-}
-
-% Writes output to \axis@TMP
-\def\axis@filter@input@ticks@with@log#1{%
- \let\axis@TMP=\empty
- \foreach \axis@TMPB in {#1} {%
- \expandafter\pgfmathlog@\expandafter{\axis@TMPB}%
- \ifx\axis@TMP\empty
- \xdef\axis@TMP{\pgfmathresult}%
- \else
- \xdef\axis@TMP{\axis@TMP,\pgfmathresult}%
- \fi
- }%
-}
-
-\tikzdeclarecoordinatesystem{axis}{\axis@evalute@tikz@coord@system@interface#1\axis@coord@end}
-
-
-% Assigns \pgfmathresult := canvas coordinate (#2) for axis #1.
-\long\def\axis@evalute@tikz@coord@system@interface@for#1#2{%
- \expandafter\let\expandafter\if@datascaled@cur\csname ifaxis@float@numerics@mode@#1\endcsname
- \expandafter\ifcase\csname axis@#1mode\endcsname
- \if@datascaled@cur
- \csname axis@datascaletrafo@fromfixed@#1\endcsname#2\to\pgfmathresult
- \else
- \def\pgfmathresult{#2}%
- \fi
- \or
- \pgfmathlog@{#2}%
- \fi
-}
-
-\long\def\axis@evalute@tikz@coord@system@interface#1,#2\axis@coord@end{%
- \begingroup
- \axis@evalute@tikz@coord@system@interface@for{x}{#1}%
- \let\axis@evaluate@tikz@coord@x=\pgfmathresult
- \axis@evalute@tikz@coord@system@interface@for{y}{#2}%
- \xdef\axis@TMP{\axis@evaluate@tikz@coord@x pt}%
- \xdef\axis@TMPB{\pgfmathresult pt}%
- \endgroup
- \pgfpointxy{\axis@TMP}{\axis@TMPB}%
-}
-
-% In case of (semi-) logplots, this command will
-% - assign a filter which invokes \pgfmathlog@{} for each coordinate
-% - replace any user-specified coordinate by its log.
-%
-% All subsequent commands will then work with logarithmic coordinates.
-%
-% @see pgfmathlog.sty for details about the implementation of log().
-%
-% PRECONDITION:
-% - The user input options have been set correctly,
-% - the option processing has not yet begun
-%
-% POSTCONDITION:
-% - any user input for log-axis has been replaced by its log
-% - coordinate filters to compute logs are installed
-%
-% See also:
-% \axis@apply@data@scale@trafo@to@options@for
-\def\axis@prepare@coord@filtering@for#1{%
- \expandafter\ifcase\csname axis@#1mode\endcsname
- \ifaxis@disabledatascaling
- \csname axis@float@numerics@mode@#1false\endcsname
- \axis@float@numerics@modefalse
- \else
- \csname axis@float@numerics@mode@#1true\endcsname
- \axis@float@numerics@modetrue
- \fi
- \ifaxis@float@numerics@mode
- % Install coordinate filters that
- % - read input as normalised floating point numbers,
- % - return [SIGN][MANTISSE]eEXPONENT
- % Motivation:
- % 1. we can compute axis limits using such data
- % 2. we can remember the floating point representation for
- % the data scaling transformation.
- % ATTENTION:
- % this here is a preprocessing step! You will need to
- % apply the data scaling later!
- % see
- % \axis@apply@data@scaletrafo@to@plot@data
- \expandafter\let\expandafter\axis@TMP\csname axis@#1filter\endcsname
- \ifx\axis@TMP\empty
- \expandafter\def\csname addplot@float@numerics@#1filter\endcsname##1\to##2{%
- \sciparsesign{##1}\axis@tmp@S\axis@tmp@M\axis@tmp@E
- \scisetcomponents{##2}\axis@tmp@S\axis@tmp@M\axis@tmp@E
- \edef##2{\axis@tmp@S\axis@tmp@M e\axis@tmp@E}%
- }%
- \else
- \expandafter\let\csname axis@#1filter@orig\endcsname=\axis@TMP
- \expandafter\def\csname addplot@float@numerics@#1filter\endcsname##1\to##2{%
- \csname axis@#1filter@orig\endcsname##1\to##2\relax
- \ifx##2\empty
- \else
- \expandafter\sciparsesign\expandafter{##2}\axis@tmp@S\axis@tmp@M\axis@tmp@E
- \scisetcomponents{##2}\axis@tmp@S\axis@tmp@M\axis@tmp@E
- \edef##2{\axis@tmp@S\axis@tmp@M e\axis@tmp@E}%
- \fi
- }%
- \fi
- \expandafter\let\expandafter\axis@TMP\csname addplot@float@numerics@#1filter\endcsname
- \expandafter\let\csname axis@#1filter\endcsname\axis@TMP
- %
- % Check for any existing axis limits:
- \expandafter\let\expandafter\axis@TMP\csname axis@#1min\endcsname
- \ifx\axis@TMP\empty
- \else
- \expandafter\sciparsesign\expandafter{\axis@TMP}\axis@tmp@S\axis@tmp@M\axis@tmp@E
- \expandafter\scisetcomponents\csname axis@#1min\endcsname\axis@tmp@S\axis@tmp@M\axis@tmp@E
- \fi
- \expandafter\let\expandafter\axis@TMP\csname axis@#1max\endcsname
- \ifx\axis@TMP\empty
- \else
- \expandafter\sciparsesign\expandafter{\axis@TMP}\axis@tmp@S\axis@tmp@M\axis@tmp@E
- \expandafter\scisetcomponents\csname axis@#1max\endcsname\axis@tmp@S\axis@tmp@M\axis@tmp@E
- \fi
- \fi
- \or
- \ifaxis@disablelogfilter
- \else
- % any user-specified axis limits:
- \expandafter\let\expandafter\axis@TMP\csname axis@#1min\endcsname
- \ifx\axis@TMP\empty
- \else
- \expandafter\pgfmathlog@\expandafter{\axis@TMP}%
- \expandafter\let\csname axis@#1min\endcsname=\pgfmathresult
- \fi
- \expandafter\let\expandafter\axis@TMP\csname axis@#1max\endcsname
- \ifx\axis@TMP\empty
- \else
- \expandafter\pgfmathlog@\expandafter{\axis@TMP}%
- \expandafter\let\csname axis@#1max\endcsname=\pgfmathresult
- \fi
- %
- % any user specified axis ticks:
- \expandafter\let\expandafter\axis@TMP\csname axis@#1tick\endcsname
- \ifx\axis@TMP\empty
- \else
- \expandafter\axis@filter@input@ticks@with@log\expandafter{\axis@TMP}%
- \expandafter\edef\csname axis@#1tick\endcsname{\axis@TMP}%
- \fi
- %
- \expandafter\let\expandafter\axis@TMP\csname axis@#1filter\endcsname
- \ifx\axis@TMP\empty
- \expandafter\def\csname addplot@log@compute@#1filter\endcsname##1\to##2{%
- \pgfmathlog@{##1}%
- \let##2=\pgfmathresult
- }%
- \else
- \expandafter\let\csname axis@#1filter@orig\endcsname=\axis@TMP
- \expandafter\def\csname addplot@log@compute@#1filter\endcsname##1\to##2{%
- \pgfmathlog@{##1}%
- \ifx\pgfmathresult\empty
- \let##2=\empty
- \else
- \expandafter\expandafter\csname axis@#1filter@orig\endcsname\pgfmathresult\to##2\relax
- \fi
- }%
- \fi
- \expandafter\let\expandafter\axis@TMP\csname addplot@log@compute@#1filter\endcsname
- \expandafter\let\csname axis@#1filter\endcsname\axis@TMP
- \fi
- \fi
-}
-
-\def\axis@create@axis@descriptions{%
- \ifaxis@hide
- \else
- \ifx\axis@xlabel\empty
- \else
- \axisshowxlabel
- \fi
- \ifx\axis@ylabel\empty
- \else
- \axisshowylabel
- \fi
- \fi
- \ifx\axis@title\empty
- \else
- \axisshowtitle
- \fi
- \axis@createlegend
-}
-
-% DATA TRANSFORMATION T(x) = X
-%
-% Input:
-% a number in the original data range, given in **floating** point representation
-% Output:
-% a fixed point number in transformed range
-% @see
-% \axis@datascaletrafo@x@three
-% \axis@datascaletrafo@fromfixed@x
-\def\axis@datascaletrafo@x#1\to#2{%
- \scigetcomponents#1\axis@tmp@S\axis@tmp@M\axis@tmp@E
- \axis@datascaletrafo@x@three\axis@tmp@S\axis@tmp@M\axis@tmp@E\to#2
-}
-
-% Overloaded function.
-% Input:
-% The same as above, but with Sign, Mantisse, Exponent.
-% #1,#2 and #3 are expected to be MACRO NAMES.
-\def\axis@datascaletrafo@x@three#1#2#3\to#4{%
- \def\axis@TMP{\scimathshift{#1}{#2}{#3}}%
- \expandafter\axis@TMP\expandafter{\axis@data@scale@trafo@SHIFT@x}%
- \scitofixed{#1}{#2}{#3}{#4}%
-}
-
-% Overloaded function.
-% Input:
-% a FIXED point number instead of a floating point one.
-% @see \axis@datascaletrafo@x
-\def\axis@datascaletrafo@fromfixed@x#1\to#2{%
- \begingroup
- \sciparsesign{#1}\axis@S\axis@M\axis@E
- \axis@datascaletrafo@x@three\axis@S\axis@M\axis@E\to{#2}%
- \global\let\axis@TMP=#2\relax
- \endgroup
- \let#2=\axis@TMP
-}
-
-\def\axis@datascaletrafo@y#1\to#2{%
- \scigetcomponents#1\axis@tmp@S\axis@tmp@M\axis@tmp@E
- \axis@datascaletrafo@y@three\axis@tmp@S\axis@tmp@M\axis@tmp@E\to#2
-}
-\def\axis@datascaletrafo@y@three#1#2#3\to#4{%
- \def\axis@TMP{\scimathshift{#1}{#2}{#3}}%
- \expandafter\axis@TMP\expandafter{\axis@data@scale@trafo@SHIFT@y}%
- \scitofixed{#1}{#2}{#3}{#4}%
-}
-\def\axis@datascaletrafo@fromfixed@y#1\to#2{%
- \begingroup
- \sciparsesign{#1}\axis@S\axis@M\axis@E
- \axis@datascaletrafo@y@three\axis@S\axis@M\axis@E\to{#2}%
- \global\let\axis@TMP=#2\relax
- \endgroup
- \let#2=\axis@TMP
-}
-
-% INVERSE transformation x = T^{-1}( X )
-% Input:
-% a fixed point number in transformed domain
-% Output:
-% a number in the data domain, given in floating point
-% representation
-\def\axis@inverse@datascaletrafo@x#1\to#2{%
- \expandafter\sciparsesignsingle\expandafter{#1}#2
- \edef\axis@TMP{\noexpand#2{-\axis@data@scale@trafo@SHIFT@x}}%
- \expandafter\scimathshiftsingle\axis@TMP
-}
-
-\def\axis@inverse@datascaletrafo@y#1\to#2{%
- \expandafter\sciparsesignsingle\expandafter{#1}#2
- \edef\axis@TMP{\noexpand#2{-\axis@data@scale@trafo@SHIFT@y}}%
- \expandafter\scimathshiftsingle\axis@TMP
-}
-
-% Overloaded function.
-%
-% In contrast to \axis@inverse@datascaletrafo@x, this method
-% returns a number in FIXED point representation.
-% @see \axis@inverse@datascaletrafo@x
-\def\axis@inverse@datascaletrafo@tofixed@x#1\to#2{%
- \axis@inverse@datascaletrafo@x#1\to{#2}%
- \scitofixedsingle{#2}{#2}%
-}
-\def\axis@inverse@datascaletrafo@tofixed@y#1\to#2{%
- \axis@inverse@datascaletrafo@y#1\to{#2}%
- \scitofixedsingle{#2}{#2}%
-}
-
-\newenvironment{axis}[1][]{%
- \begingroup
-% \def\axis@setkeys{\setkeys*[\prefix]{axis}}%
-%\tracingmacros=2\tracingcommands=2
-% \message{Der every-axis-style ist gerade \csname tikz@st@every axis\endcsname}%
-%\tracingmacros=0\tracingcommands=0
-% \expandafter\expandafter\expandafter\axis@setkeys
- % \expandafter\expandafter\expandafter{\csname tikz@st@every axis\endcsname}%
- \begin{scope}[style=every axis,%
- x=1pt,y=1pt% see below
- ]
- % The explicit specification of 'x' and 'y' as 1pt is to avoid
- % numeric overflow/underflow during scale computations:
- %
- % The scaling (i.e. proper values for 'x' and 'y') will be
- % determined later-on, dependend on the axis limits. Since axis
- % limits are implicitly in units of 1pt, it is reasonable to use
- % '1pt' here as well.
- %
- %
-%--------------------------------------------------
-% \draw[very thin,color=gray,xstep=1,ystep=\logten]
-% (\xcoordmin\axis@leftover,\ycoordmin)
-% grid (\xcoordmax\axis@rightover,\ycoordmax);
-%--------------------------------------------------
- \setkeys[\prefix]{axis}{#1}%
- %
- % --------------------
- % Allocations:
- % --------------------
- \listnewempty\axis@plotspeclist
- \listnewempty\axis@legend
- \listnewempty\axis@stored@plot@cmds
- \listnewempty\axis@stored@plot@data
- \newif\ifaxis@autocompute@xlim
- \newif\ifaxis@autocompute@ylim
- \newif\ifaxis@filtercoords
- \newif\ifaxis@float@numerics@mode@x
- \newif\ifaxis@float@numerics@mode@y
- \newif\ifaxis@float@numerics@mode
- % rename '\ifaxis@hide axis' to mask the white space:
- \expandafter\let\expandafter\ifaxis@hide\csname ifaxis@hide axis\endcsname
- % the same for other options with white spaces:
- \expandafter\let\expandafter\ifaxis@scale@only@axis\csname ifaxis@scale only axis\endcsname
- \newif\ifaxis@draw@at@end
- \newif\ifaxis@limits@are@computed
- \newif\ifaxis@EMERGENCY@FORCE@DATA@TRAFO@TO@IDENTITY
- \axis@numplots=0
- \let\axis@already@computed@legend@node=\empty
- %
- % --------------------
- % Option preprocessing
- % --------------------
- \axis@prepare@coord@filtering@for x
- \axis@prepare@coord@filtering@for y
- %
- \ifx\axis@xfilter\empty
- \else
- \axis@filtercoordstrue
- \fi
- \ifx\axis@yfilter\empty
- \else
- \axis@filtercoordstrue
- \fi
- %
- \ifx\axis@xmin\empty
- \axis@autocompute@xlimtrue
- \def\axis@xmin{16300}%
- \ifaxis@float@numerics@mode@x
- \scisetcomponents\axis@xmin{1}{1.0}{324}%
- \fi
- \fi
- \ifx\axis@xmax\empty
- \axis@autocompute@xlimtrue
- \def\axis@xmax{-16300}%
- \ifaxis@float@numerics@mode@x
- \scisetcomponents\axis@xmax{2}{1.0}{324}%
- \fi
- \fi
- \ifx\axis@ymin\empty
- \axis@autocompute@ylimtrue
- \def\axis@ymin{16300}%
- \ifaxis@float@numerics@mode@y
- \scisetcomponents\axis@ymin{1}{1.0}{324}%
- \fi
- \fi
- \ifx\axis@ymax\empty
- \axis@autocompute@ylimtrue
- \def\axis@ymax{-16300}%
- \ifaxis@float@numerics@mode@y
- \scisetcomponents\axis@ymax{2}{1.0}{324}%
- \fi
- \fi
- %
- \ifaxis@autocompute@xlim
- \axis@draw@at@endtrue
- \axis@limits@are@computedfalse
- \else
- \axis@limits@are@computedtrue
- \fi
- \ifaxis@autocompute@ylim
- \axis@draw@at@endtrue
- \axis@limits@are@computedfalse
- \else
- \axis@limits@are@computedtrue
- \fi
- %
- %
- % --------------------
- % Start axis:
- % either postponed to \end or directly.
- % --------------------
- %
- \ifaxis@draw@at@end
- \else
- \axis@BEGIN@init@and@draw@axis
- \fi
-}{%
- %\end{axis}:
- % --------------------
- % All plotting commands
- % have been done.
- % -> apply postponed drawing commands!
- % --------------------
- \ifaxis@draw@at@end
- \ifaxis@limits@are@computed
- \else
- % EMPTY AXIS:
- \def\axis@xmin{0}%
- \def\axis@xmax{1}%
- \def\axis@ymin{0}%
- \def\axis@ymax{1}%
- \fi
- \axis@BEGIN@init@and@draw@axis
- \listforeach\axis@stored@plot@cmds\as\plotcmd{%
- \listpopfront\axis@stored@plot@data\to\plotdata
- \ifaxis@float@numerics@mode
- \ifx\plotcmd\empty
- \plotdata
- \else
- % Apply the data scaling transformation
- \expandafter\axis@apply@data@scaletrafo@to@plot@data\plotdata\to\plotdata
- \expandafter\plotcmd\plotdata
- \fi
- \else
- \expandafter\plotcmd\plotdata
- \fi
- }%
- \fi
- \axis@END@init@and@draw@axis
- %
- \begin{scope}[%
- xshift=+\axis@xcoordminTEX,
- yshift=\axis@ycoordminTEX,
- x={\axis@xcoordmaxTEX-\axis@xcoordminTEX},
- y={\axis@ycoordmaxTEX-\axis@ycoordminTEX}
- ]%
- \axis@create@axis@descriptions
- \end{scope}%
- \end{scope}% this scope starts inside of \axis@BEGIN@init@and@draw@axis
- %
- \end{scope}%
- \endgroup
-}
+\input pgfplots.code.tex
+\usetikzlibrary{plotmarks}
-\newenvironment{semilogxaxis}[1][]{%
- \begin{axis}[xmode=log,ymode=normal,#1]
-}{%
- \end{axis}%
-}
-\newenvironment{semilogyaxis}[1][]{%
- \begin{axis}[xmode=normal,ymode=log,#1]
-}{%
- \end{axis}%
-}
-\newenvironment{loglogaxis}[1][]{%
- \begin{axis}[xmode=log,ymode=log,#1]
-}{%
- \end{axis}%
-}
+\endinput
diff --git a/Master/texmf-dist/tex/latex/pgfplots/pgfplotshelpers.sty b/Master/texmf-dist/tex/latex/pgfplots/pgfplotshelpers.sty
deleted file mode 100644
index 304448fbef4..00000000000
--- a/Master/texmf-dist/tex/latex/pgfplots/pgfplotshelpers.sty
+++ /dev/null
@@ -1,208 +0,0 @@
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Low-level helper methods for string parsing and number conversion.
-%
-% This file comes as part of the pgfplots-package.
-%
-% Copyright 2007/2008 by Christian Feuersänger.
-%
-% This program is free software: you can redistribute it and/or modify
-% it under the terms of the GNU General Public License as published by
-% the Free Software Foundation, either version 3 of the License, or
-% (at your option) any later version.
-%
-% This program is distributed in the hope that it will be useful,
-% but WITHOUT ANY WARRANTY; without even the implied warranty of
-% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-% GNU General Public License for more details.
-%
-% You should have received a copy of the GNU General Public License
-% along with this program. If not, see <http://www.gnu.org/licenses/>.
-%
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\ProvidesPackage{pgfplotshelpers}[2008/02/17 Version 0.9.4]
-
-\newtoks\pgfplots@toka
-
-\def\prettyprintnumberprecision{2}
-
-\def\pgfmathlog@tonumber#1pt{#1}
-
-% Invokes command #1 with #2 without the 'pt' suffix.
-\def\invokepgf@math@one#1#2{%
- %\edef\pgfmath@resulttemp{\pgf@sys@tonumber{#2}}%
- %\expandafter#1\expandafter{\pgfmath@resulttemp}%
- \edef\pgfmath@resulttemp{{\pgf@sys@tonumber{#2}}}%
- \expandafter#1\pgfmath@resulttemp%
-}
-
-% Expands #2 using \edef and invokes #1 with the resulting string.
-%
-% Example:
-% \pgfmath@y=7.9pt
-% \pgfmathlog@invoke@expanded\pgfmathexp@{{\pgf@sys@tonumber{\pgfmath@y}}}%
-% will invoke
-% \pgfmathexp@{7.9}
-\def\pgfmathlog@invoke@expanded#1#2{%
- \edef\pgfmath@resulttemp{#2}%
- \expandafter#1\pgfmath@resulttemp
-}
-
-% Expands the NUMBER (without units) to a pretty printed string argument: rounded to
-% several digits, discard any suffix zeros etc.
-%
-% It uses \prettyprintnumberprecision digits after the comma.
-\def\prettyprintnumber#1{%
- \begingroup
-% \edef\argument{#1}%
-% \expandafter\prettyprintnumber@impl\argument.\END
- \edef\argument{#1\noexpand\prec\prettyprintnumberprecision}%
- \expandafter\fixedpointround\argument\to\result
- \result
- \endgroup
-}
-
-\def\prettyprintnumber@impl#1.#2\END{%
- % This implementation is really bad.
- % I hope I find time to get something better...
- \def\tmp{#2}%
- \ifx\tmp\empty
- % there was no '.' in the original arg
- #1
- \else
- % ok, there is a dot in the arg.
- % 1. ROUND
- % 2. DISCARD ZEROS
- \toksdef\tokens=2
- \let\i=\c@pgf@counta
- \let\lastdigit=\c@pgf@countb
- \let\numberAsDIM=\pgfmath@x
- \let\zeroFilledNum=\pgfmath@y
- \i=0
- \tokens={}%
- \def\D{#2}%
- \def\DOT{.}%
- \ifx\D\DOT
- % the number '#1.'
- \let\D=\empty
- \else
- \expandafter\prettyprintnumber@impl@getfirst
- \prettyprintnumberprecision
- \of#2%
- \to\tokens%
- \nextto\D
- \count\i
- \fi
- %\message{Pretty print: first <= \prettyprintnumberprecision\ digits after period: \the\tokens, (strlen=\the\i), next rounding-relevant-digit: '\D'}%
- \ifx\D\empty
- \numberAsDIM=#1\expandafter.\the\tokens pt
- % Nothing to do - we have our desired precision.
- \else
- \lastdigit\expandafter=\D\relax
-% \message{D=\D!}%
- \ifnum\lastdigit>4
- \numberAsDIM=#1\expandafter.\expandafter\the\tokens\D pt
- % round up:
- % compute numberAsDIM += 0.0000[10-digit]
- \advance\lastdigit by-10
- \multiply\lastdigit by-1
- \tokens={0.}%
- \loop
- \ifnum\i>0
- \tokens=\expandafter{\the\tokens0}%
- \advance\i by-1
- \repeat
- \edef\D{\the\tokens\the\lastdigit pt}%
- \expandafter\zeroFilledNum\D
- \ifdim\numberAsDIM<0pt
- \advance\numberAsDIM by-\zeroFilledNum
- \else
- \advance\numberAsDIM by\zeroFilledNum
- \fi
- \else
- \numberAsDIM=#1\expandafter.\the\tokens pt
- \fi
- \fi
- %\message{Pretty print: Result after rounding = \the\numberAsDIM / zeroFilledNum = \the\zeroFilledNum [only defined on up-rounding}%
- \edef\D{\pgf@sys@tonumber{\numberAsDIM}}%
- \expandafter\prettyprintnumber@onlyrelevant@digits\D\to\D
- % FIXME : I could return '\D' as macro!? May thats a better
- % way...
- \D
- \fi
-}
-
-% This macro takes the first \prettyprintnumberprecision digits after
-% the period and squeezes away any trailing zeros.
-%
-% If no digits after the period remain, the period will be discarded
-% as well.
-\def\prettyprintnumber@onlyrelevant@digits#1.#2\to#3{%
- \begingroup
- \toksdef\tokens=2
- \let\i=\c@pgf@counta
- \let\maxDigits=\c@pgf@countc
- \let\numsuffixZeros=\c@pgf@countb
- \tokens={#1.}%
- \i=0
- \expandafter\maxDigits\prettyprintnumberprecision
- \numsuffixZeros=0
- \prettyprintnumber@onlyrelevant@digits@leftshift#2\to#3
- \ifnum\numsuffixZeros>0
- \ifnum\numsuffixZeros=\i
- \tokens={#1}%
- \else
- \maxDigits=\i
- \advance\maxDigits by-\numsuffixZeros
- \tokens={#1.}%
- \i=0
- \prettyprintnumber@onlyrelevant@digits@leftshift#2\to#3
- \fi
- \fi
- \xdef\pgfplotshelpersTMP{\the\tokens}%
- \endgroup
- \let#3=\pgfplotshelpersTMP
-}
-
-
-% shifts the input argument until either no more input is left or
-% \maxDigits entries have been acquired.
-%
-% It also updates \i (will contain the number of acquired elements)
-% and \numsuffixZeros (the number of zeros at the tail of #3 on
-% output).
-\def\prettyprintnumber@onlyrelevant@digits@leftshift#1#2\to#3{%
- \ifnum\i<\maxDigits
- \tokens=\expandafter{\the\tokens#1}%
- \advance\i by1
- \ifnum#1=0
- \advance\numsuffixZeros by1
- \else
- \numsuffixZeros=0
- \fi
- \def\tmp{#2}%
- \ifx\tmp\empty
- \else
- \prettyprintnumber@onlyrelevant@digits@leftshift#2\to#3
- \fi
- \fi
-}
-
-\def\prettyprintnumber@impl@getfirst#1\of#2#3.\to#4\nextto#5\count#6{%
- \edef#5{#3}%
- #4=\expandafter{\the#4#2}%
- \advance#6 by1
- \ifx#5\empty
- \else
- \ifnum#6<#1
- \prettyprintnumber@impl@getfirst #1\of#3.\to#4\nextto#5\count{#6}%
- \else
- \prettyprintnumber@impl@firstof#3\to#5
- \fi
- \fi
-}
-
-\def\prettyprintnumber@impl@firstof#1#2\to#3{\def#3{#1}}%
-
diff --git a/Master/texmf-dist/tex/latex/pgfplots/sciformat.sty b/Master/texmf-dist/tex/latex/pgfplots/sciformat.sty
deleted file mode 100644
index 493aca948d1..00000000000
--- a/Master/texmf-dist/tex/latex/pgfplots/sciformat.sty
+++ /dev/null
@@ -1,861 +0,0 @@
-%--------------------------------------------
-%
-% Package sciformat.sty
-%
-% Provides support for floating point number representations of the
-% form
-%
-% S * M * 10^e
-%
-% with S in [-,+,0], 0<M<10, e in Z.
-%
-% Example:
-%
-% +1.62452*10^-8
-%
-% The conversion routines are complete text-based.
-%
-% Copyright 2007/2008 by Christian Feuersänger.
-%
-% This program is free software: you can redistribute it and/or modify
-% it under the terms of the GNU General Public License as published by
-% the Free Software Foundation, either version 3 of the License, or
-% (at your option) any later version.
-%
-% This program is distributed in the hope that it will be useful,
-% but WITHOUT ANY WARRANTY; without even the implied warranty of
-% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-% GNU General Public License for more details.
-%
-% You should have received a copy of the GNU General Public License
-% along with this program. If not, see <http://www.gnu.org/licenses/>.
-%
-%--------------------------------------------
-\ProvidesPackage{sciformat}[2008/02/17 v.0.9.4]
-\RequirePackage{pgf}[2007/01/01]
-\RequirePackage{pgfplotshelpers}[2008/02/17]
-
-% Computes a normalised floating point representation for #1 of the
-% form
-% [+-]X.XXXXXXX*10^C
-% where
-% X.XXXXXX is a mantisse with first number != 0
-% and C is a count.
-%
-% This method does NOT use TeX Registers to represent the numbers! The
-% computation is COMPLETELY STRING BASED.
-% This allows numbers such at 10000000 or 5.23e-10 to be represented
-% properly, although TeX-registers would produce overflow/underflow
-% errors in these cases.
-%
-% It is to be used to compute logs, because log(X*10^Y) = log(X) + log(10)*Y
-%
-% Arguments:
-% #1 a -possibly non-normalized- number representation. Accepted input
-% format is
-% [+-]XXXXX.XXXXXX
-% [+-]XXXXX.XXXXXXeXXXX
-% [+-]0.0000XXXXXX
-% [+-]0.0000XXXXXXeXXXX
-% NOT accepted input format is
-% [+-]0000.XXXXXX [leading zeros not supported]
-% [+-]XXXXX.XXXXXXEXXXXX [E notation not yet implemented]
-% #2 a macro name. \def#2{.....} will be used to assign the mantisse.
-% #3 a macro name. \def#3{.....} will be used to assign the exponent (base 10).
-%
-% Example:
-% \def\normalize#1{%
-% \sciparse#1\to\M\powten\E
-% \[ #1 \mapsto \M\cdot 10^{\E} \]
-% }
-% \normalize{123.41251}%
-% \normalize{3.26101452e-06}%
-%
-% REMARKS:
-% - the mantisse will ALWAYS have a period and one following number.
-% - Special case: the number +- 0 will always have the mantisse 0.0. The sign and
-% the exponent is undefined.
-\def\sciparse#1\to#2\powten#3{%
- \begingroup
- \sciparse@impl@possibly@signed#1\to#2\powten{#3}%
- \xdef\sciparseTMP{%
- \noexpand\def\noexpand#2{#2}%
- \noexpand\def\noexpand#3{#3}%
- }%
- \endgroup
- \sciparseTMP
-}
-
-% Overloaded scientific parser.
-%
-% In addition to '\sciparse', this method checks for '+- 0' cases
-% and sets #2 accordingly.
-%
-% \S #2: will be \def'ed to one of [0,1,2] with
-% 0 == '0', ( \def#2{0} )
-% 1 == '+',
-% 2 == '-',
-% -> can be used with \ifcase
-% \M #3: will be filled with a positive mantisse (undefined in case \S=0).
-% \E #4: the exponent basis 10 (an integer). Undefined in case \S = 0.
-%
-% Example:
-% \sciparsesign141.212\S\M\E
-% -> \S = 1, \M = 1.41212, \E =2
-%
-\def\sciparsesign#1#2#3#4{%
- \begingroup
- \sciparsesign@impl@possibly@signed#1\S#2\M#3\E{#4}%
- \def\sciparseTMP{0}%
- \ifx\sciparseTMP#2\relax
- \def#4{0}%
- \fi
- \xdef\sciparseTMP{%
- \noexpand\def\noexpand#2{#2}%
- \noexpand\def\noexpand#3{#3}%
- \noexpand\def\noexpand#4{#4}%
- }%
- \endgroup
- \sciparseTMP
-}
-
-\def\sciparsesignsingle#1#2{%
- \begingroup
- \sciparsesign{#1}\sci@S\sci@M\sci@E
- \xdef\sciparseTMP{\noexpand\scisetcomponents{\noexpand#2}{\sci@S}{\sci@M}{\sci@E}}%
- \endgroup
- \sciparseTMP
-}
-
-% Compares
-% x = Sign(#1) #2 * 10^#3
-% with
-% y = Sign(#4) #5 * 10^#6
-%
-% example:
-% \scimathlessthan\S\M\E\and\SS\MM\EE
-% \ifscimathlessthan
-% is smaller!
-% \else
-% is not smaller.
-% \fi
-%
-% and sets the boolean
-% \ifscimathlessthan := (x<y).
-\def\scimathlessthan#1#2#3\and#4#5#6{%
- \scimathlessthanfalse
- \begingroup
- \let\S@first=\c@pgf@counta
- \let\S@second=\c@pgf@countb
- \S@first\expandafter=#1\relax
- \S@second\expandafter=#4\relax
- \ifcase\S@first
- % x = 0 -> (x<y <=> y >0)
- \ifnum1=\S@second
- \aftergroup\scimathlessthantrue
- \fi
- \or
- % x > 0 -> (x<y <=> ( y > 0 && |x| < |y|) )
- \ifnum1=\S@second
- % y>0:
- \scimathlessthan@positive\M#2\E#3\MM#5\EE{#6}%
- \fi
- \or
- % x < 0 -> (x<y <=> (y >= 0 || |x| > |y|) )
- \ifnum2=\S@second
- % 'y<0':
- \scimathlessthan@positive\M#5\E#6\MM#2\EE{#3}%
- \else
- \aftergroup\scimathlessthantrue
- \fi
- \fi
- \endgroup
-}
-
-\def\scimathmax#1#2#3\and#4#5#6\to#7#8#9{%
- \scimathlessthan#1#2#3\and#4#5#6\relax
- \ifscimathlessthan
- \let#7=#4
- \let#8=#5
- \let#9=#6
- \else
- \let#7=#1
- \let#8=#2
- \let#9=#3
- \fi
-}
-
-\def\scimathmin#1#2#3\and#4#5#6\to#7#8#9{%
- \scimathlessthan#1#2#3\and#4#5#6\relax
- \ifscimathlessthan
- \let#7=#1
- \let#8=#2
- \let#9=#3
- \else
- \let#7=#4
- \let#8=#5
- \let#9=#6
- \fi
-}
-
-% Takes \S, \M and \E as sign, mantisse and exponent and computes a
-% fixed point representation for that number.
-%
-% example:
-% \S=1
-% \M=4.2
-% \E=1
-% \scitofixed\S\M\E\result
-% -> 42.0
-\def\scitofixed#1#2#3#4{%
- \begingroup
- \let\sci@sign=\c@pgf@counta
- \sci@sign\expandafter=#1\relax
- \ifnum0=\sci@sign
- \xdef\sciparseTMP{0.0}%
- \else
- \expandafter\scitofixed@impl#2\E#3\END
- \ifnum2=\sci@sign
- \xdef\sciparseTMP{-\sciparseTMP}%
- \fi
- \fi
- \endgroup
- \let#4=\sciparseTMP
-}
-
-% Single macro SCI-representation to #2.
-\def\scitofixedsingle#1#2{%
- \begingroup
- \scigetcomponents{#1}\sci@S\sci@M\sci@E
- \scitofixed\sci@S\sci@M\sci@E{#2}%
- \global\let\sciparseTMP=#2%
- \endgroup
- \let#2=\sciparseTMP
-}
-
-% Takes a SINGLE macro representing a floating point and extracts
-% sign, mantisse and exponent.
-% #1: the name of the single macro.
-% The expansion of #1 is COMPLETELY independend of associated
-% floating point number. You can even use \def#1{foo bar}
-% so change the meaning of #1 without affecting the number.
-% #2: will be set to #1's sign
-% #3: will be set to #1's mantisse
-% #4: will be set to #1's exponent
-%
-% @see scisetcomponents
-\def\scigetcomponents#1#2#3#4{%
- \expandafter\let\expandafter#2\csname\string#1@S\endcsname
- \expandafter\let\expandafter#3\csname\string#1@M\endcsname
- \expandafter\let\expandafter#4\csname\string#1@E\endcsname
-}
-
-% Assigns sign #2, mantisse #3 and exponent #4 to a single macro
-% representing the floating point.
-%
-% #1: the target name. Will create macros #1@S, #1@M and #1@E
-% which will be filled with #2, #3 and #4.
-%
-% Remark:
-% It is perfectly save to use the macro name #1 for other uses since
-% only the '@{S,M,E}' - macros are used to maintain the numerical
-% information.
-%
-% @see scigetcomponents
-\def\scisetcomponents#1#2#3#4{%
- \expandafter\edef\csname\string#1@S\endcsname{#2}%
- \expandafter\edef\csname\string#1@M\endcsname{#3}%
- \expandafter\edef\csname\string#1@E\endcsname{#4}%
-}
-
-% Divides or multiplies the input number by 10^#4 using an arithmetic
-% left/right shift.
-%
-% Input:
-% #1 Sign macro
-% #2 Mantisse macro
-% #3 exponent macro
-% #4 a positive or negative integer number denoting the shift.
-%
-% Example:
-% \scimathshift\S\M\E4
-\def\scimathshift#1#2#3#4{%
- \begingroup
- \c@pgf@counta\expandafter=#3\relax
- \advance\c@pgf@counta by#4\relax
- \xdef\sciparseTMP{\the\c@pgf@counta}%
- \endgroup
- \let#3=\sciparseTMP
-}
-
-\def\scimathshiftsingle#1#2{%
- \begingroup
- \expandafter\let\expandafter\E\csname\string#1@E\endcsname
- \c@pgf@counta\expandafter=\E\relax
- \advance\c@pgf@counta by#2\relax
- \xdef\sciparseTMP{\the\c@pgf@counta}%
- \endgroup
- \expandafter\let\csname\string#1@E\endcsname\sciparseTMP%
-}
-
-
-% Rounds a fixed point number #1 to #2 digits precision and returns
-% the result into macro #3.
-%
-% This method is PURELY text based and can work with arbirtrary
-% precision (well, limited to TeX's stack size and integer size).
-\def\fixedpointround#1\prec#2\to#3{%
- \begingroup
- \pgfplots@toka={}%
- \let\fp@round@next=\empty
- \let\fp@round@prec=\c@pgf@countb
- \let\fp@offsetbehindperiod=\c@pgf@counta
- \let\fp@round@lastzeros=\c@pgf@countc
- \let\fp@round@trg=#3\relax
- \def\fp@round@input{#1}%
- \fp@round@prec=#2\relax
- \fp@round@lastzeros=0
- \fp@offsetbehindperiod=-1 % means: no period found so far
- \fixedpointround@impl@ITERATE@NODOT #1\fp@round@EOI
- \xdef\sciparseTMP{\fp@round@trg}%
- \endgroup
- \let#3=\sciparseTMP
-}
-
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% IMPL
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-% \fixedpointround implementation in WORDS:
-%
-% coarse idea:
-% 1. collect all digits/sign BEFORE the first period in REVERSE order
-% 2. then, collect UP TO \prec digits after the period in REVERSE order
-% Steps 1. and 2. lead to the digit [sign] sequence
-% "x_{-p} x_{-p+1} ... x_{-2} x_{-1} '.' x_0 ... x_r"
-% where 'r' is the total number of digits. The integer 'p' denotes the
-% ACTUALLY collected number of digits behind the period.
-%
-% Let 'k' be the desired precision.
-%
-% There are exactly TWO cases:
-% 1. The case with p<=k and x_{-p-1} = end of input.
-% 2. The case with p=k and x_{-p-1} is a further, next character.
-%
-% Then, we do in case 1.)
-% discard any unused zeros at the tail of our number (possibly
-% including the period)
-%
-% and in case 2.)
-% if NEXT DIGIT < 5:
-% do exactly the same as in case 1.) above and discard any
-% following digits.
-% else
-% let q := -p
-% while(x_q = 9 and q<=r )
-% if q>=0
-% set x_q = '0'
-% else
-% discard digit x_q='9'
-% fi
-% ++q
-% if q=0
-% discard the period
-% fi
-% end while
-% if q = r+1
-% insert a '1'
-% else
-% set x_q = x_q + 1
-% fi
-% fi
-%
-% All these loops have been implemented in spaghetti-code below.
-% Sorry, I fear its hard to understand. In principle, everything is
-% realised using more or less finite state machines (with some number
-% counting logic).
-%
-% Some comments:
-% - The token register \pgfplots@toka is used to accumulate the REVERSED input number.
-% - \fp@round@EOI always denotes 'END OF INPUT'.
-% - in the second stage, we need to reverse \pgfplots@toka.
-% This is -again- done with \pgfplots@toka.
-
-\def\fixedpointround@impl@discard@period#1.#2\fp@round@EOI{%
- \def\fp@round@trg{#1}%
-}
-
-\def\fixedpointround@impl@gobble@rest@and@start#1\fp@round@EOI{%
- \fixedpointround@impl@start
-}
-\def\fixedpointround@impl@gobble@and@start\fp@round@EOI{%
- \fixedpointround@impl@start
-}
-\def\fixedpointround@impl@gobble\fp@round@EOI{}%
-
-\def\fixedpointround@impl@start{%
- \ifx\fp@round@next\empty
- \ifnum\fp@offsetbehindperiod<0
- \edef\fp@round@trg{\fp@round@input}%
- \else
- \ifnum\fp@offsetbehindperiod>\fp@round@prec
- \errmessage{Internal logic error in fixedpointround at [I] - should not have happened!?}%
- \fi
- \fixedpointround@impl@discard@suffix@zeros
- \fi
- \else
- \ifnum\fp@offsetbehindperiod=\fp@round@prec
- \else
- \errmessage{Internal logic error in fixedpointround at [II] - should not have happened!? I have offsetbehindperiod=\the\fp@offsetbehindperiod and prec = \the\fp@round@prec}%
- \fi
- \expandafter\ifnum\fp@round@next<5
- \fixedpointround@impl@discard@suffix@zeros
- \else
- \multiply\fp@offsetbehindperiod by-1
- %\edef\fp@round@trg{B\the\pgfplots@toka B}%
- \expandafter\fixedpointround@impl@ADD@ONE\the\pgfplots@toka\fp@round@EOI
- \fi
- \fi
-}
-
-\def\fixedpointround@impl@ADD@ONE{%
- \pgfplots@toka={}%
- \fixedpointround@impl@ADD@ONE@ITERATE
-}
-\def\fixedpointround@impl@ADD@ONE@ITERATE{%
- \@ifnextchar\fp@round@EOI{%
- \edef\fp@round@trg{1\the\pgfplots@toka}%
- \fixedpointround@impl@gobble
- }{%
- \@ifnextchar.{%
- \fixedpointround@impl@ADD@ONE@NEXT@COLLECT
- }{%
- \@ifnextchar+{%
- \fixedpointround@impl@ADD@ONE@NEXT@COLLECT
- }{%
- \@ifnextchar-{%
- \fixedpointround@impl@ADD@ONE@NEXT@COLLECT
- }{%
- \fixedpointround@impl@ADD@ONE@NEXT
- }%
- }%
- }%
- }%
-}
-
-\def\fixedpointround@impl@ADD@ONE@ITERATE@gobble@dot.{%
- \fixedpointround@impl@ADD@ONE@ITERATE
-}
-
-\def\fixedpointround@impl@ADD@ONE@NEXT@COLLECT#1{%
- \pgfplots@toka=\expandafter{\expandafter#1\the\pgfplots@toka}%
- \fixedpointround@impl@ADD@ONE@ITERATE
-}
-\def\fixedpointround@impl@ADD@ONE@NEXT#1{%
- \ifnum#1=9
- \ifnum\fp@offsetbehindperiod<0
- % silently DROP digit
- \else
- \pgfplots@toka=\expandafter{\expandafter0\the\pgfplots@toka}%
- \fi
- \advance\fp@offsetbehindperiod by1
- \ifnum\fp@offsetbehindperiod=0
- \def\fp@round@nextcmd{\fixedpointround@impl@ADD@ONE@ITERATE@gobble@dot}%
- \else
- \def\fp@round@nextcmd{\fixedpointround@impl@ADD@ONE@ITERATE}%
- \fi
- \else
- % re-use this counter:
- \fp@round@lastzeros=#1
- \advance\fp@round@lastzeros by1
- \edef\fp@round@trg{\the\fp@round@lastzeros\the\pgfplots@toka}%
- \pgfplots@toka=\expandafter{\fp@round@trg}%
- \def\fp@round@nextcmd{\fixedpointround@impl@REVERSE@ITERATE}%
- \fi
- \fp@round@nextcmd
-}
-
-
-\def\fixedpointround@impl@discard@suffix@zeros{%
- \ifnum\fp@round@lastzeros=\fp@offsetbehindperiod
- \expandafter\fixedpointround@impl@discard@period\fp@round@input\fp@round@EOI
- \else
- \ifnum\fp@round@lastzeros=0
- \expandafter\fixedpointround@impl@REVERSE\the\pgfplots@toka\fp@round@EOI
- \else
- \expandafter\fixedpointround@impl@discard@suffix@zeros@ITERATE\the\pgfplots@toka\fp@round@EOI
- \fi
- \fi
-}
-
-% PRECONDITION:
-% \fp@round@lastzeros > 0
-\def\fixedpointround@impl@discard@suffix@zeros@ITERATE#1{%
- \advance\fp@round@lastzeros by-1
- \ifnum\fp@round@lastzeros=0
- \def\fp@round@nextcmd{\fixedpointround@impl@REVERSE}%
- \else
- \def\fp@round@nextcmd{\fixedpointround@impl@discard@suffix@zeros@ITERATE}%
- \fi
- \fp@round@nextcmd
-}
-
-\def\fixedpointround@impl@REVERSE{%
- \pgfplots@toka={}%
- \fixedpointround@impl@REVERSE@ITERATE
-}
-
-\def\fixedpointround@impl@REVERSE@ITERATE{%
- \@ifnextchar\fp@round@EOI{%
- \edef\fp@round@trg{\the\pgfplots@toka}%
- \fixedpointround@impl@gobble
- }{%
- \fixedpointround@impl@REVERSE@NEXT
- }%
-}
-
-\def\fixedpointround@impl@REVERSE@NEXT#1{%
- \pgfplots@toka=\expandafter{\expandafter#1\the\pgfplots@toka}%
- \fixedpointround@impl@REVERSE@ITERATE
-}
-
-\def\fixedpointround@impl@BEGIN@DOT.{%
- \pgfplots@toka=\expandafter{\expandafter.\the\pgfplots@toka}%
- \fp@offsetbehindperiod=0
- \fixedpointround@impl@ITERATE@DOT
-}
-\def\fixedpointround@impl@ITERATE@DOT{%
- \@ifnextchar\fp@round@EOI{%
- % finished.
- \fixedpointround@impl@gobble@and@start
- }{%
- \fixedpointround@impl@NEXT@DOT
- }%
-}
-\def\fixedpointround@impl@NEXT@DOT#1{%
- \ifnum\fp@offsetbehindperiod=\fp@round@prec
- \def\fp@round@next{#1}%
- \def\fp@round@nextcmd{\fixedpointround@impl@gobble@rest@and@start}%
- \else
- \advance\fp@offsetbehindperiod by1
- \ifnum#1=0
- \advance\fp@round@lastzeros by1
- \else
- \fp@round@lastzeros=0
- \fi
- \pgfplots@toka=\expandafter{\expandafter#1\the\pgfplots@toka}%
- \def\fp@round@nextcmd{\fixedpointround@impl@ITERATE@DOT}%
- \fi
- \fp@round@nextcmd
-}%
-
-\def\fixedpointround@impl@ITERATE@NODOT{%
- \@ifnextchar\fp@round@EOI{%
- \fixedpointround@impl@gobble@and@start
- }{%
- \@ifnextchar.{%
- \fixedpointround@impl@BEGIN@DOT
- }{%
- \fixedpointround@impl@NEXT@NODOT
- }%
- }%
-}
-\def\fixedpointround@impl@NEXT@NODOT#1{%
- \pgfplots@toka=\expandafter{\expandafter#1\the\pgfplots@toka}%
- \fixedpointround@impl@ITERATE@NODOT
-}%
-
-%--------------------------------------------
-% END of fixedpointround implementation.
-%--------------------------------------------
-
-\newif\ifscimathlessthan
-
-% first character MAY be + or -. This is checked, then
-% \sciparse@impl@positive will be called for the
-% absolute value. The sign is inserted afterwards.
-\def\sciparse@impl@possibly@signed#1#2\to#3\powten#4{%
- \def\sciparseTMP{#1}%
- \def\sciparseTMPB{-}%
- \if\sciparseTMP\sciparseTMPB
- \sciparse@impl@positive@possibly@noperiod#2.\to#3\powten#4\S\sciparseTMPB%
- \edef#3{-#3}%
- \else
- \def\sciparseTMPB{+}%
- \if\sciparseTMP\sciparseTMPB
- \sciparse@impl@positive@possibly@noperiod#2.\to#3\powten#4\S\sciparseTMPB%
- \else
- \sciparse@impl@positive@possibly@noperiod#1#2.\to#3\powten#4\S\sciparseTMPB%
- \fi
- \fi
-}
-
-% the same as above, only the return value is different.
-\def\sciparsesign@impl@possibly@signed#1#2\S#3\M#4\E#5{%
- \def\sciparseTMP{#1}%
- \def\sciparseTMPB{-}%
- \if\sciparseTMP\sciparseTMPB
- \def#3{2}%
- \sciparse@impl@positive@possibly@noperiod#2.\to#4\powten#5\S#3%
- \else
- \def#3{1}%
- \def\sciparseTMPB{+}%
- \if\sciparseTMP\sciparseTMPB
- \sciparse@impl@positive@possibly@noperiod#2.\to#4\powten#5\S#3%
- \else
- \sciparse@impl@positive@possibly@noperiod#1#2.\to#4\powten#5\S#3%
- \fi
- \fi
-}
-
-% XXXX -> XXXX.0
-% XXXX.YYY -> XXXX.YYYY
-\def\sciparse@impl@positive@possibly@noperiod#1.#2\to#3\powten#4\S#5{%
-%\tracingmacros=2\tracingcommands=2
- \def\sciparseTMP{#2}%
- \ifx\sciparseTMP\empty
- \sciparse@impl@positive@noperiod@possibly@SCI#1e\to#3\powten#4\S{#5}%
- \else
- \expandafter\sciparse@impl@positive\sciformat@pop@last@of@two@dots#1.#2\to#3\powten#4\S{#5}%
- \fi
-}
-\def\sciformat@pop@last@of@two@dots#1.#2.{#1.#2}%
-
-\def\sciparse@impl@positive@noperiod@possibly@SCI#1e#2\to#3\powten#4\S#5{%
- \def\sciparseTMP{#2}%
- \ifx\sciparseTMP\empty
- % this case applies to
- % 1234 -> 1234.0
- \sciparse@impl@positive#1.0\to#3\powten#4\S{#5}%
- \else
- % this case applies to
- % 1e1 -> 1.0e1
- % in this case, #1e#2 = 1e1e, so we have to discard a suffix 'e'.
- \edef\sciparseTMP{#1.0e\sciformat@popsuffix@e@expansion#2}%
- \expandafter\sciparse@impl@positive\sciparseTMP\to#3\powten#4\S{#5}%
- \fi
-}
-
-% XXXXX.XXXXX -> X.XXXXXXX * 10^4
-% 0.0000XXXXX -> X.XXXX * 10^{-5}
-%
-% or
-% XXXX.XXXXXeYYY -> X.XXXXXX* 10^{3+YYY}
-% 0.0000XXXXeYYY -> X.XXX* 10^{-5+YYY}
-%
-% this version does not accept a sign. A period is required.
-%
-% The return value #6 will be \def'ed to '0' if the resulting mantisse is '0'.
-% Won't be touched otherwise.
-\def\sciparse@impl@positive#1#2.#3\to#4\powten#5\S#6{%
-% \begingroup
-% FIXME! restore variables!!
-%\tracingmacros=2\tracingcommands=2
-%\tracingmacros=0\tracingcommands=0
- \sciparse@positive@getexisting@exponent@e#3e\preexponentto\preexponentstring\exponenttocount\c@pgf@counta
- % will \c@pgf@counta will be initialised in the line above
- % \c@pgf@counta=0
- \ifnum#1=0
- % the case 0.0000XXXX
- % does also handle 0.0000XXXXeXXX
- \def\sciparseTMP{#2}%
- \ifx\sciparseTMP\empty
- \c@pgf@countb=0
- \expandafter\sciformat@count@leading@zeros\preexponentstring\to\c@pgf@countb
- \advance\c@pgf@countb by1
- \advance\c@pgf@counta by-\c@pgf@countb
- \edef#5{\the\c@pgf@counta}%
- \expandafter\sciformat@assignmantisse\preexponentstring\to#4\countdownzerosfrom\c@pgf@countb\S{#6}%
- \else
- % the case 000.0000XXXXX
- % is not allowed and does not make sense.
- \errmessage{INVALID NUMBER FORMAT: leading zeros 00*.* not supported yet}%
- \fi
- \else
- % the case NXXXXX.XXXXXXX
- % or NXXXXXX.XXXXXXeXXXX
- % where N in [1-9]
- \sciformat@strlen#1#2\to\c@pgf@counta
- \advance\c@pgf@counta by-1
- \edef#4{#1.#2\preexponentstring}%
- \edef#5{\the\c@pgf@counta}%
- \fi
-%\tracingmacros=0\tracingcommands=0
-% \endgroup
-}
-
-% parses scientific notation and returns the exponent and everything
-% before the exponent like
-%
-% XXXXXXXeYYYY -> \def#2{XXXXXXX} #3=YYYY
-% or
-% XXXXXXXXe -> \def#2{XXXXXXXX} #3=0
-%
-% Examples:
-% - \sciparse@exponent@e123456e\preexponentto\M\exponenttocount\acount
-% \M->123456
-% \acount=0
-% Please note that the input was 123456e -> at least 'e' is expected!
-%
-% - \sciparse@exponent@e123456e-10e\preexponentto\M\exponenttocount\acount
-% \M->123456
-% \acount=-10
-% Again, the suffix 'e' is REQUIRED. This allows to reduce \ifs.
-\def\sciparse@positive@getexisting@exponent@e#1e#2\preexponentto#3\exponenttocount#4{%
- \def#3{#1}%
- \def\sciparseTMP{#2}%
- \ifx\sciparseTMP\empty
- #4=0
- \else
- \sciformat@popsuffix@e#2\tocount{#4}%
- \fi
-}
-
-% XXXXXe -> #2=XXXXX where X in [+-0-9].
-\def\sciformat@popsuffix@e#1e\tocount#2{%
- #2=#1
-}
-
-\def\sciformat@popsuffix@e@expansion#1e{%
- #1%
-}%
-
-% 00000XXXXXX -> X.XXXXX
-% Inputs:
-% #1 = 00000XXXXXX
-% #2 a macro name
-% #3 a count in which the number of zeros plus one is contained (i.e.
-% the number of shifts).
-% #4 a macro name which will be \def'ed to '0' if the resulting
-% mantisse is 0. Won't be touched otherwise.
-\def\sciformat@assignmantisse#1\to#2\countdownzerosfrom#3\S#4{%
- \pgfplots@toka={#1}%
- \loop
- \ifnum#3=1
- \else
- \expandafter\sciformat@popfirst\the\pgfplots@toka\to{\pgfplots@toka}%
- \advance#3 by-1
- \repeat
- \edef\sciformat@assignmantisseTMP{\the\pgfplots@toka}%
- \ifx\sciformat@assignmantisseTMP\empty
- % The case 0.0 * 10^0
- \def#2{0.0}%
- \def#4{0}%
- \else
- \expandafter\sciformat@insertperiod\the\pgfplots@toka\to{#2}%
- \fi
-}
-
-% XXXXXX -> X.XXXXX into #3
-\def\sciformat@insertperiod#1#2\to#3{%
- \def\sciparseTMP{#2}%
- \ifx\sciparseTMP\empty
- \def#3{#1.0}%
- \else
- \def#3{#1.#2}%
- \fi
-}
-
-% discards the first token.
-\def\sciformat@popfirst#1#2\to#3{%
- #3={#2}%
-}
-
-% adds the string length of #1#2 into the count register #3.
-%
-% The register won't be initialised to zero!
-\def\sciformat@strlen#1#2\to#3{%
- \advance#3 by1
- \def\sciparseTMP{#2}%
- \ifx\sciparseTMP\empty
- \else
- \sciformat@strlen#2\to{#3}%
- \fi
-}
-
-% Adds the number of leadings zeros of #1#2 into the count register
-% #3.
-%
-% The register won't be initialised to zero!
-\def\sciformat@count@leading@zeros#1#2\to#3{%
- \ifnum#1=0
- \advance#3 by1
- \def\sciparseTMP{#2}%
- \ifx\sciparseTMP\empty
- \else
- \sciformat@count@leading@zeros#2\to{#3}%
- \fi
- \fi
-}
-
-
-
-
-
-
-\def\scimathlessthan@positive\M#1\E#2\MM#3\EE#4{%
- \c@pgf@counta\expandafter=#2\relax
- \c@pgf@countb\expandafter=#4\relax
- \ifnum\c@pgf@counta<\c@pgf@countb
- \aftergroup\scimathlessthantrue
- \else
- \ifnum\c@pgf@counta=\c@pgf@countb\relax
- \pgfmath@xa\expandafter=#1 pt\relax
- \pgfmath@xb\expandafter=#3 pt\relax
- \ifdim\pgfmath@xa<\pgfmath@xb
- \aftergroup\scimathlessthantrue
- \fi
- \fi
- \fi
-}
-
-\def\scitofixed@impl#1.#2\E#3\END{%
- \let\scitofixed@exponent=\c@pgf@countb
- \scitofixed@exponent\expandafter=#3\relax
- \ifnum\scitofixed@exponent<0
- \pgfplots@toka={0.}%
- \loop
- \ifnum\scitofixed@exponent<-1
- \pgfplots@toka=\expandafter{\the\pgfplots@toka 0}%
- \advance\scitofixed@exponent by1
- \repeat
- \def\sciparseTMPB{#2}%
- \def\sciparseTMPC{0}%
- \ifx\sciparseTMPB\sciparseTMPC
- \xdef\sciparseTMP{\the\pgfplots@toka #1}%
- \else
- \xdef\sciparseTMP{\the\pgfplots@toka #1#2}%
- \fi
- \else
- \ifnum\scitofixed@exponent=0
- \xdef\sciparseTMP{#1.#2}%
- \else
- \pgfplots@toka={#1}%
- \scitofixed@impl@collectmantisse#2\count\scitofixed@exponent
- \xdef\sciparseTMP{\the\pgfplots@toka}%
- \fi
- \fi
-}
-
-\def\scitofixed@impl@collectmantisse#1#2\count#3{%
- \pgfplots@toka=\expandafter{\the\pgfplots@toka #1}%
- \advance\scitofixed@exponent by-1
- \def\sciparseTMPB{#2}%
- \ifx\sciparseTMPB\empty
- \loop
- \ifnum\scitofixed@exponent>0
- \pgfplots@toka=\expandafter{\the\pgfplots@toka 0}%
- \advance\scitofixed@exponent by-1
- \repeat
- \else
- \ifnum\scitofixed@exponent=0
- \pgfplots@toka=\expandafter{\the\pgfplots@toka .#2}%
- \else
- \scitofixed@impl@collectmantisse#2\count#3%
- \fi
- \fi
-}
diff --git a/Master/texmf-dist/tex/plain/pgfplots/pgfplots.tex b/Master/texmf-dist/tex/plain/pgfplots/pgfplots.tex
new file mode 100644
index 00000000000..22e526ef23e
--- /dev/null
+++ b/Master/texmf-dist/tex/plain/pgfplots/pgfplots.tex
@@ -0,0 +1,49 @@
+%--------------------------------------------
+%
+% Package pgfplots
+%
+% Provides a user-friendly interface to create function plots (normal
+% plots, semi-logplots and double-logplots).
+%
+% It is based on Till Tantau's PGF package.
+%
+% Copyright 2007/2008 by Christian Feuersänger.
+%
+% This program is free software: you can redistribute it and/or modify
+% it under the terms of the GNU General Public License as published by
+% the Free Software Foundation, either version 3 of the License, or
+% (at your option) any later version.
+%
+% This program is distributed in the hope that it will be useful,
+% but WITHOUT ANY WARRANTY; without even the implied warranty of
+% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+% GNU General Public License for more details.
+%
+% You should have received a copy of the GNU General Public License
+% along with this program. If not, see <http://www.gnu.org/licenses/>.
+%
+%--------------------------------------------
+% ATTENTION:
+% you MAY need one of
+% \def\pgfsysdriver{pgfsys-dvipdfm.def}
+% \def\pgfsysdriver{pgfsys-pdftex.def}
+% \def\pgfsysdriver{pgfsys-dvips.def}
+%
+% BEFORE the first \input pgf.tex, \input tikz.tex or
+% \input pgfplots.tex
+% Default is
+% 'dvips' for 'tex'
+% 'pdftex' for 'pdftex'
+% -> dvipdfm needs special attention.
+%
+\input tikz.tex%
+%
+\edef\pgfplotscatcode{\the\catcode`\@}%
+\catcode`\@=11
+%
+\input pgfplots.code.tex%
+\usetikzlibrary{plotmarks}%
+%
+\catcode`\@=\pgfplotscatcode
+%
+\endinput
diff --git a/Master/tlpkg/bin/ctan2tds b/Master/tlpkg/bin/ctan2tds
index 966f6d2faf2..7b1fd4c987b 100755
--- a/Master/tlpkg/bin/ctan2tds
+++ b/Master/tlpkg/bin/ctan2tds
@@ -280,7 +280,7 @@ chdir $startdir || die "chdir($startdir) failed: $!"; # back to raw
'pdf-forms-tutorial-en', "&MAKEpdf_forms_tutorial",
'pdfrack', "die 'skipping until someone asks for it'",
'pgf', "&MAKEcopy",
- 'pgfplots', "&MAKEflatten", # .sty's claimed generic aren't, keep latex
+ 'pgfplots', "&MAKEcopy",
'phaistos', "&MAKEflatten",
'pict2e', "&MAKEpict2e",
'pictex', "&MAKEpictex",
@@ -425,6 +425,7 @@ chdir $startdir || die "chdir($startdir) failed: $!"; # back to raw
'interactiveworkbook' => '&POSTinteractiveworkbook',
'koma-script' => '&POSTkoma',
'pgf' => '&POSTpgf',
+ 'pgfplots' => '&POSTpgfplots',
'pst-cox' => '&POSTpstcox',
'xecyr' => '&POSTxecyr',
);
@@ -1351,7 +1352,7 @@ sub MAKEcopy
# remove top-level README (shouldn't overwrite texmf-dist/README!),
# needed for vntex, pgf, others. Do this before removing symlinks,
# in case the README is a symlink (e.g., iwona).
- -r "$dest/README" && &SYSTEM ("$RM $dest/README $dest/00readme*");
+# -r "$dest/README" && &SYSTEM ("$RM $dest/README $dest/00readme*");
# for arev et al., remove symlinks.
&SYSTEM ("find $dest -type l | xargs --no-run-if-empty rm");
@@ -3043,7 +3044,7 @@ sub MAKEpsnfss {
# different packages), and we don't want to mess with that. So just
# remove the fonts subdir -- except for the map files, which we do want.
#
- print "\t SPECIAL omit fonts from latex-tds $package\n";
+ print "\t SPECIAL $package omit fonts from latex-tds version\n";
# Start with the usual straight copy.
&SYSTEM ("$RM $startdir/$packagedir/TDS_READY");
@@ -3061,7 +3062,8 @@ sub MAKEcmlgc {
&MAKEflatten;
}
-sub MAKEpict2e {
+sub MAKEpict2e
+{
&setup;
chdir("$DEST/doc/$whichdocformat/$package");
&setup;
@@ -3162,6 +3164,26 @@ sub POSTpgf
&SYSTEM ("cd $DEST && mkdir tex && mv context generic latex plain tex");
}
+sub xmkdir
+{
+ my ($dir) = @_;
+ &SYSTEM ("mkdir -p $dir");
+}
+
+sub POSTpgfplots
+{
+ print "\t POST$package - mv directories\n";
+ &xchdir ($DEST);
+ #
+ &xmkdir ("doc/generic/$package");
+ &SYSTEM ("mv README ext_scripts test doc/generic/$package");
+ #
+ &xmkdir ("tex/generic");
+ &SYSTEM ("mv generic tex/generic/$package");
+ #
+ &SYSTEM ("mv context latex plain tex");
+}
+
sub POSTpstcox
{
print "POST$package - mv latex .sty, doc Gallery\n";