diff options
author | Karl Berry <karl@freefriends.org> | 2016-01-08 00:02:17 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-01-08 00:02:17 +0000 |
commit | 4e668f51370a93cc9dc26b1a11a949b50493b353 (patch) | |
tree | 85ab6891036f9a348e68f83e31c56b069332a9ca /Master/texmf-dist | |
parent | f2995718d3db02b5ff46d4552b9281b9761327ae (diff) |
pgfplots (7jan16)
git-svn-id: svn://tug.org/texlive/trunk@39303 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
53 files changed, 9282 insertions, 925 deletions
diff --git a/Master/texmf-dist/doc/context/third/pgfplots/Makefile b/Master/texmf-dist/doc/context/third/pgfplots/Makefile new file mode 100644 index 00000000000..5f9be6c1a5f --- /dev/null +++ b/Master/texmf-dist/doc/context/third/pgfplots/Makefile @@ -0,0 +1,6 @@ + +pgfplotsexample-context.pdf: FORCE + . ~/context/tex/setuptex && context pgfplotsexample-context + @echo "Context MkIV compiled" + +FORCE: diff --git a/Master/texmf-dist/doc/context/third/pgfplots/pgfplotsexample-context.pdf b/Master/texmf-dist/doc/context/third/pgfplots/pgfplotsexample-context.pdf Binary files differindex 29de02daaee..9bc8f7915e2 100644 --- a/Master/texmf-dist/doc/context/third/pgfplots/pgfplotsexample-context.pdf +++ b/Master/texmf-dist/doc/context/third/pgfplots/pgfplotsexample-context.pdf diff --git a/Master/texmf-dist/doc/context/third/pgfplots/pgfplotsexample-context.tuc b/Master/texmf-dist/doc/context/third/pgfplots/pgfplotsexample-context.tuc index dc35d5f87c6..d0842bd9086 100644 --- a/Master/texmf-dist/doc/context/third/pgfplots/pgfplotsexample-context.tuc +++ b/Master/texmf-dist/doc/context/third/pgfplots/pgfplotsexample-context.tuc @@ -2,10 +2,10 @@ local utilitydata = { } utilitydata.comment={ ["escape"]="[===[ ... ]===]", - ["file"]="pgfplotsexample-context", + ["file"]="tex.jobname", ["format"]="cont-en", - ["stamp"]="2014.05.21 22:04", - ["version"]=1.25, + ["stamp"]="2015.04.18 14:41", + ["version"]=1.29, } if not utilitydata.job then utilitydata.job = { } end @@ -18,7 +18,7 @@ if not utilitydata.job then utilitydata.job = { } end if not utilitydata.job.variables then utilitydata.job.variables = { } end utilitydata.job.variables.collected={ - ["randomseed"]=0.044282636625824, + ["randomseed"]=0.52511715866864, } if not utilitydata.job then utilitydata.job = { } end @@ -48,6 +48,12 @@ utilitydata.job.structure.collected={ ["type"]="text", } +if not utilitydata.job then utilitydata.job = { } end +if not utilitydata.job.positions then utilitydata.job.positions = { } end + +utilitydata.job.positions.collected={ +} + if not utilitydata.structures then utilitydata.structures = { } end if not utilitydata.structures.specials then utilitydata.structures.specials = { } end @@ -121,7 +127,6 @@ utilitydata.structures.pages.collected={ ["numberdata"]=1, ["prefixdata"]=2, ["state"]="start", - ["viewerprefix"]="", }, } @@ -138,12 +143,6 @@ utilitydata.structures.references.referred={ } if not utilitydata.job then utilitydata.job = { } end -if not utilitydata.job.positions then utilitydata.job.positions = { } end - -utilitydata.job.positions.collected={ -} - -if not utilitydata.job then utilitydata.job = { } end if not utilitydata.job.objects then utilitydata.job.objects = { } end utilitydata.job.objects.collected={ diff --git a/Master/texmf-dist/doc/generic/pgfplots/README b/Master/texmf-dist/doc/generic/pgfplots/README index c80c59d88db..55645f9867b 100644 --- a/Master/texmf-dist/doc/generic/pgfplots/README +++ b/Master/texmf-dist/doc/generic/pgfplots/README @@ -41,6 +41,50 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. HISTORY: +1.13: +- fixed bug: incompatiblity between fillbetween and babel +- fixed bug: 'compat=1.9' (or newer) failed to work with log bar plots +- fixed bug: javascript incompatibility between Acrobat reader DC and clickable lib +- fixed bug in polar axes: repaired default axis label positions +- fixed bug in polar axes: repaired support for sloped descriptions +- fixed bug: 'axis line style={draw=none}' had no effect unless one had 2d boxed axes +- fixed bug: point meta expressions with '=' inside of them which caused compilation errors +- fixed bug: compat=1.12 combined with interrupted plots (by empty line) failed to work +- fixed bug: compat=1.12 combined with lualatex evaluated relational operations (<, ==) with the wrong operator precedence +- fixed bug: fixed floor and ceil functions +- fixed bug: 'set layers' broke alignment features with different manifestations + ('set layers' together with fill between in group plots, together with at={} key, together with anchor) +- fixed bug: fill between and group plots: fill-between graphics was missing (list of layers was lost) +- fixed bug: \addplot graphics {\newFile{P.pdf}}; failed to properly expand the file name +- fixed bug: fill between + error bars resulted in compilation error +- fixed bug: stacked plots occasionally used a wrong coordinate mapping +- fixed bug: provided suitable default legends for xbar and xbar stacked +- fixed bug: 'dateplot' now computes missing 'date ZERO' automatically. 'date ZERO' is managed automatically. +- new feature: Added support for search paths to find data files (table/search path) +- new feature: 'xtick distance' allows to define tick positions by distance +- new feature: "axis line shift=10pt" shifts axis lines together with all their descriptions +- new feature: 'matrix plot' (alias 'imagesc') which allows cell-based matrix plots +- new feature: unbounded point meta in mesh plots will be treated like an invisible patch +- new feature: added high quality colormap 'viridis' (use 'colormap name=viridis' to activate it) +- new feature: ensured that 'shader=flat' returns the same result for every choice of 'z buffer' (starting with compat=1.13) +- new feature: utility function \pgfplotsforeachungrouped: added support for \breakforeach +- new feature: compat=1.13: activates sampling routine with less rounding errors +- new feature: cycle multiindex list (uses the 'ith' element for every provided sub-list) +- new feature: 'color of colormap=<value>' or 'color of colormap=<value> of <colormap name>' +- new feature: 'index of colormap=<value>' or 'index of colormap=<value> of <colormap name>' +- new feature: cycle list={[of colormap]} +- new feature: cycle list={[colors of colormap={0,100,500,100} of viridis]} +- new feature: cycle list={[indices of colormap={0,1,2,3} of hot]} +- new feature: added support for 'stack negative=on previous|separate' which allows separate plots for '+' and '-' (useful for bar plots) +- new feature: added support for 'colormap access=direct' combined with 'shader=flat mean' and 'shader=interp': + it previously used to interpolate indices instead of colors +- new feature: \closedcycle now produces useful results for 3d line plots +- new feature: added \usetikzlibrary{colorbrewer} and \usepgfplotslibrary{colorbrewer} +- new feature: added 'colormap access=piecewise constant' +- new feature: added rudimentary support for "Filled Contours" (based on 'colormap access=piecewise constant') +- new feature: added methods to build colormaps based on other colormaps using + "color of colormap", "index of colormap", "colors of colormap", "samples of colormap", and "indices of colormap" + 1.12.1: minor bugfix release - fixed bug: incompatibility of 1.12 with unicode-math - fixed bug: lua backend failed to work with table input and dependency on \coordindex diff --git a/Master/texmf-dist/doc/latex/pgfplots/TeX-programming-notes.pdf b/Master/texmf-dist/doc/latex/pgfplots/TeX-programming-notes.pdf Binary files differindex c7e578dde5b..000e79227eb 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/TeX-programming-notes.pdf +++ b/Master/texmf-dist/doc/latex/pgfplots/TeX-programming-notes.pdf diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.doc.src.tar.bz2 b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.doc.src.tar.bz2 Binary files differindex 846b6de22ca..ab06c343729 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.doc.src.tar.bz2 +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.doc.src.tar.bz2 diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.pdf b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.pdf Binary files differindex 8494981041e..e51abb3bf7a 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.pdf +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.pdf diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplotsexample.pdf b/Master/texmf-dist/doc/latex/pgfplots/pgfplotsexample.pdf Binary files differindex 839f2c5418e..f0b934ed995 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplotsexample.pdf +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplotsexample.pdf diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplotstable.pdf b/Master/texmf-dist/doc/latex/pgfplots/pgfplotstable.pdf Binary files differindex 732f8df680d..d18be381ebb 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplotstable.pdf +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplotstable.pdf diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplotstodo.pdf b/Master/texmf-dist/doc/latex/pgfplots/pgfplotstodo.pdf Binary files differindex 1c6018421bf..04ff8bf454c 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplotstodo.pdf +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplotstodo.pdf diff --git a/Master/texmf-dist/doc/plain/pgfplots/pgfplotsexample-plain.pdf b/Master/texmf-dist/doc/plain/pgfplots/pgfplotsexample-plain.pdf Binary files differindex c0aea225d31..d9d303f7657 100644 --- a/Master/texmf-dist/doc/plain/pgfplots/pgfplotsexample-plain.pdf +++ b/Master/texmf-dist/doc/plain/pgfplots/pgfplotsexample-plain.pdf diff --git a/Master/texmf-dist/source/context/third/pgfplots/pgfplotstests.context.tar.bz2 b/Master/texmf-dist/source/context/third/pgfplots/pgfplotstests.context.tar.bz2 Binary files differindex a33e9e31329..5687de7f7a9 100644 --- a/Master/texmf-dist/source/context/third/pgfplots/pgfplotstests.context.tar.bz2 +++ b/Master/texmf-dist/source/context/third/pgfplots/pgfplotstests.context.tar.bz2 diff --git a/Master/texmf-dist/source/latex/pgfplots/pgfplotstests.tar.bz2 b/Master/texmf-dist/source/latex/pgfplots/pgfplotstests.tar.bz2 Binary files differindex 23ce7d57676..572d6708c6a 100644 --- a/Master/texmf-dist/source/latex/pgfplots/pgfplotstests.tar.bz2 +++ b/Master/texmf-dist/source/latex/pgfplots/pgfplotstests.tar.bz2 diff --git a/Master/texmf-dist/tex/generic/pgfplots/libs/pgflibrarypgfplots.colorbrewer.code.tex b/Master/texmf-dist/tex/generic/pgfplots/libs/pgflibrarypgfplots.colorbrewer.code.tex new file mode 100644 index 00000000000..11a3547c048 --- /dev/null +++ b/Master/texmf-dist/tex/generic/pgfplots/libs/pgflibrarypgfplots.colorbrewer.code.tex @@ -0,0 +1,4149 @@ + +% load all colors for the `colormap's and `cycle list's +\usetikzlibrary{colorbrewer} + +% define `colormap's and `cycle list's +\pgfplotsset{ + /pgfplots/@@brewer set cycle list/.code={% + \pgfkeysalso{/pgfplots/ensure colormap={/pgfplots/colormap/#1},/pgfplots/cycle list name=#1}% + }, + /pgfplots/colormap/YlGn-3/.style={ + colormap={YlGn-3}{ + color=(YlGn-C); + color=(YlGn-F); + color=(YlGn-I); + }, + cycle list/.define={YlGn-3}{[of colormap=YlGn-3]}, + }, + /pgfplots/cycle list/YlGn-3/.style={/pgfplots/@@brewer set cycle list={YlGn-3}}, + % + /pgfplots/colormap/YlGn-4/.style={ + colormap={YlGn-4}{ + color=(YlGn-B); + color=(YlGn-E); + color=(YlGn-G); + color=(YlGn-J); + }, + cycle list/.define={YlGn-4}{[of colormap=YlGn-4]}, + }, + /pgfplots/cycle list/YlGn-4/.style={/pgfplots/@@brewer set cycle list={YlGn-4}}, + % + /pgfplots/colormap/YlGn-5/.style={ + colormap={YlGn-5}{ + color=(YlGn-B); + color=(YlGn-E); + color=(YlGn-G); + color=(YlGn-I); + color=(YlGn-K); + }, + cycle list/.define={YlGn-5}{[of colormap=YlGn-5]}, + }, + /pgfplots/cycle list/YlGn-5/.style={/pgfplots/@@brewer set cycle list={YlGn-5}}, + % + /pgfplots/colormap/YlGn-6/.style={ + colormap={YlGn-6}{ + color=(YlGn-B); + color=(YlGn-D); + color=(YlGn-F); + color=(YlGn-G); + color=(YlGn-I); + color=(YlGn-K); + }, + cycle list/.define={YlGn-6}{[of colormap=YlGn-6]}, + }, + /pgfplots/cycle list/YlGn-6/.style={/pgfplots/@@brewer set cycle list={YlGn-6}}, + % + /pgfplots/colormap/YlGn-7/.style={ + colormap={YlGn-7}{ + color=(YlGn-B); + color=(YlGn-D); + color=(YlGn-F); + color=(YlGn-G); + color=(YlGn-H); + color=(YlGn-J); + color=(YlGn-L); + }, + cycle list/.define={YlGn-7}{[of colormap=YlGn-7]}, + }, + /pgfplots/cycle list/YlGn-7/.style={/pgfplots/@@brewer set cycle list={YlGn-7}}, + % + /pgfplots/colormap/YlGn-8/.style={ + colormap={YlGn-8}{ + color=(YlGn-A); + color=(YlGn-C); + color=(YlGn-D); + color=(YlGn-F); + color=(YlGn-G); + color=(YlGn-H); + color=(YlGn-J); + color=(YlGn-L); + }, + cycle list/.define={YlGn-8}{[of colormap=YlGn-8]}, + }, + /pgfplots/cycle list/YlGn-8/.style={/pgfplots/@@brewer set cycle list={YlGn-8}}, + % + /pgfplots/colormap/YlGn-9/.style={ + colormap={YlGn-9}{ + color=(YlGn-A); + color=(YlGn-C); + color=(YlGn-D); + color=(YlGn-F); + color=(YlGn-G); + color=(YlGn-H); + color=(YlGn-J); + color=(YlGn-K); + color=(YlGn-M); + }, + cycle list/.define={YlGn-9}{[of colormap=YlGn-9]}, + }, + /pgfplots/cycle list/YlGn-9/.style={/pgfplots/@@brewer set cycle list={YlGn-9}}, + % + /pgfplots/colormap/YlGnBu-3/.style={ + colormap={YlGnBu-3}{ + color=(YlGnBu-C); + color=(YlGnBu-F); + color=(YlGnBu-I); + }, + cycle list/.define={YlGnBu-3}{[of colormap=YlGnBu-3]}, + }, + /pgfplots/cycle list/YlGnBu-3/.style={/pgfplots/@@brewer set cycle list={YlGnBu-3}}, + % + /pgfplots/colormap/YlGnBu-4/.style={ + colormap={YlGnBu-4}{ + color=(YlGnBu-B); + color=(YlGnBu-E); + color=(YlGnBu-G); + color=(YlGnBu-J); + }, + cycle list/.define={YlGnBu-4}{[of colormap=YlGnBu-4]}, + }, + /pgfplots/cycle list/YlGnBu-4/.style={/pgfplots/@@brewer set cycle list={YlGnBu-4}}, + % + /pgfplots/colormap/YlGnBu-5/.style={ + colormap={YlGnBu-5}{ + color=(YlGnBu-B); + color=(YlGnBu-E); + color=(YlGnBu-G); + color=(YlGnBu-I); + color=(YlGnBu-K); + }, + cycle list/.define={YlGnBu-5}{[of colormap=YlGnBu-5]}, + }, + /pgfplots/cycle list/YlGnBu-5/.style={/pgfplots/@@brewer set cycle list={YlGnBu-5}}, + % + /pgfplots/colormap/YlGnBu-6/.style={ + colormap={YlGnBu-6}{ + color=(YlGnBu-B); + color=(YlGnBu-D); + color=(YlGnBu-F); + color=(YlGnBu-G); + color=(YlGnBu-I); + color=(YlGnBu-K); + }, + cycle list/.define={YlGnBu-6}{[of colormap=YlGnBu-6]}, + }, + /pgfplots/cycle list/YlGnBu-6/.style={/pgfplots/@@brewer set cycle list={YlGnBu-6}}, + % + /pgfplots/colormap/YlGnBu-7/.style={ + colormap={YlGnBu-7}{ + color=(YlGnBu-B); + color=(YlGnBu-D); + color=(YlGnBu-F); + color=(YlGnBu-G); + color=(YlGnBu-H); + color=(YlGnBu-J); + color=(YlGnBu-L); + }, + cycle list/.define={YlGnBu-7}{[of colormap=YlGnBu-7]}, + }, + /pgfplots/cycle list/YlGnBu-7/.style={/pgfplots/@@brewer set cycle list={YlGnBu-7}}, + % + /pgfplots/colormap/YlGnBu-8/.style={ + colormap={YlGnBu-8}{ + color=(YlGnBu-A); + color=(YlGnBu-C); + color=(YlGnBu-D); + color=(YlGnBu-F); + color=(YlGnBu-G); + color=(YlGnBu-H); + color=(YlGnBu-J); + color=(YlGnBu-L); + }, + cycle list/.define={YlGnBu-8}{[of colormap=YlGnBu-8]}, + }, + /pgfplots/cycle list/YlGnBu-8/.style={/pgfplots/@@brewer set cycle list={YlGnBu-8}}, + % + /pgfplots/colormap/YlGnBu-9/.style={ + colormap={YlGnBu-9}{ + color=(YlGnBu-A); + color=(YlGnBu-C); + color=(YlGnBu-D); + color=(YlGnBu-F); + color=(YlGnBu-G); + color=(YlGnBu-H); + color=(YlGnBu-J); + color=(YlGnBu-K); + color=(YlGnBu-M); + }, + cycle list/.define={YlGnBu-9}{[of colormap=YlGnBu-9]}, + }, + /pgfplots/cycle list/YlGnBu-9/.style={/pgfplots/@@brewer set cycle list={YlGnBu-9}}, + % + /pgfplots/colormap/GnBu-3/.style={ + colormap={GnBu-3}{ + color=(GnBu-C); + color=(GnBu-F); + color=(GnBu-I); + }, + cycle list/.define={GnBu-3}{[of colormap=GnBu-3]}, + }, + /pgfplots/cycle list/GnBu-3/.style={/pgfplots/@@brewer set cycle list={GnBu-3}}, + % + /pgfplots/colormap/GnBu-4/.style={ + colormap={GnBu-4}{ + color=(GnBu-B); + color=(GnBu-E); + color=(GnBu-G); + color=(GnBu-J); + }, + cycle list/.define={GnBu-4}{[of colormap=GnBu-4]}, + }, + /pgfplots/cycle list/GnBu-4/.style={/pgfplots/@@brewer set cycle list={GnBu-4}}, + % + /pgfplots/colormap/GnBu-5/.style={ + colormap={GnBu-5}{ + color=(GnBu-B); + color=(GnBu-E); + color=(GnBu-G); + color=(GnBu-I); + color=(GnBu-K); + }, + cycle list/.define={GnBu-5}{[of colormap=GnBu-5]}, + }, + /pgfplots/cycle list/GnBu-5/.style={/pgfplots/@@brewer set cycle list={GnBu-5}}, + % + /pgfplots/colormap/GnBu-6/.style={ + colormap={GnBu-6}{ + color=(GnBu-B); + color=(GnBu-D); + color=(GnBu-F); + color=(GnBu-G); + color=(GnBu-I); + color=(GnBu-K); + }, + cycle list/.define={GnBu-6}{[of colormap=GnBu-6]}, + }, + /pgfplots/cycle list/GnBu-6/.style={/pgfplots/@@brewer set cycle list={GnBu-6}}, + % + /pgfplots/colormap/GnBu-7/.style={ + colormap={GnBu-7}{ + color=(GnBu-B); + color=(GnBu-D); + color=(GnBu-F); + color=(GnBu-G); + color=(GnBu-H); + color=(GnBu-J); + color=(GnBu-L); + }, + cycle list/.define={GnBu-7}{[of colormap=GnBu-7]}, + }, + /pgfplots/cycle list/GnBu-7/.style={/pgfplots/@@brewer set cycle list={GnBu-7}}, + % + /pgfplots/colormap/GnBu-8/.style={ + colormap={GnBu-8}{ + color=(GnBu-A); + color=(GnBu-C); + color=(GnBu-D); + color=(GnBu-F); + color=(GnBu-G); + color=(GnBu-H); + color=(GnBu-J); + color=(GnBu-L); + }, + cycle list/.define={GnBu-8}{[of colormap=GnBu-8]}, + }, + /pgfplots/cycle list/GnBu-8/.style={/pgfplots/@@brewer set cycle list={GnBu-8}}, + % + /pgfplots/colormap/GnBu-9/.style={ + colormap={GnBu-9}{ + color=(GnBu-A); + color=(GnBu-C); + color=(GnBu-D); + color=(GnBu-F); + color=(GnBu-G); + color=(GnBu-H); + color=(GnBu-J); + color=(GnBu-K); + color=(GnBu-M); + }, + cycle list/.define={GnBu-9}{[of colormap=GnBu-9]}, + }, + /pgfplots/cycle list/GnBu-9/.style={/pgfplots/@@brewer set cycle list={GnBu-9}}, + % + /pgfplots/colormap/BuGn-3/.style={ + colormap={BuGn-3}{ + color=(BuGn-C); + color=(BuGn-F); + color=(BuGn-I); + }, + cycle list/.define={BuGn-3}{[of colormap=BuGn-3]}, + }, + /pgfplots/cycle list/BuGn-3/.style={/pgfplots/@@brewer set cycle list={BuGn-3}}, + % + /pgfplots/colormap/BuGn-4/.style={ + colormap={BuGn-4}{ + color=(BuGn-B); + color=(BuGn-E); + color=(BuGn-G); + color=(BuGn-J); + }, + cycle list/.define={BuGn-4}{[of colormap=BuGn-4]}, + }, + /pgfplots/cycle list/BuGn-4/.style={/pgfplots/@@brewer set cycle list={BuGn-4}}, + % + /pgfplots/colormap/BuGn-5/.style={ + colormap={BuGn-5}{ + color=(BuGn-B); + color=(BuGn-E); + color=(BuGn-G); + color=(BuGn-I); + color=(BuGn-K); + }, + cycle list/.define={BuGn-5}{[of colormap=BuGn-5]}, + }, + /pgfplots/cycle list/BuGn-5/.style={/pgfplots/@@brewer set cycle list={BuGn-5}}, + % + /pgfplots/colormap/BuGn-6/.style={ + colormap={BuGn-6}{ + color=(BuGn-B); + color=(BuGn-D); + color=(BuGn-F); + color=(BuGn-G); + color=(BuGn-I); + color=(BuGn-K); + }, + cycle list/.define={BuGn-6}{[of colormap=BuGn-6]}, + }, + /pgfplots/cycle list/BuGn-6/.style={/pgfplots/@@brewer set cycle list={BuGn-6}}, + % + /pgfplots/colormap/BuGn-7/.style={ + colormap={BuGn-7}{ + color=(BuGn-B); + color=(BuGn-D); + color=(BuGn-F); + color=(BuGn-G); + color=(BuGn-H); + color=(BuGn-J); + color=(BuGn-L); + }, + cycle list/.define={BuGn-7}{[of colormap=BuGn-7]}, + }, + /pgfplots/cycle list/BuGn-7/.style={/pgfplots/@@brewer set cycle list={BuGn-7}}, + % + /pgfplots/colormap/BuGn-8/.style={ + colormap={BuGn-8}{ + color=(BuGn-A); + color=(BuGn-C); + color=(BuGn-D); + color=(BuGn-F); + color=(BuGn-G); + color=(BuGn-H); + color=(BuGn-J); + color=(BuGn-L); + }, + cycle list/.define={BuGn-8}{[of colormap=BuGn-8]}, + }, + /pgfplots/cycle list/BuGn-8/.style={/pgfplots/@@brewer set cycle list={BuGn-8}}, + % + /pgfplots/colormap/BuGn-9/.style={ + colormap={BuGn-9}{ + color=(BuGn-A); + color=(BuGn-C); + color=(BuGn-D); + color=(BuGn-F); + color=(BuGn-G); + color=(BuGn-H); + color=(BuGn-J); + color=(BuGn-K); + color=(BuGn-M); + }, + cycle list/.define={BuGn-9}{[of colormap=BuGn-9]}, + }, + /pgfplots/cycle list/BuGn-9/.style={/pgfplots/@@brewer set cycle list={BuGn-9}}, + % + /pgfplots/colormap/PuBuGn-3/.style={ + colormap={PuBuGn-3}{ + color=(PuBuGn-C); + color=(PuBuGn-F); + color=(PuBuGn-I); + }, + cycle list/.define={PuBuGn-3}{[of colormap=PuBuGn-3]}, + }, + /pgfplots/cycle list/PuBuGn-3/.style={/pgfplots/@@brewer set cycle list={PuBuGn-3}}, + % + /pgfplots/colormap/PuBuGn-4/.style={ + colormap={PuBuGn-4}{ + color=(PuBuGn-B); + color=(PuBuGn-E); + color=(PuBuGn-G); + color=(PuBuGn-J); + }, + cycle list/.define={PuBuGn-4}{[of colormap=PuBuGn-4]}, + }, + /pgfplots/cycle list/PuBuGn-4/.style={/pgfplots/@@brewer set cycle list={PuBuGn-4}}, + % + /pgfplots/colormap/PuBuGn-5/.style={ + colormap={PuBuGn-5}{ + color=(PuBuGn-B); + color=(PuBuGn-E); + color=(PuBuGn-G); + color=(PuBuGn-I); + color=(PuBuGn-K); + }, + cycle list/.define={PuBuGn-5}{[of colormap=PuBuGn-5]}, + }, + /pgfplots/cycle list/PuBuGn-5/.style={/pgfplots/@@brewer set cycle list={PuBuGn-5}}, + % + /pgfplots/colormap/PuBuGn-6/.style={ + colormap={PuBuGn-6}{ + color=(PuBuGn-B); + color=(PuBuGn-D); + color=(PuBuGn-F); + color=(PuBuGn-G); + color=(PuBuGn-I); + color=(PuBuGn-K); + }, + cycle list/.define={PuBuGn-6}{[of colormap=PuBuGn-6]}, + }, + /pgfplots/cycle list/PuBuGn-6/.style={/pgfplots/@@brewer set cycle list={PuBuGn-6}}, + % + /pgfplots/colormap/PuBuGn-7/.style={ + colormap={PuBuGn-7}{ + color=(PuBuGn-B); + color=(PuBuGn-D); + color=(PuBuGn-F); + color=(PuBuGn-G); + color=(PuBuGn-H); + color=(PuBuGn-J); + color=(PuBuGn-L); + }, + cycle list/.define={PuBuGn-7}{[of colormap=PuBuGn-7]}, + }, + /pgfplots/cycle list/PuBuGn-7/.style={/pgfplots/@@brewer set cycle list={PuBuGn-7}}, + % + /pgfplots/colormap/PuBuGn-8/.style={ + colormap={PuBuGn-8}{ + color=(PuBuGn-A); + color=(PuBuGn-C); + color=(PuBuGn-D); + color=(PuBuGn-F); + color=(PuBuGn-G); + color=(PuBuGn-H); + color=(PuBuGn-J); + color=(PuBuGn-L); + }, + cycle list/.define={PuBuGn-8}{[of colormap=PuBuGn-8]}, + }, + /pgfplots/cycle list/PuBuGn-8/.style={/pgfplots/@@brewer set cycle list={PuBuGn-8}}, + % + /pgfplots/colormap/PuBuGn-9/.style={ + colormap={PuBuGn-9}{ + color=(PuBuGn-A); + color=(PuBuGn-C); + color=(PuBuGn-D); + color=(PuBuGn-F); + color=(PuBuGn-G); + color=(PuBuGn-H); + color=(PuBuGn-J); + color=(PuBuGn-K); + color=(PuBuGn-M); + }, + cycle list/.define={PuBuGn-9}{[of colormap=PuBuGn-9]}, + }, + /pgfplots/cycle list/PuBuGn-9/.style={/pgfplots/@@brewer set cycle list={PuBuGn-9}}, + % + /pgfplots/colormap/PuBu-3/.style={ + colormap={PuBu-3}{ + color=(PuBu-C); + color=(PuBu-F); + color=(PuBu-I); + }, + cycle list/.define={PuBu-3}{[of colormap=PuBu-3]}, + }, + /pgfplots/cycle list/PuBu-3/.style={/pgfplots/@@brewer set cycle list={PuBu-3}}, + % + /pgfplots/colormap/PuBu-4/.style={ + colormap={PuBu-4}{ + color=(PuBu-B); + color=(PuBu-E); + color=(PuBu-G); + color=(PuBu-J); + }, + cycle list/.define={PuBu-4}{[of colormap=PuBu-4]}, + }, + /pgfplots/cycle list/PuBu-4/.style={/pgfplots/@@brewer set cycle list={PuBu-4}}, + % + /pgfplots/colormap/PuBu-5/.style={ + colormap={PuBu-5}{ + color=(PuBu-B); + color=(PuBu-E); + color=(PuBu-G); + color=(PuBu-I); + color=(PuBu-K); + }, + cycle list/.define={PuBu-5}{[of colormap=PuBu-5]}, + }, + /pgfplots/cycle list/PuBu-5/.style={/pgfplots/@@brewer set cycle list={PuBu-5}}, + % + /pgfplots/colormap/PuBu-6/.style={ + colormap={PuBu-6}{ + color=(PuBu-B); + color=(PuBu-D); + color=(PuBu-F); + color=(PuBu-G); + color=(PuBu-I); + color=(PuBu-K); + }, + cycle list/.define={PuBu-6}{[of colormap=PuBu-6]}, + }, + /pgfplots/cycle list/PuBu-6/.style={/pgfplots/@@brewer set cycle list={PuBu-6}}, + % + /pgfplots/colormap/PuBu-7/.style={ + colormap={PuBu-7}{ + color=(PuBu-B); + color=(PuBu-D); + color=(PuBu-F); + color=(PuBu-G); + color=(PuBu-H); + color=(PuBu-J); + color=(PuBu-L); + }, + cycle list/.define={PuBu-7}{[of colormap=PuBu-7]}, + }, + /pgfplots/cycle list/PuBu-7/.style={/pgfplots/@@brewer set cycle list={PuBu-7}}, + % + /pgfplots/colormap/PuBu-8/.style={ + colormap={PuBu-8}{ + color=(PuBu-A); + color=(PuBu-C); + color=(PuBu-D); + color=(PuBu-F); + color=(PuBu-G); + color=(PuBu-H); + color=(PuBu-J); + color=(PuBu-L); + }, + cycle list/.define={PuBu-8}{[of colormap=PuBu-8]}, + }, + /pgfplots/cycle list/PuBu-8/.style={/pgfplots/@@brewer set cycle list={PuBu-8}}, + % + /pgfplots/colormap/PuBu-9/.style={ + colormap={PuBu-9}{ + color=(PuBu-A); + color=(PuBu-C); + color=(PuBu-D); + color=(PuBu-F); + color=(PuBu-G); + color=(PuBu-H); + color=(PuBu-J); + color=(PuBu-K); + color=(PuBu-M); + }, + cycle list/.define={PuBu-9}{[of colormap=PuBu-9]}, + }, + /pgfplots/cycle list/PuBu-9/.style={/pgfplots/@@brewer set cycle list={PuBu-9}}, + % + /pgfplots/colormap/BuPu-3/.style={ + colormap={BuPu-3}{ + color=(BuPu-C); + color=(BuPu-F); + color=(BuPu-I); + }, + cycle list/.define={BuPu-3}{[of colormap=BuPu-3]}, + }, + /pgfplots/cycle list/BuPu-3/.style={/pgfplots/@@brewer set cycle list={BuPu-3}}, + % + /pgfplots/colormap/BuPu-4/.style={ + colormap={BuPu-4}{ + color=(BuPu-B); + color=(BuPu-E); + color=(BuPu-G); + color=(BuPu-J); + }, + cycle list/.define={BuPu-4}{[of colormap=BuPu-4]}, + }, + /pgfplots/cycle list/BuPu-4/.style={/pgfplots/@@brewer set cycle list={BuPu-4}}, + % + /pgfplots/colormap/BuPu-5/.style={ + colormap={BuPu-5}{ + color=(BuPu-B); + color=(BuPu-E); + color=(BuPu-G); + color=(BuPu-I); + color=(BuPu-K); + }, + cycle list/.define={BuPu-5}{[of colormap=BuPu-5]}, + }, + /pgfplots/cycle list/BuPu-5/.style={/pgfplots/@@brewer set cycle list={BuPu-5}}, + % + /pgfplots/colormap/BuPu-6/.style={ + colormap={BuPu-6}{ + color=(BuPu-B); + color=(BuPu-D); + color=(BuPu-F); + color=(BuPu-G); + color=(BuPu-I); + color=(BuPu-K); + }, + cycle list/.define={BuPu-6}{[of colormap=BuPu-6]}, + }, + /pgfplots/cycle list/BuPu-6/.style={/pgfplots/@@brewer set cycle list={BuPu-6}}, + % + /pgfplots/colormap/BuPu-7/.style={ + colormap={BuPu-7}{ + color=(BuPu-B); + color=(BuPu-D); + color=(BuPu-F); + color=(BuPu-G); + color=(BuPu-H); + color=(BuPu-J); + color=(BuPu-L); + }, + cycle list/.define={BuPu-7}{[of colormap=BuPu-7]}, + }, + /pgfplots/cycle list/BuPu-7/.style={/pgfplots/@@brewer set cycle list={BuPu-7}}, + % + /pgfplots/colormap/BuPu-8/.style={ + colormap={BuPu-8}{ + color=(BuPu-A); + color=(BuPu-C); + color=(BuPu-D); + color=(BuPu-F); + color=(BuPu-G); + color=(BuPu-H); + color=(BuPu-J); + color=(BuPu-L); + }, + cycle list/.define={BuPu-8}{[of colormap=BuPu-8]}, + }, + /pgfplots/cycle list/BuPu-8/.style={/pgfplots/@@brewer set cycle list={BuPu-8}}, + % + /pgfplots/colormap/BuPu-9/.style={ + colormap={BuPu-9}{ + color=(BuPu-A); + color=(BuPu-C); + color=(BuPu-D); + color=(BuPu-F); + color=(BuPu-G); + color=(BuPu-H); + color=(BuPu-J); + color=(BuPu-K); + color=(BuPu-M); + }, + cycle list/.define={BuPu-9}{[of colormap=BuPu-9]}, + }, + /pgfplots/cycle list/BuPu-9/.style={/pgfplots/@@brewer set cycle list={BuPu-9}}, + % + /pgfplots/colormap/RdPu-3/.style={ + colormap={RdPu-3}{ + color=(RdPu-C); + color=(RdPu-F); + color=(RdPu-I); + }, + cycle list/.define={RdPu-3}{[of colormap=RdPu-3]}, + }, + /pgfplots/cycle list/RdPu-3/.style={/pgfplots/@@brewer set cycle list={RdPu-3}}, + % + /pgfplots/colormap/RdPu-4/.style={ + colormap={RdPu-4}{ + color=(RdPu-B); + color=(RdPu-E); + color=(RdPu-G); + color=(RdPu-J); + }, + cycle list/.define={RdPu-4}{[of colormap=RdPu-4]}, + }, + /pgfplots/cycle list/RdPu-4/.style={/pgfplots/@@brewer set cycle list={RdPu-4}}, + % + /pgfplots/colormap/RdPu-5/.style={ + colormap={RdPu-5}{ + color=(RdPu-B); + color=(RdPu-E); + color=(RdPu-G); + color=(RdPu-I); + color=(RdPu-K); + }, + cycle list/.define={RdPu-5}{[of colormap=RdPu-5]}, + }, + /pgfplots/cycle list/RdPu-5/.style={/pgfplots/@@brewer set cycle list={RdPu-5}}, + % + /pgfplots/colormap/RdPu-6/.style={ + colormap={RdPu-6}{ + color=(RdPu-B); + color=(RdPu-D); + color=(RdPu-F); + color=(RdPu-G); + color=(RdPu-I); + color=(RdPu-K); + }, + cycle list/.define={RdPu-6}{[of colormap=RdPu-6]}, + }, + /pgfplots/cycle list/RdPu-6/.style={/pgfplots/@@brewer set cycle list={RdPu-6}}, + % + /pgfplots/colormap/RdPu-7/.style={ + colormap={RdPu-7}{ + color=(RdPu-B); + color=(RdPu-D); + color=(RdPu-F); + color=(RdPu-G); + color=(RdPu-H); + color=(RdPu-J); + color=(RdPu-L); + }, + cycle list/.define={RdPu-7}{[of colormap=RdPu-7]}, + }, + /pgfplots/cycle list/RdPu-7/.style={/pgfplots/@@brewer set cycle list={RdPu-7}}, + % + /pgfplots/colormap/RdPu-8/.style={ + colormap={RdPu-8}{ + color=(RdPu-A); + color=(RdPu-C); + color=(RdPu-D); + color=(RdPu-F); + color=(RdPu-G); + color=(RdPu-H); + color=(RdPu-J); + color=(RdPu-L); + }, + cycle list/.define={RdPu-8}{[of colormap=RdPu-8]}, + }, + /pgfplots/cycle list/RdPu-8/.style={/pgfplots/@@brewer set cycle list={RdPu-8}}, + % + /pgfplots/colormap/RdPu-9/.style={ + colormap={RdPu-9}{ + color=(RdPu-A); + color=(RdPu-C); + color=(RdPu-D); + color=(RdPu-F); + color=(RdPu-G); + color=(RdPu-H); + color=(RdPu-J); + color=(RdPu-K); + color=(RdPu-M); + }, + cycle list/.define={RdPu-9}{[of colormap=RdPu-9]}, + }, + /pgfplots/cycle list/RdPu-9/.style={/pgfplots/@@brewer set cycle list={RdPu-9}}, + % + /pgfplots/colormap/PuRd-3/.style={ + colormap={PuRd-3}{ + color=(PuRd-C); + color=(PuRd-F); + color=(PuRd-I); + }, + cycle list/.define={PuRd-3}{[of colormap=PuRd-3]}, + }, + /pgfplots/cycle list/PuRd-3/.style={/pgfplots/@@brewer set cycle list={PuRd-3}}, + % + /pgfplots/colormap/PuRd-4/.style={ + colormap={PuRd-4}{ + color=(PuRd-B); + color=(PuRd-E); + color=(PuRd-G); + color=(PuRd-J); + }, + cycle list/.define={PuRd-4}{[of colormap=PuRd-4]}, + }, + /pgfplots/cycle list/PuRd-4/.style={/pgfplots/@@brewer set cycle list={PuRd-4}}, + % + /pgfplots/colormap/PuRd-5/.style={ + colormap={PuRd-5}{ + color=(PuRd-B); + color=(PuRd-E); + color=(PuRd-G); + color=(PuRd-I); + color=(PuRd-K); + }, + cycle list/.define={PuRd-5}{[of colormap=PuRd-5]}, + }, + /pgfplots/cycle list/PuRd-5/.style={/pgfplots/@@brewer set cycle list={PuRd-5}}, + % + /pgfplots/colormap/PuRd-6/.style={ + colormap={PuRd-6}{ + color=(PuRd-B); + color=(PuRd-D); + color=(PuRd-F); + color=(PuRd-G); + color=(PuRd-I); + color=(PuRd-K); + }, + cycle list/.define={PuRd-6}{[of colormap=PuRd-6]}, + }, + /pgfplots/cycle list/PuRd-6/.style={/pgfplots/@@brewer set cycle list={PuRd-6}}, + % + /pgfplots/colormap/PuRd-7/.style={ + colormap={PuRd-7}{ + color=(PuRd-B); + color=(PuRd-D); + color=(PuRd-F); + color=(PuRd-G); + color=(PuRd-H); + color=(PuRd-J); + color=(PuRd-L); + }, + cycle list/.define={PuRd-7}{[of colormap=PuRd-7]}, + }, + /pgfplots/cycle list/PuRd-7/.style={/pgfplots/@@brewer set cycle list={PuRd-7}}, + % + /pgfplots/colormap/PuRd-8/.style={ + colormap={PuRd-8}{ + color=(PuRd-A); + color=(PuRd-C); + color=(PuRd-D); + color=(PuRd-F); + color=(PuRd-G); + color=(PuRd-H); + color=(PuRd-J); + color=(PuRd-L); + }, + cycle list/.define={PuRd-8}{[of colormap=PuRd-8]}, + }, + /pgfplots/cycle list/PuRd-8/.style={/pgfplots/@@brewer set cycle list={PuRd-8}}, + % + /pgfplots/colormap/PuRd-9/.style={ + colormap={PuRd-9}{ + color=(PuRd-A); + color=(PuRd-C); + color=(PuRd-D); + color=(PuRd-F); + color=(PuRd-G); + color=(PuRd-H); + color=(PuRd-J); + color=(PuRd-K); + color=(PuRd-M); + }, + cycle list/.define={PuRd-9}{[of colormap=PuRd-9]}, + }, + /pgfplots/cycle list/PuRd-9/.style={/pgfplots/@@brewer set cycle list={PuRd-9}}, + % + /pgfplots/colormap/OrRd-3/.style={ + colormap={OrRd-3}{ + color=(OrRd-C); + color=(OrRd-F); + color=(OrRd-I); + }, + cycle list/.define={OrRd-3}{[of colormap=OrRd-3]}, + }, + /pgfplots/cycle list/OrRd-3/.style={/pgfplots/@@brewer set cycle list={OrRd-3}}, + % + /pgfplots/colormap/OrRd-4/.style={ + colormap={OrRd-4}{ + color=(OrRd-B); + color=(OrRd-E); + color=(OrRd-G); + color=(OrRd-J); + }, + cycle list/.define={OrRd-4}{[of colormap=OrRd-4]}, + }, + /pgfplots/cycle list/OrRd-4/.style={/pgfplots/@@brewer set cycle list={OrRd-4}}, + % + /pgfplots/colormap/OrRd-5/.style={ + colormap={OrRd-5}{ + color=(OrRd-B); + color=(OrRd-E); + color=(OrRd-G); + color=(OrRd-I); + color=(OrRd-K); + }, + cycle list/.define={OrRd-5}{[of colormap=OrRd-5]}, + }, + /pgfplots/cycle list/OrRd-5/.style={/pgfplots/@@brewer set cycle list={OrRd-5}}, + % + /pgfplots/colormap/OrRd-6/.style={ + colormap={OrRd-6}{ + color=(OrRd-B); + color=(OrRd-D); + color=(OrRd-F); + color=(OrRd-G); + color=(OrRd-I); + color=(OrRd-K); + }, + cycle list/.define={OrRd-6}{[of colormap=OrRd-6]}, + }, + /pgfplots/cycle list/OrRd-6/.style={/pgfplots/@@brewer set cycle list={OrRd-6}}, + % + /pgfplots/colormap/OrRd-7/.style={ + colormap={OrRd-7}{ + color=(OrRd-B); + color=(OrRd-D); + color=(OrRd-F); + color=(OrRd-G); + color=(OrRd-H); + color=(OrRd-J); + color=(OrRd-L); + }, + cycle list/.define={OrRd-7}{[of colormap=OrRd-7]}, + }, + /pgfplots/cycle list/OrRd-7/.style={/pgfplots/@@brewer set cycle list={OrRd-7}}, + % + /pgfplots/colormap/OrRd-8/.style={ + colormap={OrRd-8}{ + color=(OrRd-A); + color=(OrRd-C); + color=(OrRd-D); + color=(OrRd-F); + color=(OrRd-G); + color=(OrRd-H); + color=(OrRd-J); + color=(OrRd-L); + }, + cycle list/.define={OrRd-8}{[of colormap=OrRd-8]}, + }, + /pgfplots/cycle list/OrRd-8/.style={/pgfplots/@@brewer set cycle list={OrRd-8}}, + % + /pgfplots/colormap/OrRd-9/.style={ + colormap={OrRd-9}{ + color=(OrRd-A); + color=(OrRd-C); + color=(OrRd-D); + color=(OrRd-F); + color=(OrRd-G); + color=(OrRd-H); + color=(OrRd-J); + color=(OrRd-K); + color=(OrRd-M); + }, + cycle list/.define={OrRd-9}{[of colormap=OrRd-9]}, + }, + /pgfplots/cycle list/OrRd-9/.style={/pgfplots/@@brewer set cycle list={OrRd-9}}, + % + /pgfplots/colormap/YlOrRd-3/.style={ + colormap={YlOrRd-3}{ + color=(YlOrRd-C); + color=(YlOrRd-F); + color=(YlOrRd-I); + }, + cycle list/.define={YlOrRd-3}{[of colormap=YlOrRd-3]}, + }, + /pgfplots/cycle list/YlOrRd-3/.style={/pgfplots/@@brewer set cycle list={YlOrRd-3}}, + % + /pgfplots/colormap/YlOrRd-4/.style={ + colormap={YlOrRd-4}{ + color=(YlOrRd-B); + color=(YlOrRd-E); + color=(YlOrRd-G); + color=(YlOrRd-J); + }, + cycle list/.define={YlOrRd-4}{[of colormap=YlOrRd-4]}, + }, + /pgfplots/cycle list/YlOrRd-4/.style={/pgfplots/@@brewer set cycle list={YlOrRd-4}}, + % + /pgfplots/colormap/YlOrRd-5/.style={ + colormap={YlOrRd-5}{ + color=(YlOrRd-B); + color=(YlOrRd-E); + color=(YlOrRd-G); + color=(YlOrRd-I); + color=(YlOrRd-K); + }, + cycle list/.define={YlOrRd-5}{[of colormap=YlOrRd-5]}, + }, + /pgfplots/cycle list/YlOrRd-5/.style={/pgfplots/@@brewer set cycle list={YlOrRd-5}}, + % + /pgfplots/colormap/YlOrRd-6/.style={ + colormap={YlOrRd-6}{ + color=(YlOrRd-B); + color=(YlOrRd-D); + color=(YlOrRd-F); + color=(YlOrRd-G); + color=(YlOrRd-I); + color=(YlOrRd-K); + }, + cycle list/.define={YlOrRd-6}{[of colormap=YlOrRd-6]}, + }, + /pgfplots/cycle list/YlOrRd-6/.style={/pgfplots/@@brewer set cycle list={YlOrRd-6}}, + % + /pgfplots/colormap/YlOrRd-7/.style={ + colormap={YlOrRd-7}{ + color=(YlOrRd-B); + color=(YlOrRd-D); + color=(YlOrRd-F); + color=(YlOrRd-G); + color=(YlOrRd-H); + color=(YlOrRd-J); + color=(YlOrRd-L); + }, + cycle list/.define={YlOrRd-7}{[of colormap=YlOrRd-7]}, + }, + /pgfplots/cycle list/YlOrRd-7/.style={/pgfplots/@@brewer set cycle list={YlOrRd-7}}, + % + /pgfplots/colormap/YlOrRd-8/.style={ + colormap={YlOrRd-8}{ + color=(YlOrRd-A); + color=(YlOrRd-C); + color=(YlOrRd-D); + color=(YlOrRd-F); + color=(YlOrRd-G); + color=(YlOrRd-H); + color=(YlOrRd-J); + color=(YlOrRd-L); + }, + cycle list/.define={YlOrRd-8}{[of colormap=YlOrRd-8]}, + }, + /pgfplots/cycle list/YlOrRd-8/.style={/pgfplots/@@brewer set cycle list={YlOrRd-8}}, + % + /pgfplots/colormap/YlOrRd-9/.style={ + colormap={YlOrRd-9}{ + color=(YlOrRd-A); + color=(YlOrRd-C); + color=(YlOrRd-D); + color=(YlOrRd-F); + color=(YlOrRd-G); + color=(YlOrRd-H); + color=(YlOrRd-J); + color=(YlOrRd-K); + color=(YlOrRd-M); + }, + cycle list/.define={YlOrRd-9}{[of colormap=YlOrRd-9]}, + }, + /pgfplots/cycle list/YlOrRd-9/.style={/pgfplots/@@brewer set cycle list={YlOrRd-9}}, + % + /pgfplots/colormap/YlOrBr-3/.style={ + colormap={YlOrBr-3}{ + color=(YlOrBr-C); + color=(YlOrBr-F); + color=(YlOrBr-I); + }, + cycle list/.define={YlOrBr-3}{[of colormap=YlOrBr-3]}, + }, + /pgfplots/cycle list/YlOrBr-3/.style={/pgfplots/@@brewer set cycle list={YlOrBr-3}}, + % + /pgfplots/colormap/YlOrBr-4/.style={ + colormap={YlOrBr-4}{ + color=(YlOrBr-B); + color=(YlOrBr-E); + color=(YlOrBr-G); + color=(YlOrBr-J); + }, + cycle list/.define={YlOrBr-4}{[of colormap=YlOrBr-4]}, + }, + /pgfplots/cycle list/YlOrBr-4/.style={/pgfplots/@@brewer set cycle list={YlOrBr-4}}, + % + /pgfplots/colormap/YlOrBr-5/.style={ + colormap={YlOrBr-5}{ + color=(YlOrBr-B); + color=(YlOrBr-E); + color=(YlOrBr-G); + color=(YlOrBr-I); + color=(YlOrBr-K); + }, + cycle list/.define={YlOrBr-5}{[of colormap=YlOrBr-5]}, + }, + /pgfplots/cycle list/YlOrBr-5/.style={/pgfplots/@@brewer set cycle list={YlOrBr-5}}, + % + /pgfplots/colormap/YlOrBr-6/.style={ + colormap={YlOrBr-6}{ + color=(YlOrBr-B); + color=(YlOrBr-D); + color=(YlOrBr-F); + color=(YlOrBr-G); + color=(YlOrBr-I); + color=(YlOrBr-K); + }, + cycle list/.define={YlOrBr-6}{[of colormap=YlOrBr-6]}, + }, + /pgfplots/cycle list/YlOrBr-6/.style={/pgfplots/@@brewer set cycle list={YlOrBr-6}}, + % + /pgfplots/colormap/YlOrBr-7/.style={ + colormap={YlOrBr-7}{ + color=(YlOrBr-B); + color=(YlOrBr-D); + color=(YlOrBr-F); + color=(YlOrBr-G); + color=(YlOrBr-H); + color=(YlOrBr-J); + color=(YlOrBr-L); + }, + cycle list/.define={YlOrBr-7}{[of colormap=YlOrBr-7]}, + }, + /pgfplots/cycle list/YlOrBr-7/.style={/pgfplots/@@brewer set cycle list={YlOrBr-7}}, + % + /pgfplots/colormap/YlOrBr-8/.style={ + colormap={YlOrBr-8}{ + color=(YlOrBr-A); + color=(YlOrBr-C); + color=(YlOrBr-D); + color=(YlOrBr-F); + color=(YlOrBr-G); + color=(YlOrBr-H); + color=(YlOrBr-J); + color=(YlOrBr-L); + }, + cycle list/.define={YlOrBr-8}{[of colormap=YlOrBr-8]}, + }, + /pgfplots/cycle list/YlOrBr-8/.style={/pgfplots/@@brewer set cycle list={YlOrBr-8}}, + % + /pgfplots/colormap/YlOrBr-9/.style={ + colormap={YlOrBr-9}{ + color=(YlOrBr-A); + color=(YlOrBr-C); + color=(YlOrBr-D); + color=(YlOrBr-F); + color=(YlOrBr-G); + color=(YlOrBr-H); + color=(YlOrBr-J); + color=(YlOrBr-K); + color=(YlOrBr-M); + }, + cycle list/.define={YlOrBr-9}{[of colormap=YlOrBr-9]}, + }, + /pgfplots/cycle list/YlOrBr-9/.style={/pgfplots/@@brewer set cycle list={YlOrBr-9}}, + % + /pgfplots/colormap/Purples-3/.style={ + colormap={Purples-3}{ + color=(Purples-C); + color=(Purples-F); + color=(Purples-I); + }, + cycle list/.define={Purples-3}{[of colormap=Purples-3]}, + }, + /pgfplots/cycle list/Purples-3/.style={/pgfplots/@@brewer set cycle list={Purples-3}}, + % + /pgfplots/colormap/Purples-4/.style={ + colormap={Purples-4}{ + color=(Purples-B); + color=(Purples-E); + color=(Purples-G); + color=(Purples-J); + }, + cycle list/.define={Purples-4}{[of colormap=Purples-4]}, + }, + /pgfplots/cycle list/Purples-4/.style={/pgfplots/@@brewer set cycle list={Purples-4}}, + % + /pgfplots/colormap/Purples-5/.style={ + colormap={Purples-5}{ + color=(Purples-B); + color=(Purples-E); + color=(Purples-G); + color=(Purples-I); + color=(Purples-K); + }, + cycle list/.define={Purples-5}{[of colormap=Purples-5]}, + }, + /pgfplots/cycle list/Purples-5/.style={/pgfplots/@@brewer set cycle list={Purples-5}}, + % + /pgfplots/colormap/Purples-6/.style={ + colormap={Purples-6}{ + color=(Purples-B); + color=(Purples-D); + color=(Purples-F); + color=(Purples-G); + color=(Purples-I); + color=(Purples-K); + }, + cycle list/.define={Purples-6}{[of colormap=Purples-6]}, + }, + /pgfplots/cycle list/Purples-6/.style={/pgfplots/@@brewer set cycle list={Purples-6}}, + % + /pgfplots/colormap/Purples-7/.style={ + colormap={Purples-7}{ + color=(Purples-B); + color=(Purples-D); + color=(Purples-F); + color=(Purples-G); + color=(Purples-H); + color=(Purples-J); + color=(Purples-L); + }, + cycle list/.define={Purples-7}{[of colormap=Purples-7]}, + }, + /pgfplots/cycle list/Purples-7/.style={/pgfplots/@@brewer set cycle list={Purples-7}}, + % + /pgfplots/colormap/Purples-8/.style={ + colormap={Purples-8}{ + color=(Purples-A); + color=(Purples-C); + color=(Purples-D); + color=(Purples-F); + color=(Purples-G); + color=(Purples-H); + color=(Purples-J); + color=(Purples-L); + }, + cycle list/.define={Purples-8}{[of colormap=Purples-8]}, + }, + /pgfplots/cycle list/Purples-8/.style={/pgfplots/@@brewer set cycle list={Purples-8}}, + % + /pgfplots/colormap/Purples-9/.style={ + colormap={Purples-9}{ + color=(Purples-A); + color=(Purples-C); + color=(Purples-D); + color=(Purples-F); + color=(Purples-G); + color=(Purples-H); + color=(Purples-J); + color=(Purples-K); + color=(Purples-M); + }, + cycle list/.define={Purples-9}{[of colormap=Purples-9]}, + }, + /pgfplots/cycle list/Purples-9/.style={/pgfplots/@@brewer set cycle list={Purples-9}}, + % + /pgfplots/colormap/Blues-3/.style={ + colormap={Blues-3}{ + color=(Blues-C); + color=(Blues-F); + color=(Blues-I); + }, + cycle list/.define={Blues-3}{[of colormap=Blues-3]}, + }, + /pgfplots/cycle list/Blues-3/.style={/pgfplots/@@brewer set cycle list={Blues-3}}, + % + /pgfplots/colormap/Blues-4/.style={ + colormap={Blues-4}{ + color=(Blues-B); + color=(Blues-E); + color=(Blues-G); + color=(Blues-J); + }, + cycle list/.define={Blues-4}{[of colormap=Blues-4]}, + }, + /pgfplots/cycle list/Blues-4/.style={/pgfplots/@@brewer set cycle list={Blues-4}}, + % + /pgfplots/colormap/Blues-5/.style={ + colormap={Blues-5}{ + color=(Blues-B); + color=(Blues-E); + color=(Blues-G); + color=(Blues-I); + color=(Blues-K); + }, + cycle list/.define={Blues-5}{[of colormap=Blues-5]}, + }, + /pgfplots/cycle list/Blues-5/.style={/pgfplots/@@brewer set cycle list={Blues-5}}, + % + /pgfplots/colormap/Blues-6/.style={ + colormap={Blues-6}{ + color=(Blues-B); + color=(Blues-D); + color=(Blues-F); + color=(Blues-G); + color=(Blues-I); + color=(Blues-K); + }, + cycle list/.define={Blues-6}{[of colormap=Blues-6]}, + }, + /pgfplots/cycle list/Blues-6/.style={/pgfplots/@@brewer set cycle list={Blues-6}}, + % + /pgfplots/colormap/Blues-7/.style={ + colormap={Blues-7}{ + color=(Blues-B); + color=(Blues-D); + color=(Blues-F); + color=(Blues-G); + color=(Blues-H); + color=(Blues-J); + color=(Blues-L); + }, + cycle list/.define={Blues-7}{[of colormap=Blues-7]}, + }, + /pgfplots/cycle list/Blues-7/.style={/pgfplots/@@brewer set cycle list={Blues-7}}, + % + /pgfplots/colormap/Blues-8/.style={ + colormap={Blues-8}{ + color=(Blues-A); + color=(Blues-C); + color=(Blues-D); + color=(Blues-F); + color=(Blues-G); + color=(Blues-H); + color=(Blues-J); + color=(Blues-L); + }, + cycle list/.define={Blues-8}{[of colormap=Blues-8]}, + }, + /pgfplots/cycle list/Blues-8/.style={/pgfplots/@@brewer set cycle list={Blues-8}}, + % + /pgfplots/colormap/Blues-9/.style={ + colormap={Blues-9}{ + color=(Blues-A); + color=(Blues-C); + color=(Blues-D); + color=(Blues-F); + color=(Blues-G); + color=(Blues-H); + color=(Blues-J); + color=(Blues-K); + color=(Blues-M); + }, + cycle list/.define={Blues-9}{[of colormap=Blues-9]}, + }, + /pgfplots/cycle list/Blues-9/.style={/pgfplots/@@brewer set cycle list={Blues-9}}, + % + /pgfplots/colormap/Greens-3/.style={ + colormap={Greens-3}{ + color=(Greens-C); + color=(Greens-F); + color=(Greens-I); + }, + cycle list/.define={Greens-3}{[of colormap=Greens-3]}, + }, + /pgfplots/cycle list/Greens-3/.style={/pgfplots/@@brewer set cycle list={Greens-3}}, + % + /pgfplots/colormap/Greens-4/.style={ + colormap={Greens-4}{ + color=(Greens-B); + color=(Greens-E); + color=(Greens-G); + color=(Greens-J); + }, + cycle list/.define={Greens-4}{[of colormap=Greens-4]}, + }, + /pgfplots/cycle list/Greens-4/.style={/pgfplots/@@brewer set cycle list={Greens-4}}, + % + /pgfplots/colormap/Greens-5/.style={ + colormap={Greens-5}{ + color=(Greens-B); + color=(Greens-E); + color=(Greens-G); + color=(Greens-I); + color=(Greens-K); + }, + cycle list/.define={Greens-5}{[of colormap=Greens-5]}, + }, + /pgfplots/cycle list/Greens-5/.style={/pgfplots/@@brewer set cycle list={Greens-5}}, + % + /pgfplots/colormap/Greens-6/.style={ + colormap={Greens-6}{ + color=(Greens-B); + color=(Greens-D); + color=(Greens-F); + color=(Greens-G); + color=(Greens-I); + color=(Greens-K); + }, + cycle list/.define={Greens-6}{[of colormap=Greens-6]}, + }, + /pgfplots/cycle list/Greens-6/.style={/pgfplots/@@brewer set cycle list={Greens-6}}, + % + /pgfplots/colormap/Greens-7/.style={ + colormap={Greens-7}{ + color=(Greens-B); + color=(Greens-D); + color=(Greens-F); + color=(Greens-G); + color=(Greens-H); + color=(Greens-J); + color=(Greens-L); + }, + cycle list/.define={Greens-7}{[of colormap=Greens-7]}, + }, + /pgfplots/cycle list/Greens-7/.style={/pgfplots/@@brewer set cycle list={Greens-7}}, + % + /pgfplots/colormap/Greens-8/.style={ + colormap={Greens-8}{ + color=(Greens-A); + color=(Greens-C); + color=(Greens-D); + color=(Greens-F); + color=(Greens-G); + color=(Greens-H); + color=(Greens-J); + color=(Greens-L); + }, + cycle list/.define={Greens-8}{[of colormap=Greens-8]}, + }, + /pgfplots/cycle list/Greens-8/.style={/pgfplots/@@brewer set cycle list={Greens-8}}, + % + /pgfplots/colormap/Greens-9/.style={ + colormap={Greens-9}{ + color=(Greens-A); + color=(Greens-C); + color=(Greens-D); + color=(Greens-F); + color=(Greens-G); + color=(Greens-H); + color=(Greens-J); + color=(Greens-K); + color=(Greens-M); + }, + cycle list/.define={Greens-9}{[of colormap=Greens-9]}, + }, + /pgfplots/cycle list/Greens-9/.style={/pgfplots/@@brewer set cycle list={Greens-9}}, + % + /pgfplots/colormap/Oranges-3/.style={ + colormap={Oranges-3}{ + color=(Oranges-C); + color=(Oranges-F); + color=(Oranges-I); + }, + cycle list/.define={Oranges-3}{[of colormap=Oranges-3]}, + }, + /pgfplots/cycle list/Oranges-3/.style={/pgfplots/@@brewer set cycle list={Oranges-3}}, + % + /pgfplots/colormap/Oranges-4/.style={ + colormap={Oranges-4}{ + color=(Oranges-B); + color=(Oranges-E); + color=(Oranges-G); + color=(Oranges-J); + }, + cycle list/.define={Oranges-4}{[of colormap=Oranges-4]}, + }, + /pgfplots/cycle list/Oranges-4/.style={/pgfplots/@@brewer set cycle list={Oranges-4}}, + % + /pgfplots/colormap/Oranges-5/.style={ + colormap={Oranges-5}{ + color=(Oranges-B); + color=(Oranges-E); + color=(Oranges-G); + color=(Oranges-I); + color=(Oranges-K); + }, + cycle list/.define={Oranges-5}{[of colormap=Oranges-5]}, + }, + /pgfplots/cycle list/Oranges-5/.style={/pgfplots/@@brewer set cycle list={Oranges-5}}, + % + /pgfplots/colormap/Oranges-6/.style={ + colormap={Oranges-6}{ + color=(Oranges-B); + color=(Oranges-D); + color=(Oranges-F); + color=(Oranges-G); + color=(Oranges-I); + color=(Oranges-K); + }, + cycle list/.define={Oranges-6}{[of colormap=Oranges-6]}, + }, + /pgfplots/cycle list/Oranges-6/.style={/pgfplots/@@brewer set cycle list={Oranges-6}}, + % + /pgfplots/colormap/Oranges-7/.style={ + colormap={Oranges-7}{ + color=(Oranges-B); + color=(Oranges-D); + color=(Oranges-F); + color=(Oranges-G); + color=(Oranges-H); + color=(Oranges-J); + color=(Oranges-L); + }, + cycle list/.define={Oranges-7}{[of colormap=Oranges-7]}, + }, + /pgfplots/cycle list/Oranges-7/.style={/pgfplots/@@brewer set cycle list={Oranges-7}}, + % + /pgfplots/colormap/Oranges-8/.style={ + colormap={Oranges-8}{ + color=(Oranges-A); + color=(Oranges-C); + color=(Oranges-D); + color=(Oranges-F); + color=(Oranges-G); + color=(Oranges-H); + color=(Oranges-J); + color=(Oranges-L); + }, + cycle list/.define={Oranges-8}{[of colormap=Oranges-8]}, + }, + /pgfplots/cycle list/Oranges-8/.style={/pgfplots/@@brewer set cycle list={Oranges-8}}, + % + /pgfplots/colormap/Oranges-9/.style={ + colormap={Oranges-9}{ + color=(Oranges-A); + color=(Oranges-C); + color=(Oranges-D); + color=(Oranges-F); + color=(Oranges-G); + color=(Oranges-H); + color=(Oranges-J); + color=(Oranges-K); + color=(Oranges-M); + }, + cycle list/.define={Oranges-9}{[of colormap=Oranges-9]}, + }, + /pgfplots/cycle list/Oranges-9/.style={/pgfplots/@@brewer set cycle list={Oranges-9}}, + % + /pgfplots/colormap/Reds-3/.style={ + colormap={Reds-3}{ + color=(Reds-C); + color=(Reds-F); + color=(Reds-I); + }, + cycle list/.define={Reds-3}{[of colormap=Reds-3]}, + }, + /pgfplots/cycle list/Reds-3/.style={/pgfplots/@@brewer set cycle list={Reds-3}}, + % + /pgfplots/colormap/Reds-4/.style={ + colormap={Reds-4}{ + color=(Reds-B); + color=(Reds-E); + color=(Reds-G); + color=(Reds-J); + }, + cycle list/.define={Reds-4}{[of colormap=Reds-4]}, + }, + /pgfplots/cycle list/Reds-4/.style={/pgfplots/@@brewer set cycle list={Reds-4}}, + % + /pgfplots/colormap/Reds-5/.style={ + colormap={Reds-5}{ + color=(Reds-B); + color=(Reds-E); + color=(Reds-G); + color=(Reds-I); + color=(Reds-K); + }, + cycle list/.define={Reds-5}{[of colormap=Reds-5]}, + }, + /pgfplots/cycle list/Reds-5/.style={/pgfplots/@@brewer set cycle list={Reds-5}}, + % + /pgfplots/colormap/Reds-6/.style={ + colormap={Reds-6}{ + color=(Reds-B); + color=(Reds-D); + color=(Reds-F); + color=(Reds-G); + color=(Reds-I); + color=(Reds-K); + }, + cycle list/.define={Reds-6}{[of colormap=Reds-6]}, + }, + /pgfplots/cycle list/Reds-6/.style={/pgfplots/@@brewer set cycle list={Reds-6}}, + % + /pgfplots/colormap/Reds-7/.style={ + colormap={Reds-7}{ + color=(Reds-B); + color=(Reds-D); + color=(Reds-F); + color=(Reds-G); + color=(Reds-H); + color=(Reds-J); + color=(Reds-L); + }, + cycle list/.define={Reds-7}{[of colormap=Reds-7]}, + }, + /pgfplots/cycle list/Reds-7/.style={/pgfplots/@@brewer set cycle list={Reds-7}}, + % + /pgfplots/colormap/Reds-8/.style={ + colormap={Reds-8}{ + color=(Reds-A); + color=(Reds-C); + color=(Reds-D); + color=(Reds-F); + color=(Reds-G); + color=(Reds-H); + color=(Reds-J); + color=(Reds-L); + }, + cycle list/.define={Reds-8}{[of colormap=Reds-8]}, + }, + /pgfplots/cycle list/Reds-8/.style={/pgfplots/@@brewer set cycle list={Reds-8}}, + % + /pgfplots/colormap/Reds-9/.style={ + colormap={Reds-9}{ + color=(Reds-A); + color=(Reds-C); + color=(Reds-D); + color=(Reds-F); + color=(Reds-G); + color=(Reds-H); + color=(Reds-J); + color=(Reds-K); + color=(Reds-M); + }, + cycle list/.define={Reds-9}{[of colormap=Reds-9]}, + }, + /pgfplots/cycle list/Reds-9/.style={/pgfplots/@@brewer set cycle list={Reds-9}}, + % + /pgfplots/colormap/Greys-3/.style={ + colormap={Greys-3}{ + color=(Greys-C); + color=(Greys-F); + color=(Greys-I); + }, + cycle list/.define={Greys-3}{[of colormap=Greys-3]}, + }, + /pgfplots/cycle list/Greys-3/.style={/pgfplots/@@brewer set cycle list={Greys-3}}, + % + /pgfplots/colormap/Greys-4/.style={ + colormap={Greys-4}{ + color=(Greys-B); + color=(Greys-E); + color=(Greys-G); + color=(Greys-J); + }, + cycle list/.define={Greys-4}{[of colormap=Greys-4]}, + }, + /pgfplots/cycle list/Greys-4/.style={/pgfplots/@@brewer set cycle list={Greys-4}}, + % + /pgfplots/colormap/Greys-5/.style={ + colormap={Greys-5}{ + color=(Greys-B); + color=(Greys-E); + color=(Greys-G); + color=(Greys-I); + color=(Greys-K); + }, + cycle list/.define={Greys-5}{[of colormap=Greys-5]}, + }, + /pgfplots/cycle list/Greys-5/.style={/pgfplots/@@brewer set cycle list={Greys-5}}, + % + /pgfplots/colormap/Greys-6/.style={ + colormap={Greys-6}{ + color=(Greys-B); + color=(Greys-D); + color=(Greys-F); + color=(Greys-G); + color=(Greys-I); + color=(Greys-K); + }, + cycle list/.define={Greys-6}{[of colormap=Greys-6]}, + }, + /pgfplots/cycle list/Greys-6/.style={/pgfplots/@@brewer set cycle list={Greys-6}}, + % + /pgfplots/colormap/Greys-7/.style={ + colormap={Greys-7}{ + color=(Greys-B); + color=(Greys-D); + color=(Greys-F); + color=(Greys-G); + color=(Greys-H); + color=(Greys-J); + color=(Greys-L); + }, + cycle list/.define={Greys-7}{[of colormap=Greys-7]}, + }, + /pgfplots/cycle list/Greys-7/.style={/pgfplots/@@brewer set cycle list={Greys-7}}, + % + /pgfplots/colormap/Greys-8/.style={ + colormap={Greys-8}{ + color=(Greys-A); + color=(Greys-C); + color=(Greys-D); + color=(Greys-F); + color=(Greys-G); + color=(Greys-H); + color=(Greys-J); + color=(Greys-L); + }, + cycle list/.define={Greys-8}{[of colormap=Greys-8]}, + }, + /pgfplots/cycle list/Greys-8/.style={/pgfplots/@@brewer set cycle list={Greys-8}}, + % + /pgfplots/colormap/Greys-9/.style={ + colormap={Greys-9}{ + color=(Greys-A); + color=(Greys-C); + color=(Greys-D); + color=(Greys-F); + color=(Greys-G); + color=(Greys-H); + color=(Greys-J); + color=(Greys-K); + color=(Greys-M); + }, + cycle list/.define={Greys-9}{[of colormap=Greys-9]}, + }, + /pgfplots/cycle list/Greys-9/.style={/pgfplots/@@brewer set cycle list={Greys-9}}, + % + % =========================================================================== + /pgfplots/colormap/PuOr-3/.style={ + colormap={PuOr-3}{ + color=(PuOr-E); + color=(PuOr-H); + color=(PuOr-K); + }, + cycle list/.define={PuOr-3}{[of colormap=PuOr-3]}, + }, + /pgfplots/cycle list/PuOr-3/.style={/pgfplots/@@brewer set cycle list={PuOr-3}}, + % + /pgfplots/colormap/PuOr-4/.style={ + colormap={PuOr-4}{ + color=(PuOr-C); + color=(PuOr-F); + color=(PuOr-J); + color=(PuOr-M); + }, + cycle list/.define={PuOr-4}{[of colormap=PuOr-4]}, + }, + /pgfplots/cycle list/PuOr-4/.style={/pgfplots/@@brewer set cycle list={PuOr-4}}, + % + /pgfplots/colormap/PuOr-5/.style={ + colormap={PuOr-5}{ + color=(PuOr-C); + color=(PuOr-F); + color=(PuOr-H); + color=(PuOr-J); + color=(PuOr-M); + }, + cycle list/.define={PuOr-5}{[of colormap=PuOr-5]}, + }, + /pgfplots/cycle list/PuOr-5/.style={/pgfplots/@@brewer set cycle list={PuOr-5}}, + % + /pgfplots/colormap/PuOr-6/.style={ + colormap={PuOr-6}{ + color=(PuOr-B); + color=(PuOr-E); + color=(PuOr-G); + color=(PuOr-I); + color=(PuOr-K); + color=(PuOr-N); + }, + cycle list/.define={PuOr-6}{[of colormap=PuOr-6]}, + }, + /pgfplots/cycle list/PuOr-6/.style={/pgfplots/@@brewer set cycle list={PuOr-6}}, + % + /pgfplots/colormap/PuOr-7/.style={ + colormap={PuOr-7}{ + color=(PuOr-B); + color=(PuOr-E); + color=(PuOr-G); + color=(PuOr-H); + color=(PuOr-I); + color=(PuOr-K); + color=(PuOr-N); + }, + cycle list/.define={PuOr-7}{[of colormap=PuOr-7]}, + }, + /pgfplots/cycle list/PuOr-7/.style={/pgfplots/@@brewer set cycle list={PuOr-7}}, + % + /pgfplots/colormap/PuOr-8/.style={ + colormap={PuOr-8}{ + color=(PuOr-B); + color=(PuOr-D); + color=(PuOr-F); + color=(PuOr-G); + color=(PuOr-I); + color=(PuOr-J); + color=(PuOr-L); + color=(PuOr-N); + }, + cycle list/.define={PuOr-8}{[of colormap=PuOr-8]}, + }, + /pgfplots/cycle list/PuOr-8/.style={/pgfplots/@@brewer set cycle list={PuOr-8}}, + % + /pgfplots/colormap/PuOr-9/.style={ + colormap={PuOr-9}{ + color=(PuOr-B); + color=(PuOr-D); + color=(PuOr-F); + color=(PuOr-G); + color=(PuOr-H); + color=(PuOr-I); + color=(PuOr-J); + color=(PuOr-L); + color=(PuOr-N); + }, + cycle list/.define={PuOr-9}{[of colormap=PuOr-9]}, + }, + /pgfplots/cycle list/PuOr-9/.style={/pgfplots/@@brewer set cycle list={PuOr-9}}, + % + /pgfplots/colormap/PuOr-10/.style={ + colormap={PuOr-10}{ + color=(PuOr-A); + color=(PuOr-B); + color=(PuOr-D); + color=(PuOr-F); + color=(PuOr-G); + color=(PuOr-I); + color=(PuOr-J); + color=(PuOr-L); + color=(PuOr-N); + color=(PuOr-O); + }, + cycle list/.define={PuOr-10}{[of colormap=PuOr-10]}, + }, + /pgfplots/cycle list/PuOr-10/.style={/pgfplots/@@brewer set cycle list={PuOr-10}}, + % + /pgfplots/colormap/PuOr-11/.style={ + colormap={PuOr-11}{ + color=(PuOr-A); + color=(PuOr-B); + color=(PuOr-D); + color=(PuOr-F); + color=(PuOr-G); + color=(PuOr-H); + color=(PuOr-I); + color=(PuOr-J); + color=(PuOr-L); + color=(PuOr-N); + color=(PuOr-O); + }, + cycle list/.define={PuOr-11}{[of colormap=PuOr-11]}, + }, + /pgfplots/cycle list/PuOr-11/.style={/pgfplots/@@brewer set cycle list={PuOr-11}}, + % + /pgfplots/colormap/BrBG-3/.style={ + colormap={BrBG-3}{ + color=(BrBG-E); + color=(BrBG-H); + color=(BrBG-K); + }, + cycle list/.define={BrBG-3}{[of colormap=BrBG-3]}, + }, + /pgfplots/cycle list/BrBG-3/.style={/pgfplots/@@brewer set cycle list={BrBG-3}}, + % + /pgfplots/colormap/BrBG-4/.style={ + colormap={BrBG-4}{ + color=(BrBG-C); + color=(BrBG-F); + color=(BrBG-J); + color=(BrBG-M); + }, + cycle list/.define={BrBG-4}{[of colormap=BrBG-4]}, + }, + /pgfplots/cycle list/BrBG-4/.style={/pgfplots/@@brewer set cycle list={BrBG-4}}, + % + /pgfplots/colormap/BrBG-5/.style={ + colormap={BrBG-5}{ + color=(BrBG-C); + color=(BrBG-F); + color=(BrBG-H); + color=(BrBG-J); + color=(BrBG-M); + }, + cycle list/.define={BrBG-5}{[of colormap=BrBG-5]}, + }, + /pgfplots/cycle list/BrBG-5/.style={/pgfplots/@@brewer set cycle list={BrBG-5}}, + % + /pgfplots/colormap/BrBG-6/.style={ + colormap={BrBG-6}{ + color=(BrBG-B); + color=(BrBG-E); + color=(BrBG-G); + color=(BrBG-I); + color=(BrBG-K); + color=(BrBG-N); + }, + cycle list/.define={BrBG-6}{[of colormap=BrBG-6]}, + }, + /pgfplots/cycle list/BrBG-6/.style={/pgfplots/@@brewer set cycle list={BrBG-6}}, + % + /pgfplots/colormap/BrBG-7/.style={ + colormap={BrBG-7}{ + color=(BrBG-B); + color=(BrBG-E); + color=(BrBG-G); + color=(BrBG-H); + color=(BrBG-I); + color=(BrBG-K); + color=(BrBG-N); + }, + cycle list/.define={BrBG-7}{[of colormap=BrBG-7]}, + }, + /pgfplots/cycle list/BrBG-7/.style={/pgfplots/@@brewer set cycle list={BrBG-7}}, + % + /pgfplots/colormap/BrBG-8/.style={ + colormap={BrBG-8}{ + color=(BrBG-B); + color=(BrBG-D); + color=(BrBG-F); + color=(BrBG-G); + color=(BrBG-I); + color=(BrBG-J); + color=(BrBG-L); + color=(BrBG-N); + }, + cycle list/.define={BrBG-8}{[of colormap=BrBG-8]}, + }, + /pgfplots/cycle list/BrBG-8/.style={/pgfplots/@@brewer set cycle list={BrBG-8}}, + % + /pgfplots/colormap/BrBG-9/.style={ + colormap={BrBG-9}{ + color=(BrBG-B); + color=(BrBG-D); + color=(BrBG-F); + color=(BrBG-G); + color=(BrBG-H); + color=(BrBG-I); + color=(BrBG-J); + color=(BrBG-L); + color=(BrBG-N); + }, + cycle list/.define={BrBG-9}{[of colormap=BrBG-9]}, + }, + /pgfplots/cycle list/BrBG-9/.style={/pgfplots/@@brewer set cycle list={BrBG-9}}, + % + /pgfplots/colormap/BrBG-10/.style={ + colormap={BrBG-10}{ + color=(BrBG-A); + color=(BrBG-B); + color=(BrBG-D); + color=(BrBG-F); + color=(BrBG-G); + color=(BrBG-I); + color=(BrBG-J); + color=(BrBG-L); + color=(BrBG-N); + color=(BrBG-O); + }, + cycle list/.define={BrBG-10}{[of colormap=BrBG-10]}, + }, + /pgfplots/cycle list/BrBG-10/.style={/pgfplots/@@brewer set cycle list={BrBG-10}}, + % + /pgfplots/colormap/BrBG-11/.style={ + colormap={BrBG-11}{ + color=(BrBG-A); + color=(BrBG-B); + color=(BrBG-D); + color=(BrBG-F); + color=(BrBG-G); + color=(BrBG-H); + color=(BrBG-I); + color=(BrBG-J); + color=(BrBG-L); + color=(BrBG-N); + color=(BrBG-O); + }, + cycle list/.define={BrBG-11}{[of colormap=BrBG-11]}, + }, + /pgfplots/cycle list/BrBG-11/.style={/pgfplots/@@brewer set cycle list={BrBG-11}}, + % + /pgfplots/colormap/PRGn-3/.style={ + colormap={PRGn-3}{ + color=(PRGn-E); + color=(PRGn-H); + color=(PRGn-K); + }, + cycle list/.define={PRGn-3}{[of colormap=PRGn-3]}, + }, + /pgfplots/cycle list/PRGn-3/.style={/pgfplots/@@brewer set cycle list={PRGn-3}}, + % + /pgfplots/colormap/PRGn-4/.style={ + colormap={PRGn-4}{ + color=(PRGn-C); + color=(PRGn-F); + color=(PRGn-J); + color=(PRGn-M); + }, + cycle list/.define={PRGn-4}{[of colormap=PRGn-4]}, + }, + /pgfplots/cycle list/PRGn-4/.style={/pgfplots/@@brewer set cycle list={PRGn-4}}, + % + /pgfplots/colormap/PRGn-5/.style={ + colormap={PRGn-5}{ + color=(PRGn-C); + color=(PRGn-F); + color=(PRGn-H); + color=(PRGn-J); + color=(PRGn-M); + }, + cycle list/.define={PRGn-5}{[of colormap=PRGn-5]}, + }, + /pgfplots/cycle list/PRGn-5/.style={/pgfplots/@@brewer set cycle list={PRGn-5}}, + % + /pgfplots/colormap/PRGn-6/.style={ + colormap={PRGn-6}{ + color=(PRGn-B); + color=(PRGn-E); + color=(PRGn-G); + color=(PRGn-I); + color=(PRGn-K); + color=(PRGn-N); + }, + cycle list/.define={PRGn-6}{[of colormap=PRGn-6]}, + }, + /pgfplots/cycle list/PRGn-6/.style={/pgfplots/@@brewer set cycle list={PRGn-6}}, + % + /pgfplots/colormap/PRGn-7/.style={ + colormap={PRGn-7}{ + color=(PRGn-B); + color=(PRGn-E); + color=(PRGn-G); + color=(PRGn-H); + color=(PRGn-I); + color=(PRGn-K); + color=(PRGn-N); + }, + cycle list/.define={PRGn-7}{[of colormap=PRGn-7]}, + }, + /pgfplots/cycle list/PRGn-7/.style={/pgfplots/@@brewer set cycle list={PRGn-7}}, + % + /pgfplots/colormap/PRGn-8/.style={ + colormap={PRGn-8}{ + color=(PRGn-B); + color=(PRGn-D); + color=(PRGn-F); + color=(PRGn-G); + color=(PRGn-I); + color=(PRGn-J); + color=(PRGn-L); + color=(PRGn-N); + }, + cycle list/.define={PRGn-8}{[of colormap=PRGn-8]}, + }, + /pgfplots/cycle list/PRGn-8/.style={/pgfplots/@@brewer set cycle list={PRGn-8}}, + % + /pgfplots/colormap/PRGn-9/.style={ + colormap={PRGn-9}{ + color=(PRGn-B); + color=(PRGn-D); + color=(PRGn-F); + color=(PRGn-G); + color=(PRGn-H); + color=(PRGn-I); + color=(PRGn-J); + color=(PRGn-L); + color=(PRGn-N); + }, + cycle list/.define={PRGn-9}{[of colormap=PRGn-9]}, + }, + /pgfplots/cycle list/PRGn-9/.style={/pgfplots/@@brewer set cycle list={PRGn-9}}, + % + /pgfplots/colormap/PRGn-10/.style={ + colormap={PRGn-10}{ + color=(PRGn-A); + color=(PRGn-B); + color=(PRGn-D); + color=(PRGn-F); + color=(PRGn-G); + color=(PRGn-I); + color=(PRGn-J); + color=(PRGn-L); + color=(PRGn-N); + color=(PRGn-O); + }, + cycle list/.define={PRGn-10}{[of colormap=PRGn-10]}, + }, + /pgfplots/cycle list/PRGn-10/.style={/pgfplots/@@brewer set cycle list={PRGn-10}}, + % + /pgfplots/colormap/PRGn-11/.style={ + colormap={PRGn-11}{ + color=(PRGn-A); + color=(PRGn-B); + color=(PRGn-D); + color=(PRGn-F); + color=(PRGn-G); + color=(PRGn-H); + color=(PRGn-I); + color=(PRGn-J); + color=(PRGn-L); + color=(PRGn-N); + color=(PRGn-O); + }, + cycle list/.define={PRGn-11}{[of colormap=PRGn-11]}, + }, + /pgfplots/cycle list/PRGn-11/.style={/pgfplots/@@brewer set cycle list={PRGn-11}}, + % + /pgfplots/colormap/PiYG-3/.style={ + colormap={PiYG-3}{ + color=(PiYG-E); + color=(PiYG-H); + color=(PiYG-K); + }, + cycle list/.define={PiYG-3}{[of colormap=PiYG-3]}, + }, + /pgfplots/cycle list/PiYG-3/.style={/pgfplots/@@brewer set cycle list={PiYG-3}}, + % + /pgfplots/colormap/PiYG-4/.style={ + colormap={PiYG-4}{ + color=(PiYG-C); + color=(PiYG-F); + color=(PiYG-J); + color=(PiYG-M); + }, + cycle list/.define={PiYG-4}{[of colormap=PiYG-4]}, + }, + /pgfplots/cycle list/PiYG-4/.style={/pgfplots/@@brewer set cycle list={PiYG-4}}, + % + /pgfplots/colormap/PiYG-5/.style={ + colormap={PiYG-5}{ + color=(PiYG-C); + color=(PiYG-F); + color=(PiYG-H); + color=(PiYG-J); + color=(PiYG-M); + }, + cycle list/.define={PiYG-5}{[of colormap=PiYG-5]}, + }, + /pgfplots/cycle list/PiYG-5/.style={/pgfplots/@@brewer set cycle list={PiYG-5}}, + % + /pgfplots/colormap/PiYG-6/.style={ + colormap={PiYG-6}{ + color=(PiYG-B); + color=(PiYG-E); + color=(PiYG-G); + color=(PiYG-I); + color=(PiYG-K); + color=(PiYG-N); + }, + cycle list/.define={PiYG-6}{[of colormap=PiYG-6]}, + }, + /pgfplots/cycle list/PiYG-6/.style={/pgfplots/@@brewer set cycle list={PiYG-6}}, + % + /pgfplots/colormap/PiYG-7/.style={ + colormap={PiYG-7}{ + color=(PiYG-B); + color=(PiYG-E); + color=(PiYG-G); + color=(PiYG-H); + color=(PiYG-I); + color=(PiYG-K); + color=(PiYG-N); + }, + cycle list/.define={PiYG-7}{[of colormap=PiYG-7]}, + }, + /pgfplots/cycle list/PiYG-7/.style={/pgfplots/@@brewer set cycle list={PiYG-7}}, + % + /pgfplots/colormap/PiYG-8/.style={ + colormap={PiYG-8}{ + color=(PiYG-B); + color=(PiYG-D); + color=(PiYG-F); + color=(PiYG-G); + color=(PiYG-I); + color=(PiYG-J); + color=(PiYG-L); + color=(PiYG-N); + }, + cycle list/.define={PiYG-8}{[of colormap=PiYG-8]}, + }, + /pgfplots/cycle list/PiYG-8/.style={/pgfplots/@@brewer set cycle list={PiYG-8}}, + % + /pgfplots/colormap/PiYG-9/.style={ + colormap={PiYG-9}{ + color=(PiYG-B); + color=(PiYG-D); + color=(PiYG-F); + color=(PiYG-G); + color=(PiYG-H); + color=(PiYG-I); + color=(PiYG-J); + color=(PiYG-L); + color=(PiYG-N); + }, + cycle list/.define={PiYG-9}{[of colormap=PiYG-9]}, + }, + /pgfplots/cycle list/PiYG-9/.style={/pgfplots/@@brewer set cycle list={PiYG-9}}, + % + /pgfplots/colormap/PiYG-10/.style={ + colormap={PiYG-10}{ + color=(PiYG-A); + color=(PiYG-B); + color=(PiYG-D); + color=(PiYG-F); + color=(PiYG-G); + color=(PiYG-I); + color=(PiYG-J); + color=(PiYG-L); + color=(PiYG-N); + color=(PiYG-O); + }, + cycle list/.define={PiYG-10}{[of colormap=PiYG-10]}, + }, + /pgfplots/cycle list/PiYG-10/.style={/pgfplots/@@brewer set cycle list={PiYG-10}}, + % + /pgfplots/colormap/PiYG-11/.style={ + colormap={PiYG-11}{ + color=(PiYG-A); + color=(PiYG-B); + color=(PiYG-D); + color=(PiYG-F); + color=(PiYG-G); + color=(PiYG-H); + color=(PiYG-I); + color=(PiYG-J); + color=(PiYG-L); + color=(PiYG-N); + color=(PiYG-O); + }, + cycle list/.define={PiYG-11}{[of colormap=PiYG-11]}, + }, + /pgfplots/cycle list/PiYG-11/.style={/pgfplots/@@brewer set cycle list={PiYG-11}}, + % + /pgfplots/colormap/RdBu-3/.style={ + colormap={RdBu-3}{ + color=(RdBu-E); + color=(RdBu-H); + color=(RdBu-K); + }, + cycle list/.define={RdBu-3}{[of colormap=RdBu-3]}, + }, + /pgfplots/cycle list/RdBu-3/.style={/pgfplots/@@brewer set cycle list={RdBu-3}}, + % + /pgfplots/colormap/RdBu-4/.style={ + colormap={RdBu-4}{ + color=(RdBu-C); + color=(RdBu-F); + color=(RdBu-J); + color=(RdBu-M); + }, + cycle list/.define={RdBu-4}{[of colormap=RdBu-4]}, + }, + /pgfplots/cycle list/RdBu-4/.style={/pgfplots/@@brewer set cycle list={RdBu-4}}, + % + /pgfplots/colormap/RdBu-5/.style={ + colormap={RdBu-5}{ + color=(RdBu-C); + color=(RdBu-F); + color=(RdBu-H); + color=(RdBu-J); + color=(RdBu-M); + }, + cycle list/.define={RdBu-5}{[of colormap=RdBu-5]}, + }, + /pgfplots/cycle list/RdBu-5/.style={/pgfplots/@@brewer set cycle list={RdBu-5}}, + % + /pgfplots/colormap/RdBu-6/.style={ + colormap={RdBu-6}{ + color=(RdBu-B); + color=(RdBu-E); + color=(RdBu-G); + color=(RdBu-I); + color=(RdBu-K); + color=(RdBu-N); + }, + cycle list/.define={RdBu-6}{[of colormap=RdBu-6]}, + }, + /pgfplots/cycle list/RdBu-6/.style={/pgfplots/@@brewer set cycle list={RdBu-6}}, + % + /pgfplots/colormap/RdBu-7/.style={ + colormap={RdBu-7}{ + color=(RdBu-B); + color=(RdBu-E); + color=(RdBu-G); + color=(RdBu-H); + color=(RdBu-I); + color=(RdBu-K); + color=(RdBu-N); + }, + cycle list/.define={RdBu-7}{[of colormap=RdBu-7]}, + }, + /pgfplots/cycle list/RdBu-7/.style={/pgfplots/@@brewer set cycle list={RdBu-7}}, + % + /pgfplots/colormap/RdBu-8/.style={ + colormap={RdBu-8}{ + color=(RdBu-B); + color=(RdBu-D); + color=(RdBu-F); + color=(RdBu-G); + color=(RdBu-I); + color=(RdBu-J); + color=(RdBu-L); + color=(RdBu-N); + }, + cycle list/.define={RdBu-8}{[of colormap=RdBu-8]}, + }, + /pgfplots/cycle list/RdBu-8/.style={/pgfplots/@@brewer set cycle list={RdBu-8}}, + % + /pgfplots/colormap/RdBu-9/.style={ + colormap={RdBu-9}{ + color=(RdBu-B); + color=(RdBu-D); + color=(RdBu-F); + color=(RdBu-G); + color=(RdBu-H); + color=(RdBu-I); + color=(RdBu-J); + color=(RdBu-L); + color=(RdBu-N); + }, + cycle list/.define={RdBu-9}{[of colormap=RdBu-9]}, + }, + /pgfplots/cycle list/RdBu-9/.style={/pgfplots/@@brewer set cycle list={RdBu-9}}, + % + /pgfplots/colormap/RdBu-10/.style={ + colormap={RdBu-10}{ + color=(RdBu-A); + color=(RdBu-B); + color=(RdBu-D); + color=(RdBu-F); + color=(RdBu-G); + color=(RdBu-I); + color=(RdBu-J); + color=(RdBu-L); + color=(RdBu-N); + color=(RdBu-O); + }, + cycle list/.define={RdBu-10}{[of colormap=RdBu-10]}, + }, + /pgfplots/cycle list/RdBu-10/.style={/pgfplots/@@brewer set cycle list={RdBu-10}}, + % + /pgfplots/colormap/RdBu-11/.style={ + colormap={RdBu-11}{ + color=(RdBu-A); + color=(RdBu-B); + color=(RdBu-D); + color=(RdBu-F); + color=(RdBu-G); + color=(RdBu-H); + color=(RdBu-I); + color=(RdBu-J); + color=(RdBu-L); + color=(RdBu-N); + color=(RdBu-O); + }, + cycle list/.define={RdBu-11}{[of colormap=RdBu-11]}, + }, + /pgfplots/cycle list/RdBu-11/.style={/pgfplots/@@brewer set cycle list={RdBu-11}}, + % + /pgfplots/colormap/RdGy-3/.style={ + colormap={RdGy-3}{ + color=(RdGy-E); + color=(RdGy-H); + color=(RdGy-K); + }, + cycle list/.define={RdGy-3}{[of colormap=RdGy-3]}, + }, + /pgfplots/cycle list/RdGy-3/.style={/pgfplots/@@brewer set cycle list={RdGy-3}}, + % + /pgfplots/colormap/RdGy-4/.style={ + colormap={RdGy-4}{ + color=(RdGy-C); + color=(RdGy-F); + color=(RdGy-J); + color=(RdGy-M); + }, + cycle list/.define={RdGy-4}{[of colormap=RdGy-4]}, + }, + /pgfplots/cycle list/RdGy-4/.style={/pgfplots/@@brewer set cycle list={RdGy-4}}, + % + /pgfplots/colormap/RdGy-5/.style={ + colormap={RdGy-5}{ + color=(RdGy-C); + color=(RdGy-F); + color=(RdGy-H); + color=(RdGy-J); + color=(RdGy-M); + }, + cycle list/.define={RdGy-5}{[of colormap=RdGy-5]}, + }, + /pgfplots/cycle list/RdGy-5/.style={/pgfplots/@@brewer set cycle list={RdGy-5}}, + % + /pgfplots/colormap/RdGy-6/.style={ + colormap={RdGy-6}{ + color=(RdGy-B); + color=(RdGy-E); + color=(RdGy-G); + color=(RdGy-I); + color=(RdGy-K); + color=(RdGy-N); + }, + cycle list/.define={RdGy-6}{[of colormap=RdGy-6]}, + }, + /pgfplots/cycle list/RdGy-6/.style={/pgfplots/@@brewer set cycle list={RdGy-6}}, + % + /pgfplots/colormap/RdGy-7/.style={ + colormap={RdGy-7}{ + color=(RdGy-B); + color=(RdGy-E); + color=(RdGy-G); + color=(RdGy-H); + color=(RdGy-I); + color=(RdGy-K); + color=(RdGy-N); + }, + cycle list/.define={RdGy-7}{[of colormap=RdGy-7]}, + }, + /pgfplots/cycle list/RdGy-7/.style={/pgfplots/@@brewer set cycle list={RdGy-7}}, + % + /pgfplots/colormap/RdGy-8/.style={ + colormap={RdGy-8}{ + color=(RdGy-B); + color=(RdGy-D); + color=(RdGy-F); + color=(RdGy-G); + color=(RdGy-I); + color=(RdGy-J); + color=(RdGy-L); + color=(RdGy-N); + }, + cycle list/.define={RdGy-8}{[of colormap=RdGy-8]}, + }, + /pgfplots/cycle list/RdGy-8/.style={/pgfplots/@@brewer set cycle list={RdGy-8}}, + % + /pgfplots/colormap/RdGy-9/.style={ + colormap={RdGy-9}{ + color=(RdGy-B); + color=(RdGy-D); + color=(RdGy-F); + color=(RdGy-G); + color=(RdGy-H); + color=(RdGy-I); + color=(RdGy-J); + color=(RdGy-L); + color=(RdGy-N); + }, + cycle list/.define={RdGy-9}{[of colormap=RdGy-9]}, + }, + /pgfplots/cycle list/RdGy-9/.style={/pgfplots/@@brewer set cycle list={RdGy-9}}, + % + /pgfplots/colormap/RdGy-10/.style={ + colormap={RdGy-10}{ + color=(RdGy-A); + color=(RdGy-B); + color=(RdGy-D); + color=(RdGy-F); + color=(RdGy-G); + color=(RdGy-I); + color=(RdGy-J); + color=(RdGy-L); + color=(RdGy-N); + color=(RdGy-O); + }, + cycle list/.define={RdGy-10}{[of colormap=RdGy-10]}, + }, + /pgfplots/cycle list/RdGy-10/.style={/pgfplots/@@brewer set cycle list={RdGy-10}}, + % + /pgfplots/colormap/RdGy-11/.style={ + colormap={RdGy-11}{ + color=(RdGy-A); + color=(RdGy-B); + color=(RdGy-D); + color=(RdGy-F); + color=(RdGy-G); + color=(RdGy-H); + color=(RdGy-I); + color=(RdGy-J); + color=(RdGy-L); + color=(RdGy-N); + color=(RdGy-O); + }, + cycle list/.define={RdGy-11}{[of colormap=RdGy-11]}, + }, + /pgfplots/cycle list/RdGy-11/.style={/pgfplots/@@brewer set cycle list={RdGy-11}}, + % + /pgfplots/colormap/RdYlBu-3/.style={ + colormap={RdYlBu-3}{ + color=(RdYlBu-E); + color=(RdYlBu-H); + color=(RdYlBu-K); + }, + cycle list/.define={RdYlBu-3}{[of colormap=RdYlBu-3]}, + }, + /pgfplots/cycle list/RdYlBu-3/.style={/pgfplots/@@brewer set cycle list={RdYlBu-3}}, + % + /pgfplots/colormap/RdYlBu-4/.style={ + colormap={RdYlBu-4}{ + color=(RdYlBu-C); + color=(RdYlBu-F); + color=(RdYlBu-J); + color=(RdYlBu-M); + }, + cycle list/.define={RdYlBu-4}{[of colormap=RdYlBu-4]}, + }, + /pgfplots/cycle list/RdYlBu-4/.style={/pgfplots/@@brewer set cycle list={RdYlBu-4}}, + % + /pgfplots/colormap/RdYlBu-5/.style={ + colormap={RdYlBu-5}{ + color=(RdYlBu-C); + color=(RdYlBu-F); + color=(RdYlBu-H); + color=(RdYlBu-J); + color=(RdYlBu-M); + }, + cycle list/.define={RdYlBu-5}{[of colormap=RdYlBu-5]}, + }, + /pgfplots/cycle list/RdYlBu-5/.style={/pgfplots/@@brewer set cycle list={RdYlBu-5}}, + % + /pgfplots/colormap/RdYlBu-6/.style={ + colormap={RdYlBu-6}{ + color=(RdYlBu-B); + color=(RdYlBu-E); + color=(RdYlBu-G); + color=(RdYlBu-I); + color=(RdYlBu-K); + color=(RdYlBu-N); + }, + cycle list/.define={RdYlBu-6}{[of colormap=RdYlBu-6]}, + }, + /pgfplots/cycle list/RdYlBu-6/.style={/pgfplots/@@brewer set cycle list={RdYlBu-6}}, + % + /pgfplots/colormap/RdYlBu-7/.style={ + colormap={RdYlBu-7}{ + color=(RdYlBu-B); + color=(RdYlBu-E); + color=(RdYlBu-G); + color=(RdYlBu-H); + color=(RdYlBu-I); + color=(RdYlBu-K); + color=(RdYlBu-N); + }, + cycle list/.define={RdYlBu-7}{[of colormap=RdYlBu-7]}, + }, + /pgfplots/cycle list/RdYlBu-7/.style={/pgfplots/@@brewer set cycle list={RdYlBu-7}}, + % + /pgfplots/colormap/RdYlBu-8/.style={ + colormap={RdYlBu-8}{ + color=(RdYlBu-B); + color=(RdYlBu-D); + color=(RdYlBu-F); + color=(RdYlBu-G); + color=(RdYlBu-I); + color=(RdYlBu-J); + color=(RdYlBu-L); + color=(RdYlBu-N); + }, + cycle list/.define={RdYlBu-8}{[of colormap=RdYlBu-8]}, + }, + /pgfplots/cycle list/RdYlBu-8/.style={/pgfplots/@@brewer set cycle list={RdYlBu-8}}, + % + /pgfplots/colormap/RdYlBu-9/.style={ + colormap={RdYlBu-9}{ + color=(RdYlBu-B); + color=(RdYlBu-D); + color=(RdYlBu-F); + color=(RdYlBu-G); + color=(RdYlBu-H); + color=(RdYlBu-I); + color=(RdYlBu-J); + color=(RdYlBu-L); + color=(RdYlBu-N); + }, + cycle list/.define={RdYlBu-9}{[of colormap=RdYlBu-9]}, + }, + /pgfplots/cycle list/RdYlBu-9/.style={/pgfplots/@@brewer set cycle list={RdYlBu-9}}, + % + /pgfplots/colormap/RdYlBu-10/.style={ + colormap={RdYlBu-10}{ + color=(RdYlBu-A); + color=(RdYlBu-B); + color=(RdYlBu-D); + color=(RdYlBu-F); + color=(RdYlBu-G); + color=(RdYlBu-I); + color=(RdYlBu-J); + color=(RdYlBu-L); + color=(RdYlBu-N); + color=(RdYlBu-O); + }, + cycle list/.define={RdYlBu-10}{[of colormap=RdYlBu-10]}, + }, + /pgfplots/cycle list/RdYlBu-10/.style={/pgfplots/@@brewer set cycle list={RdYlBu-10}}, + % + /pgfplots/colormap/RdYlBu-11/.style={ + colormap={RdYlBu-11}{ + color=(RdYlBu-A); + color=(RdYlBu-B); + color=(RdYlBu-D); + color=(RdYlBu-F); + color=(RdYlBu-G); + color=(RdYlBu-H); + color=(RdYlBu-I); + color=(RdYlBu-J); + color=(RdYlBu-L); + color=(RdYlBu-N); + color=(RdYlBu-O); + }, + cycle list/.define={RdYlBu-11}{[of colormap=RdYlBu-11]}, + }, + /pgfplots/cycle list/RdYlBu-11/.style={/pgfplots/@@brewer set cycle list={RdYlBu-11}}, + % + /pgfplots/colormap/Spectral-3/.style={ + colormap={Spectral-3}{ + color=(Spectral-E); + color=(Spectral-H); + color=(Spectral-K); + }, + cycle list/.define={Spectral-3}{[of colormap=Spectral-3]}, + }, + /pgfplots/cycle list/Spectral-3/.style={/pgfplots/@@brewer set cycle list={Spectral-3}}, + % + /pgfplots/colormap/Spectral-4/.style={ + colormap={Spectral-4}{ + color=(Spectral-C); + color=(Spectral-F); + color=(Spectral-J); + color=(Spectral-M); + }, + cycle list/.define={Spectral-4}{[of colormap=Spectral-4]}, + }, + /pgfplots/cycle list/Spectral-4/.style={/pgfplots/@@brewer set cycle list={Spectral-4}}, + % + /pgfplots/colormap/Spectral-5/.style={ + colormap={Spectral-5}{ + color=(Spectral-C); + color=(Spectral-F); + color=(Spectral-H); + color=(Spectral-J); + color=(Spectral-M); + }, + cycle list/.define={Spectral-5}{[of colormap=Spectral-5]}, + }, + /pgfplots/cycle list/Spectral-5/.style={/pgfplots/@@brewer set cycle list={Spectral-5}}, + % + /pgfplots/colormap/Spectral-6/.style={ + colormap={Spectral-6}{ + color=(Spectral-B); + color=(Spectral-E); + color=(Spectral-G); + color=(Spectral-I); + color=(Spectral-K); + color=(Spectral-N); + }, + cycle list/.define={Spectral-6}{[of colormap=Spectral-6]}, + }, + /pgfplots/cycle list/Spectral-6/.style={/pgfplots/@@brewer set cycle list={Spectral-6}}, + % + /pgfplots/colormap/Spectral-7/.style={ + colormap={Spectral-7}{ + color=(Spectral-B); + color=(Spectral-E); + color=(Spectral-G); + color=(Spectral-H); + color=(Spectral-I); + color=(Spectral-K); + color=(Spectral-N); + }, + cycle list/.define={Spectral-7}{[of colormap=Spectral-7]}, + }, + /pgfplots/cycle list/Spectral-7/.style={/pgfplots/@@brewer set cycle list={Spectral-7}}, + % + /pgfplots/colormap/Spectral-8/.style={ + colormap={Spectral-8}{ + color=(Spectral-B); + color=(Spectral-D); + color=(Spectral-F); + color=(Spectral-G); + color=(Spectral-I); + color=(Spectral-J); + color=(Spectral-L); + color=(Spectral-N); + }, + cycle list/.define={Spectral-8}{[of colormap=Spectral-8]}, + }, + /pgfplots/cycle list/Spectral-8/.style={/pgfplots/@@brewer set cycle list={Spectral-8}}, + % + /pgfplots/colormap/Spectral-9/.style={ + colormap={Spectral-9}{ + color=(Spectral-B); + color=(Spectral-D); + color=(Spectral-F); + color=(Spectral-G); + color=(Spectral-H); + color=(Spectral-I); + color=(Spectral-J); + color=(Spectral-L); + color=(Spectral-N); + }, + cycle list/.define={Spectral-9}{[of colormap=Spectral-9]}, + }, + /pgfplots/cycle list/Spectral-9/.style={/pgfplots/@@brewer set cycle list={Spectral-9}}, + % + /pgfplots/colormap/Spectral-10/.style={ + colormap={Spectral-10}{ + color=(Spectral-A); + color=(Spectral-B); + color=(Spectral-D); + color=(Spectral-F); + color=(Spectral-G); + color=(Spectral-I); + color=(Spectral-J); + color=(Spectral-L); + color=(Spectral-N); + color=(Spectral-O); + }, + cycle list/.define={Spectral-10}{[of colormap=Spectral-10]}, + }, + /pgfplots/cycle list/Spectral-10/.style={/pgfplots/@@brewer set cycle list={Spectral-10}}, + % + /pgfplots/colormap/Spectral-11/.style={ + colormap={Spectral-11}{ + color=(Spectral-A); + color=(Spectral-B); + color=(Spectral-D); + color=(Spectral-F); + color=(Spectral-G); + color=(Spectral-H); + color=(Spectral-I); + color=(Spectral-J); + color=(Spectral-L); + color=(Spectral-N); + color=(Spectral-O); + }, + cycle list/.define={Spectral-11}{[of colormap=Spectral-11]}, + }, + /pgfplots/cycle list/Spectral-11/.style={/pgfplots/@@brewer set cycle list={Spectral-11}}, + % + /pgfplots/colormap/RdYlGn-3/.style={ + colormap={RdYlGn-3}{ + color=(RdYlGn-E); + color=(RdYlGn-H); + color=(RdYlGn-K); + }, + cycle list/.define={RdYlGn-3}{[of colormap=RdYlGn-3]}, + }, + /pgfplots/cycle list/RdYlGn-3/.style={/pgfplots/@@brewer set cycle list={RdYlGn-3}}, + % + /pgfplots/colormap/RdYlGn-4/.style={ + colormap={RdYlGn-4}{ + color=(RdYlGn-C); + color=(RdYlGn-F); + color=(RdYlGn-J); + color=(RdYlGn-M); + }, + cycle list/.define={RdYlGn-4}{[of colormap=RdYlGn-4]}, + }, + /pgfplots/cycle list/RdYlGn-4/.style={/pgfplots/@@brewer set cycle list={RdYlGn-4}}, + % + /pgfplots/colormap/RdYlGn-5/.style={ + colormap={RdYlGn-5}{ + color=(RdYlGn-C); + color=(RdYlGn-F); + color=(RdYlGn-H); + color=(RdYlGn-J); + color=(RdYlGn-M); + }, + cycle list/.define={RdYlGn-5}{[of colormap=RdYlGn-5]}, + }, + /pgfplots/cycle list/RdYlGn-5/.style={/pgfplots/@@brewer set cycle list={RdYlGn-5}}, + % + /pgfplots/colormap/RdYlGn-6/.style={ + colormap={RdYlGn-6}{ + color=(RdYlGn-B); + color=(RdYlGn-E); + color=(RdYlGn-G); + color=(RdYlGn-I); + color=(RdYlGn-K); + color=(RdYlGn-N); + }, + cycle list/.define={RdYlGn-6}{[of colormap=RdYlGn-6]}, + }, + /pgfplots/cycle list/RdYlGn-6/.style={/pgfplots/@@brewer set cycle list={RdYlGn-6}}, + % + /pgfplots/colormap/RdYlGn-7/.style={ + colormap={RdYlGn-7}{ + color=(RdYlGn-B); + color=(RdYlGn-E); + color=(RdYlGn-G); + color=(RdYlGn-H); + color=(RdYlGn-I); + color=(RdYlGn-K); + color=(RdYlGn-N); + }, + cycle list/.define={RdYlGn-7}{[of colormap=RdYlGn-7]}, + }, + /pgfplots/cycle list/RdYlGn-7/.style={/pgfplots/@@brewer set cycle list={RdYlGn-7}}, + % + /pgfplots/colormap/RdYlGn-8/.style={ + colormap={RdYlGn-8}{ + color=(RdYlGn-B); + color=(RdYlGn-D); + color=(RdYlGn-F); + color=(RdYlGn-G); + color=(RdYlGn-I); + color=(RdYlGn-J); + color=(RdYlGn-L); + color=(RdYlGn-N); + }, + cycle list/.define={RdYlGn-8}{[of colormap=RdYlGn-8]}, + }, + /pgfplots/cycle list/RdYlGn-8/.style={/pgfplots/@@brewer set cycle list={RdYlGn-8}}, + % + /pgfplots/colormap/RdYlGn-9/.style={ + colormap={RdYlGn-9}{ + color=(RdYlGn-B); + color=(RdYlGn-D); + color=(RdYlGn-F); + color=(RdYlGn-G); + color=(RdYlGn-H); + color=(RdYlGn-I); + color=(RdYlGn-J); + color=(RdYlGn-L); + color=(RdYlGn-N); + }, + cycle list/.define={RdYlGn-9}{[of colormap=RdYlGn-9]}, + }, + /pgfplots/cycle list/RdYlGn-9/.style={/pgfplots/@@brewer set cycle list={RdYlGn-9}}, + % + /pgfplots/colormap/RdYlGn-10/.style={ + colormap={RdYlGn-10}{ + color=(RdYlGn-A); + color=(RdYlGn-B); + color=(RdYlGn-D); + color=(RdYlGn-F); + color=(RdYlGn-G); + color=(RdYlGn-I); + color=(RdYlGn-J); + color=(RdYlGn-L); + color=(RdYlGn-N); + color=(RdYlGn-O); + }, + cycle list/.define={RdYlGn-10}{[of colormap=RdYlGn-10]}, + }, + /pgfplots/cycle list/RdYlGn-10/.style={/pgfplots/@@brewer set cycle list={RdYlGn-10}}, + % + /pgfplots/colormap/RdYlGn-11/.style={ + colormap={RdYlGn-11}{ + color=(RdYlGn-A); + color=(RdYlGn-B); + color=(RdYlGn-D); + color=(RdYlGn-F); + color=(RdYlGn-G); + color=(RdYlGn-H); + color=(RdYlGn-I); + color=(RdYlGn-J); + color=(RdYlGn-L); + color=(RdYlGn-N); + color=(RdYlGn-O); + }, + cycle list/.define={RdYlGn-11}{[of colormap=RdYlGn-11]}, + }, + /pgfplots/cycle list/RdYlGn-11/.style={/pgfplots/@@brewer set cycle list={RdYlGn-11}}, + % + % =========================================================================== + /pgfplots/colormap/Set3-3/.style={ + colormap={Set3-3}{ + color=(Set3-A); + color=(Set3-B); + color=(Set3-C); + }, + cycle list/.define={Set3-3}{[of colormap=Set3-3]}, + }, + /pgfplots/cycle list/Set3-3/.style={/pgfplots/@@brewer set cycle list={Set3-3}}, + % + /pgfplots/colormap/Set3-4/.style={ + colormap={Set3-4}{ + color=(Set3-A); + color=(Set3-B); + color=(Set3-C); + color=(Set3-D); + }, + cycle list/.define={Set3-4}{[of colormap=Set3-4]}, + }, + /pgfplots/cycle list/Set3-4/.style={/pgfplots/@@brewer set cycle list={Set3-4}}, + % + /pgfplots/colormap/Set3-5/.style={ + colormap={Set3-5}{ + color=(Set3-A); + color=(Set3-B); + color=(Set3-C); + color=(Set3-D); + color=(Set3-E); + }, + cycle list/.define={Set3-5}{[of colormap=Set3-5]}, + }, + /pgfplots/cycle list/Set3-5/.style={/pgfplots/@@brewer set cycle list={Set3-5}}, + % + /pgfplots/colormap/Set3-6/.style={ + colormap={Set3-6}{ + color=(Set3-A); + color=(Set3-B); + color=(Set3-C); + color=(Set3-D); + color=(Set3-E); + color=(Set3-F); + }, + cycle list/.define={Set3-6}{[of colormap=Set3-6]}, + }, + /pgfplots/cycle list/Set3-6/.style={/pgfplots/@@brewer set cycle list={Set3-6}}, + % + /pgfplots/colormap/Set3-7/.style={ + colormap={Set3-7}{ + color=(Set3-A); + color=(Set3-B); + color=(Set3-C); + color=(Set3-D); + color=(Set3-E); + color=(Set3-F); + color=(Set3-G); + }, + cycle list/.define={Set3-7}{[of colormap=Set3-7]}, + }, + /pgfplots/cycle list/Set3-7/.style={/pgfplots/@@brewer set cycle list={Set3-7}}, + % + /pgfplots/colormap/Set3-8/.style={ + colormap={Set3-8}{ + color=(Set3-A); + color=(Set3-B); + color=(Set3-C); + color=(Set3-D); + color=(Set3-E); + color=(Set3-F); + color=(Set3-G); + color=(Set3-H); + }, + cycle list/.define={Set3-8}{[of colormap=Set3-8]}, + }, + /pgfplots/cycle list/Set3-8/.style={/pgfplots/@@brewer set cycle list={Set3-8}}, + % + /pgfplots/colormap/Set3-9/.style={ + colormap={Set3-9}{ + color=(Set3-A); + color=(Set3-B); + color=(Set3-C); + color=(Set3-D); + color=(Set3-E); + color=(Set3-F); + color=(Set3-G); + color=(Set3-H); + color=(Set3-I); + }, + cycle list/.define={Set3-9}{[of colormap=Set3-9]}, + }, + /pgfplots/cycle list/Set3-9/.style={/pgfplots/@@brewer set cycle list={Set3-9}}, + % + /pgfplots/colormap/Set3-10/.style={ + colormap={Set3-10}{ + color=(Set3-A); + color=(Set3-B); + color=(Set3-C); + color=(Set3-D); + color=(Set3-E); + color=(Set3-F); + color=(Set3-G); + color=(Set3-H); + color=(Set3-I); + color=(Set3-J); + }, + cycle list/.define={Set3-10}{[of colormap=Set3-10]}, + }, + /pgfplots/cycle list/Set3-10/.style={/pgfplots/@@brewer set cycle list={Set3-10}}, + % + /pgfplots/colormap/Set3-11/.style={ + colormap={Set3-11}{ + color=(Set3-A); + color=(Set3-B); + color=(Set3-C); + color=(Set3-D); + color=(Set3-E); + color=(Set3-F); + color=(Set3-G); + color=(Set3-H); + color=(Set3-I); + color=(Set3-J); + color=(Set3-K); + }, + cycle list/.define={Set3-11}{[of colormap=Set3-11]}, + }, + /pgfplots/cycle list/Set3-11/.style={/pgfplots/@@brewer set cycle list={Set3-11}}, + % + /pgfplots/colormap/Set3-12/.style={ + colormap={Set3-12}{ + color=(Set3-A); + color=(Set3-B); + color=(Set3-C); + color=(Set3-D); + color=(Set3-E); + color=(Set3-F); + color=(Set3-G); + color=(Set3-H); + color=(Set3-I); + color=(Set3-J); + color=(Set3-K); + color=(Set3-L); + }, + cycle list/.define={Set3-12}{[of colormap=Set3-12]}, + }, + /pgfplots/cycle list/Set3-12/.style={/pgfplots/@@brewer set cycle list={Set3-12}}, + % + /pgfplots/colormap/Pastel1-3/.style={ + colormap={Pastel1-3}{ + color=(Pastel1-A); + color=(Pastel1-B); + color=(Pastel1-C); + }, + cycle list/.define={Pastel1-3}{[of colormap=Pastel1-3]}, + }, + /pgfplots/cycle list/Pastel1-3/.style={/pgfplots/@@brewer set cycle list={Pastel1-3}}, + % + /pgfplots/colormap/Pastel1-4/.style={ + colormap={Pastel1-4}{ + color=(Pastel1-A); + color=(Pastel1-B); + color=(Pastel1-C); + color=(Pastel1-D); + }, + cycle list/.define={Pastel1-4}{[of colormap=Pastel1-4]}, + }, + /pgfplots/cycle list/Pastel1-4/.style={/pgfplots/@@brewer set cycle list={Pastel1-4}}, + % + /pgfplots/colormap/Pastel1-5/.style={ + colormap={Pastel1-5}{ + color=(Pastel1-A); + color=(Pastel1-B); + color=(Pastel1-C); + color=(Pastel1-D); + color=(Pastel1-E); + }, + cycle list/.define={Pastel1-5}{[of colormap=Pastel1-5]}, + }, + /pgfplots/cycle list/Pastel1-5/.style={/pgfplots/@@brewer set cycle list={Pastel1-5}}, + % + /pgfplots/colormap/Pastel1-6/.style={ + colormap={Pastel1-6}{ + color=(Pastel1-A); + color=(Pastel1-B); + color=(Pastel1-C); + color=(Pastel1-D); + color=(Pastel1-E); + color=(Pastel1-F); + }, + cycle list/.define={Pastel1-6}{[of colormap=Pastel1-6]}, + }, + /pgfplots/cycle list/Pastel1-6/.style={/pgfplots/@@brewer set cycle list={Pastel1-6}}, + % + /pgfplots/colormap/Pastel1-7/.style={ + colormap={Pastel1-7}{ + color=(Pastel1-A); + color=(Pastel1-B); + color=(Pastel1-C); + color=(Pastel1-D); + color=(Pastel1-E); + color=(Pastel1-F); + color=(Pastel1-G); + }, + cycle list/.define={Pastel1-7}{[of colormap=Pastel1-7]}, + }, + /pgfplots/cycle list/Pastel1-7/.style={/pgfplots/@@brewer set cycle list={Pastel1-7}}, + % + /pgfplots/colormap/Pastel1-8/.style={ + colormap={Pastel1-8}{ + color=(Pastel1-A); + color=(Pastel1-B); + color=(Pastel1-C); + color=(Pastel1-D); + color=(Pastel1-E); + color=(Pastel1-F); + color=(Pastel1-G); + color=(Pastel1-H); + }, + cycle list/.define={Pastel1-8}{[of colormap=Pastel1-8]}, + }, + /pgfplots/cycle list/Pastel1-8/.style={/pgfplots/@@brewer set cycle list={Pastel1-8}}, + % + /pgfplots/colormap/Pastel1-9/.style={ + colormap={Pastel1-9}{ + color=(Pastel1-A); + color=(Pastel1-B); + color=(Pastel1-C); + color=(Pastel1-D); + color=(Pastel1-E); + color=(Pastel1-F); + color=(Pastel1-G); + color=(Pastel1-H); + color=(Pastel1-I); + }, + cycle list/.define={Pastel1-9}{[of colormap=Pastel1-9]}, + }, + /pgfplots/cycle list/Pastel1-9/.style={/pgfplots/@@brewer set cycle list={Pastel1-9}}, + % + /pgfplots/colormap/Set1-3/.style={ + colormap={Set1-3}{ + color=(Set1-A); + color=(Set1-B); + color=(Set1-C); + }, + cycle list/.define={Set1-3}{[of colormap=Set1-3]}, + }, + /pgfplots/cycle list/Set1-3/.style={/pgfplots/@@brewer set cycle list={Set1-3}}, + % + /pgfplots/colormap/Set1-4/.style={ + colormap={Set1-4}{ + color=(Set1-A); + color=(Set1-B); + color=(Set1-C); + color=(Set1-D); + }, + cycle list/.define={Set1-4}{[of colormap=Set1-4]}, + }, + /pgfplots/cycle list/Set1-4/.style={/pgfplots/@@brewer set cycle list={Set1-4}}, + % + /pgfplots/colormap/Set1-5/.style={ + colormap={Set1-5}{ + color=(Set1-A); + color=(Set1-B); + color=(Set1-C); + color=(Set1-D); + color=(Set1-E); + }, + cycle list/.define={Set1-5}{[of colormap=Set1-5]}, + }, + /pgfplots/cycle list/Set1-5/.style={/pgfplots/@@brewer set cycle list={Set1-5}}, + % + /pgfplots/colormap/Set1-6/.style={ + colormap={Set1-6}{ + color=(Set1-A); + color=(Set1-B); + color=(Set1-C); + color=(Set1-D); + color=(Set1-E); + color=(Set1-F); + }, + cycle list/.define={Set1-6}{[of colormap=Set1-6]}, + }, + /pgfplots/cycle list/Set1-6/.style={/pgfplots/@@brewer set cycle list={Set1-6}}, + % + /pgfplots/colormap/Set1-7/.style={ + colormap={Set1-7}{ + color=(Set1-A); + color=(Set1-B); + color=(Set1-C); + color=(Set1-D); + color=(Set1-E); + color=(Set1-F); + color=(Set1-G); + }, + cycle list/.define={Set1-7}{[of colormap=Set1-7]}, + }, + /pgfplots/cycle list/Set1-7/.style={/pgfplots/@@brewer set cycle list={Set1-7}}, + % + /pgfplots/colormap/Set1-8/.style={ + colormap={Set1-8}{ + color=(Set1-A); + color=(Set1-B); + color=(Set1-C); + color=(Set1-D); + color=(Set1-E); + color=(Set1-F); + color=(Set1-G); + color=(Set1-H); + }, + cycle list/.define={Set1-8}{[of colormap=Set1-8]}, + }, + /pgfplots/cycle list/Set1-8/.style={/pgfplots/@@brewer set cycle list={Set1-8}}, + % + /pgfplots/colormap/Set1-9/.style={ + colormap={Set1-9}{ + color=(Set1-A); + color=(Set1-B); + color=(Set1-C); + color=(Set1-D); + color=(Set1-E); + color=(Set1-F); + color=(Set1-G); + color=(Set1-H); + color=(Set1-I); + }, + cycle list/.define={Set1-9}{[of colormap=Set1-9]}, + }, + /pgfplots/cycle list/Set1-9/.style={/pgfplots/@@brewer set cycle list={Set1-9}}, + % + /pgfplots/colormap/Pastel2-3/.style={ + colormap={Pastel2-3}{ + color=(Pastel2-A); + color=(Pastel2-B); + color=(Pastel2-C); + }, + cycle list/.define={Pastel2-3}{[of colormap=Pastel2-3]}, + }, + /pgfplots/cycle list/Pastel2-3/.style={/pgfplots/@@brewer set cycle list={Pastel2-3}}, + % + /pgfplots/colormap/Pastel2-4/.style={ + colormap={Pastel2-4}{ + color=(Pastel2-A); + color=(Pastel2-B); + color=(Pastel2-C); + color=(Pastel2-D); + }, + cycle list/.define={Pastel2-4}{[of colormap=Pastel2-4]}, + }, + /pgfplots/cycle list/Pastel2-4/.style={/pgfplots/@@brewer set cycle list={Pastel2-4}}, + % + /pgfplots/colormap/Pastel2-5/.style={ + colormap={Pastel2-5}{ + color=(Pastel2-A); + color=(Pastel2-B); + color=(Pastel2-C); + color=(Pastel2-D); + color=(Pastel2-E); + }, + cycle list/.define={Pastel2-5}{[of colormap=Pastel2-5]}, + }, + /pgfplots/cycle list/Pastel2-5/.style={/pgfplots/@@brewer set cycle list={Pastel2-5}}, + % + /pgfplots/colormap/Pastel2-6/.style={ + colormap={Pastel2-6}{ + color=(Pastel2-A); + color=(Pastel2-B); + color=(Pastel2-C); + color=(Pastel2-D); + color=(Pastel2-E); + color=(Pastel2-F); + }, + cycle list/.define={Pastel2-6}{[of colormap=Pastel2-6]}, + }, + /pgfplots/cycle list/Pastel2-6/.style={/pgfplots/@@brewer set cycle list={Pastel2-6}}, + % + /pgfplots/colormap/Pastel2-7/.style={ + colormap={Pastel2-7}{ + color=(Pastel2-A); + color=(Pastel2-B); + color=(Pastel2-C); + color=(Pastel2-D); + color=(Pastel2-E); + color=(Pastel2-F); + color=(Pastel2-G); + }, + cycle list/.define={Pastel2-7}{[of colormap=Pastel2-7]}, + }, + /pgfplots/cycle list/Pastel2-7/.style={/pgfplots/@@brewer set cycle list={Pastel2-7}}, + % + /pgfplots/colormap/Pastel2-8/.style={ + colormap={Pastel2-8}{ + color=(Pastel2-A); + color=(Pastel2-B); + color=(Pastel2-C); + color=(Pastel2-D); + color=(Pastel2-E); + color=(Pastel2-F); + color=(Pastel2-G); + color=(Pastel2-H); + }, + cycle list/.define={Pastel2-8}{[of colormap=Pastel2-8]}, + }, + /pgfplots/cycle list/Pastel2-8/.style={/pgfplots/@@brewer set cycle list={Pastel2-8}}, + % + /pgfplots/colormap/Set2-3/.style={ + colormap={Set2-3}{ + color=(Set2-A); + color=(Set2-B); + color=(Set2-C); + }, + cycle list/.define={Set2-3}{[of colormap=Set2-3]}, + }, + /pgfplots/cycle list/Set2-3/.style={/pgfplots/@@brewer set cycle list={Set2-3}}, + % + /pgfplots/colormap/Set2-4/.style={ + colormap={Set2-4}{ + color=(Set2-A); + color=(Set2-B); + color=(Set2-C); + color=(Set2-D); + }, + cycle list/.define={Set2-4}{[of colormap=Set2-4]}, + }, + /pgfplots/cycle list/Set2-4/.style={/pgfplots/@@brewer set cycle list={Set2-4}}, + % + /pgfplots/colormap/Set2-5/.style={ + colormap={Set2-5}{ + color=(Set2-A); + color=(Set2-B); + color=(Set2-C); + color=(Set2-D); + color=(Set2-E); + }, + cycle list/.define={Set2-5}{[of colormap=Set2-5]}, + }, + /pgfplots/cycle list/Set2-5/.style={/pgfplots/@@brewer set cycle list={Set2-5}}, + % + /pgfplots/colormap/Set2-6/.style={ + colormap={Set2-6}{ + color=(Set2-A); + color=(Set2-B); + color=(Set2-C); + color=(Set2-D); + color=(Set2-E); + color=(Set2-F); + }, + cycle list/.define={Set2-6}{[of colormap=Set2-6]}, + }, + /pgfplots/cycle list/Set2-6/.style={/pgfplots/@@brewer set cycle list={Set2-6}}, + % + /pgfplots/colormap/Set2-7/.style={ + colormap={Set2-7}{ + color=(Set2-A); + color=(Set2-B); + color=(Set2-C); + color=(Set2-D); + color=(Set2-E); + color=(Set2-F); + color=(Set2-G); + }, + cycle list/.define={Set2-7}{[of colormap=Set2-7]}, + }, + /pgfplots/cycle list/Set2-7/.style={/pgfplots/@@brewer set cycle list={Set2-7}}, + % + /pgfplots/colormap/Set2-8/.style={ + colormap={Set2-8}{ + color=(Set2-A); + color=(Set2-B); + color=(Set2-C); + color=(Set2-D); + color=(Set2-E); + color=(Set2-F); + color=(Set2-G); + color=(Set2-H); + }, + cycle list/.define={Set2-8}{[of colormap=Set2-8]}, + }, + /pgfplots/cycle list/Set2-8/.style={/pgfplots/@@brewer set cycle list={Set2-8}}, + % + /pgfplots/colormap/Dark2-3/.style={ + colormap={Dark2-3}{ + color=(Dark2-A); + color=(Dark2-B); + color=(Dark2-C); + }, + cycle list/.define={Dark2-3}{[of colormap=Dark2-3]}, + }, + /pgfplots/cycle list/Dark2-3/.style={/pgfplots/@@brewer set cycle list={Dark2-3}}, + % + /pgfplots/colormap/Dark2-4/.style={ + colormap={Dark2-4}{ + color=(Dark2-A); + color=(Dark2-B); + color=(Dark2-C); + color=(Dark2-D); + }, + cycle list/.define={Dark2-4}{[of colormap=Dark2-4]}, + }, + /pgfplots/cycle list/Dark2-4/.style={/pgfplots/@@brewer set cycle list={Dark2-4}}, + % + /pgfplots/colormap/Dark2-5/.style={ + colormap={Dark2-5}{ + color=(Dark2-A); + color=(Dark2-B); + color=(Dark2-C); + color=(Dark2-D); + color=(Dark2-E); + }, + cycle list/.define={Dark2-5}{[of colormap=Dark2-5]}, + }, + /pgfplots/cycle list/Dark2-5/.style={/pgfplots/@@brewer set cycle list={Dark2-5}}, + % + /pgfplots/colormap/Dark2-6/.style={ + colormap={Dark2-6}{ + color=(Dark2-A); + color=(Dark2-B); + color=(Dark2-C); + color=(Dark2-D); + color=(Dark2-E); + color=(Dark2-F); + }, + cycle list/.define={Dark2-6}{[of colormap=Dark2-6]}, + }, + /pgfplots/cycle list/Dark2-6/.style={/pgfplots/@@brewer set cycle list={Dark2-6}}, + % + /pgfplots/colormap/Dark2-7/.style={ + colormap={Dark2-7}{ + color=(Dark2-A); + color=(Dark2-B); + color=(Dark2-C); + color=(Dark2-D); + color=(Dark2-E); + color=(Dark2-F); + color=(Dark2-G); + }, + cycle list/.define={Dark2-7}{[of colormap=Dark2-7]}, + }, + /pgfplots/cycle list/Dark2-7/.style={/pgfplots/@@brewer set cycle list={Dark2-7}}, + % + /pgfplots/colormap/Dark2-8/.style={ + colormap={Dark2-8}{ + color=(Dark2-A); + color=(Dark2-B); + color=(Dark2-C); + color=(Dark2-D); + color=(Dark2-E); + color=(Dark2-F); + color=(Dark2-G); + color=(Dark2-H); + }, + cycle list/.define={Dark2-8}{[of colormap=Dark2-8]}, + }, + /pgfplots/cycle list/Dark2-8/.style={/pgfplots/@@brewer set cycle list={Dark2-8}}, + % + /pgfplots/colormap/Paired-3/.style={ + colormap={Paired-3}{ + color=(Paired-A); + color=(Paired-B); + color=(Paired-C); + }, + cycle list/.define={Paired-3}{[of colormap=Paired-3]}, + }, + /pgfplots/cycle list/Paired-3/.style={/pgfplots/@@brewer set cycle list={Paired-3}}, + % + /pgfplots/colormap/Paired-4/.style={ + colormap={Paired-4}{ + color=(Paired-A); + color=(Paired-B); + color=(Paired-C); + color=(Paired-D); + }, + cycle list/.define={Paired-4}{[of colormap=Paired-4]}, + }, + /pgfplots/cycle list/Paired-4/.style={/pgfplots/@@brewer set cycle list={Paired-4}}, + % + /pgfplots/colormap/Paired-5/.style={ + colormap={Paired-5}{ + color=(Paired-A); + color=(Paired-B); + color=(Paired-C); + color=(Paired-D); + color=(Paired-E); + }, + cycle list/.define={Paired-5}{[of colormap=Paired-5]}, + }, + /pgfplots/cycle list/Paired-5/.style={/pgfplots/@@brewer set cycle list={Paired-5}}, + % + /pgfplots/colormap/Paired-6/.style={ + colormap={Paired-6}{ + color=(Paired-A); + color=(Paired-B); + color=(Paired-C); + color=(Paired-D); + color=(Paired-E); + color=(Paired-F); + }, + cycle list/.define={Paired-6}{[of colormap=Paired-6]}, + }, + /pgfplots/cycle list/Paired-6/.style={/pgfplots/@@brewer set cycle list={Paired-6}}, + % + /pgfplots/colormap/Paired-7/.style={ + colormap={Paired-7}{ + color=(Paired-A); + color=(Paired-B); + color=(Paired-C); + color=(Paired-D); + color=(Paired-E); + color=(Paired-F); + color=(Paired-G); + }, + cycle list/.define={Paired-7}{[of colormap=Paired-7]}, + }, + /pgfplots/cycle list/Paired-7/.style={/pgfplots/@@brewer set cycle list={Paired-7}}, + % + /pgfplots/colormap/Paired-8/.style={ + colormap={Paired-8}{ + color=(Paired-A); + color=(Paired-B); + color=(Paired-C); + color=(Paired-D); + color=(Paired-E); + color=(Paired-F); + color=(Paired-G); + color=(Paired-H); + }, + cycle list/.define={Paired-8}{[of colormap=Paired-8]}, + }, + /pgfplots/cycle list/Paired-8/.style={/pgfplots/@@brewer set cycle list={Paired-8}}, + % + /pgfplots/colormap/Paired-9/.style={ + colormap={Paired-9}{ + color=(Paired-A); + color=(Paired-B); + color=(Paired-C); + color=(Paired-D); + color=(Paired-E); + color=(Paired-F); + color=(Paired-G); + color=(Paired-H); + color=(Paired-I); + }, + cycle list/.define={Paired-9}{[of colormap=Paired-9]}, + }, + /pgfplots/cycle list/Paired-9/.style={/pgfplots/@@brewer set cycle list={Paired-9}}, + % + /pgfplots/colormap/Paired-10/.style={ + colormap={Paired-10}{ + color=(Paired-A); + color=(Paired-B); + color=(Paired-C); + color=(Paired-D); + color=(Paired-E); + color=(Paired-F); + color=(Paired-G); + color=(Paired-H); + color=(Paired-I); + color=(Paired-J); + }, + cycle list/.define={Paired-10}{[of colormap=Paired-10]}, + }, + /pgfplots/cycle list/Paired-10/.style={/pgfplots/@@brewer set cycle list={Paired-10}}, + % + /pgfplots/colormap/Paired-11/.style={ + colormap={Paired-11}{ + color=(Paired-A); + color=(Paired-B); + color=(Paired-C); + color=(Paired-D); + color=(Paired-E); + color=(Paired-F); + color=(Paired-G); + color=(Paired-H); + color=(Paired-I); + color=(Paired-J); + color=(Paired-K); + }, + cycle list/.define={Paired-11}{[of colormap=Paired-11]}, + }, + /pgfplots/cycle list/Paired-11/.style={/pgfplots/@@brewer set cycle list={Paired-11}}, + % + /pgfplots/colormap/Paired-12/.style={ + colormap={Paired-12}{ + color=(Paired-A); + color=(Paired-B); + color=(Paired-C); + color=(Paired-D); + color=(Paired-E); + color=(Paired-F); + color=(Paired-G); + color=(Paired-H); + color=(Paired-I); + color=(Paired-J); + color=(Paired-K); + color=(Paired-L); + }, + cycle list/.define={Paired-12}{[of colormap=Paired-12]}, + }, + /pgfplots/cycle list/Paired-12/.style={/pgfplots/@@brewer set cycle list={Paired-12}}, + % + /pgfplots/colormap/Accent-3/.style={ + colormap={Accent-3}{ + color=(Accent-A); + color=(Accent-B); + color=(Accent-C); + }, + cycle list/.define={Accent-3}{[of colormap=Accent-3]}, + }, + /pgfplots/cycle list/Accent-3/.style={/pgfplots/@@brewer set cycle list={Accent-3}}, + % + /pgfplots/colormap/Accent-4/.style={ + colormap={Accent-4}{ + color=(Accent-A); + color=(Accent-B); + color=(Accent-C); + color=(Accent-D); + }, + cycle list/.define={Accent-4}{[of colormap=Accent-4]}, + }, + /pgfplots/cycle list/Accent-4/.style={/pgfplots/@@brewer set cycle list={Accent-4}}, + % + /pgfplots/colormap/Accent-5/.style={ + colormap={Accent-5}{ + color=(Accent-A); + color=(Accent-B); + color=(Accent-C); + color=(Accent-D); + color=(Accent-E); + }, + cycle list/.define={Accent-5}{[of colormap=Accent-5]}, + }, + /pgfplots/cycle list/Accent-5/.style={/pgfplots/@@brewer set cycle list={Accent-5}}, + % + /pgfplots/colormap/Accent-6/.style={ + colormap={Accent-6}{ + color=(Accent-A); + color=(Accent-B); + color=(Accent-C); + color=(Accent-D); + color=(Accent-E); + color=(Accent-F); + }, + cycle list/.define={Accent-6}{[of colormap=Accent-6]}, + }, + /pgfplots/cycle list/Accent-6/.style={/pgfplots/@@brewer set cycle list={Accent-6}}, + % + /pgfplots/colormap/Accent-7/.style={ + colormap={Accent-7}{ + color=(Accent-A); + color=(Accent-B); + color=(Accent-C); + color=(Accent-D); + color=(Accent-E); + color=(Accent-F); + color=(Accent-G); + }, + cycle list/.define={Accent-7}{[of colormap=Accent-7]}, + }, + /pgfplots/cycle list/Accent-7/.style={/pgfplots/@@brewer set cycle list={Accent-7}}, + % + /pgfplots/colormap/Accent-8/.style={ + colormap={Accent-8}{ + color=(Accent-A); + color=(Accent-B); + color=(Accent-C); + color=(Accent-D); + color=(Accent-E); + color=(Accent-F); + color=(Accent-G); + color=(Accent-H); + }, + cycle list/.define={Accent-8}{[of colormap=Accent-8]}, + }, + /pgfplots/cycle list/Accent-8/.style={/pgfplots/@@brewer set cycle list={Accent-8}}, + % +} + +% define additional colormap styles for "continuous" colorbars +% (then one doesn't have to guess the maximum number of classes) +\pgfplotsset{ + /pgfplots/colormap/YlGn/.style={ + colormap={YlGn}{ + color=(YlGn-A); + color=(YlGn-C); + color=(YlGn-D); + color=(YlGn-F); + color=(YlGn-G); + color=(YlGn-H); + color=(YlGn-J); + color=(YlGn-K); + color=(YlGn-M); + }, + cycle list/.define={YlGn}{[of colormap=YlGn]}, + }, + /pgfplots/cycle list/YlGn/.style={/pgfplots/@@brewer set cycle list={YlGn}}, + % + /pgfplots/colormap/YlGnBu/.style={ + colormap={YlGnBu}{ + color=(YlGnBu-A); + color=(YlGnBu-C); + color=(YlGnBu-D); + color=(YlGnBu-F); + color=(YlGnBu-G); + color=(YlGnBu-H); + color=(YlGnBu-J); + color=(YlGnBu-K); + color=(YlGnBu-M); + }, + cycle list/.define={YlGnBu}{[of colormap=YlGnBu]}, + }, + /pgfplots/cycle list/YlGnBu/.style={/pgfplots/@@brewer set cycle list={YlGnBu}}, + % + /pgfplots/colormap/GnBu/.style={ + colormap={GnBu}{ + color=(GnBu-A); + color=(GnBu-C); + color=(GnBu-D); + color=(GnBu-F); + color=(GnBu-G); + color=(GnBu-H); + color=(GnBu-J); + color=(GnBu-K); + color=(GnBu-M); + }, + cycle list/.define={GnBu}{[of colormap=GnBu]}, + }, + /pgfplots/cycle list/GnBu/.style={/pgfplots/@@brewer set cycle list={GnBu}}, + % + /pgfplots/colormap/BuGn/.style={ + colormap={BuGn}{ + color=(BuGn-A); + color=(BuGn-C); + color=(BuGn-D); + color=(BuGn-F); + color=(BuGn-G); + color=(BuGn-H); + color=(BuGn-J); + color=(BuGn-K); + color=(BuGn-M); + }, + cycle list/.define={BuGn}{[of colormap=BuGn]}, + }, + /pgfplots/cycle list/BuGn/.style={/pgfplots/@@brewer set cycle list={BuGn}}, + % + /pgfplots/colormap/PuBuGn/.style={ + colormap={PuBuGn}{ + color=(PuBuGn-A); + color=(PuBuGn-C); + color=(PuBuGn-D); + color=(PuBuGn-F); + color=(PuBuGn-G); + color=(PuBuGn-H); + color=(PuBuGn-J); + color=(PuBuGn-K); + color=(PuBuGn-M); + }, + cycle list/.define={PuBuGn}{[of colormap=PuBuGn]}, + }, + /pgfplots/cycle list/PuBuGn/.style={/pgfplots/@@brewer set cycle list={PuBuGn}}, + % + /pgfplots/colormap/PuBu/.style={ + colormap={PuBu}{ + color=(PuBu-A); + color=(PuBu-C); + color=(PuBu-D); + color=(PuBu-F); + color=(PuBu-G); + color=(PuBu-H); + color=(PuBu-J); + color=(PuBu-K); + color=(PuBu-M); + }, + cycle list/.define={PuBu}{[of colormap=PuBu]}, + }, + /pgfplots/cycle list/PuBu/.style={/pgfplots/@@brewer set cycle list={PuBu}}, + % + /pgfplots/colormap/BuPu/.style={ + colormap={BuPu}{ + color=(BuPu-A); + color=(BuPu-C); + color=(BuPu-D); + color=(BuPu-F); + color=(BuPu-G); + color=(BuPu-H); + color=(BuPu-J); + color=(BuPu-K); + color=(BuPu-M); + }, + cycle list/.define={BuPu}{[of colormap=BuPu]}, + }, + /pgfplots/cycle list/BuPu/.style={/pgfplots/@@brewer set cycle list={BuPu}}, + % + /pgfplots/colormap/RdPu/.style={ + colormap={RdPu}{ + color=(RdPu-A); + color=(RdPu-C); + color=(RdPu-D); + color=(RdPu-F); + color=(RdPu-G); + color=(RdPu-H); + color=(RdPu-J); + color=(RdPu-K); + color=(RdPu-M); + }, + cycle list/.define={RdPu}{[of colormap=RdPu]}, + }, + /pgfplots/cycle list/RdPu/.style={/pgfplots/@@brewer set cycle list={RdPu}}, + % + /pgfplots/colormap/PuRd/.style={ + colormap={PuRd}{ + color=(PuRd-A); + color=(PuRd-C); + color=(PuRd-D); + color=(PuRd-F); + color=(PuRd-G); + color=(PuRd-H); + color=(PuRd-J); + color=(PuRd-K); + color=(PuRd-M); + }, + cycle list/.define={PuRd}{[of colormap=PuRd]}, + }, + /pgfplots/cycle list/PuRd/.style={/pgfplots/@@brewer set cycle list={PuRd}}, + % + /pgfplots/colormap/OrRd/.style={ + colormap={OrRd}{ + color=(OrRd-A); + color=(OrRd-C); + color=(OrRd-D); + color=(OrRd-F); + color=(OrRd-G); + color=(OrRd-H); + color=(OrRd-J); + color=(OrRd-K); + color=(OrRd-M); + }, + cycle list/.define={OrRd}{[of colormap=OrRd]}, + }, + /pgfplots/cycle list/OrRd/.style={/pgfplots/@@brewer set cycle list={OrRd}}, + % + /pgfplots/colormap/YlOrRd/.style={ + colormap={YlOrRd}{ + color=(YlOrRd-A); + color=(YlOrRd-C); + color=(YlOrRd-D); + color=(YlOrRd-F); + color=(YlOrRd-G); + color=(YlOrRd-H); + color=(YlOrRd-J); + color=(YlOrRd-K); + color=(YlOrRd-M); + }, + cycle list/.define={YlOrRd}{[of colormap=YlOrRd]}, + }, + /pgfplots/cycle list/YlOrRd/.style={/pgfplots/@@brewer set cycle list={YlOrRd}}, + % + /pgfplots/colormap/YlOrBr/.style={ + colormap={YlOrBr}{ + color=(YlOrBr-A); + color=(YlOrBr-C); + color=(YlOrBr-D); + color=(YlOrBr-F); + color=(YlOrBr-G); + color=(YlOrBr-H); + color=(YlOrBr-J); + color=(YlOrBr-K); + color=(YlOrBr-M); + }, + cycle list/.define={YlOrBr}{[of colormap=YlOrBr]}, + }, + /pgfplots/cycle list/YlOrBr/.style={/pgfplots/@@brewer set cycle list={YlOrBr}}, + % + /pgfplots/colormap/Purples/.style={ + colormap={Purples}{ + color=(Purples-A); + color=(Purples-C); + color=(Purples-D); + color=(Purples-F); + color=(Purples-G); + color=(Purples-H); + color=(Purples-J); + color=(Purples-K); + color=(Purples-M); + }, + cycle list/.define={Purples}{[of colormap=Purples]}, + }, + /pgfplots/cycle list/Purples/.style={/pgfplots/@@brewer set cycle list={Purples}}, + % + /pgfplots/colormap/Blues/.style={ + colormap={Blues}{ + color=(Blues-A); + color=(Blues-C); + color=(Blues-D); + color=(Blues-F); + color=(Blues-G); + color=(Blues-H); + color=(Blues-J); + color=(Blues-K); + color=(Blues-M); + }, + cycle list/.define={Blues}{[of colormap=Blues]}, + }, + /pgfplots/cycle list/Blues/.style={/pgfplots/@@brewer set cycle list={Blues}}, + % + /pgfplots/colormap/Greens/.style={ + colormap={Greens}{ + color=(Greens-A); + color=(Greens-C); + color=(Greens-D); + color=(Greens-F); + color=(Greens-G); + color=(Greens-H); + color=(Greens-J); + color=(Greens-K); + color=(Greens-M); + }, + cycle list/.define={Greens}{[of colormap=Greens]}, + }, + /pgfplots/cycle list/Greens/.style={/pgfplots/@@brewer set cycle list={Greens}}, + % + /pgfplots/colormap/Oranges/.style={ + colormap={Oranges}{ + color=(Oranges-A); + color=(Oranges-C); + color=(Oranges-D); + color=(Oranges-F); + color=(Oranges-G); + color=(Oranges-H); + color=(Oranges-J); + color=(Oranges-K); + color=(Oranges-M); + }, + cycle list/.define={Oranges}{[of colormap=Oranges]}, + }, + /pgfplots/cycle list/Oranges/.style={/pgfplots/@@brewer set cycle list={Oranges}}, + % + /pgfplots/colormap/Reds/.style={ + colormap={Reds}{ + color=(Reds-A); + color=(Reds-C); + color=(Reds-D); + color=(Reds-F); + color=(Reds-G); + color=(Reds-H); + color=(Reds-J); + color=(Reds-K); + color=(Reds-M); + }, + cycle list/.define={Reds}{[of colormap=Reds]}, + }, + /pgfplots/cycle list/Reds/.style={/pgfplots/@@brewer set cycle list={Reds}}, + % + /pgfplots/colormap/Greys/.style={ + colormap={Greys}{ + color=(Greys-A); + color=(Greys-C); + color=(Greys-D); + color=(Greys-F); + color=(Greys-G); + color=(Greys-H); + color=(Greys-J); + color=(Greys-K); + color=(Greys-M); + }, + cycle list/.define={Greys}{[of colormap=Greys]}, + }, + /pgfplots/cycle list/Greys/.style={/pgfplots/@@brewer set cycle list={Greys}}, + % + % =========================================================================== + /pgfplots/colormap/PuOr/.style={ + colormap={PuOr}{ + color=(PuOr-A); + color=(PuOr-B); + color=(PuOr-D); + color=(PuOr-F); + color=(PuOr-G); + color=(PuOr-H); + color=(PuOr-I); + color=(PuOr-J); + color=(PuOr-L); + color=(PuOr-N); + color=(PuOr-O); + }, + cycle list/.define={PuOr}{[of colormap=PuOr]}, + }, + /pgfplots/cycle list/PuOr/.style={/pgfplots/@@brewer set cycle list={PuOr}}, + % + /pgfplots/colormap/BrBG/.style={ + colormap={BrBG}{ + color=(BrBG-A); + color=(BrBG-B); + color=(BrBG-D); + color=(BrBG-F); + color=(BrBG-G); + color=(BrBG-H); + color=(BrBG-I); + color=(BrBG-J); + color=(BrBG-L); + color=(BrBG-N); + color=(BrBG-O); + }, + cycle list/.define={BrBG}{[of colormap=BrBG]}, + }, + /pgfplots/cycle list/BrBG/.style={/pgfplots/@@brewer set cycle list={BrBG}}, + % + /pgfplots/colormap/PRGn/.style={ + colormap={PRGn}{ + color=(PRGn-A); + color=(PRGn-B); + color=(PRGn-D); + color=(PRGn-F); + color=(PRGn-G); + color=(PRGn-H); + color=(PRGn-I); + color=(PRGn-J); + color=(PRGn-L); + color=(PRGn-N); + color=(PRGn-O); + }, + cycle list/.define={PRGn}{[of colormap=PRGn]}, + }, + /pgfplots/cycle list/PRGn/.style={/pgfplots/@@brewer set cycle list={PRGn}}, + % + /pgfplots/colormap/PiYG/.style={ + colormap={PiYG}{ + color=(PiYG-A); + color=(PiYG-B); + color=(PiYG-D); + color=(PiYG-F); + color=(PiYG-G); + color=(PiYG-H); + color=(PiYG-I); + color=(PiYG-J); + color=(PiYG-L); + color=(PiYG-N); + color=(PiYG-O); + }, + cycle list/.define={PiYG}{[of colormap=PiYG]}, + }, + /pgfplots/cycle list/PiYG/.style={/pgfplots/@@brewer set cycle list={PiYG}}, + % + /pgfplots/colormap/RdBu/.style={ + colormap={RdBu}{ + color=(RdBu-A); + color=(RdBu-B); + color=(RdBu-D); + color=(RdBu-F); + color=(RdBu-G); + color=(RdBu-H); + color=(RdBu-I); + color=(RdBu-J); + color=(RdBu-L); + color=(RdBu-N); + color=(RdBu-O); + }, + cycle list/.define={RdBu}{[of colormap=RdBu]}, + }, + /pgfplots/cycle list/RdBu/.style={/pgfplots/@@brewer set cycle list={RdBu}}, + % + /pgfplots/colormap/RdGy/.style={ + colormap={RdGy}{ + color=(RdGy-A); + color=(RdGy-B); + color=(RdGy-D); + color=(RdGy-F); + color=(RdGy-G); + color=(RdGy-H); + color=(RdGy-I); + color=(RdGy-J); + color=(RdGy-L); + color=(RdGy-N); + color=(RdGy-O); + }, + cycle list/.define={RdGy}{[of colormap=RdGy]}, + }, + /pgfplots/cycle list/RdGy/.style={/pgfplots/@@brewer set cycle list={RdGy}}, + % + /pgfplots/colormap/RdYlBu/.style={ + colormap={RdYlBu}{ + color=(RdYlBu-A); + color=(RdYlBu-B); + color=(RdYlBu-D); + color=(RdYlBu-F); + color=(RdYlBu-G); + color=(RdYlBu-H); + color=(RdYlBu-I); + color=(RdYlBu-J); + color=(RdYlBu-L); + color=(RdYlBu-N); + color=(RdYlBu-O); + }, + cycle list/.define={RdYlBu}{[of colormap=RdYlBu]}, + }, + /pgfplots/cycle list/RdYlBu/.style={/pgfplots/@@brewer set cycle list={RdYlBu}}, + % + /pgfplots/colormap/Spectral/.style={ + colormap={Spectral}{ + color=(Spectral-A); + color=(Spectral-B); + color=(Spectral-D); + color=(Spectral-F); + color=(Spectral-G); + color=(Spectral-H); + color=(Spectral-I); + color=(Spectral-J); + color=(Spectral-L); + color=(Spectral-N); + color=(Spectral-O); + }, + cycle list/.define={Spectral}{[of colormap=Spectral]}, + }, + /pgfplots/cycle list/Spectral/.style={/pgfplots/@@brewer set cycle list={Spectral}}, + % + /pgfplots/colormap/RdYlGn/.style={ + colormap={RdYlGn}{ + color=(RdYlGn-A); + color=(RdYlGn-B); + color=(RdYlGn-D); + color=(RdYlGn-F); + color=(RdYlGn-G); + color=(RdYlGn-H); + color=(RdYlGn-I); + color=(RdYlGn-J); + color=(RdYlGn-L); + color=(RdYlGn-N); + color=(RdYlGn-O); + }, + cycle list/.define={RdYlGn}{[of colormap=RdYlGn]}, + }, + /pgfplots/cycle list/RdYlGn/.style={/pgfplots/@@brewer set cycle list={RdYlGn}}, + % +} + +% define additional colormap styles for "qualitative" cycle lists +% (because colors are always the same on the same index and so one doesn't have +% to choose a number for the cycle lists) +\pgfplotsset{ + /pgfplots/colormap/Set3/.style={ + colormap={Set3}{ + color=(Set3-A); + color=(Set3-B); + color=(Set3-C); + color=(Set3-D); + color=(Set3-E); + color=(Set3-F); + color=(Set3-G); + color=(Set3-H); + color=(Set3-I); + color=(Set3-J); + color=(Set3-K); + color=(Set3-L); + }, + cycle list/.define={Set3}{[of colormap=Set3]}, + }, + /pgfplots/cycle list/Set3/.style={/pgfplots/@@brewer set cycle list={Set3}}, + % + /pgfplots/colormap/Pastel1/.style={ + colormap={Pastel1}{ + color=(Pastel1-A); + color=(Pastel1-B); + color=(Pastel1-C); + color=(Pastel1-D); + color=(Pastel1-E); + color=(Pastel1-F); + color=(Pastel1-G); + color=(Pastel1-H); + color=(Pastel1-I); + }, + cycle list/.define={Pastel1}{[of colormap=Pastel1]}, + }, + /pgfplots/cycle list/Pastel1/.style={/pgfplots/@@brewer set cycle list={Pastel1}}, + % + /pgfplots/colormap/Set1/.style={ + colormap={Set1}{ + color=(Set1-A); + color=(Set1-B); + color=(Set1-C); + color=(Set1-D); + color=(Set1-E); + color=(Set1-F); + color=(Set1-G); + color=(Set1-H); + color=(Set1-I); + }, + cycle list/.define={Set1}{[of colormap=Set1]}, + }, + /pgfplots/cycle list/Set1/.style={/pgfplots/@@brewer set cycle list={Set1}}, + % + /pgfplots/colormap/Pastel2/.style={ + colormap={Pastel2}{ + color=(Pastel2-A); + color=(Pastel2-B); + color=(Pastel2-C); + color=(Pastel2-D); + color=(Pastel2-E); + color=(Pastel2-F); + color=(Pastel2-G); + color=(Pastel2-H); + }, + cycle list/.define={Pastel2}{[of colormap=Pastel2]}, + }, + /pgfplots/cycle list/Pastel2/.style={/pgfplots/@@brewer set cycle list={Pastel2}}, + % + /pgfplots/colormap/Set2/.style={ + colormap={Set2}{ + color=(Set2-A); + color=(Set2-B); + color=(Set2-C); + color=(Set2-D); + color=(Set2-E); + color=(Set2-F); + color=(Set2-G); + color=(Set2-H); + }, + cycle list/.define={Set2}{[of colormap=Set2]}, + }, + /pgfplots/cycle list/Set2/.style={/pgfplots/@@brewer set cycle list={Set2}}, + % + /pgfplots/colormap/Dark2/.style={ + colormap={Dark2}{ + color=(Dark2-A); + color=(Dark2-B); + color=(Dark2-C); + color=(Dark2-D); + color=(Dark2-E); + color=(Dark2-F); + color=(Dark2-G); + color=(Dark2-H); + }, + cycle list/.define={Dark2}{[of colormap=Dark2]}, + }, + /pgfplots/cycle list/Dark2/.style={/pgfplots/@@brewer set cycle list={Dark2}}, + % + /pgfplots/colormap/Paired/.style={ + colormap={Paired}{ + color=(Paired-A); + color=(Paired-B); + color=(Paired-C); + color=(Paired-D); + color=(Paired-E); + color=(Paired-F); + color=(Paired-G); + color=(Paired-H); + color=(Paired-I); + color=(Paired-J); + color=(Paired-K); + color=(Paired-L); + }, + cycle list/.define={Paired}{[of colormap=Paired]}, + }, + /pgfplots/cycle list/Paired/.style={/pgfplots/@@brewer set cycle list={Paired}}, + % + /pgfplots/colormap/Accent/.style={ + colormap={Accent}{ + color=(Accent-A); + color=(Accent-B); + color=(Accent-C); + color=(Accent-D); + color=(Accent-E); + color=(Accent-F); + color=(Accent-G); + color=(Accent-H); + }, + cycle list/.define={Accent}{[of colormap=Accent]}, + }, + /pgfplots/cycle list/Accent/.style={/pgfplots/@@brewer set cycle list={Accent}}, + % +} + diff --git a/Master/texmf-dist/tex/generic/pgfplots/libs/pgflibrarypgfplots.surfshading.code.tex b/Master/texmf-dist/tex/generic/pgfplots/libs/pgflibrarypgfplots.surfshading.code.tex index e73f87a59d2..82fdfd68619 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/libs/pgflibrarypgfplots.surfshading.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/libs/pgflibrarypgfplots.surfshading.code.tex @@ -283,6 +283,13 @@ \pgfplotslibrarysurfstreamend@set@BB } +\def\pgfplotslibrarysurfdraw{% + \ifx\pgfplotslibrarysurf@binarystream\pgfutil@empty + \else + \pgfplotslibrarysurfdraw@sys + \fi +}% + \def\pgfplotslibrarysurfstreamend@set@BB{% \xdef\pgfplotslibrarysurf@corner@sw{% \global\pgf@x=\the\pgf@pathminx\space @@ -353,7 +360,7 @@ \edef\pgfplots@loc@TMPa{#1}% \def\pgfplotsretval{}% \expandafter\pgfplotslibrarysurf@encode@cdata@loop\pgfplots@loc@TMPa,,% - \let\pgfplotsbinaryresult=\pgfplotsretval + \global\let\pgfplotsbinaryresult=\pgfplotsretval \fi } @@ -623,7 +630,7 @@ \input pgflibrarypgfplots.surfshading.\pgfsysdriver\relax \def\pgflibrarysurfshadingifactive#1#2{#1}% }{% - \def\pgfplotslibrarysurfdraw{% + \def\pgfplotslibrarysurfdraw@sys{% \pgfplots@error{Sorry, surfshading (shader=interp) is NOT available for the selected driver `\pgfsysdriver'.}% }% \def\pgflibrarysurfshadingifactive#1#2{#2}% diff --git a/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarycolorbrewer.code.tex b/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarycolorbrewer.code.tex new file mode 100644 index 00000000000..f5bbcd543e0 --- /dev/null +++ b/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarycolorbrewer.code.tex @@ -0,0 +1,533 @@ +% Color schemes as obtained from http://colorbrewer2.org/ +% +% Apache-Style Software License for ColorBrewer software and ColorBrewer Color +% Schemes +% +% Copyright (c) 2002 Cynthia Brewer, Mark Harrower, and The Pennsylvania State +% University. +% +% Licensed under the Apache License, Version 2.0 (the "License"); you may not +% use this file except in compliance with the License. You may obtain a copy of +% the License at +% +% http://www.apache.org/licenses/LICENSE-2.0 +% +% Unless required by applicable law or agreed to in writing, software +% distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +% WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +% License for the specific language governing permissions and limitations under +% the License. +% +% Redistribution and use in source and binary forms, with or without +% modification, are permitted provided that the following conditions are met: +% 1. Redistributions as source code must retain the above copyright notice, this +% list of conditions and the following disclaimer. +% 2. The end-user documentation included with the redistribution, if any, must +% include the following acknowledgment: This product includes color +% specifications and designs developed by Cynthia Brewer +% (http://colorbrewer.org/). Alternately, this acknowledgment may appear in the +% software itself, if and wherever such third-party acknowledgments normally +% appear. +% 3. The name "ColorBrewer" must not be used to endorse or promote products +% derived from this software without prior written permission. For written +% permission, please contact Cynthia Brewer at cbrewer@psu.edu. +% 4. Products derived from this software may not be called "ColorBrewer", nor +% may "ColorBrewer" appear in their name, without prior written permission of +% Cynthia Brewer. + +% ============================================================================= +% sequential color schemes +% ============================================================================= + +% Multi hue + +\pgfutil@definecolor{BuGn-A}{RGB}{247,252,253} +\pgfutil@definecolor{BuGn-B}{RGB}{237,248,251} +\pgfutil@definecolor{BuGn-C}{RGB}{229,245,249} +\pgfutil@definecolor{BuGn-D}{RGB}{204,236,230} +\pgfutil@definecolor{BuGn-E}{RGB}{178,226,226} +\pgfutil@definecolor{BuGn-F}{RGB}{153,216,201} +\pgfutil@definecolor{BuGn-G}{RGB}{102,194,164} +\pgfutil@definecolor{BuGn-H}{RGB}{65,174,118} +\pgfutil@definecolor{BuGn-I}{RGB}{44,162,95} +\pgfutil@definecolor{BuGn-J}{RGB}{35,139,69} +\pgfutil@definecolor{BuGn-K}{RGB}{0,109,44} +\pgfutil@definecolor{BuGn-L}{RGB}{0,88,36} +\pgfutil@definecolor{BuGn-M}{RGB}{0,68,27} + +\pgfutil@definecolor{BuPu-A}{RGB}{247,252,253} +\pgfutil@definecolor{BuPu-B}{RGB}{237,248,251} +\pgfutil@definecolor{BuPu-C}{RGB}{224,236,244} +\pgfutil@definecolor{BuPu-D}{RGB}{191,211,230} +\pgfutil@definecolor{BuPu-E}{RGB}{179,205,227} +\pgfutil@definecolor{BuPu-F}{RGB}{158,188,218} +\pgfutil@definecolor{BuPu-G}{RGB}{140,150,198} +\pgfutil@definecolor{BuPu-H}{RGB}{140,107,177} +\pgfutil@definecolor{BuPu-I}{RGB}{136,86,167} +\pgfutil@definecolor{BuPu-J}{RGB}{136,65,157} +\pgfutil@definecolor{BuPu-K}{RGB}{129,15,124} +\pgfutil@definecolor{BuPu-L}{RGB}{110,1,107} +\pgfutil@definecolor{BuPu-M}{RGB}{77,0,75} + +\pgfutil@definecolor{GnBu-A}{RGB}{247,252,240} +\pgfutil@definecolor{GnBu-B}{RGB}{240,249,232} +\pgfutil@definecolor{GnBu-C}{RGB}{224,243,219} +\pgfutil@definecolor{GnBu-D}{RGB}{204,235,197} +\pgfutil@definecolor{GnBu-E}{RGB}{186,228,188} +\pgfutil@definecolor{GnBu-F}{RGB}{168,221,181} +\pgfutil@definecolor{GnBu-G}{RGB}{123,204,196} +\pgfutil@definecolor{GnBu-H}{RGB}{78,179,211} +\pgfutil@definecolor{GnBu-I}{RGB}{67,162,202} +\pgfutil@definecolor{GnBu-J}{RGB}{43,140,190} +\pgfutil@definecolor{GnBu-K}{RGB}{8,104,172} +\pgfutil@definecolor{GnBu-L}{RGB}{8,88,158} +\pgfutil@definecolor{GnBu-M}{RGB}{8,64,129} + +\pgfutil@definecolor{OrRd-A}{RGB}{255,247,236} +\pgfutil@definecolor{OrRd-B}{RGB}{254,240,217} +\pgfutil@definecolor{OrRd-C}{RGB}{254,232,200} +\pgfutil@definecolor{OrRd-D}{RGB}{253,212,158} +\pgfutil@definecolor{OrRd-E}{RGB}{253,204,138} +\pgfutil@definecolor{OrRd-F}{RGB}{253,187,132} +\pgfutil@definecolor{OrRd-G}{RGB}{252,141,89} +\pgfutil@definecolor{OrRd-H}{RGB}{239,101,72} +\pgfutil@definecolor{OrRd-I}{RGB}{227,74,51} +\pgfutil@definecolor{OrRd-J}{RGB}{215,48,31} +\pgfutil@definecolor{OrRd-K}{RGB}{179,0,0} +\pgfutil@definecolor{OrRd-L}{RGB}{153,0,0} +\pgfutil@definecolor{OrRd-M}{RGB}{127,0,0} + +\pgfutil@definecolor{PuBu-A}{RGB}{255,247,251} +\pgfutil@definecolor{PuBu-B}{RGB}{241,238,246} +\pgfutil@definecolor{PuBu-C}{RGB}{236,231,242} +\pgfutil@definecolor{PuBu-D}{RGB}{208,209,230} +\pgfutil@definecolor{PuBu-E}{RGB}{189,201,225} +\pgfutil@definecolor{PuBu-F}{RGB}{166,189,219} +\pgfutil@definecolor{PuBu-G}{RGB}{116,169,207} +\pgfutil@definecolor{PuBu-H}{RGB}{54,144,192} +\pgfutil@definecolor{PuBu-I}{RGB}{43,140,190} +\pgfutil@definecolor{PuBu-J}{RGB}{5,112,176} +\pgfutil@definecolor{PuBu-K}{RGB}{4,90,141} +\pgfutil@definecolor{PuBu-L}{RGB}{3,78,123} +\pgfutil@definecolor{PuBu-M}{RGB}{2,56,88} + +\pgfutil@definecolor{PuBuGn-A}{RGB}{255,247,251} +\pgfutil@definecolor{PuBuGn-B}{RGB}{246,239,247} +\pgfutil@definecolor{PuBuGn-C}{RGB}{236,226,240} +\pgfutil@definecolor{PuBuGn-D}{RGB}{208,209,230} +\pgfutil@definecolor{PuBuGn-E}{RGB}{189,201,225} +\pgfutil@definecolor{PuBuGn-F}{RGB}{166,189,219} +\pgfutil@definecolor{PuBuGn-G}{RGB}{103,169,207} +\pgfutil@definecolor{PuBuGn-H}{RGB}{54,144,192} +\pgfutil@definecolor{PuBuGn-I}{RGB}{28,144,153} +\pgfutil@definecolor{PuBuGn-J}{RGB}{2,129,138} +\pgfutil@definecolor{PuBuGn-K}{RGB}{1,108,89} +\pgfutil@definecolor{PuBuGn-L}{RGB}{1,100,80} +\pgfutil@definecolor{PuBuGn-M}{RGB}{1,70,54} + +\pgfutil@definecolor{PuRd-A}{RGB}{247,244,249} +\pgfutil@definecolor{PuRd-B}{RGB}{241,238,246} +\pgfutil@definecolor{PuRd-C}{RGB}{231,225,239} +\pgfutil@definecolor{PuRd-D}{RGB}{212,185,218} +\pgfutil@definecolor{PuRd-E}{RGB}{215,181,216} +\pgfutil@definecolor{PuRd-F}{RGB}{201,148,199} +\pgfutil@definecolor{PuRd-G}{RGB}{223,101,176} +\pgfutil@definecolor{PuRd-H}{RGB}{231,41,138} +\pgfutil@definecolor{PuRd-I}{RGB}{221,28,119} +\pgfutil@definecolor{PuRd-J}{RGB}{206,18,86} +\pgfutil@definecolor{PuRd-K}{RGB}{152,0,67} +\pgfutil@definecolor{PuRd-L}{RGB}{145,0,63} +\pgfutil@definecolor{PuRd-M}{RGB}{103,0,31} + +\pgfutil@definecolor{RdPu-A}{RGB}{255,247,243} +\pgfutil@definecolor{RdPu-B}{RGB}{254,235,226} +\pgfutil@definecolor{RdPu-C}{RGB}{253,224,221} +\pgfutil@definecolor{RdPu-D}{RGB}{252,197,192} +\pgfutil@definecolor{RdPu-E}{RGB}{251,180,185} +\pgfutil@definecolor{RdPu-F}{RGB}{250,159,181} +\pgfutil@definecolor{RdPu-G}{RGB}{247,104,161} +\pgfutil@definecolor{RdPu-H}{RGB}{221,52,151} +\pgfutil@definecolor{RdPu-I}{RGB}{197,27,138} +\pgfutil@definecolor{RdPu-J}{RGB}{174,1,126} +\pgfutil@definecolor{RdPu-K}{RGB}{122,1,119} +\pgfutil@definecolor{RdPu-L}{RGB}{122,1,119} +\pgfutil@definecolor{RdPu-M}{RGB}{73,0,106} + +\pgfutil@definecolor{YlGn-A}{RGB}{255,255,229} +\pgfutil@definecolor{YlGn-B}{RGB}{255,255,204} +\pgfutil@definecolor{YlGn-C}{RGB}{247,252,185} +\pgfutil@definecolor{YlGn-D}{RGB}{217,240,163} +\pgfutil@definecolor{YlGn-E}{RGB}{194,230,153} +\pgfutil@definecolor{YlGn-F}{RGB}{173,221,142} +\pgfutil@definecolor{YlGn-G}{RGB}{120,198,121} +\pgfutil@definecolor{YlGn-H}{RGB}{65,171,93} +\pgfutil@definecolor{YlGn-I}{RGB}{49,163,84} +\pgfutil@definecolor{YlGn-J}{RGB}{35,132,67} +\pgfutil@definecolor{YlGn-K}{RGB}{0,104,55} +\pgfutil@definecolor{YlGn-L}{RGB}{0,90,50} +\pgfutil@definecolor{YlGn-M}{RGB}{0,69,41} + +\pgfutil@definecolor{YlGnBu-A}{RGB}{255,255,217} +\pgfutil@definecolor{YlGnBu-B}{RGB}{255,255,204} +\pgfutil@definecolor{YlGnBu-C}{RGB}{237,248,177} +\pgfutil@definecolor{YlGnBu-D}{RGB}{199,233,180} +\pgfutil@definecolor{YlGnBu-E}{RGB}{161,218,180} +\pgfutil@definecolor{YlGnBu-F}{RGB}{127,205,187} +\pgfutil@definecolor{YlGnBu-G}{RGB}{65,182,196} +\pgfutil@definecolor{YlGnBu-H}{RGB}{29,145,192} +\pgfutil@definecolor{YlGnBu-I}{RGB}{44,127,184} +\pgfutil@definecolor{YlGnBu-J}{RGB}{34,94,168} +\pgfutil@definecolor{YlGnBu-K}{RGB}{37,52,148} +\pgfutil@definecolor{YlGnBu-L}{RGB}{12,44,132} +\pgfutil@definecolor{YlGnBu-M}{RGB}{8,29,88} + +\pgfutil@definecolor{YlOrBr-A}{RGB}{255,255,229} +\pgfutil@definecolor{YlOrBr-B}{RGB}{255,255,212} +\pgfutil@definecolor{YlOrBr-C}{RGB}{255,247,188} +\pgfutil@definecolor{YlOrBr-D}{RGB}{254,227,145} +\pgfutil@definecolor{YlOrBr-E}{RGB}{254,217,142} +\pgfutil@definecolor{YlOrBr-F}{RGB}{254,196,79} +\pgfutil@definecolor{YlOrBr-G}{RGB}{254,153,41} +\pgfutil@definecolor{YlOrBr-H}{RGB}{236,112,20} +\pgfutil@definecolor{YlOrBr-I}{RGB}{217,95,14} +\pgfutil@definecolor{YlOrBr-J}{RGB}{204,76,2} +\pgfutil@definecolor{YlOrBr-K}{RGB}{153,52,4} +\pgfutil@definecolor{YlOrBr-L}{RGB}{140,45,4} +\pgfutil@definecolor{YlOrBr-M}{RGB}{102,37,6} + +\pgfutil@definecolor{YlOrRd-A}{RGB}{255,255,204} +\pgfutil@definecolor{YlOrRd-B}{RGB}{255,255,178} +\pgfutil@definecolor{YlOrRd-C}{RGB}{255,237,160} +\pgfutil@definecolor{YlOrRd-D}{RGB}{254,217,118} +\pgfutil@definecolor{YlOrRd-E}{RGB}{254,204,92} +\pgfutil@definecolor{YlOrRd-F}{RGB}{254,178,76} +\pgfutil@definecolor{YlOrRd-G}{RGB}{253,141,60} +\pgfutil@definecolor{YlOrRd-H}{RGB}{252,78,42} +\pgfutil@definecolor{YlOrRd-I}{RGB}{240,59,32} +\pgfutil@definecolor{YlOrRd-J}{RGB}{227,26,28} +\pgfutil@definecolor{YlOrRd-K}{RGB}{189,0,38} +\pgfutil@definecolor{YlOrRd-L}{RGB}{177,0,38} +\pgfutil@definecolor{YlOrRd-M}{RGB}{128,0,38} + +% ----------------------------------------------------------------------------- +% Single hue + +\pgfutil@definecolor{Blues-A}{RGB}{247,251,255} +\pgfutil@definecolor{Blues-B}{RGB}{239,243,255} +\pgfutil@definecolor{Blues-C}{RGB}{222,235,247} +\pgfutil@definecolor{Blues-D}{RGB}{198,219,239} +\pgfutil@definecolor{Blues-E}{RGB}{189,215,231} +\pgfutil@definecolor{Blues-F}{RGB}{158,202,225} +\pgfutil@definecolor{Blues-G}{RGB}{107,174,214} +\pgfutil@definecolor{Blues-H}{RGB}{66,146,198} +\pgfutil@definecolor{Blues-I}{RGB}{49,130,189} +\pgfutil@definecolor{Blues-J}{RGB}{33,113,181} +\pgfutil@definecolor{Blues-K}{RGB}{8,81,156} +\pgfutil@definecolor{Blues-L}{RGB}{8,69,148} +\pgfutil@definecolor{Blues-M}{RGB}{8,48,107} + +\pgfutil@definecolor{Greens-A}{RGB}{247,252,245} +\pgfutil@definecolor{Greens-B}{RGB}{237,248,233} +\pgfutil@definecolor{Greens-C}{RGB}{229,245,224} +\pgfutil@definecolor{Greens-D}{RGB}{199,233,192} +\pgfutil@definecolor{Greens-E}{RGB}{186,228,179} +\pgfutil@definecolor{Greens-F}{RGB}{161,217,155} +\pgfutil@definecolor{Greens-G}{RGB}{116,196,118} +\pgfutil@definecolor{Greens-H}{RGB}{65,171,93} +\pgfutil@definecolor{Greens-I}{RGB}{49,163,84} +\pgfutil@definecolor{Greens-J}{RGB}{35,139,69} +\pgfutil@definecolor{Greens-K}{RGB}{0,109,44} +\pgfutil@definecolor{Greens-L}{RGB}{0,90,50} +\pgfutil@definecolor{Greens-M}{RGB}{0,68,27} + +\pgfutil@definecolor{Greys-A}{RGB}{255,255,255} +\pgfutil@definecolor{Greys-B}{RGB}{247,247,247} +\pgfutil@definecolor{Greys-C}{RGB}{240,240,240} +\pgfutil@definecolor{Greys-D}{RGB}{217,217,217} +\pgfutil@definecolor{Greys-E}{RGB}{204,204,204} +\pgfutil@definecolor{Greys-F}{RGB}{189,189,189} +\pgfutil@definecolor{Greys-G}{RGB}{150,150,150} +\pgfutil@definecolor{Greys-H}{RGB}{115,115,115} +\pgfutil@definecolor{Greys-I}{RGB}{99,99,99} +\pgfutil@definecolor{Greys-J}{RGB}{82,82,82} +\pgfutil@definecolor{Greys-K}{RGB}{37,37,37} +\pgfutil@definecolor{Greys-L}{RGB}{37,37,37} +\pgfutil@definecolor{Greys-M}{RGB}{0,0,0} + +\pgfutil@definecolor{Oranges-A}{RGB}{255,245,235} +\pgfutil@definecolor{Oranges-B}{RGB}{254,237,222} +\pgfutil@definecolor{Oranges-C}{RGB}{254,230,206} +\pgfutil@definecolor{Oranges-D}{RGB}{253,208,162} +\pgfutil@definecolor{Oranges-E}{RGB}{253,190,133} +\pgfutil@definecolor{Oranges-F}{RGB}{253,174,107} +\pgfutil@definecolor{Oranges-G}{RGB}{253,141,60} +\pgfutil@definecolor{Oranges-H}{RGB}{241,105,19} +\pgfutil@definecolor{Oranges-I}{RGB}{230,85,13} +\pgfutil@definecolor{Oranges-J}{RGB}{217,71,1} +\pgfutil@definecolor{Oranges-K}{RGB}{166,54,3} +\pgfutil@definecolor{Oranges-L}{RGB}{140,45,4} +\pgfutil@definecolor{Oranges-M}{RGB}{127,39,4} + +\pgfutil@definecolor{Purples-A}{RGB}{252,251,253} +\pgfutil@definecolor{Purples-B}{RGB}{242,240,247} +\pgfutil@definecolor{Purples-C}{RGB}{239,237,245} +\pgfutil@definecolor{Purples-D}{RGB}{218,218,235} +\pgfutil@definecolor{Purples-E}{RGB}{203,201,226} +\pgfutil@definecolor{Purples-F}{RGB}{188,189,220} +\pgfutil@definecolor{Purples-G}{RGB}{158,154,200} +\pgfutil@definecolor{Purples-H}{RGB}{128,125,186} +\pgfutil@definecolor{Purples-I}{RGB}{117,107,177} +\pgfutil@definecolor{Purples-J}{RGB}{106,81,163} +\pgfutil@definecolor{Purples-K}{RGB}{84,39,143} +\pgfutil@definecolor{Purples-L}{RGB}{74,20,134} +\pgfutil@definecolor{Purples-M}{RGB}{63,0,125} + +\pgfutil@definecolor{Reds-A}{RGB}{255,245,240} +\pgfutil@definecolor{Reds-B}{RGB}{254,229,217} +\pgfutil@definecolor{Reds-C}{RGB}{254,224,210} +\pgfutil@definecolor{Reds-D}{RGB}{252,187,161} +\pgfutil@definecolor{Reds-E}{RGB}{252,174,145} +\pgfutil@definecolor{Reds-F}{RGB}{252,146,114} +\pgfutil@definecolor{Reds-G}{RGB}{251,106,74} +\pgfutil@definecolor{Reds-H}{RGB}{239,59,44} +\pgfutil@definecolor{Reds-I}{RGB}{222,45,38} +\pgfutil@definecolor{Reds-J}{RGB}{203,24,29} +\pgfutil@definecolor{Reds-K}{RGB}{165,15,21} +\pgfutil@definecolor{Reds-L}{RGB}{153,0,13} +\pgfutil@definecolor{Reds-M}{RGB}{103,0,13} + + +% ============================================================================= +% diverging color schemes +% ============================================================================= + +\pgfutil@definecolor{BrBG-A}{RGB}{84,48,5} +\pgfutil@definecolor{BrBG-B}{RGB}{140,81,10} +\pgfutil@definecolor{BrBG-C}{RGB}{166,97,26} +\pgfutil@definecolor{BrBG-D}{RGB}{191,129,45} +\pgfutil@definecolor{BrBG-E}{RGB}{216,179,101} +\pgfutil@definecolor{BrBG-F}{RGB}{223,194,125} +\pgfutil@definecolor{BrBG-G}{RGB}{246,232,195} +\pgfutil@definecolor{BrBG-H}{RGB}{245,245,245} +\pgfutil@definecolor{BrBG-I}{RGB}{199,234,229} +\pgfutil@definecolor{BrBG-J}{RGB}{128,205,193} +\pgfutil@definecolor{BrBG-K}{RGB}{90,180,172} +\pgfutil@definecolor{BrBG-L}{RGB}{53,151,143} +\pgfutil@definecolor{BrBG-M}{RGB}{1,133,113} +\pgfutil@definecolor{BrBG-N}{RGB}{1,102,94} +\pgfutil@definecolor{BrBG-O}{RGB}{0,60,48} + +\pgfutil@definecolor{PiYG-A}{RGB}{142,1,82} +\pgfutil@definecolor{PiYG-B}{RGB}{197,27,125} +\pgfutil@definecolor{PiYG-C}{RGB}{208,28,139} +\pgfutil@definecolor{PiYG-D}{RGB}{222,119,174} +\pgfutil@definecolor{PiYG-E}{RGB}{233,163,201} +\pgfutil@definecolor{PiYG-F}{RGB}{241,182,218} +\pgfutil@definecolor{PiYG-G}{RGB}{253,224,239} +\pgfutil@definecolor{PiYG-H}{RGB}{247,247,247} +\pgfutil@definecolor{PiYG-I}{RGB}{230,245,208} +\pgfutil@definecolor{PiYG-J}{RGB}{184,225,134} +\pgfutil@definecolor{PiYG-K}{RGB}{161,215,106} +\pgfutil@definecolor{PiYG-L}{RGB}{127,188,65} +\pgfutil@definecolor{PiYG-M}{RGB}{77,172,38} +\pgfutil@definecolor{PiYG-N}{RGB}{77,146,33} +\pgfutil@definecolor{PiYG-O}{RGB}{39,100,25} + +\pgfutil@definecolor{PRGn-A}{RGB}{64,0,75} +\pgfutil@definecolor{PRGn-B}{RGB}{118,42,131} +\pgfutil@definecolor{PRGn-C}{RGB}{123,50,148} +\pgfutil@definecolor{PRGn-D}{RGB}{153,112,171} +\pgfutil@definecolor{PRGn-E}{RGB}{175,141,195} +\pgfutil@definecolor{PRGn-F}{RGB}{194,165,207} +\pgfutil@definecolor{PRGn-G}{RGB}{231,212,232} +\pgfutil@definecolor{PRGn-H}{RGB}{247,247,247} +\pgfutil@definecolor{PRGn-I}{RGB}{217,240,211} +\pgfutil@definecolor{PRGn-J}{RGB}{166,219,160} +\pgfutil@definecolor{PRGn-K}{RGB}{127,191,123} +\pgfutil@definecolor{PRGn-L}{RGB}{90,174,97} +\pgfutil@definecolor{PRGn-M}{RGB}{0,136,55} +\pgfutil@definecolor{PRGn-N}{RGB}{27,120,55} +\pgfutil@definecolor{PRGn-O}{RGB}{0,68,27} + +\pgfutil@definecolor{PuOr-A}{RGB}{127,59,8} +\pgfutil@definecolor{PuOr-B}{RGB}{179,88,6} +\pgfutil@definecolor{PuOr-C}{RGB}{230,97,1} +\pgfutil@definecolor{PuOr-D}{RGB}{224,130,20} +\pgfutil@definecolor{PuOr-E}{RGB}{241,163,64} +\pgfutil@definecolor{PuOr-F}{RGB}{253,184,99} +\pgfutil@definecolor{PuOr-G}{RGB}{254,224,182} +\pgfutil@definecolor{PuOr-H}{RGB}{247,247,247} +\pgfutil@definecolor{PuOr-I}{RGB}{216,218,235} +\pgfutil@definecolor{PuOr-J}{RGB}{178,171,210} +\pgfutil@definecolor{PuOr-K}{RGB}{153,142,195} +\pgfutil@definecolor{PuOr-L}{RGB}{128,115,172} +\pgfutil@definecolor{PuOr-M}{RGB}{94,60,153} +\pgfutil@definecolor{PuOr-N}{RGB}{84,39,136} +\pgfutil@definecolor{PuOr-O}{RGB}{45,0,75} + +\pgfutil@definecolor{RdBu-A}{RGB}{103,0,31} +\pgfutil@definecolor{RdBu-B}{RGB}{178,24,43} +\pgfutil@definecolor{RdBu-C}{RGB}{202,0,32} +\pgfutil@definecolor{RdBu-D}{RGB}{214,96,77} +\pgfutil@definecolor{RdBu-E}{RGB}{239,138,98} +\pgfutil@definecolor{RdBu-F}{RGB}{244,165,130} +\pgfutil@definecolor{RdBu-G}{RGB}{253,219,199} +\pgfutil@definecolor{RdBu-H}{RGB}{247,247,247} +\pgfutil@definecolor{RdBu-I}{RGB}{209,229,240} +\pgfutil@definecolor{RdBu-J}{RGB}{146,197,222} +\pgfutil@definecolor{RdBu-K}{RGB}{103,169,207} +\pgfutil@definecolor{RdBu-L}{RGB}{67,147,195} +\pgfutil@definecolor{RdBu-M}{RGB}{5,113,176} +\pgfutil@definecolor{RdBu-N}{RGB}{33,102,172} +\pgfutil@definecolor{RdBu-O}{RGB}{5,48,97} + +\pgfutil@definecolor{RdGy-A}{RGB}{103,0,31} +\pgfutil@definecolor{RdGy-B}{RGB}{178,24,43} +\pgfutil@definecolor{RdGy-C}{RGB}{202,0,32} +\pgfutil@definecolor{RdGy-D}{RGB}{214,96,77} +\pgfutil@definecolor{RdGy-E}{RGB}{239,138,98} +\pgfutil@definecolor{RdGy-F}{RGB}{244,165,130} +\pgfutil@definecolor{RdGy-G}{RGB}{253,219,199} +\pgfutil@definecolor{RdGy-H}{RGB}{255,255,255} +\pgfutil@definecolor{RdGy-I}{RGB}{224,224,224} +\pgfutil@definecolor{RdGy-J}{RGB}{186,186,186} +\pgfutil@definecolor{RdGy-K}{RGB}{153,153,153} +\pgfutil@definecolor{RdGy-L}{RGB}{135,135,135} +\pgfutil@definecolor{RdGy-M}{RGB}{64,64,64} +\pgfutil@definecolor{RdGy-N}{RGB}{77,77,77} +\pgfutil@definecolor{RdGy-O}{RGB}{26,26,26} + +\pgfutil@definecolor{RdYlBu-A}{RGB}{165,0,38} +\pgfutil@definecolor{RdYlBu-B}{RGB}{215,48,39} +\pgfutil@definecolor{RdYlBu-C}{RGB}{215,25,28} +\pgfutil@definecolor{RdYlBu-D}{RGB}{244,109,67} +\pgfutil@definecolor{RdYlBu-E}{RGB}{252,141,89} +\pgfutil@definecolor{RdYlBu-F}{RGB}{253,174,97} +\pgfutil@definecolor{RdYlBu-G}{RGB}{254,224,144} +\pgfutil@definecolor{RdYlBu-H}{RGB}{255,255,191} +\pgfutil@definecolor{RdYlBu-I}{RGB}{224,243,248} +\pgfutil@definecolor{RdYlBu-J}{RGB}{171,217,233} +\pgfutil@definecolor{RdYlBu-K}{RGB}{145,191,219} +\pgfutil@definecolor{RdYlBu-L}{RGB}{116,173,209} +\pgfutil@definecolor{RdYlBu-M}{RGB}{44,123,182} +\pgfutil@definecolor{RdYlBu-N}{RGB}{69,117,180} +\pgfutil@definecolor{RdYlBu-O}{RGB}{49,54,149} + +\pgfutil@definecolor{RdYlGn-A}{RGB}{165,0,38} +\pgfutil@definecolor{RdYlGn-B}{RGB}{215,48,39} +\pgfutil@definecolor{RdYlGn-C}{RGB}{215,25,28} +\pgfutil@definecolor{RdYlGn-D}{RGB}{244,109,67} +\pgfutil@definecolor{RdYlGn-E}{RGB}{252,141,89} +\pgfutil@definecolor{RdYlGn-F}{RGB}{253,174,97} +\pgfutil@definecolor{RdYlGn-G}{RGB}{254,224,139} +\pgfutil@definecolor{RdYlGn-H}{RGB}{255,255,191} +\pgfutil@definecolor{RdYlGn-I}{RGB}{217,239,139} +\pgfutil@definecolor{RdYlGn-J}{RGB}{166,217,106} +\pgfutil@definecolor{RdYlGn-K}{RGB}{145,207,96} +\pgfutil@definecolor{RdYlGn-L}{RGB}{102,189,99} +\pgfutil@definecolor{RdYlGn-M}{RGB}{26,150,65} +\pgfutil@definecolor{RdYlGn-N}{RGB}{26,152,80} +\pgfutil@definecolor{RdYlGn-O}{RGB}{0,104,55} + +\pgfutil@definecolor{Spectral-A}{RGB}{158,1,66} +\pgfutil@definecolor{Spectral-B}{RGB}{213,62,79} +\pgfutil@definecolor{Spectral-C}{RGB}{215,25,28} +\pgfutil@definecolor{Spectral-D}{RGB}{244,109,67} +\pgfutil@definecolor{Spectral-E}{RGB}{252,141,89} +\pgfutil@definecolor{Spectral-F}{RGB}{253,174,97} +\pgfutil@definecolor{Spectral-G}{RGB}{254,224,139} +\pgfutil@definecolor{Spectral-H}{RGB}{255,255,191} +\pgfutil@definecolor{Spectral-I}{RGB}{230,245,152} +\pgfutil@definecolor{Spectral-J}{RGB}{171,221,164} +\pgfutil@definecolor{Spectral-K}{RGB}{153,213,148} +\pgfutil@definecolor{Spectral-L}{RGB}{102,194,165} +\pgfutil@definecolor{Spectral-M}{RGB}{43,131,186} +\pgfutil@definecolor{Spectral-N}{RGB}{50,136,189} +\pgfutil@definecolor{Spectral-O}{RGB}{94,79,162} + + +% ============================================================================= +% qualitative color schemes +% ============================================================================= + +\pgfutil@definecolor{Accent-A}{RGB}{127,201,127} +\pgfutil@definecolor{Accent-B}{RGB}{190,174,212} +\pgfutil@definecolor{Accent-C}{RGB}{253,192,134} +\pgfutil@definecolor{Accent-D}{RGB}{255,255,153} +\pgfutil@definecolor{Accent-E}{RGB}{56,108,176} +\pgfutil@definecolor{Accent-F}{RGB}{240,2,127} +\pgfutil@definecolor{Accent-G}{RGB}{191,91,23} +\pgfutil@definecolor{Accent-H}{RGB}{102,102,102} + +\pgfutil@definecolor{Dark2-A}{RGB}{27,158,119} +\pgfutil@definecolor{Dark2-B}{RGB}{217,95,2} +\pgfutil@definecolor{Dark2-C}{RGB}{117,112,179} +\pgfutil@definecolor{Dark2-D}{RGB}{231,41,138} +\pgfutil@definecolor{Dark2-E}{RGB}{102,166,30} +\pgfutil@definecolor{Dark2-F}{RGB}{230,171,2} +\pgfutil@definecolor{Dark2-G}{RGB}{166,118,29} +\pgfutil@definecolor{Dark2-H}{RGB}{102,102,102} + +\pgfutil@definecolor{Paired-A}{RGB}{166,206,227} +\pgfutil@definecolor{Paired-B}{RGB}{31,120,180} +\pgfutil@definecolor{Paired-C}{RGB}{178,223,138} +\pgfutil@definecolor{Paired-D}{RGB}{51,160,44} +\pgfutil@definecolor{Paired-E}{RGB}{251,154,153} +\pgfutil@definecolor{Paired-F}{RGB}{227,26,28} +\pgfutil@definecolor{Paired-G}{RGB}{253,191,111} +\pgfutil@definecolor{Paired-H}{RGB}{255,127,0} +\pgfutil@definecolor{Paired-I}{RGB}{202,178,214} +\pgfutil@definecolor{Paired-J}{RGB}{106,61,154} +\pgfutil@definecolor{Paired-K}{RGB}{255,255,153} +\pgfutil@definecolor{Paired-L}{RGB}{177,89,40} + +\pgfutil@definecolor{Pastel1-A}{RGB}{251,180,174} +\pgfutil@definecolor{Pastel1-B}{RGB}{179,205,227} +\pgfutil@definecolor{Pastel1-C}{RGB}{204,235,197} +\pgfutil@definecolor{Pastel1-D}{RGB}{222,203,228} +\pgfutil@definecolor{Pastel1-E}{RGB}{254,217,166} +\pgfutil@definecolor{Pastel1-F}{RGB}{255,255,204} +\pgfutil@definecolor{Pastel1-G}{RGB}{229,216,189} +\pgfutil@definecolor{Pastel1-H}{RGB}{253,218,236} +\pgfutil@definecolor{Pastel1-I}{RGB}{242,242,242} + +\pgfutil@definecolor{Pastel2-A}{RGB}{179,226,205} +\pgfutil@definecolor{Pastel2-B}{RGB}{253,205,172} +\pgfutil@definecolor{Pastel2-C}{RGB}{203,213,232} +\pgfutil@definecolor{Pastel2-D}{RGB}{244,202,228} +\pgfutil@definecolor{Pastel2-E}{RGB}{230,245,201} +\pgfutil@definecolor{Pastel2-F}{RGB}{255,242,174} +\pgfutil@definecolor{Pastel2-G}{RGB}{241,226,204} +\pgfutil@definecolor{Pastel2-H}{RGB}{204,204,204} + +\pgfutil@definecolor{Set1-A}{RGB}{228,26,28} +\pgfutil@definecolor{Set1-B}{RGB}{55,126,184} +\pgfutil@definecolor{Set1-C}{RGB}{77,175,74} +\pgfutil@definecolor{Set1-D}{RGB}{152,78,163} +\pgfutil@definecolor{Set1-E}{RGB}{255,127,0} +\pgfutil@definecolor{Set1-F}{RGB}{255,255,51} +\pgfutil@definecolor{Set1-G}{RGB}{166,86,40} +\pgfutil@definecolor{Set1-H}{RGB}{247,129,191} +\pgfutil@definecolor{Set1-I}{RGB}{153,153,153} + +\pgfutil@definecolor{Set2-A}{RGB}{102,194,165} +\pgfutil@definecolor{Set2-B}{RGB}{252,141,98} +\pgfutil@definecolor{Set2-C}{RGB}{141,160,203} +\pgfutil@definecolor{Set2-D}{RGB}{231,138,195} +\pgfutil@definecolor{Set2-E}{RGB}{166,216,84} +\pgfutil@definecolor{Set2-F}{RGB}{255,217,47} +\pgfutil@definecolor{Set2-G}{RGB}{229,196,148} +\pgfutil@definecolor{Set2-H}{RGB}{179,179,179} + +\pgfutil@definecolor{Set3-A}{RGB}{141,211,199} +\pgfutil@definecolor{Set3-B}{RGB}{255,255,179} +\pgfutil@definecolor{Set3-C}{RGB}{190,186,218} +\pgfutil@definecolor{Set3-D}{RGB}{251,128,114} +\pgfutil@definecolor{Set3-E}{RGB}{128,177,211} +\pgfutil@definecolor{Set3-F}{RGB}{253,180,98} +\pgfutil@definecolor{Set3-G}{RGB}{179,222,105} +\pgfutil@definecolor{Set3-H}{RGB}{252,205,229} +\pgfutil@definecolor{Set3-I}{RGB}{217,217,217} +\pgfutil@definecolor{Set3-J}{RGB}{188,128,189} +\pgfutil@definecolor{Set3-K}{RGB}{204,235,197} +\pgfutil@definecolor{Set3-L}{RGB}{255,237,111} diff --git a/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.colormaps.code.tex b/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.colormaps.code.tex index d6060e15e2b..297818b877a 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.colormaps.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.colormaps.code.tex @@ -94,6 +94,266 @@ /pgfplots/colormap/winter/.style={ /pgfplots/colormap={winter}{rgb255=(0,0,255) rgb255=(0,255,128)} }, + /pgfplots/colormap/viridis high res/.style={% + /pgfplots/colormap={viridis high res}{% + rgb=(0.26700401, 0.00487433, 0.32941519) + rgb=(0.26851048, 0.00960483, 0.33542652) + rgb=(0.26994384, 0.01462494, 0.34137895) + rgb=(0.27130489, 0.01994186, 0.34726862) + rgb=(0.27259384, 0.02556309, 0.35309303) + rgb=(0.27380934, 0.03149748, 0.35885256) + rgb=(0.27495242, 0.03775181, 0.36454323) + rgb=(0.27602238, 0.04416723, 0.37016418) + rgb=(0.2770184 , 0.05034437, 0.37571452) + rgb=(0.27794143, 0.05632444, 0.38119074) + rgb=(0.27879067, 0.06214536, 0.38659204) + rgb=(0.2795655 , 0.06783587, 0.39191723) + rgb=(0.28026658, 0.07341724, 0.39716349) + rgb=(0.28089358, 0.07890703, 0.40232944) + rgb=(0.28144581, 0.0843197 , 0.40741404) + rgb=(0.28192358, 0.08966622, 0.41241521) + rgb=(0.28232739, 0.09495545, 0.41733086) + rgb=(0.28265633, 0.10019576, 0.42216032) + rgb=(0.28291049, 0.10539345, 0.42690202) + rgb=(0.28309095, 0.11055307, 0.43155375) + rgb=(0.28319704, 0.11567966, 0.43611482) + rgb=(0.28322882, 0.12077701, 0.44058404) + rgb=(0.28318684, 0.12584799, 0.44496 ) + rgb=(0.283072 , 0.13089477, 0.44924127) + rgb=(0.28288389, 0.13592005, 0.45342734) + rgb=(0.28262297, 0.14092556, 0.45751726) + rgb=(0.28229037, 0.14591233, 0.46150995) + rgb=(0.28188676, 0.15088147, 0.46540474) + rgb=(0.28141228, 0.15583425, 0.46920128) + rgb=(0.28086773, 0.16077132, 0.47289909) + rgb=(0.28025468, 0.16569272, 0.47649762) + rgb=(0.27957399, 0.17059884, 0.47999675) + rgb=(0.27882618, 0.1754902 , 0.48339654) + rgb=(0.27801236, 0.18036684, 0.48669702) + rgb=(0.27713437, 0.18522836, 0.48989831) + rgb=(0.27619376, 0.19007447, 0.49300074) + rgb=(0.27519116, 0.1949054 , 0.49600488) + rgb=(0.27412802, 0.19972086, 0.49891131) + rgb=(0.27300596, 0.20452049, 0.50172076) + rgb=(0.27182812, 0.20930306, 0.50443413) + rgb=(0.27059473, 0.21406899, 0.50705243) + rgb=(0.26930756, 0.21881782, 0.50957678) + rgb=(0.26796846, 0.22354911, 0.5120084 ) + rgb=(0.26657984, 0.2282621 , 0.5143487 ) + rgb=(0.2651445 , 0.23295593, 0.5165993 ) + rgb=(0.2636632 , 0.23763078, 0.51876163) + rgb=(0.26213801, 0.24228619, 0.52083736) + rgb=(0.26057103, 0.2469217 , 0.52282822) + rgb=(0.25896451, 0.25153685, 0.52473609) + rgb=(0.25732244, 0.2561304 , 0.52656332) + rgb=(0.25564519, 0.26070284, 0.52831152) + rgb=(0.25393498, 0.26525384, 0.52998273) + rgb=(0.25219404, 0.26978306, 0.53157905) + rgb=(0.25042462, 0.27429024, 0.53310261) + rgb=(0.24862899, 0.27877509, 0.53455561) + rgb=(0.2468114 , 0.28323662, 0.53594093) + rgb=(0.24497208, 0.28767547, 0.53726018) + rgb=(0.24311324, 0.29209154, 0.53851561) + rgb=(0.24123708, 0.29648471, 0.53970946) + rgb=(0.23934575, 0.30085494, 0.54084398) + rgb=(0.23744138, 0.30520222, 0.5419214 ) + rgb=(0.23552606, 0.30952657, 0.54294396) + rgb=(0.23360277, 0.31382773, 0.54391424) + rgb=(0.2316735 , 0.3181058 , 0.54483444) + rgb=(0.22973926, 0.32236127, 0.54570633) + rgb=(0.22780192, 0.32659432, 0.546532 ) + rgb=(0.2258633 , 0.33080515, 0.54731353) + rgb=(0.22392515, 0.334994 , 0.54805291) + rgb=(0.22198915, 0.33916114, 0.54875211) + rgb=(0.22005691, 0.34330688, 0.54941304) + rgb=(0.21812995, 0.34743154, 0.55003755) + rgb=(0.21620971, 0.35153548, 0.55062743) + rgb=(0.21429757, 0.35561907, 0.5511844 ) + rgb=(0.21239477, 0.35968273, 0.55171011) + rgb=(0.2105031 , 0.36372671, 0.55220646) + rgb=(0.20862342, 0.36775151, 0.55267486) + rgb=(0.20675628, 0.37175775, 0.55311653) + rgb=(0.20490257, 0.37574589, 0.55353282) + rgb=(0.20306309, 0.37971644, 0.55392505) + rgb=(0.20123854, 0.38366989, 0.55429441) + rgb=(0.1994295 , 0.38760678, 0.55464205) + rgb=(0.1976365 , 0.39152762, 0.55496905) + rgb=(0.19585993, 0.39543297, 0.55527637) + rgb=(0.19410009, 0.39932336, 0.55556494) + rgb=(0.19235719, 0.40319934, 0.55583559) + rgb=(0.19063135, 0.40706148, 0.55608907) + rgb=(0.18892259, 0.41091033, 0.55632606) + rgb=(0.18723083, 0.41474645, 0.55654717) + rgb=(0.18555593, 0.4185704 , 0.55675292) + rgb=(0.18389763, 0.42238275, 0.55694377) + rgb=(0.18225561, 0.42618405, 0.5571201 ) + rgb=(0.18062949, 0.42997486, 0.55728221) + rgb=(0.17901879, 0.43375572, 0.55743035) + rgb=(0.17742298, 0.4375272 , 0.55756466) + rgb=(0.17584148, 0.44128981, 0.55768526) + rgb=(0.17427363, 0.4450441 , 0.55779216) + rgb=(0.17271876, 0.4487906 , 0.55788532) + rgb=(0.17117615, 0.4525298 , 0.55796464) + rgb=(0.16964573, 0.45626209, 0.55803034) + rgb=(0.16812641, 0.45998802, 0.55808199) + rgb=(0.1666171 , 0.46370813, 0.55811913) + rgb=(0.16511703, 0.4674229 , 0.55814141) + rgb=(0.16362543, 0.47113278, 0.55814842) + rgb=(0.16214155, 0.47483821, 0.55813967) + rgb=(0.16066467, 0.47853961, 0.55811466) + rgb=(0.15919413, 0.4822374 , 0.5580728 ) + rgb=(0.15772933, 0.48593197, 0.55801347) + rgb=(0.15626973, 0.4896237 , 0.557936 ) + rgb=(0.15481488, 0.49331293, 0.55783967) + rgb=(0.15336445, 0.49700003, 0.55772371) + rgb=(0.1519182 , 0.50068529, 0.55758733) + rgb=(0.15047605, 0.50436904, 0.55742968) + rgb=(0.14903918, 0.50805136, 0.5572505 ) + rgb=(0.14760731, 0.51173263, 0.55704861) + rgb=(0.14618026, 0.51541316, 0.55682271) + rgb=(0.14475863, 0.51909319, 0.55657181) + rgb=(0.14334327, 0.52277292, 0.55629491) + rgb=(0.14193527, 0.52645254, 0.55599097) + rgb=(0.14053599, 0.53013219, 0.55565893) + rgb=(0.13914708, 0.53381201, 0.55529773) + rgb=(0.13777048, 0.53749213, 0.55490625) + rgb=(0.1364085 , 0.54117264, 0.55448339) + rgb=(0.13506561, 0.54485335, 0.55402906) + rgb=(0.13374299, 0.54853458, 0.55354108) + rgb=(0.13244401, 0.55221637, 0.55301828) + rgb=(0.13117249, 0.55589872, 0.55245948) + rgb=(0.1299327 , 0.55958162, 0.55186354) + rgb=(0.12872938, 0.56326503, 0.55122927) + rgb=(0.12756771, 0.56694891, 0.55055551) + rgb=(0.12645338, 0.57063316, 0.5498411 ) + rgb=(0.12539383, 0.57431754, 0.54908564) + rgb=(0.12439474, 0.57800205, 0.5482874 ) + rgb=(0.12346281, 0.58168661, 0.54744498) + rgb=(0.12260562, 0.58537105, 0.54655722) + rgb=(0.12183122, 0.58905521, 0.54562298) + rgb=(0.12114807, 0.59273889, 0.54464114) + rgb=(0.12056501, 0.59642187, 0.54361058) + rgb=(0.12009154, 0.60010387, 0.54253043) + rgb=(0.11973756, 0.60378459, 0.54139999) + rgb=(0.11951163, 0.60746388, 0.54021751) + rgb=(0.11942341, 0.61114146, 0.53898192) + rgb=(0.11948255, 0.61481702, 0.53769219) + rgb=(0.11969858, 0.61849025, 0.53634733) + rgb=(0.12008079, 0.62216081, 0.53494633) + rgb=(0.12063824, 0.62582833, 0.53348834) + rgb=(0.12137972, 0.62949242, 0.53197275) + rgb=(0.12231244, 0.63315277, 0.53039808) + rgb=(0.12344358, 0.63680899, 0.52876343) + rgb=(0.12477953, 0.64046069, 0.52706792) + rgb=(0.12632581, 0.64410744, 0.52531069) + rgb=(0.12808703, 0.64774881, 0.52349092) + rgb=(0.13006688, 0.65138436, 0.52160791) + rgb=(0.13226797, 0.65501363, 0.51966086) + rgb=(0.13469183, 0.65863619, 0.5176488 ) + rgb=(0.13733921, 0.66225157, 0.51557101) + rgb=(0.14020991, 0.66585927, 0.5134268 ) + rgb=(0.14330291, 0.66945881, 0.51121549) + rgb=(0.1466164 , 0.67304968, 0.50893644) + rgb=(0.15014782, 0.67663139, 0.5065889 ) + rgb=(0.15389405, 0.68020343, 0.50417217) + rgb=(0.15785146, 0.68376525, 0.50168574) + rgb=(0.16201598, 0.68731632, 0.49912906) + rgb=(0.1663832 , 0.69085611, 0.49650163) + rgb=(0.1709484 , 0.69438405, 0.49380294) + rgb=(0.17570671, 0.6978996 , 0.49103252) + rgb=(0.18065314, 0.70140222, 0.48818938) + rgb=(0.18578266, 0.70489133, 0.48527326) + rgb=(0.19109018, 0.70836635, 0.48228395) + rgb=(0.19657063, 0.71182668, 0.47922108) + rgb=(0.20221902, 0.71527175, 0.47608431) + rgb=(0.20803045, 0.71870095, 0.4728733 ) + rgb=(0.21400015, 0.72211371, 0.46958774) + rgb=(0.22012381, 0.72550945, 0.46622638) + rgb=(0.2263969 , 0.72888753, 0.46278934) + rgb=(0.23281498, 0.73224735, 0.45927675) + rgb=(0.2393739 , 0.73558828, 0.45568838) + rgb=(0.24606968, 0.73890972, 0.45202405) + rgb=(0.25289851, 0.74221104, 0.44828355) + rgb=(0.25985676, 0.74549162, 0.44446673) + rgb=(0.26694127, 0.74875084, 0.44057284) + rgb=(0.27414922, 0.75198807, 0.4366009 ) + rgb=(0.28147681, 0.75520266, 0.43255207) + rgb=(0.28892102, 0.75839399, 0.42842626) + rgb=(0.29647899, 0.76156142, 0.42422341) + rgb=(0.30414796, 0.76470433, 0.41994346) + rgb=(0.31192534, 0.76782207, 0.41558638) + rgb=(0.3198086 , 0.77091403, 0.41115215) + rgb=(0.3277958 , 0.77397953, 0.40664011) + rgb=(0.33588539, 0.7770179 , 0.40204917) + rgb=(0.34407411, 0.78002855, 0.39738103) + rgb=(0.35235985, 0.78301086, 0.39263579) + rgb=(0.36074053, 0.78596419, 0.38781353) + rgb=(0.3692142 , 0.78888793, 0.38291438) + rgb=(0.37777892, 0.79178146, 0.3779385 ) + rgb=(0.38643282, 0.79464415, 0.37288606) + rgb=(0.39517408, 0.79747541, 0.36775726) + rgb=(0.40400101, 0.80027461, 0.36255223) + rgb=(0.4129135 , 0.80304099, 0.35726893) + rgb=(0.42190813, 0.80577412, 0.35191009) + rgb=(0.43098317, 0.80847343, 0.34647607) + rgb=(0.44013691, 0.81113836, 0.3409673 ) + rgb=(0.44936763, 0.81376835, 0.33538426) + rgb=(0.45867362, 0.81636288, 0.32972749) + rgb=(0.46805314, 0.81892143, 0.32399761) + rgb=(0.47750446, 0.82144351, 0.31819529) + rgb=(0.4870258 , 0.82392862, 0.31232133) + rgb=(0.49661536, 0.82637633, 0.30637661) + rgb=(0.5062713 , 0.82878621, 0.30036211) + rgb=(0.51599182, 0.83115784, 0.29427888) + rgb=(0.52577622, 0.83349064, 0.2881265 ) + rgb=(0.5356211 , 0.83578452, 0.28190832) + rgb=(0.5455244 , 0.83803918, 0.27562602) + rgb=(0.55548397, 0.84025437, 0.26928147) + rgb=(0.5654976 , 0.8424299 , 0.26287683) + rgb=(0.57556297, 0.84456561, 0.25641457) + rgb=(0.58567772, 0.84666139, 0.24989748) + rgb=(0.59583934, 0.84871722, 0.24332878) + rgb=(0.60604528, 0.8507331 , 0.23671214) + rgb=(0.61629283, 0.85270912, 0.23005179) + rgb=(0.62657923, 0.85464543, 0.22335258) + rgb=(0.63690157, 0.85654226, 0.21662012) + rgb=(0.64725685, 0.85839991, 0.20986086) + rgb=(0.65764197, 0.86021878, 0.20308229) + rgb=(0.66805369, 0.86199932, 0.19629307) + rgb=(0.67848868, 0.86374211, 0.18950326) + rgb=(0.68894351, 0.86544779, 0.18272455) + rgb=(0.69941463, 0.86711711, 0.17597055) + rgb=(0.70989842, 0.86875092, 0.16925712) + rgb=(0.72039115, 0.87035015, 0.16260273) + rgb=(0.73088902, 0.87191584, 0.15602894) + rgb=(0.74138803, 0.87344918, 0.14956101) + rgb=(0.75188414, 0.87495143, 0.14322828) + rgb=(0.76237342, 0.87642392, 0.13706449) + rgb=(0.77285183, 0.87786808, 0.13110864) + rgb=(0.78331535, 0.87928545, 0.12540538) + rgb=(0.79375994, 0.88067763, 0.12000532) + rgb=(0.80418159, 0.88204632, 0.11496505) + rgb=(0.81457634, 0.88339329, 0.11034678) + rgb=(0.82494028, 0.88472036, 0.10621724) + rgb=(0.83526959, 0.88602943, 0.1026459 ) + rgb=(0.84556056, 0.88732243, 0.09970219) + rgb=(0.8558096 , 0.88860134, 0.09745186) + rgb=(0.86601325, 0.88986815, 0.09595277) + rgb=(0.87616824, 0.89112487, 0.09525046) + rgb=(0.88627146, 0.89237353, 0.09537439) + rgb=(0.89632002, 0.89361614, 0.09633538) + rgb=(0.90631121, 0.89485467, 0.09812496) + rgb=(0.91624212, 0.89609127, 0.1007168 ) + rgb=(0.92610579, 0.89732977, 0.10407067) + rgb=(0.93590444, 0.8985704 , 0.10813094) + rgb=(0.94563626, 0.899815 , 0.11283773) + rgb=(0.95529972, 0.90106534, 0.11812832) + rgb=(0.96489353, 0.90232311, 0.12394051) + rgb=(0.97441665, 0.90358991, 0.13021494) + rgb=(0.98386829, 0.90486726, 0.13689671) + rgb=(0.99324789, 0.90615657, 0.1439362 ) + }, + }, } \endinput diff --git a/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.dateplot.code.tex b/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.dateplot.code.tex index 55d8da81154..a8ed6e9f3da 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.dateplot.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.dateplot.code.tex @@ -123,16 +123,47 @@ % \def\pgfplotslibdateplot@discard@trailing@colon#1:{#1}% %-------------------------------------------------- +\let\pgfplots@calender@ZEROSHIFT=\pgfutil@empty +\def\pgfplots@dateplot@ensure@ZEROSHIFT#1{% + \ifx\pgfplots@calender@ZEROSHIFT\pgfutil@empty + \ifx\pgfplots@global@dateplot@defaultshift\pgfutil@empty + \pgfplots@log4{dateplot: setting 'date ZERO={#1}' for this axis.}% + \pgfplots@dateplot@parse@ZEROSHIFT{#1}% + \global\let\pgfplots@global@dateplot@defaultshift=\pgfmathresult + \fi + % + \let\pgfplots@calender@ZEROSHIFT=\pgfplots@global@dateplot@defaultshift + \fi +}% +% defines \pgfplots@calender@ZEROSHIFT to be the zero shift +\def\pgfplots@dateplot@get@ZEROSHIFT{% + \ifx\pgfplots@calender@ZEROSHIFT\pgfutil@empty + \ifx\pgfplots@global@dateplot@defaultshift\pgfutil@empty + % should never happen + \pgfplots@error{Illegal internal state: no 'date ZERO' value found}% + \def\pgfplots@calender@ZEROSHIFT{0}% + \else + \let\pgfplots@calender@ZEROSHIFT=\pgfplots@global@dateplot@defaultshift + \fi + \fi +}% + +\def\pgfplots@dateplot@parse@ZEROSHIFT#1{% + \begingroup + \pgfcalendardatetojulian{#1}\c@pgf@counta + \edef\pgfmathresult{\the\c@pgf@counta}% + \pgfmath@smuggleone\pgfmathresult + \endgroup +}% + \pgfplotsset{ /pgfplots/date ZERO/.code={% - \begingroup - \pgfcalendardatetojulian{#1}\c@pgf@counta - \edef\pgfmathresult{\the\c@pgf@counta}% - \pgfmath@smuggleone\pgfmathresult - \endgroup + \pgfplots@dateplot@parse@ZEROSHIFT{#1}% \let\pgfplots@calender@ZEROSHIFT=\pgfmathresult }, - date ZERO=2006-01-01, + /pgfplots/execute at begin axis@@/.add={}{% + \global\let\pgfplots@global@dateplot@defaultshift=\pgfutil@empty + }, /pgfplots/date coordinates in/.code={% \pgfkeysdef{/pgfplots/#1 coord trafo}{% \begingroup @@ -145,6 +176,9 @@ \else \let\pgfplotstemptime=\pgfutil@empty \fi + % + \expandafter\pgfplots@dateplot@ensure@ZEROSHIFT\expandafter{\pgfplotstempjuliandate}% + % \expandafter\pgfcalendardatetojulian\expandafter{\pgfplotstempjuliandate}\c@pgf@counta \advance\c@pgf@counta by-\pgfplots@calender@ZEROSHIFT\relax \ifx\pgfplotstemptime\pgfutil@empty @@ -169,6 +203,8 @@ \pgfkeysdef{/pgfplots/#1 coord inv trafo}{% \edef\pgfplotstempjuliandatenumeric{##1}% \begingroup + \pgfplots@dateplot@get@ZEROSHIFT + % \expandafter\pgfplotslibdateplot@number@to@julian@and@time\pgfplotstempjuliandatenumeric\julianto{\c@pgf@counta}\hourto\Hour\minuteto\Minute% \advance\c@pgf@counta by\pgfplots@calender@ZEROSHIFT\relax \expandafter\pgfcalendarjuliantodate\expandafter{\the\c@pgf@counta}\year\month\day diff --git a/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.external.code.tex b/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.external.code.tex index 41fc81ba6f1..3259029cc67 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.external.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.external.code.tex @@ -33,6 +33,7 @@ % \pgfplots@glob@TMPa = 1 iff we can rely on the external lib shipped % with tikz: +% -> see also below for a list of patches! \pgfplotsiffileexists{tikzlibraryexternal.code.tex}{% \pgfplots@ifneedspgfcompabitibilitycode@has@pgf@one@zero@zero{% \def\pgfplots@glob@TMPa{0}% @@ -56,9 +57,18 @@ \if1\pgfplots@glob@TMPa \usetikzlibrary{external}% - \pgfutil@ifundefined{tikzexternal@driver@pgfsys-pdftex.def}{% + % + % check for patches + \gdef\pgfplots@glob@TMPa{0}% + \pgfutil@ifundefined{c@tikzexternal@version}{% + \gdef\pgfplots@glob@TMPa{1}% + }{% + \gdef\pgfplots@glob@TMPa{0}% + }% + % + \if1\pgfplots@glob@TMPa \pgfplots@backw@compat@external@load - }{}% + \fi \else \pgfplots@backw@compat@external@load \fi diff --git a/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.groupplots.code.tex b/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.groupplots.code.tex index 74f7cd56a43..0f42923b753 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.groupplots.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.groupplots.code.tex @@ -437,7 +437,19 @@ \pgfutil@ifnextchar[{\pgfplots@@environment@groupplot}{\pgfplots@@environment@groupplot[\pgfutil@empty]}% } -\def\endpgfplots@environment@groupplot{\endpgfplots@environment@opt\endgroup} +\def\endpgfplots@environment@groupplot{% + \endpgfplots@environment@opt + % + % transport some items beyond this \endgroup: + \pgf@remember@layerlist@globally + \aftergroup\pgf@restore@layerlist@from@global + \endgroup + % + % ... and transport them beyond the next \endgroup as well (LaTeX + % introduces one for \end{groupplot}): + \aftergroup\pgf@restore@layerlist@from@global + \aftergroup\pgfplots@cell@picture@remembered +} \def\pgfplots@@environment@groupplot[#1]{% \begingroup% @@ -445,27 +457,27 @@ % the following things appear to be complete... ? \pgfkeysinstallkeyfilterhandler{/pgf/key filter handlers/append filtered to}{\pgfplots@group@rmopts}% \let\pgfplots@group@rmopts=\pgfutil@empty - \pgfkeysinstallkeyfilter{/pgf/key filters/equals}{/pgfplots/group style} - \pgfkeysinstallkeyfilter{/pgf/key filters/is descendant of}{/pgfplots/group} - \pgfqkeysfiltered{/pgfplots}{#1} + \pgfkeysinstallkeyfilter{/pgf/key filters/equals}{/pgfplots/group style}% + \pgfkeysinstallkeyfilter{/pgf/key filters/is descendant of}{/pgfplots/group}% + \pgfqkeysfiltered{/pgfplots}{#1}% \edef\pgfplots@loc@TMPa{% - \noexpand\pgfkeys{/pgfplots/group/.cd,\pgfplots@group@style} + \noexpand\pgfkeys{/pgfplots/group/.cd,\pgfplots@group@style}% }\pgfplots@loc@TMPa % \let\pgfplots@set@options@sanitizemode@old=\pgfplots@set@options@sanitizemode \let\pgfplots@set@options@sanitize@old=\pgfplots@set@options@sanitize \let\pgfplots@set@options@sanitize=\relax \let\pgfplots@set@options@sanitizemode=\relax - \expandafter\pgfplots@set@options\expandafter{\pgfplots@group@rmopts} + \expandafter\pgfplots@set@options\expandafter{\pgfplots@group@rmopts}% \let\pgfplots@set@options@sanitize=\pgfplots@set@options@sanitize@old \let\pgfplots@set@options@sanitizemode=\pgfplots@set@options@sanitizemode@old % \pgfplots@group@individual@setup \pgfplots@group@determine@ticklabels \pgfplots@group@determine@labels - \pgfplots@group@current@plot=0% - \pgfplots@group@current@row=1% - \pgfplots@group@current@column=0% + \pgfplots@group@current@plot=0 % + \pgfplots@group@current@row=1 % + \pgfplots@group@current@column=0 % \begingroup \c@pgf@counta=\pgfplots@group@rows\relax \multiply \c@pgf@counta by\pgfplots@group@columns\relax diff --git a/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.patchplots.code.tex b/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.patchplots.code.tex index 9e885f380ba..a1259e975f4 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.patchplots.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.patchplots.code.tex @@ -937,6 +937,7 @@ \pgfplotspatchready },% first vertex=\expandafter\pgfplotspatchvertex\pgfplotspatchclass@rect@A\endvertex, + first vertex before z buffer=\pgfplotspatchclass@rect@first@before@z@buffer, foreach vertex={% \expandafter\pgfplotspatchvertex\pgfplotspatchclass@rect@A\endvertex #1% \expandafter\pgfplotspatchvertex\pgfplotspatchclass@rect@B\endvertex #1% diff --git a/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.polar.code.tex b/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.polar.code.tex index 6697ab0f4ad..30ac9587b2b 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.polar.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.polar.code.tex @@ -42,21 +42,39 @@ /pgfplots/polar labels/.code={ % this is equivalent to 'use units=false'. But that key is only available if the units lib is loaded. \pgfplots@units@usefalse - \pgfkeysalso{% - % is this a good choice? No, it is not. - % In fact, I believe that neither xlabel nor ylabel is a good idea for a polar plot. - % BUT: if we simply leave the defaults, they will be placed outside of the circle - and - % this will confuse the units library which (for some reason) always generates labels. - every axis x label/.style={ - at={(rel axis cs:0,0.5)}, - anchor=north, - }, - every axis y label/.style={ - at={(0.2,0.85)}, - anchor=center, - }, - }% + \if1\b@pgfplots@polaraxis@fix@positioning + \pgfkeysalso{% + every axis x label/.style={ + at={(xticklabel cs:0.125)}, + sloped={at position=45}, + anchor=near ticklabel, + near ticklabel at=45, + }, + every axis y label/.style={ + at={(yticklabel cs:0.5)}, + anchor=near ticklabel, + }, + }% + \else + \pgfkeysalso{% + % is this a good choice? No, it is not. + % In fact, I believe that neither xlabel nor ylabel is a good idea for a polar plot. + % BUT: if we simply leave the defaults, they will be placed outside of the circle - and + % this will confuse the units library which (for some reason) always generates labels. + every axis x label/.style={ + at={(rel axis cs:0,0.5)}, + anchor=north, + }, + every axis y label/.style={ + at={(0.2,0.85)}, + anchor=center, + }, + }% + \fi }, + /pgfplots/polar labels style/.style={% + /pgfplots/polar labels/.append style={#1}% + },% /pgfplots/xticklabel in circle/.style={ xtick align=inside, xticklabel style={ @@ -78,7 +96,14 @@ \let\pgfplotsqpointxy@cart=\pgfplotsqpointxy \let\pgfplotsqpointxy=\pgfplotsqpointxy@polaraxis \let\pgfplotsqpointxy@orthogonal=\pgfplotsqpointxy -% \def\pgfplotsqpointxyz##1##2##3{\pgfplotsqpointxy{##1}{##2}}% FIXME + \if1\b@pgfplots@polaraxis@fix@positioning + % this is needed in order to let + % \pgfplotspointonorientedsurfaceab work + \def\pgfplotsqpointxyz##1##2##3{% + % ignore z here. + \pgfplotsqpointxy{##1}{##2}% + }% + \fi \let\pgfplotspointouternormalvectorofaxis@=\pgfplotspointouternormalvectorofaxis@polaraxis \def\pgfplotspointouternormalvectorofaxis@ifdependson@v##1##2##3{##2}% \def\pgfplots@drawtickgridlines@INSTALLCLIP@onorientedsurf##1{}% @@ -97,7 +122,9 @@ \let\pgfplots@limits@ready=\pgfplots@limits@ready@polar \let\pgfplots@assign@default@tick@foraxis@normalizetickdist=\pgfplots@assign@default@tick@foraxis@normalizetickdist@polar \let\pgfplots@show@ticklabel@=\pgfplots@show@ticklabel@@polar + \let\pgfplots@transformshift@along@outer@normal@on@line@of@oriented@surf=\pgfplots@transformshift@along@outer@normal@on@line@of@oriented@surf@polar \let\pgfplots@enlarge@limit@for=\pgfplots@enlarge@limit@for@polar + \let\pgfplotstransformtoaxisdirection@=\pgfplotstransformtoaxisdirection@@polar \def\pgfplots@xtick@disable@last@tick{0}% \let\pgfplots@xtick@check@tickshow=\pgfplots@xtick@check@tickshow@polar% \let\pgfplots@set@options@sanitize=\relax @@ -133,6 +160,58 @@ \let\pgfplotsaxisupdatelimitsforcoordinatethreedim=\pgfplotsaxisupdatelimitsforcoordinatetwodim@polar }% +\let\pgfplotstransformtoaxisdirection@@orig=\pgfplotstransformtoaxisdirection@ +\def\pgfplotstransformtoaxisdirection@@polar[#1]#2{% + \if#2y% + \pgfplotstransformtoaxisdirection@@orig[#1]{#2}% + \else + % ah, the angle. Treat it with special care. + \pgfplots@sloped@allowupsidedownfalse + \pgfplots@sloped@resets@nontranslationstrue + % + \def\pgfplots@loc@TMPa{#1}% + \ifx\pgfplots@loc@TMPa\pgfutil@empty + \else + \pgfqkeys{/pgfplots/sloped}{#1}% + \fi + \ifpgfplots@sloped + % + \ifpgfplots@sloped@resets@nontranslations + \pgftransformresetnontranslations + \fi + % + \pgfkeysgetvalue{/pgfplots/sloped/at position}\pgfplots@loc@TMPd + \ifx\pgfplots@loc@TMPd\pgfutil@empty + \def\pgfplots@loc@TMPd{90}% + \else + \pgfmathparse{90+\pgfplots@loc@TMPd}% + \let\pgfplots@loc@TMPd=\pgfmathresult + \fi + \pgfpointpolar{\pgfplots@loc@TMPd}{1pt}% + % + \ifdim\pgf@x<0pt% + % oh. upside down. + \pgfkeysvalueof{/pgfplots/sloped/execute for upside down}% + \ifpgfplots@sloped@allowupsidedown + \else + % do not allow upside down labels: + \global\pgf@x=-\pgf@x% + \global\pgf@y=-\pgf@y% + \fi + \fi% + % + \pgf@ya=-\pgf@y% + % set up rotation matrix + % [ cos(alpha) sin(alpha); + % -sin(alpha) cos(alpha) ] + % where cos(alpha) = n_x and sin(alpha) = n_y: + \pgftransformcm% + {\pgf@sys@tonumber{\pgf@x}}{\pgf@sys@tonumber{\pgf@y}}% + {\pgf@sys@tonumber{\pgf@ya}}{\pgf@sys@tonumber{\pgf@x}}{\pgfpointorigin}% + \fi + \fi +} + \def\pgfplotsaxisupdatelimitsforcoordinatetwodim@polar#1#2#3{% % % @@ -334,7 +413,11 @@ % FIXME : aspect ratios! % perhaps pgfpointpolarxy? \if y\pgfplotspointonorientedsurfaceB - \pgfqpointpolar{#1}{1pt}% + \if r\pgfkeysvalueof{/pgfplots/\pgfplotspointonorientedsurfaceA\space dir/value}% + \pgfqpointpolar{-#1}{-1pt}% + \else + \pgfqpointpolar{#1}{1pt}% + \fi \else \pgfpointorigin \fi @@ -390,15 +473,26 @@ \def\pgfplotspointouternormalvectorofaxis@polaraxis#1#2#3\relax{% \if v#1% + % ah, we want to find the outer normal for an ANGLE. + % + % That's tricky because we need the current value! What if we + % do not have one? \pgfplotspointouternormalvectorofaxisgetv{#1#2#3}% % in direction of the length. \ifx\pgfplotsretval\pgfutil@empty + \pgfplotswarning{missing near ticklabel at}{}\pgfeov% + % oh, what a mess. We do not know the angle! + % this means the alignment will be wrong (most likely...) \def\pgfplotsretval{0}% \fi % FIXME : datascaling! % FIXME : aspect ratios! % perhaps pgfpointpolarxy? - \pgfqpointpolar{\pgfplotsretval}{1pt}% + \if r\pgfkeysvalueof{/pgfplots/x dir/value}% + \pgfqpointpolar{-\pgfplotsretval}{-1pt}% + \else + \pgfqpointpolar{\pgfplotsretval}{1pt}% + \fi \else \if v#2% \if#10% @@ -467,6 +561,9 @@ \ifx\pgfplotsretval\pgfutil@empty \def\pgfplotsretval{0}% \fi + \if r\pgfkeysvalueof{/pgfplots/x dir/value}% + \edef\pgfplotsretval{-\pgfplotsretval}% + \fi \pgfmath@basic@sin@{\pgfplotsretval}% \pgf@x=-\pgfmathresult pt \pgfmath@basic@cos@{\pgfplotsretval}% @@ -476,12 +573,32 @@ \def\pgfplotsunitxinvlength{1}% % \def\pgfplotspointunity{% + % FIXME : what about 'x dir=reverse' !? \pgfqpointpolar{\pgfplots@xmin}{1pt}% }% \def\pgfplotsunitylength{1}% \def\pgfplotsunityinvlength{1}% }% +\def\pgfplots@transformshift@along@outer@normal@on@line@of@oriented@surf@polar#1#2{% + \if v#1% + \let\pgfplots@loc@TMPa=\pgfplotspointonorientedsurfaceA% + \if v#2% + \pgfplots@error{Exactly one of '#1' or '#2' must be 'v', not both}% + \fi + \else + \if v#2% + \let\pgfplots@loc@TMPa=\pgfplotspointonorientedsurfaceB% + \else + \pgfplots@error{One of '#1' or '#2' must be 'v'}% + \fi + \fi + % + \if x\pgfplots@loc@TMPa + \else + \pgfplots@transformshift@along@outer@normal@on@line@of@oriented@surf@orig{#1}{#2}% + \fi +}% \def\pgfplots@drawgridlines@onorientedsurf@fromto@polar#1{% \if x\pgfplotspointonorientedsurfaceA \pgfpathmoveto{\pgfplotspointonorientedsurfaceab{#1}{\csname pgfplots@\pgfplotspointonorientedsurfaceB min\endcsname}}% diff --git a/Master/texmf-dist/tex/generic/pgfplots/liststructure/pgfplotsarray.code.tex b/Master/texmf-dist/tex/generic/pgfplots/liststructure/pgfplotsarray.code.tex index 59b69da9712..55a91874293 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/liststructure/pgfplotsarray.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/liststructure/pgfplotsarray.code.tex @@ -301,6 +301,7 @@ % % During the loop, \pgfplotsarrayforeachindex expands to the current index. \long\def\pgfplotsarrayforeach#1\as#2#3{% + % FIXME : add support for \breakforeach \pgfplotsarray@@getsizeto{#1}{\pgfplotsarray@TMP}% \c@pgfplotsarray@tmp=0\relax \def\pgfplotsarrayforeachindex{\the\c@pgfplotsarray@tmp}% diff --git a/Master/texmf-dist/tex/generic/pgfplots/liststructure/pgfplotsliststructure.code.tex b/Master/texmf-dist/tex/generic/pgfplots/liststructure/pgfplotsliststructure.code.tex index 3b964264327..a30a28e48a2 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/liststructure/pgfplotsliststructure.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/liststructure/pgfplotsliststructure.code.tex @@ -78,6 +78,11 @@ % Use braces '{}' to use '\\' or ',' as arguments. % \long\def\pgfplotslistnew#1#2{% + \pgfkeys@spdef\pgfplotslist@loc@TMPa{#2}% + \def\pgfplotslist@loc@TMPb{\pgfplotslistnew@{#1}}% + \expandafter\pgfplotslist@loc@TMPb\expandafter{\pgfplotslist@loc@TMPa}% +} +\long\def\pgfplotslistnew@#1#2{% \pgfplotslist@check@backslash@list #2\\\pgfplotslist@EOI \ifpgfplotslist@is@backslash@terminated \pgfplotslistnew@backslash@{#1}{#2}% diff --git a/Master/texmf-dist/tex/generic/pgfplots/lua/pgfplots/pgfplotstexio.lua b/Master/texmf-dist/tex/generic/pgfplots/lua/pgfplots/pgfplotstexio.lua index ca8b894a7c3..bbce58d50c9 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/lua/pgfplots/pgfplotstexio.lua +++ b/Master/texmf-dist/tex/generic/pgfplots/lua/pgfplots/pgfplotstexio.lua @@ -118,6 +118,17 @@ function texSurveyPoint(x,y,z,meta) gca.currentPlotHandler:surveypoint(pt) end +-- Called during \addplot, i.e. during the survey phase. It is only called in PARTIAL MODE (see above). +function texSurveyAddJump() + local pt = Coord.new() + pt.x[1] = nil + pt.x[2] = nil + pt.x[3] = nil + pt.meta = nil + + gca:addSurveyedJump(gca.currentPlotHandler, pt) +end + -- Copies survey results of the current plot back to TeX. It prints a couple of executable TeX statements as result. -- @see \pgfplots@LUA@survey@end function texSurveyEnd() diff --git a/Master/texmf-dist/tex/generic/pgfplots/lua/pgfplots/plothandler.lua b/Master/texmf-dist/tex/generic/pgfplots/lua/pgfplots/plothandler.lua index e3fc089e25d..ba719753dad 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/lua/pgfplots/plothandler.lua +++ b/Master/texmf-dist/tex/generic/pgfplots/lua/pgfplots/plothandler.lua @@ -148,6 +148,7 @@ function Plothandler:constructor(name, axis, pointmetainputhandler) self.pointmetamap = nil -- will be set later self.filteredCoordsAway = false self.plotHasJumps = false + self.hasUnboundedPointMeta = false -- will be set before the visualization phase starts. At least. self.plotIs3d = false return self @@ -173,6 +174,7 @@ function Plothandler:addSurveyedPoint(pt) -- log("addSurveyedPoint(" .. tostring(pt) .. ") ...\n") end + -- PRIVATE -- -- assigns the point meta value by means of the PointMetaHandler @@ -186,7 +188,7 @@ end -- -- updates point meta limits function Plothandler:setperpointmetalimits(pt) - if pt.meta ~= nil then + if self.pointmetainputhandler ~= nil and self.pointmetainputhandler:isPointMetaBounded(pt.meta) then if not type(pt.meta) == 'number' then error("got unparsed input "..tostring(pt)) end if self.autocomputeMetaMin then self.metamin = math.min(self.metamin, pt.meta ) @@ -195,6 +197,9 @@ function Plothandler:setperpointmetalimits(pt) if self.autocomputeMetaMax then self.metamax = math.max(self.metamax, pt.meta ) end + else + -- FIXME : the TeX code also checks for 'bounded point meta' if there is no point meta input!? + self.hasUnboundedPointMeta = true end end @@ -490,6 +495,25 @@ function PointMetaHandler.assign(pt) error("This instance of PointMetaHandler is not implemented") end +-- see \pgfplotsifpointmetaisbounded +function PointMetaHandler:isPointMetaBounded(meta) + if meta == nil then + return false + end + + if self.isSymbolic then + if meta == "" then + return false + else + return true + end + + else + -- check the number: + return pgfplotsmath.isfinite(meta) + end +end + -- A PointMetaHandler which merely acquires values of either x,y, or z. CoordAssignmentPointMetaHandler = newClassExtends( PointMetaHandler ) @@ -853,10 +877,7 @@ function Axis:datapointsurveyed(pt, plothandler) log("NOTE: coordinate " .. tostring(pt) .. " has been dropped because " .. reason .. "\n") end else - plothandler.plotHasJumps = true - - local serialized = self:addVisualizationDependencies(pt) - plothandler:addSurveyedPoint(serialized) + self:addSurveyedJump(plothandler, pt) end end end @@ -865,6 +886,13 @@ function Axis:datapointsurveyed(pt, plothandler) -- We do it it surveypoint. end +function Axis:addSurveyedJump(plothandler, pt) + plothandler.plotHasJumps = true + + local serialized = self:addVisualizationDependencies(pt) + plothandler:addSurveyedPoint(serialized) +end + local function axisLimitToTeXString(name, value) if value == math.huge or value == -math.huge then return "" @@ -937,6 +965,13 @@ function Axis:surveyToPgfplots(plothandler) result = result .. "\\def\\pgfplotsaxisplothasjumps{0}" end + if plothandler.hasUnboundedPointMeta then + result = result .. + "\\def\\pgfplotsaxisplothasunboundedpointmeta{1}" + else + result = result .. + "\\def\\pgfplotsaxisplothasunboundedpointmeta{0}" + end if plothandler.filteredCoordsAway then result = result .. "\\def\\pgfplotsaxisfilteredcoordsaway{1}" diff --git a/Master/texmf-dist/tex/generic/pgfplots/lua/pgfplotsoldpgfsupp/luamath/functions.lua b/Master/texmf-dist/tex/generic/pgfplots/lua/pgfplotsoldpgfsupp/luamath/functions.lua index e5573f26f64..d8d32997e3f 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/lua/pgfplotsoldpgfsupp/luamath/functions.lua +++ b/Master/texmf-dist/tex/generic/pgfplots/lua/pgfplotsoldpgfsupp/luamath/functions.lua @@ -19,7 +19,7 @@ -- with the deployment of this patch or partial content of PGF. Note that the author and/or maintainer of pgfplots has no obligation to fix anything: -- This file comes without any warranty as the rest of pgfplots; there is no obligation for help. ---------------------------------------------------------------------------------------------------- --- Date of this copy: Mi 14. Jan 21:15:32 CET 2015 --- +-- Date of this copy: Mi 6. Jan 11:32:04 CET 2016 --- @@ -32,7 +32,7 @@ -- -- See the file doc/generic/pgf/licenses/LICENSE for more details. -- --- $Id: functions.lua,v 1.2 2015/01/14 20:15:13 cfeuersaenger Exp $ +-- $Id: functions.lua,v 1.3 2015/05/10 20:34:13 cfeuersaenger Exp $ -- local pgfluamathfunctions = pgfluamathfunctions or {} @@ -561,6 +561,8 @@ function pgfluamathfunctions.tonumber(x) local lower = x:lower() if lower == 'nan' then result = nan + elseif lower == "-nan" then + result = nan elseif lower == 'inf' or lower == 'infty' then result = infty elseif lower == '-inf' or lower == '-infty' then diff --git a/Master/texmf-dist/tex/generic/pgfplots/lua/pgfplotsoldpgfsupp/luamath/parser.lua b/Master/texmf-dist/tex/generic/pgfplots/lua/pgfplotsoldpgfsupp/luamath/parser.lua index cc9663f145f..072ac058546 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/lua/pgfplotsoldpgfsupp/luamath/parser.lua +++ b/Master/texmf-dist/tex/generic/pgfplots/lua/pgfplotsoldpgfsupp/luamath/parser.lua @@ -19,7 +19,7 @@ -- with the deployment of this patch or partial content of PGF. Note that the author and/or maintainer of pgfplots has no obligation to fix anything: -- This file comes without any warranty as the rest of pgfplots; there is no obligation for help. ---------------------------------------------------------------------------------------------------- --- Date of this copy: Mi 14. Jan 21:15:32 CET 2015 --- +-- Date of this copy: Mi 6. Jan 11:32:04 CET 2016 --- @@ -33,7 +33,7 @@ -- -- See the file doc/generic/pgf/licenses/LICENSE for more details. -- --- $Id: parser.lua,v 1.1 2014/12/27 14:11:49 cfeuersaenger Exp $ +-- $Id: parser.lua,v 1.3 2015/11/28 17:20:49 cfeuersaenger Exp $ -- -- usage: -- @@ -73,7 +73,7 @@ local integer_pattern = S("+-")^-1 * positive_integer_pattern local positive_integer_or_decimal_pattern = positive_integer_pattern * ( P(".") * one_digit_pattern^0)^-1 + (P(".") * one_digit_pattern^1) local integer_or_decimal_pattern = S("+-")^-1 * positive_integer_or_decimal_pattern -local fpu_pattern = R"15" * P"Y" * positive_integer_or_decimal_pattern * P"e" * P("-")^-1 * R("09")^1 * P"]" +local fpu_pattern = R"05" * P"Y" * positive_integer_or_decimal_pattern * P"e" * S("+-")^-1 * R("09")^1 * P"]" local unbounded_pattern = P"inf" + P"INF" + P"nan" + P"NaN" + P"Inf" local number_pattern = C(unbounded_pattern + fpu_pattern + integer_or_decimal_pattern * (S"eE" * integer_pattern + C(tex_unit))^-1) @@ -102,7 +102,8 @@ local comma_pattern = P(",") * space_pattern ---------------- local TermOp = C(S("+-")) * space_pattern -local RelationalOp = C( P"==" + P"!=" + P"<=" + P">=" + P"<" + P">" ) * space_pattern +local EqualityOp = C( P"==" + P"!=" ) * space_pattern +local RelationalOp = C( P"<=" + P">=" + P"<" + P">" ) * space_pattern local FactorOp = C(S("*/")) * space_pattern -- Grammar @@ -195,11 +196,18 @@ local function postfix_eval(prefix, op, arg) return result end -local function relational_eval(v1, op, v2) +local function equality_eval(v1, op, v2) local fct if (op == "==") then fct = pgfluamathfunctions.equal elseif (op == "!=") then fct = pgfluamathfunctions.notequal - elseif (op == "<") then fct = pgfluamathfunctions.less + else + error("This function must not be invoked for operator "..op) + end + return fct(v1,v2) +end +local function relational_eval(v1, op, v2) + local fct + if (op == "<") then fct = pgfluamathfunctions.less elseif (op == ">") then fct = pgfluamathfunctions.greater elseif (op == ">=") then fct = pgfluamathfunctions.notless elseif (op == "<=") then fct = pgfluamathfunctions.notgreater @@ -289,6 +297,7 @@ local initialRule = V"initial" local Summand = V"Summand" local Relational = V"Relational" +local Equality = V"Equality" local LogicalOr = V"LogicalOr" local LogicalAnd = V"LogicalAnd" @@ -324,11 +333,11 @@ local G = P{ "initialRule", initialRule = space_pattern* Exp * -1; -- ternary operator (or chained ternary operators): -- FIXME : is this chaining a good idea!? - Exp = Cf( Relational * Cg(P"?" * space_pattern * Relational * P":" *space_pattern * Relational )^0, ternary_eval) ; - -- FIXME : do we really allow something like " 1 == 1 != 2" ? I would prefer (1==1) != 2 !? - Relational = Cf(LogicalOr * Cg(RelationalOp * LogicalOr)^0, relational_eval); + Exp = Cf( LogicalOr * Cg(P"?" * space_pattern * LogicalOr * P":" *space_pattern * LogicalOr )^0, ternary_eval) ; LogicalOr = Cf(LogicalAnd * (P"||" * space_pattern * LogicalAnd)^0, pgfluamathfunctions.orPGF); - LogicalAnd = Cf(Summand * (P"&&" * space_pattern * Summand)^0, pgfluamathfunctions.andPGF); + LogicalAnd = Cf(Equality * (P"&&" * space_pattern * Equality)^0, pgfluamathfunctions.andPGF); + Equality = Cf(Relational * Cg(EqualityOp * Relational)^0, equality_eval); + Relational = Cf(Summand * Cg(RelationalOp * Summand)^0, relational_eval); Summand = Cf(Term * Cg(TermOp * Term)^0, eval) ; Term = Cf(Prefix * Cg(FactorOp * Prefix)^0, eval); Prefix = prefix_operator_pattern + Postfix; diff --git a/Master/texmf-dist/tex/generic/pgfplots/numtable/pgfplotstableshared.code.tex b/Master/texmf-dist/tex/generic/pgfplots/numtable/pgfplotstableshared.code.tex index 8d470b6c6f5..be1ce3ec05c 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/numtable/pgfplotstableshared.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/numtable/pgfplotstableshared.code.tex @@ -62,6 +62,7 @@ \newif\ifpgfplots@tableread@to@listener \newif\ifpgfplots@tableread@use@begingroup \newif\ifpgfplotstable@trimcells +\newif\ifpgfplotstable@search@path@implicit@CWD \pgfkeys{% /pgfplots/table/every table/.style={}, @@ -73,6 +74,9 @@ /pgfplots/table/header/false/.code={\pgfplotstable@firstline@is@headerfalse\pgfplotstable@search@headerfalse}, /pgfplots/table/header/has colnames/.code={\pgfplotstable@firstline@is@headertrue\pgfplotstable@search@headerfalse}, /pgfplots/table/header=true, + /pgfplots/table/search path/.initial=., + /pgfplots/table/search path/implicit ./.is if=pgfplotstable@search@path@implicit@CWD, + /pgfplots/table/search path/implicit .=true, /pgfplots/table/x index/.initial=0, /pgfplots/table/x/.initial=, /pgfplots/table/x expr/.initial=, @@ -916,6 +920,98 @@ {\catcode`\"=12 \gdef\pgfplots@dquote{"}} +% gets the search path (after applying some basic sanity checks) +\def\pgfplotstable@get@search@path{% + \pgfkeysgetvalue{/pgfplots/table/search path}\pgfplotsretval + \ifx\pgfplotsretval\pgfutil@empty + \def\pgfplotsretval{.}% + \pgfkeyslet{/pgfplots/table/search path}\pgfplotsretval + \fi + % + \ifpgfplotstable@search@path@implicit@CWD + \def\b@pgfplotstable@search@contains@cwd{0}% + \def\pgfplotstable@loc@TMPd{.}% + \def\pgfplotstable@loc@TMPc{./}% + \expandafter\pgfplotsutilforeachcommasep\expandafter{\pgfplotsretval}\as\pgfplotstable@loc@TMPa{% + \ifx\pgfplotstable@loc@TMPa\pgfplotstable@loc@TMPd + \def\b@pgfplotstable@search@contains@cwd{1}% + \fi + \ifx\pgfplotstable@loc@TMPa\pgfplotstable@loc@TMPc + \def\b@pgfplotstable@search@contains@cwd{1}% + \fi + }% + % + \if0\b@pgfplotstable@search@contains@cwd + \t@pgfplotstable@a=\expandafter{\pgfplotsretval}% + \edef\pgfplotsretval{.,\the\t@pgfplotstable@a}% + \pgfkeyslet{/pgfplots/table/search path}\pgfplotsretval + \fi + \fi +} + +\def\pgfplotstable@search@path@add@slash#1{% + \def\pgfplotsretval{#1/}% + \def\pgfplotstable@loc@TMPd{./}% + \def\pgfplotstable@loc@TMPc{.//}% + \ifx\pgfplotsretval\pgfplotstable@loc@TMPd + % Ah -- we have #1='.' Do NOT use a slash at all in order to + % not disable the processing of TEXINPUTS (if pdftex finds ./ + % , it will NOT evaluated TEXINPUTS as it seems) + \let\pgfplotsretval=\pgfutil@empty + \fi + \ifx\pgfplotsretval\pgfplotstable@loc@TMPc + \let\pgfplotsretval=\pgfutil@empty + \fi +}% + +% +% POSTCONDITION: +% - \r@pgfplots@reada is the opened result file (or eof if there is no +% such file). +% - \pgfplotstableread@filename is the first found file path. +\def\pgfplotstable@search@and@open@file{% + \pgfplotstable@get@search@path + % + \let\pgfplotstableread@filename@name=\pgfplotstableread@filename + % + \def\b@pgfplotstable@search@done{0}% + \expandafter\pgfplotsutilforeachcommasep\expandafter{\pgfplotsretval}\as\pgfplotstable@loc@TMPa{% + \ifx\pgfplotstable@loc@TMPa\pgfutil@empty + % silently skip empty entries in the list. + \else + \if0\b@pgfplotstable@search@done + % + \expandafter\pgfplotstable@search@path@add@slash\expandafter{\pgfplotstable@loc@TMPa}% + % + \t@pgfplotstable@a=\expandafter{\pgfplotsretval}% + \t@pgfplots@tokc=\expandafter{\pgfplotstableread@filename@name}% + \edef\pgfplotstableread@filename{\the\t@pgfplotstable@a\the\t@pgfplots@tokc}% + % + \openin\r@pgfplots@reada=\pgfplotstableread@filename.tex + \ifeof\r@pgfplots@reada + \openin\r@pgfplots@reada=\pgfplotstableread@filename\relax + \else + \pgfplots@warning{% + You requested to open table '\pgfplotstableread@filename', but there is also a '\pgfplotstableread@filename.tex'. + TeX will automatically append the suffix '.tex', so I will now open '\pgfplotstableread@filename.tex'. + Please make sure you don't accidentally load TeX files - this may produce unrecoverable errors.}% + \closein\r@pgfplots@reada + \openin\r@pgfplots@reada=\pgfplotstableread@filename\relax + \fi + % + \ifeof\r@pgfplots@reada + \else + \def\b@pgfplotstable@search@done{1}% + \fi + \fi + \fi + }% + % + \if0\b@pgfplotstable@search@done + \let\pgfplotstableread@filename=\pgfplotstableread@filename@name + \fi +}% + % Opens \pgfplotstableread@filename. \def\pgfplotstableread@openfile{% \def\pgfplotstable@loc@TMPa{\pgfutil@in@{ }}% @@ -926,20 +1022,11 @@ \fi \let\pgfplotstableread@old@crcr=\\% \def\\{\string\\}% just to make sure we don't try to open inline table data... - \openin\r@pgfplots@reada=\pgfplotstableread@filename.tex - \ifeof\r@pgfplots@reada - \openin\r@pgfplots@reada=\pgfplotstableread@filename\relax - \else - \pgfplots@warning{% - You requested to open table '\pgfplotstableread@filename', but there is also a '\pgfplotstableread@filename.tex'. - TeX will automatically append the suffix '.tex', so I will now open '\pgfplotstableread@filename.tex'. - Please make sure you don't accidentally load TeX files - this may produce unrecoverable errors.}% - \closein\r@pgfplots@reada - \openin\r@pgfplots@reada=\pgfplotstableread@filename\relax - \fi + % + \pgfplotstable@search@and@open@file % \ifeof\r@pgfplots@reada - \pgfplotsthrow{no such table file}{\pgfplots@loc@TMPa}{\pgfplotstableread@filename}{Could not read table file '\pgfplotstableread@filename'. In case you intended to provide inline data: maybe TeX screwed up your end-of-lines? Try `row sep=crcr' and terminate your lines with `\string\\' (refer to the pgfplotstable manual for details)}\pgfeov% + \pgfplotsthrow{no such table file}{\pgfplots@loc@TMPa}{\pgfplotstableread@filename}{Could not read table file '\pgfplotstableread@filename' in 'search path=\pgfkeysvalueof{/pgfplots/table/search path}'. In case you intended to provide inline data: maybe TeX screwed up your end-of-lines? Try `row sep=crcr' and terminate your lines with `\string\\' (refer to the pgfplotstable manual for details)}\pgfeov% \global\let\pgfplotstable@colnames@glob=\pgfplots@loc@TMPa \def\pgfplotstableread@ready{0}% \fi diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_loader.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_loader.code.tex index ced1ab3c95b..1fefd8f12cd 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_loader.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_loader.code.tex @@ -61,12 +61,70 @@ }% }% +\gdef\pgfplots@glob@TMPa{0}% + +\def\pgfmathfloatfloor@broken#1{% + \edef\pgfmathfloat@loc@TMPa{#1}% + \pgfmathfloatcreate{2}{5.0}{-1}% -0.5 + \let\pgfmathfloat@loc@TMPb=\pgfmathresult + \pgfmathfloatadd@{\pgfmathfloat@loc@TMPa}{\pgfmathfloat@loc@TMPb}% + \expandafter\pgfmathfloatround@\expandafter{\pgfmathresult}% +} +\ifx\pgfmathfloatfloor\pgfmathfloatfloor@broken + \gdef\pgfplots@glob@TMPa{1}% +\fi + +\def\pgfmathfloor@broken#1{% + \begingroup% + \expandafter\pgfmath@x#1pt\relax% + \afterassignment\pgfmath@gobbletilpgfmath@% + \expandafter\c@pgfmath@counta\the\pgfmath@x\relax\pgfmath@% + \expandafter\pgfmath@x#1pt\relax% + \ifdim\pgfmath@x<0pt\relax% + \advance\c@pgfmath@counta by -1\relax% + \fi% + \pgfmath@x\c@pgfmath@counta pt\relax% + \pgfmath@returnone\pgfmath@x% + \endgroup% +}% +\ifx\pgfmathfloor@\pgfmathfloor@broken + \def\pgfmathfloor@#1{% + \begingroup% + \expandafter\pgfmath@x#1pt\relax% + \afterassignment\pgfmathfloor@collect@remainder% + \expandafter\c@pgfmath@counta\the\pgfmath@x\pgfmath@% + \expandafter\pgfmath@x#1pt\relax% + \ifdim\pgfmath@x<0pt\relax% + \ifdim\pgfmathfloor@remainder>0pt + \advance\c@pgfmath@counta by -1\relax% + \else + % ok, we stripped only '0'. + \fi + \fi% + \pgfmath@x\c@pgfmath@counta pt\relax% + \pgfmath@returnone\pgfmath@x% + \endgroup% + }% + \def\pgfmathfloor@collect@remainder#1\pgfmath@{% + \def\pgfmathfloor@remainder{#1}% + \ifx\pgfmathfloor@remainder\pgfutil@empty + \def\pgfmathfloor@remainder{0}% + \fi + }% +\fi + + + \pgfutil@ifundefined{pgfmathfloatatan2}{ + \gdef\pgfplots@glob@TMPa{1}% +} +{}% + +\if1\pgfplots@glob@TMPa \immediate\write16{Package pgfplots: loading complementary arithmetics for your pgf version...} \input pgfplotsoldpgfsupp_pgflibraryfpu.code.tex \input pgfplotsoldpgfsupp_pgfmathfloat.code.tex -} -{}% +\fi \pgfutil@IfUndefined{pgfmathdeclarefunction}{ \pgfplots@warning{Parts of pgfplots require PGF 2.10; you have PGF 2.00 . Consider upgrading if you experience problems.}% @@ -128,6 +186,8 @@ \let\pgfmath@local@function@body=\PATCH@pgfmath@local@function@body \pgfplotsusecompatibilityfile{pgflibraryluamath.code.tex} \else + \let\PATCH@pgfmathnotifynewdeclarefunction@orig=\pgfmathnotifynewdeclarefunction + \let\PATCH@pgfmathsetseed@pgfbasic = \pgfmathsetseed \pgfutil@IfFileExists{pgflibraryluamath.code.tex}{% % ah - we have a very recent version of PGF. % Well, it will hopefully come with a suitable version of the @@ -139,6 +199,25 @@ % FIXME %\pgfplots@LUA@supportedfalse }% + % + \def\pgfplots@glob@TMPa{3.0.1}% + \ifx\pgfversion\pgfplots@glob@TMPa + % 3.0.1 does not have the (correct) luamath library. + \pgfutil@directlua{% + package.loaded["pgf.luamath.functions"]=nil; + package.loaded["pgf.luamath.parser"]=nil; + pgfluamathfunctions = nil; + pgfluamathparser = nil} + \pgfplotsusecompatibilityfile{pgflibraryluamath.code.tex} + % ATTENTION: see 'pgfplots.lua' which ALSO loads these items + \pgfutil@directlua{% + pgfplots.pgfluamathfunctions = pgfluamathfunctions; + pgfplots.pgfluamathparser = pgfluamathparser} + \let\pgfmathnotifynewdeclarefunction@orig=\PATCH@pgfmathnotifynewdeclarefunction@orig + \let\pgfmathsetseed@pgfbasic=\PATCH@pgfmathsetseed@pgfbasic + \else + \pgfplots@log4{luamath library shipped with pgf \pgfversion\space is up-to-date}% + \fi \fi \fi diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfcoreexternal.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfcoreexternal.code.tex index 733cb47a4db..dc36ce92770 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfcoreexternal.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfcoreexternal.code.tex @@ -19,7 +19,7 @@ % with the deployment of this patch or partial content of PGF. Note that the author and/or maintainer of pgfplots has no obligation to fix anything: % This file comes without any warranty as the rest of pgfplots; there is no obligation for help. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%% Date of this copy: Mi 9. Jul 15:41:39 CEST 2014 %%% +%%% Date of this copy: Do 31. Dez 19:01:21 CET 2015 %%% @@ -32,7 +32,7 @@ % % See the file doc/generic/pgf/licenses/LICENSE for more details. -\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcoreexternal.code.tex,v 1.20 2013/07/15 12:05:31 tantau Exp $ +\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcoreexternal.code.tex,v 1.22 2015/08/29 10:15:21 cfeuersaenger Exp $ @@ -419,11 +419,16 @@ \begingroup \def\n{\pgfexternal@hat\pgfexternal@hat J}% \pgfexternalstorecommand{% + \pgf@external@grab@refundefinedtrue@code \noexpand\immediate\noexpand\write16{\pgf@external@grab@refundefinedtrue@warning}% \noexpand\G@refundefinedtrue }% \endgroup }% + +% A hook. will be overwritten by \usetikzlibrary{external} +\def\pgf@external@grab@refundefinedtrue@code{} + \def\pgf@external@grab@refundefinedtrue@warning{% LaTeX Warning: External picture `\pgfactualjobname' contains undefined references\noexpand\on@line.\n }% diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryfpu.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryfpu.code.tex index 8b5784c1172..1215300e328 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryfpu.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryfpu.code.tex @@ -19,7 +19,7 @@ % with the deployment of this patch or partial content of PGF. Note that the author and/or maintainer of pgfplots has no obligation to fix anything: % This file comes without any warranty as the rest of pgfplots; there is no obligation for help. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%% Date of this copy: So 11. Jan 18:03:19 CET 2015 %%% +%%% Date of this copy: Do 31. Dez 19:01:21 CET 2015 %%% @@ -230,6 +230,8 @@ \pgfmathfloat@install\pgfmathsign@=\pgfmathfloatsign@% \pgfmathfloat@install\pgfmathround@=\pgfmathfloatround@% \pgfmathfloat@install\pgfmathfloor@=\pgfmathfloatfloor@% + \pgfmathfloat@install\pgfmathceil@=\pgfmathfloatceil@ + \pgfmathfloat@install\pgfmathint@=\pgfmathfloatint@ \pgfmathfloat@install\pgfmathmod@=\pgfmathfloatmod@% \pgfmathfloat@install\pgfmathmax@=\pgfmathfloatmax@% \pgfmathfloat@install\pgfmathmin@=\pgfmathfloatmin@% @@ -284,11 +286,14 @@ \pgfmathfloat@install\pgfmathsinh@=\pgfmathfloatsinh@ \pgfmathfloat@install\pgfmathtanh@=\pgfmathfloattanh@ \expandafter\pgfmathfloat@install\csname pgfmathatan2@\endcsname=\pgfmathfloatatantwo@ - \pgfmathfloat@install@unimplemented{ceil}% + \pgfmathfloat@install@unimplemented{isprime}% + \pgfmathfloat@install@unimplemented{iseven}% + \pgfmathfloat@install@unimplemented{gcd}% \pgfmathfloat@install@unimplemented{frac}% \pgfmathfloat@install@unimplemented{random}% \pgfmathfloat@install@unimplemented{setseed}% \pgfmathfloat@install@unimplemented{Mod}% + \pgfmathfloat@install@unimplemented{div}% \pgfmathfloat@install@unimplemented{real}% % \pgfmathfloat@install@unimplemented{height}% % @@ -411,6 +416,8 @@ }% \pgfmathdeclarepseudoconstant{inf}{\def\pgfmathresult{inf}} +\pgfmathdeclarepseudoconstant{INF}{\def\pgfmathresult{inf}} +\pgfmathdeclarepseudoconstant{Inf}{\def\pgfmathresult{inf}} \pgfmathdeclarepseudoconstant{infty}{\def\pgfmathresult{inf}} \pgfmathdeclarepseudoconstant{nan}{\def\pgfmathresult{nan}} \pgfmathdeclarepseudoconstant{NaN}{\def\pgfmathresult{nan}} @@ -1407,10 +1414,16 @@ % works symbolly) % % @see \pgfmathfloattoint +% POSTCONDITION: \pgfmathresult contains the result and +% \pgfmathfloatintwasnoop=1 if there was nothing to do +% \pgfmathfloatintwasnoop=0 if there where non-zero digits after the period +% \pgfmathfloatintwasnoop=2 if there where digits after the period. The digits will be stored in \pgfmathfloatintremainder in this case. \def\pgfmathfloatint@#1{% \begingroup - \edef\pgfmathresult{#1}% - \expandafter\pgfmathfloat@decompose@tok\pgfmathresult\relax\pgfmathfloat@a@S\pgfmathfloat@a@Mtok\pgfmathfloat@a@E + \edef\pgfmathfloatint@input{#1}% + \expandafter\pgfmathfloat@decompose@tok\pgfmathfloatint@input\relax\pgfmathfloat@a@S\pgfmathfloat@a@Mtok\pgfmathfloat@a@E + \gdef\pgfmathfloatintwasnoop{1}% + \gdef\pgfmathfloatintremainder{}% \ifcase\pgfmathfloat@a@S % 0: nothing to do. \or% + @@ -1422,6 +1435,7 @@ \else % nothing to do \fi + %\message{ XXXXX int(\pgfmathfloatint@input) = \pgfmathresult -> was no op = \pgfmathfloatintwasnoop\space (remainder \pgfmathfloatintremainder)^^J}% \pgfmath@smuggleone\pgfmathresult \endgroup }% @@ -1430,6 +1444,7 @@ \pgfmathfloat@a@S=0 \pgfmathfloat@a@Mtok={0.0}% \pgfmathfloat@a@E=0 + \gdef\pgfmathfloatintwasnoop{0}% \expandafter\pgfmathfloatint@@loop@gobble \else \pgfmathfloat@a@Mtok={#1.}% @@ -1440,10 +1455,11 @@ \def\pgfmathfloatint@@loop#1{% \def\pgfmathfloatint@@loop@{#1}% \ifx\pgfmathfloatint@@loop@\pgfmathfloat@EOI + \gdef\pgfmathfloatintwasnoop{1}% \let\pgfmathfloatint@@loop@next=\relax \else \ifnum\pgfmathfloat@b@E=0 - \let\pgfmathfloatint@@loop@next=\pgfmathfloatint@@loop@gobble + \def\pgfmathfloatint@@loop@next{\pgfmathfloatint@@loop@gobble#1}% \else \pgfmathfloat@a@Mtok=\expandafter{\the\pgfmathfloat@a@Mtok#1}% \advance\pgfmathfloat@b@E by-1 @@ -1452,13 +1468,73 @@ \fi \pgfmathfloatint@@loop@next }% -\def\pgfmathfloatint@@loop@gobble#1\pgfmathfloat@EOI{}% +\def\pgfmathfloatint@@loop@gobble#1\pgfmathfloat@EOI{% + \if0\pgfmathfloatintwasnoop + \else + \gdef\pgfmathfloatintwasnoop{2}% + \gdef\pgfmathfloatintremainder{#1}% + \fi +}% \let\pgfmathfloatint=\pgfmathfloatint@ -\let\pgfmathfloatfloor=\pgfmathfloatint -\let\pgfmathfloatfloor@=\pgfmathfloatint@ + +\def\pgfmathfloatfloor#1{% + \edef\pgfmath@orig{#1}% + \pgfmathfloatint@{#1}% + \pgfmathfloatifflags{\pgfmath@orig}{2}{% + \let\pgfmath@trunc=\pgfmathresult + \ifcase\pgfmathfloatintwasnoop\relax + % ah - we stripped something! Round DOWN + \pgfmathfloatcreate{2}{1.0}{0}% -1 + \expandafter\pgfmathfloatadd@\expandafter{\pgfmathresult}{\pgfmath@trunc}% + \or + % was no-op + \let\pgfmathresult=\pgfmath@trunc + \else + % ok, we have to inspect the remainder: + \pgfmathfloatparsenumber{0.\pgfmathfloatintremainder}% + \pgfmathfloatifflags{\pgfmathresult}{1}{% + % ah - we stripped a non-zero remainder! Round DOWN + \pgfmathfloatcreate{2}{1.0}{0}% -1 + \expandafter\pgfmathfloatadd@\expandafter{\pgfmathresult}{\pgfmath@trunc}% + }{% + % was no-op + \let\pgfmathresult=\pgfmath@trunc + }% + \fi + }{}% +} +\let\pgfmathfloatfloor@=\pgfmathfloatfloor + +\def\pgfmathfloatceil#1{% + \edef\pgfmath@orig{#1}% + \pgfmathfloatint@{#1}% + \pgfmathfloatifflags{\pgfmath@orig}{1}{% + \let\pgfmath@trunc=\pgfmathresult + \ifcase\pgfmathfloatintwasnoop\relax + % ah - we stripped something! Round UP + \pgfmathfloatcreate{1}{1.0}{0}% +1 + \expandafter\pgfmathfloatadd@\expandafter{\pgfmathresult}{\pgfmath@trunc}% + \or + % was no-op + \let\pgfmathresult=\pgfmath@trunc + \else + % ok, we have to inspect the remainder: + \pgfmathfloatparsenumber{0.\pgfmathfloatintremainder}% + \pgfmathfloatifflags{\pgfmathresult}{1}{% + % ah - we stripped a non-zero remainder! Round UP + \pgfmathfloatcreate{1}{1.0}{0}% +1 + \expandafter\pgfmathfloatadd@\expandafter{\pgfmathresult}{\pgfmath@trunc}% + }{% + % was no-op + \let\pgfmathresult=\pgfmath@trunc + }% + \fi + }{}% +} +\let\pgfmathfloatceil@=\pgfmathfloatceil \def\pgfmathfloat@notimplemented#1{% - \pgfmath@error{Sorry, the operation '#1' has not yet been implemented in the floating point unit :-(}{}% + \pgfmath@error{Sorry, the operation '#1' has not yet been implemented in the floating point unit}{}% \pgfmathfloatcreate{0}{0.0}{0}% }% @@ -1721,6 +1797,7 @@ \expandafter\pgfmathfloat@decompose@tok#1\relax\pgfmathfloat@a@S\pgfmathfloat@a@Mtok\pgfmathfloat@a@E \expandafter\pgfmathfloat@decompose#2\relax\pgfmathfloat@b@S\pgfmathfloat@b@M\pgfmathfloat@b@E \ifnum\pgfmathfloat@a@S=0 + % ok, #1 = 0. Substitute by 1e-16 such that the next \ifnum catches it: \pgfmathfloat@a@E=-16 % \fi % @@ -1811,16 +1888,24 @@ \expandafter\def\csname pgfmathfloatlog10@\endcsname#1{% \pgfmathfloatln@{#1}% - \let\pgfmathfloat@log@ten=\pgfmathresult + \let\pgfmathfloat@log@e=\pgfmathresult \pgfmathfloatcreate{1}{4.34294481903252}{-1}% 1/ln(10) - \pgfmathfloatmultiply@{\pgfmathresult}{\pgfmathfloat@log@ten}% + \pgfmathfloatmultiply@{\pgfmathresult}{\pgfmathfloat@log@e}% }% +\pgfutil@namelet{pgfmathfloatlog10}{pgfmathfloatlog10@}% + \expandafter\def\csname pgfmathfloatlog2@\endcsname#1{% \pgfmathfloatln@{#1}% - \let\pgfmathfloat@log@two=\pgfmathresult + \let\pgfmathfloat@log@e=\pgfmathresult \pgfmathfloatcreate{1}{1.44269504088896}{0}% 1/ln(2) - \pgfmathfloatmultiply@{\pgfmathresult}{\pgfmathfloat@log@two}% + \pgfmathfloatmultiply@{\pgfmathresult}{\pgfmathfloat@log@e}% }% +\pgfutil@namelet{pgfmathfloatlog2}{pgfmathfloatlog2@}% + +\expandafter\let\expandafter\pgfmathfloatlogtwo\csname pgfmathfloatlog2\endcsname +\expandafter\let\expandafter\pgfmathfloatlogtwo@\csname pgfmathfloatlog2@\endcsname +\expandafter\let\expandafter\pgfmathfloatlogten\csname pgfmathfloatlog10\endcsname +\expandafter\let\expandafter\pgfmathfloatlogten@\csname pgfmathfloatlog10@\endcsname % Computes log(x) into \pgfmathresult. % diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryluamath.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryluamath.code.tex index 28de0607b25..5e6a7bbc10e 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryluamath.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryluamath.code.tex @@ -19,7 +19,7 @@ % with the deployment of this patch or partial content of PGF. Note that the author and/or maintainer of pgfplots has no obligation to fix anything: % This file comes without any warranty as the rest of pgfplots; there is no obligation for help. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%% Date of this copy: Do 1. Jan 22:31:46 CET 2015 %%% +%%% Date of this copy: Mi 6. Jan 09:15:30 CET 2016 %%% @@ -33,9 +33,7 @@ % % See the file doc/generic/pgf/licenses/LICENSE for more details. % -% $Id: pgflibraryluamath.code.tex,v 1.19 2014/12/27 14:11:49 cfeuersaenger Exp $ -% -% !!! Warning: this library does not work with fpu!!! +% $Id: pgflibraryluamath.code.tex,v 1.20 2015/06/05 06:23:21 cfeuersaenger Exp $ % % % This is a library for a LUA math parser and LUA math operations. diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzexternalshared.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzexternalshared.code.tex index adf818bef7e..f4d348e9592 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzexternalshared.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzexternalshared.code.tex @@ -19,7 +19,7 @@ % with the deployment of this patch or partial content of PGF. Note that the author and/or maintainer of pgfplots has no obligation to fix anything: % This file comes without any warranty as the rest of pgfplots; there is no obligation for help. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%% Date of this copy: So 11. Jan 19:35:13 CET 2015 %%% +%%% Date of this copy: Do 31. Dez 19:01:21 CET 2015 %%% @@ -62,6 +62,9 @@ \newif\iftikzexternal@export@enabled \tikzexternal@export@enabledtrue +% must be numeric! +\gdef\c@tikzexternal@version{2} + % This 'if' can be used as part of the public user interface. % % It is set by the 'remake next' key. @@ -163,7 +166,7 @@ mode/list only/.code = {\def\tikzexternal@opmode{3}\tikzexternal@genfigurelisttrue}, mode/convert with system call/.code={% \def\tikzexternal@opmode{4}% - \pgfkeysalso{/tikz/external/figure list=false,/pgf/images/aux in dpth=true}% ATTENTION: this *can't* work if \label{} contains pictures! + \pgfkeysalso{/tikz/external/figure list=false,/pgf/images/aux in dpth=true}% }, mode/list and make/.code = {% \def\tikzexternal@opmode{5}% @@ -172,6 +175,9 @@ mode=convert with system call, force remake/.is if=tikzexternal@force@remake, force remake/.default=true, + % + % DEPRECATED: this here will work out-of-the box (provided that + % 'aux in dpth' is active): failed ref warnings for/.initial={\ref,\cite,\pageref}, export next/.is if=tikzexternalexportnext, export/.is if=tikzexternal@export@enabled, @@ -469,8 +475,7 @@ \tikzexternalauxlock@getlockvalue \if1\tikzexternallocked \pgfexternalreadmainauxfalse - % the main .aux file won't be read. Handle \ref commands: - \tikzexternalauxlock@handleref + % the main .aux file won't be read right now. \else \pgfexternalreadmainauxtrue \fi @@ -509,79 +514,10 @@ } -% Installs a special \ref{} command such that externalized pictures -% can use \ref and the user gets a warning if something fails. -% -% The special \ref handling is installed for every reference command -% in the list '/tikz/external/failed ref warnings for' which contains -% '\ref,\pageref,\cite'. -% -% For use in the aux lock handling only. -% -% ATTENTION: this is used if and only if *all* references are broken -% (because the .aux file is NOT read at all)! -\def\tikzexternalauxlock@handleref{% - \let\pgf@external@grab@refundefinedtrue=\pgf@external@grab@refundefinedtrue@orig - % - \pgfkeysgetvalue{/tikz/external/failed ref warnings for}\tikzexternal@temp - \expandafter\tikzexternalauxlock@handleref@loop\tikzexternal@temp,\@EOI,% -} -\def\tikzexternalauxlock@handleref@loop#1,{% - \def\tikzexternal@temp{#1}% - \ifx\tikzexternal@temp\pgfutil@empty - \expandafter\tikzexternalauxlock@handleref@loop - \else - \ifx#1\@EOI - \else - {% - % strip the leading '\' - % this allows proper \protect ion when you write - % \caption{...\cite{..}} and #1=\cite - \escapechar=-1 - \xdef\pgf@temp{\string#1}% - }% - \expandafter\let\csname tikzexternalauxlock@handleref@orig@\pgf@temp\endcsname=#1% - \edef#1{\noexpand\pgf@texdist@protect\noexpand\tikzexternalauxlock@handleref@repl{\pgf@temp}}% - \expandafter\expandafter\expandafter\tikzexternalauxlock@handleref@loop - \fi - \fi -}% -\def\tikzexternalauxlock@handleref@repl#1{% - \pgfutil@ifnextchar[{\tikzexternalauxlock@handleref@gobble@opt{#1}}{\tikzexternalauxlock@handleref@repl@{#1}}% +% this is a hook into pgfcoreexternal.code.tex: +\def\pgf@external@grab@refundefinedtrue@code{% + \gdef\noexpand\tikzexternal@systemcall@reschedule@to@end@document{1}% }% -% silently discard the options. We merely need to generate a warning. -\def\tikzexternalauxlock@handleref@gobble@opt#1[#2]{% - % there may be more than one set of options (biblatex's \cite): - \pgfutil@ifnextchar[{\tikzexternalauxlock@handleref@gobble@opt{#1}}{\tikzexternalauxlock@handleref@repl@{#1}}% -}% -\def\tikzexternalauxlock@handleref@repl@#1#2{% - \tikzifexternalizingcurrent{% - % note that '#1' is NO control sequence! it is a protected string - \csname tikzexternalauxlock@handleref@orig@#1\endcsname{#2}% - \begingroup - \def\n{\pgfexternal@hat\pgfexternal@hat J}% - \tikzexternal@assemble@systemcall{\pgfactualjobname}{\pgf@tempa}% - \def\space{\noexpand\space}% - \pgfexternalstorecommand{% - \noexpand\begingroup - \noexpand\toks0={\pgf@tempa}% - \noexpand\immediate\noexpand\write16{\tikzexternalauxlock@handleref@warning{#2}{\noexpand\the\noexpand\toks0}}% - \noexpand\G@refundefinedtrue - \noexpand\endgroup - }% - \endgroup - }{% - % ok. We are not externalizing this part of the document. - % Throw the citation away without further notice. - }% -}% -\def\tikzexternalauxlock@handleref@warning#1#2{% - \n - LaTeX Warning: Reference `#1' in external picture `\pgfactualjobname' could not be resolved\noexpand\on@line.\n - This is because the \tikzexternal@realjob.aux file is not accessable in this context, you will need to issue the externalize command\n - \space\space\space#2\n - manually.\n% -} % Expands to the default image extension (it is set by % \tikzexternalize). @@ -969,8 +905,8 @@ \def\tikzexternalmakefiledefaultdeprule{% \immediate\write\tikzexternal@outmakefile{\tikzexternal@PERCENTchar.\tikzexternaldepext:}% - \immediate\write\tikzexternal@outmakefile{\tikzexternal@TABchar mkdir -p $(dir $@)}% - \immediate\write\tikzexternal@outmakefile{\tikzexternal@TABchar touch $@ \tikzexternal@HASHchar\space will be filled later.}% + \immediate\write\tikzexternal@outmakefile{\tikzexternal@TABchar mkdir -p \tikzexternal@normal@dq $(dir $@)\tikzexternal@normal@dq}% + \immediate\write\tikzexternal@outmakefile{\tikzexternal@TABchar touch \tikzexternal@normal@dq $@\tikzexternal@normal@dq\space \tikzexternal@HASHchar\space will be filled later.}% }% % Invokes '#1' if a makefile is to be written and '#2' if not. @@ -1463,6 +1399,9 @@ }% \long\def\tikzexternal@externalizefig@systemcall@@#1{% \tikzexternal@externalizefig@systemcall@uptodatecheck{#1}% + \tikzexternal@assemble@systemcall{\tikzexternal@curfilename}{\pgf@tempa}% + \global\let\tikzexternal@cursyscall=\pgf@tempa + \gdef\tikzexternal@typeset@picture@on@failure{1}% \iftikzexternal@file@isuptodate \iftikzexternal@verboseio \immediate\write16{===== Image '\tikzexternal@curfilename' is up-to-date. ======}% @@ -1471,51 +1410,72 @@ \else \begingroup % no such image. Generate it! - \tikzexternal@assemble@systemcall{\tikzexternal@curfilename}{\pgf@tempa}% - \iftikzexternal@verboseio - \immediate\write16{===== 'mode=convert with system call': Invoking '\pgf@tempa' ========}% - \fi % \tikzexternalauxlock@setlock1% - \immediate\write18{\pgf@tempa}% + \tikzexternal@externalizefig@systemcall@call{\tikzexternal@cursyscall}% \tikzexternalauxlock@setlock0% - \expandafter\tikzexternal@externalizefig@systemcall@assertsuccess\expandafter{\pgf@tempa}% + \expandafter\tikzexternal@externalizefig@systemcall@assertsuccess\expandafter{\tikzexternal@cursyscall}% \pgfmath@smuggleone\pgf@filename \endgroup \fi \ifx\pgf@filename\pgfutil@empty - % error recovery: something did not work! Try to load it - % anyway. Perhaps it was just that shell-escape wasn't - % enabled. - \begingroup - \toks0={% - \tikzexternaldisable - \pgfutil@ifundefined{scantokens}{\long\def\scantokens##1{##1}}{}% - }% - % FIXME : THIS WILL FAIL IF THERE IS '##' INSIDE OF '#1'! - % for example something like /.style={#1} in the picture environment *will* fail. - \toks1={% - \tikzpicture#1% - }% - \toks2={% - \tikzexternal@TEXDIALECT@endpicture - \tikzexternalenable - }% - \xdef\tikzexternal@externalizefig@systemcall@next{% - \the\toks0 - % try reading them again as if they were in the input file. - \noexpand\scantokens{\the\toks1 }% - \the\toks2 - }% - \endgroup + \if1\tikzexternal@typeset@picture@on@failure + % error recovery: something did not work! Try to load it + % anyway. Perhaps it was just that shell-escape wasn't + % enabled. + \begingroup + \toks0={% + \tikzexternaldisable + \pgfutil@ifundefined{scantokens}{\long\def\scantokens##1{##1}}{}% + }% + % FIXME : THIS WILL FAIL IF THERE IS '##' INSIDE OF '#1'! + % for example something like /.style={#1} in the picture environment *will* fail. + \toks1={% + \tikzpicture + #1% + }% + \toks2={% + \tikzexternal@TEXDIALECT@endpicture + \tikzexternalenable + }% + \xdef\tikzexternal@externalizefig@systemcall@next{% + \the\toks0 + % try reading them again as if they were in the input file. + \noexpand\scantokens{\the\toks1 }% + \the\toks2 + }% + \endgroup + \else + % Ah -- this picture failed, but the failure has already + % been handled somehow. Do not typeset it again! + % + % A use-case is that the picture has been rescheduled for + % \end{document}. + \gdef\tikzexternal@externalizefig@systemcall@next{\tikzexternal@closeenvironments}% + \fi \else % ok, take the image! + \gdef\tikzexternal@systemcall@reschedule@to@end@document{0}% \expandafter\pgfincludeexternalgraphics\expandafter{\tikzexternal@curfilename}% + \if1\tikzexternal@systemcall@reschedule@to@end@document + \pgfutil@IfUndefined{AtVeryEndDocument}{% + }{% + \immediate\write16{===== The previous system call resulted in undefined references inside of the output file. Rescheduling it for \string\end{document}. ========}% + \expandafter\tikzexternal@externalizefig@systemcall@reschedule\expandafter{\tikzexternal@cursyscall}% + }% + \fi \gdef\tikzexternal@externalizefig@systemcall@next{\tikzexternal@closeenvironments}% \fi \tikzexternal@externalizefig@systemcall@next }% +\def\tikzexternal@externalizefig@systemcall@call#1{% + \iftikzexternal@verboseio + \immediate\write16{===== 'mode=convert with system call': Invoking '#1' ========}% + \fi + \immediate\write18{#1}% +}% + % Sets \iftikzexternal@file@isuptodate to false if one of the "force % remake" things is active. \def\tikzexternal@checkforceremake{% @@ -1656,11 +1616,9 @@ % It returns \iftikzexternal@file@isuptodate accordingly. % #1: the picture-content \long\def\tikzexternal@externalizefig@systemcall@uptodatecheck#1{% + \tikzexternal@check@uptodate@mode{#1}% \tikzexternal@checkforceremake \iftikzexternal@file@isuptodate - \tikzexternal@check@uptodate@mode{#1}% - \fi - \iftikzexternal@file@isuptodate % check if there is already a file. % In that case, use it. If that is not the case, generate it and include it afterwards. \gdef\pgf@filename{}% @@ -1679,14 +1637,70 @@ \xdef\pgf@tempa{\noexpand\pgf@findfile\pgfsys@imagesuffixlist:+{\tikzexternal@curfilename}}% \pgf@tempa \ifx\pgf@filename\pgfutil@empty% - \tikzerror{Sorry, the system call '#1' did NOT result in a usable output file '\tikzexternal@curfilename' (expected one of \pgfsys@imagesuffixlist). Please verify that you have enabled system calls. For pdflatex, this is 'pdflatex -shell-escape'. Sometimes it is also named 'write 18' or something like that. Or maybe the command simply failed? Error messages can be found in '\tikzexternal@curfilename.log'. If you continue now, I'll try to typeset the picture}{}% + \tikzexternal@externalizefig@systemcall@handleexception{#1}% \fi }% +\def\tikzexternal@externalizefig@systemcall@handleexception@msg#1{% + \tikzerror{Sorry, the system call '#1' did NOT result in a usable output file '\tikzexternal@curfilename' (expected one of \pgfsys@imagesuffixlist). Please verify that you have enabled system calls. For pdflatex, this is 'pdflatex -shell-escape'. Sometimes it is also named 'write 18' or something like that. Or maybe the command simply failed? Error messages can be found in '\tikzexternal@curfilename.log'. If you continue now, I'll try to typeset the picture}{}% +} +\def\tikzexternal@externalizefig@systemcall@handleexception@retry@later#1{% + \gdef\tikzexternal@systemcall@reschedule@to@end@document{0}% + \expandafter\pgfexternalreaddpth\expandafter{\tikzexternal@curfilename}% + \if1\tikzexternal@systemcall@reschedule@to@end@document + \pgfutil@IfUndefined{AtVeryEndDocument}{% + \tikzexternal@externalizefig@systemcall@handleexception@msg{#1}% + }{% + \immediate\write16{===== The last system call resulted in an EMPTY output file. Maybe it is part of \string\ref. Rescheduling it for \string\end{document}. ========}% + \gdef\tikzexternal@typeset@picture@on@failure{0}% + \tikzexternal@externalizefig@systemcall@reschedule{#1}% + }% + \else + \tikzexternal@externalizefig@systemcall@handleexception@msg{#1}% + \fi +} + +% reschedules the externalization of the current file to +% \AtVeryEndDocument. +% +% This hook allows to execute code AFTER the main .aux file is +% finished; it will even re-read the main aux file. +\def\tikzexternal@externalizefig@systemcall@reschedule#1{% + \t@tikzexternal@tmpb={% + \global\let\tikzexternal@externalizefig@systemcall@handleexception=\tikzexternal@externalizefig@systemcall@handleexception@msg% + % ... no auxlocks! + \tikzexternal@externalizefig@systemcall@call{#1}% + \tikzexternal@externalizefig@systemcall@assertsuccess{#1}% + }% + \xdef\pgfutil@tempa{% + \noexpand\def\noexpand\tikzexternal@curfilename{\tikzexternal@curfilename}% + \the\t@tikzexternal@tmpb + }% + \expandafter\AtVeryEndDocument\expandafter{\pgfutil@tempa}% + \gdef\tikzexternal@has@rescheduled@something{1}% +}% +\let\tikzexternal@externalizefig@systemcall@handleexception=\tikzexternal@externalizefig@systemcall@handleexception@retry@later% + +\def\tikzexternal@has@rescheduled@something{0}% +\pgfutil@IfUndefined{AtVeryEndDocument}{}{% + \AtVeryEndDocument{% + \if1\tikzexternal@has@rescheduled@something + \immediate\write16{===== tikzexternal: \string\end{document} reached. Working on rescheduled images to resolve references... ========}% + \fi + }% +} % Overwrite error message of pgf. % This happens if the generated image was empty, i.e. if there was no \shipout. \def\pgfexternal@error@no@shipout{% \begingroup + \begingroup + % overwrite .dpth file in order to flag the file as "need to be scheduled + % for \AtVeryEndDocument" : + \immediate\openout\pgf@plotwrite=\pgfactualjobname.dpth + \let\w@pgfexternal@auxout=\pgf@plotwrite + \pgfexternalstorecommand@isexporting{\gdef\noexpand\tikzexternal@systemcall@reschedule@to@end@document{1}}% + \immediate\closeout\pgf@plotwrite + \endgroup \tikzexternal@assemble@systemcall{\pgfactualjobname}{\pgf@tempa}% \toks0=\expandafter{\pgf@tempa}% \tikzerror{Sorry, image externalization failed: the resulting image was EMPTY. I tried to externalize '\pgfactualjobname', but it seems there is no such image in the document!? diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzlibraryexternal.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzlibraryexternal.code.tex index 7e41bce2e56..e4ef015455f 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzlibraryexternal.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzlibraryexternal.code.tex @@ -19,7 +19,7 @@ % with the deployment of this patch or partial content of PGF. Note that the author and/or maintainer of pgfplots has no obligation to fix anything: % This file comes without any warranty as the rest of pgfplots; there is no obligation for help. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%% Date of this copy: Di 25. Dez 18:14:20 CET 2012 %%% +%%% Date of this copy: Do 31. Dez 19:01:21 CET 2015 %%% @@ -47,9 +47,26 @@ % It replaces \tikzpicture/ \endtikzpicture and \tikz and invokes \beginpgfgraphicnamed ... \endpgfgraphicnamed % commands if necessary. +% load this package in order to get \pdf@mdfivesum . +% \pdf@mdfivesum is available for pdftex and lualatex and computes the +% md5 sum. Note that pdftex has \pdfmdfivesum, but lualatex does not +% have it. +% +% ... also used for \pdf@shellescape. +\usepackage{pdftexcmds} +\pgfutil@IfFileExists{atveryend.sty}{% + \usepackage{atveryend}% +}{% + \message{! Package tikz Warning: \string\usepackage{atveryend} impossible. Automatic resolving of references within external files impossible.}% +}% + % source generic implementation: \input pgfplotsoldpgfsupp_tikzexternalshared.code.tex +\pgfutil@IfUndefined{pdf@mdfivesum}{}{% + \let\tikzexternal@mdfivesum=\pdf@mdfivesum +}% + \def\tikzexternal@TEXDIALECT@begpicture{\begin{tikzpicture}} \def\tikzexternal@TEXDIALECT@endpicture{\end{tikzpicture}}% @@ -77,6 +94,7 @@ \noexpand\endgroup \noexpand#1{\the\t@tikzexternal@tmpa}% }% + \t@tikzexternal@tmpa={}% release memory. \else \t@tikzexternal@tmpa=\expandafter{\the\t@tikzexternal@tmpa #2\end{#3}}% \def\tikzexternal@TEXDIALECT@collectpicture@next{% @@ -86,8 +104,30 @@ }% \def\tikzexternal@laTeX@collect@until@end@tikzpicturetikzpicturestring{tikzpicture}% +\def\tikzexternal@handle@landscape{% + \ltx@ifpackageloaded{pdflscape}{% + % Work around a bug in conjunction with pdflscape and + % external: without this optimize-away-instruction, the + % externalized image would be rotated - and it will be rotated + % once more again when it is included. + % + % if we "optimize it away", the landscape stuff will be + % omitted. I hope this is enough... might not be entirely + % fool-proof; perhaps we need to set it to \relax. For now, it + % will probably do the job + \tikzset{ + external/.cd, + optimize command away=\landscape, + optimize command away=\endlandscape + }% + }{% + }% +}% + \AtBeginDocument{% \pgfutil@ifundefined{tikzexternalrealjob}{% \global\let\tikzexternalrealjob=\jobname }{}% + \tikzexternal@handle@landscape }% + diff --git a/Master/texmf-dist/tex/generic/pgfplots/pgfplots.code.tex b/Master/texmf-dist/tex/generic/pgfplots/pgfplots.code.tex index baad7fe4c4e..e3a6cfabb32 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/pgfplots.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/pgfplots.code.tex @@ -151,7 +151,15 @@ % Invokes '#2' if a cycle list named '#1' exists and '#3' if not. \long\def\pgfplotsifcyclelistexists#1#2#3{% - \pgfutil@IfUndefined{pgfp@cyclist@\string#1@}{#3}{#2}% + \pgfutil@IfUndefined{pgfp@cyclist@\string#1@}{% + \pgfkeysifdefined{/pgfplots/cycle list/\string#1/.@cmd}{% + \pgfplotsthrow{cycle list instantiation needed}{#1}\pgfeov + % note that we cannot instantiate it lazily at this point :-( + }{}% + #3% + }{% + #2% + }% }% \def\pgfplots@label@upgrade@warning{% @@ -164,10 +172,100 @@ % 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\pgfplotscreateplotcyclelist#1#2{\expandafter\pgfplots@assign@list\csname pgfp@cyclist@\string#1@\endcsname{#2}} +% #2: the list entries. +% It accepts the following formats: +% \pgfplotscreateplotcyclelist{name}{[of colormap]}% +% \pgfplotscreateplotcyclelist{name}{[of colormap=<colormap name>]}% +% \pgfplotscreateplotcyclelist{name}{[colors of colormap={<list>}{<colormap name>}]}% +% \pgfplotscreateplotcyclelist{name}{[indices of colormap={<list>}{<colormap name>}]}% +% \pgfplotscreateplotcyclelist{name}{comma-separated-list} +% \pgfplotscreateplotcyclelist{name}{'\\'-separated list(requires the last item to be terminated by '\\')} +\def\pgfplotscreateplotcyclelist#1#2{% + \pgfkeysinterruptkeyfilter + \pgfplotscreateplotcyclelist@check@specials{#1}{#2}#2\pgfplots@EOI% + \endpgfkeysinterruptkeyfilter +}% + +\def\pgfplotscreateplotcyclelist@check@specials#1#2{% + \pgfutil@ifnextchar[{% + \pgfplotscreateplotcyclelist@check@specials@{#1}% + }{% + \pgfplotscreateplotcyclelist@check@specials@@{#1}{#2}% + }% +}% +\def\pgfplotscreateplotcyclelist@check@specials@#1[#2]{% + \pgfqkeys{/pgfplots/@cycle}{result name={#1},#2}% + \pgfutil@ifnextchar\pgfplots@EOI{% + \pgfplots@gobble@until@EOI + }{% + \pgfplotscreateplotcyclelist@check@specials@gobble@error{#2}% + }% +}% +\def\pgfplotscreateplotcyclelist@check@specials@gobble@error#1#2\pgfplots@EOI{% + \t@pgfplots@tokb={[#1]}% + \t@pgfplots@toka={#2}% + \pgfplots@error{Encountered unexpected characters '\the\t@pgfplots@toka' after option '\the\t@pgfplots@tokb' in cycle list definition}% +}% +\def\pgfplotscreateplotcyclelist@check@specials@@#1#2#3\pgfplots@EOI{% + \expandafter\pgfplots@assign@list\csname pgfp@cyclist@\string#1@\endcsname{#2}% +} + +\def\pgfplotscreateplotcyclelist@check@specials@process@colormap@conversion#1#2{% + \pgfplots@color@of@colormap@parse{#1}% + \begingroup + \gdef\pgfplots@glob@TMPa{}% + \gdef\pgfplots@glob@TMPb{0}% + \def\pgfplots@loc@TMPa{\foreach \x in }% + \expandafter\pgfplots@loc@TMPa\expandafter{\pgfplots@color@of@colormap@value}{% + \t@pgfplots@tokb=\expandafter{\pgfplots@color@of@colormap@name}% + \edef\currentValue{#2=\x\space of \the\t@pgfplots@tokb}% + % + \t@pgfplots@toka=\expandafter{\pgfplots@glob@TMPa}% + \t@pgfplots@tokb=\expandafter{\currentValue\\}% + \xdef\pgfplots@glob@TMPa{\the\t@pgfplots@toka\the\t@pgfplots@tokb}% + % + \pgfplotsutil@advancestringcounter@global\pgfplots@glob@TMPb + \ifnum\pgfplots@glob@TMPb>\pgfkeysvalueof{/pgfplots/@cycle/max size} % + % cycle lists have quadratic runtime. Use small ones! + \pgfplotswarning{cycle list size limit reached}\pgfeov + \breakforeach + \fi + }% + \endgroup + \pgfkeysgetvalue{/pgfplots/@cycle/result name}\pgfplots@color@of@colormap@name + \t@pgfplots@tokb=\expandafter{\pgfplots@color@of@colormap@name}% + \t@pgfplots@toka=\expandafter{\pgfplots@glob@TMPa}% + \edef\pgfplots@loc@TMPa{\noexpand\pgfplotscreateplotcyclelist{\the\t@pgfplots@tokb}{\the\t@pgfplots@toka}}% +%\message{got \meaning\pgfplots@loc@TMPa^^J}% + \pgfplots@loc@TMPa +}% + +\pgfqkeys{/pgfplots/@cycle}{% + result name/.initial=, + max size/.initial=80, + of colormap/.code={% + \pgfplotsutilifstringequal{#1}{\pgfkeysnovalue}{% + \pgfkeysgetvalue{/pgfplots/colormap name}\pgfplots@loc@TMPa + \t@pgfplots@toka=\expandafter{\pgfplots@loc@TMPa}% + \edef\pgfplots@loc@TMPa{% + \noexpand\pgfkeysalso{indices of colormap={0,...,\pgfplotscolormaplastindexof{\pgfplots@loc@TMPa}} of {\the\t@pgfplots@toka}}% + }% + \pgfplots@loc@TMPa + }{% + \pgfplotscolormapifdefined{#1}{% + \pgfkeysalso{indices of colormap={0,...,\pgfplotscolormaplastindexof{#1}} of {#1}}% + }{% + \pgfplots@error{There is no such colormap '#1'. Maybe you need to write \string\pgfplotsset{#1} first?}% + }% + }% + },% + colors of colormap/.code={% + \pgfplotscreateplotcyclelist@check@specials@process@colormap@conversion{#1}{color of colormap}% + }, + indices of colormap/.code={% + \pgfplotscreateplotcyclelist@check@specials@process@colormap@conversion{#1}{index of colormap}% + }, +} \pgfplotscreateplotcyclelist{black white}{% every mark/.append style={fill=gray},mark=*\\% @@ -223,6 +321,7 @@ every mark/.append style={solid,fill=\pgfplots@mark@list@fill},mark=halfsquare left*\\% } \def\pgfplots@mark@list@fill{\pgfkeysvalueof{/pgfplots/mark list fill}} +\let\pgfplotsmarklistfill=\pgfplots@mark@list@fill \pgfplotscreateplotcyclelist{exotic}{% teal,every mark/.append style={fill=teal!80!black},mark=*\\% orange,every mark/.append style={fill=orange!80!black},mark=square*\\% @@ -333,24 +432,40 @@ \def\pgfplots@loc@TMPb{lower}% \expandafter\def\csname pgfplots@#1ticklabel@pos\endcsname{l}% \ifx\pgfplots@loc@TMPa\pgfplots@loc@TMPb + % =lower \else \def\pgfplots@loc@TMPb{upper}% \ifx\pgfplots@loc@TMPa\pgfplots@loc@TMPb + % = upper \expandafter\def\csname pgfplots@#1ticklabel@pos\endcsname{u}% \else \def\pgfplots@loc@TMPb{default}% \ifx\pgfplots@loc@TMPa\pgfplots@loc@TMPb + % = default \expandafter\def\csname pgfplots@#1ticklabel@pos\endcsname{}% \else \def\pgfplots@loc@TMPb{left}% \ifx\pgfplots@loc@TMPa\pgfplots@loc@TMPb + % = left [ alias for 'lower' ] \else \def\pgfplots@loc@TMPb{right}% \ifx\pgfplots@loc@TMPa\pgfplots@loc@TMPb + % = right [ alias for 'upper' ] \expandafter\def\csname pgfplots@#1ticklabel@pos\endcsname{u}% \else - \expandafter\def\csname pgfplots@#1ticklabel@pos\endcsname{}% - \pgfplots@error{Sorry, the key '#1ticklabel pos' does not know what to do with '#2'... accepted values are 'default, 'lower', 'upper' and some aliases. Maybe you misspelled it?}% + \def\pgfplots@loc@TMPb{bottom}% + \ifx\pgfplots@loc@TMPa\pgfplots@loc@TMPb + % = bottom [ alias for 'lower' ] + \else + \def\pgfplots@loc@TMPb{top}% + \ifx\pgfplots@loc@TMPa\pgfplots@loc@TMPb + % = top [ alias for 'upper' ] + \expandafter\def\csname pgfplots@#1ticklabel@pos\endcsname{u}% + \else + \expandafter\def\csname pgfplots@#1ticklabel@pos\endcsname{}% + \pgfplots@error{Sorry, the key '#1ticklabel pos' does not know what to do with '#2'... accepted values are 'default, 'lower', 'upper' and some aliases. Maybe you misspelled it?}% + \fi + \fi \fi \fi \fi @@ -385,17 +500,19 @@ \def\pgfplots@cycle@multi@list#1{% \def\pgfplots@loc@TMPb{0}% \gdef\pgfplots@cycle@multi@list@finalize@{}% + \pgfkeysinterruptkeyfilter \pgfplots@cycle@multi@list@#1\nextlist\pgfplots@cycle@multi@list@EOI + \endpgfkeysinterruptkeyfilter }% \def\pgfplots@cycle@multi@list@#1\nextlist{% - \def\pgfplots@loc@TMPa{#1}% + \pgfkeys@spdef\pgfplots@loc@TMPa{#1}% \ifx\pgfplots@loc@TMPa\pgfutil@empty % ignore it if someone provided too many \nextlist commands. \else % parse and store list: \begingroup - \def\pgfplots@as@string{#1}% this deals with control sequences inside of #1. - \pgfplots@command@to@string\pgfplots@as@string\pgfplots@as@string + % this deals with control sequences inside of #1: + \pgfplots@command@to@string\pgfplots@loc@TMPa\pgfplots@as@string \expandafter\pgfplots@cycle@multi@list@findnamed\pgfplots@as@string\pgfplots@EOI \global\let\pgfplots@glob@TMPa=\pgfplots@loc@TMPa \endgroup @@ -413,7 +530,7 @@ \endgroup \pgfkeyslet{/pgfplots/cycle multi list/@totalN\pgfplots@loc@TMPb}\pgfmathresult \pgfkeyslet{/pgfplots/cycle multi list/@N\pgfplots@loc@TMPb}\pgfmathresult -%\def\temp{#1}\message{cycle multi list/@list={\meaning\temp}; /@N\pgfplots@loc@TMPb = \pgfkeysvalueof{/pgfplots/cycle multi list/@N\pgfplots@loc@TMPb}.}% +%\def\temp{#1}\message{cycle multi list/@list={\meaning\temp}; /@N\pgfplots@loc@TMPb = \pgfkeysvalueof{/pgfplots/cycle multi list/@N\pgfplots@loc@TMPb}^^J}% \pgfplotsutil@advancestringcounter\pgfplots@loc@TMPb \fi % @@ -424,6 +541,9 @@ }% }% +\def\pgfplots@colormap@catcodemagic{colormap} +\pgfplots@command@to@string\pgfplots@colormap@catcodemagic\pgfplots@colormap@catcodemagic + % checks for % - <known list> % - [<elements> of]<known list> @@ -436,17 +556,38 @@ \def\pgfplots@cycle@multi@list@findnamed{\pgfutil@ifnextchar[{\pgfplots@cycle@multi@list@findnamed@}{\pgfplots@cycle@multi@list@findnamed@[]}}% \def\pgfplots@cycle@multi@list@findnamed@[#1]#2\pgfplots@EOI{% \def\pgfplots@loc@TMPa{#1}% + \pgfplots@loc@tmptrue \ifx\pgfplots@loc@TMPa\pgfutil@empty \else - \pgfplots@cycle@multi@list@findnamed@@#1 \pgfplots@EOI + \expandafter\pgfutil@in@\expandafter{\pgfplots@colormap@catcodemagic}{#1}% + \ifpgfutil@in@ + % ups! This is actually one of + % [of colormap] + % [colors of colormap={...}] + % [indices of colormap={...}] + % which define a single cycle list! This is not what we aim + % for. Abort + \let\pgfplots@loc@TMPa=\pgfutil@empty + \pgfplots@loc@tmpfalse + \else + \pgfplots@cycle@multi@list@findnamed@@#1 \pgfplots@EOI + \fi + \fi + % + \ifpgfplots@loc@tmp + \pgfplotsifcyclelistexists{#2}{% + \expandafter\let\expandafter\pgfplots@loc@TMPa\csname pgfp@cyclist@\string#2@\endcsname% + }{% + \let\pgfplots@loc@TMPa=\pgfutil@empty + }% \fi - \pgfplotsifcyclelistexists{#2}{% - \expandafter\let\expandafter\pgfplots@loc@TMPa\csname pgfp@cyclist@\string#2@\endcsname% - }{% - \let\pgfplots@loc@TMPa=\pgfutil@empty - }% } -\def\pgfplots@cycle@multi@list@findnamed@@#1 {\pgfutil@ifnextchar o{\pgfplots@cycle@multi@list@findnamed@@@{#1}}{\pgfplots@cycle@multi@list@findnamed@@@{#1}of}}% +% #1: <elements> (an integer) +\def\pgfplots@cycle@multi@list@findnamed@@#1 {% + \pgfutil@ifnextchar o + {\pgfplots@cycle@multi@list@findnamed@@@{#1}}% + {\pgfplots@cycle@multi@list@findnamed@@@{#1}of}% +}% \def\pgfplots@cycle@multi@list@findnamed@@@#1of#2\pgfplots@EOI{% \begingroup \t@pgfplots@toka=\expandafter{\pgfplots@cycle@multi@list@finalize@}% @@ -460,6 +601,24 @@ \def\pgfplots@cycle@multi@list@finalize\pgfplots@cycle@multi@list@EOI{% \pgfkeyslet{/pgfplots/cycle multi list/@dim}\pgfplots@loc@TMPb \pgfplots@cycle@multi@list@finalize@ + \c@pgf@countd=0 % + \c@pgf@counta=0 % + \pgfplotsloop{% + \ifnum\c@pgf@counta<\pgfplots@loc@TMPb\relax + \pgfplotsloopcontinuetrue + \else + \pgfplotsloopcontinuefalse + \fi + }{% + \pgfkeysgetvalue{/pgfplots/cycle multi list/@N\the\c@pgf@counta}\pgfplots@cycle@N + \ifnum\c@pgf@countd<\pgfplots@cycle@N\relax + \c@pgf@countd=\pgfplots@cycle@N\relax + \fi + \advance\c@pgf@counta by1 + }% + \edef\pgfplots@loc@TMPd{\the\c@pgf@countd}% + \pgfkeyslet{/pgfplots/cycle multi list/@maxlen}\pgfplots@loc@TMPd +%\message{cycle multi list/@maxlen=\pgfplots@loc@TMPd^^J}% }% \def\pgfplots@pgfkeys@set@point@meta@value#1{% @@ -478,10 +637,8 @@ }% \expandafter\pgfplots@loc@TMPc\expandafter{\pgfplots@loc@TMPb}% }{% - \pgfplotsthrow{invalid argument} - {\pgfplots@loc@TMPa}% - {Sorry, `##1' is no valid choice for `point meta'. Maybe you misspelled it?}% - \pgfeov + % oh, then it will be a math expression. + \pgfplots@invoke@pgfkeyscode{/pgfplots/point meta/expr/.@cmd}{#1}% }% }% % disassemble key'='value: @@ -506,6 +663,54 @@ % }% +\def\pgfplots@color@of@colormap@parse#1{% + \pgfutil@in@{of }{#1}% + \ifpgfutil@in@ + \pgfplots@color@of@colormap@parse@in#1\pgfplots@EOI + \else + \pgfkeysgetvalue{/pgfplots/colormap name}\pgfplots@color@of@colormap@name + \edef\pgfplots@color@of@colormap@value{#1}% + \fi +}% +\def\pgfplots@color@of@colormap@parse@in#1of #2\pgfplots@EOI{% + \pgfkeys@spdef\pgfplots@color@of@colormap@value{#1}% + \edef\pgfplots@color@of@colormap@value{\pgfplots@color@of@colormap@value}% + \pgfkeys@spdef\pgfplots@color@of@colormap@name{#2}% +} +% defines +% - \pgfmathresult to be the resulting color. +% - \pgfplots@color@of@colormap@name the name of the colormap +\def\pgfplots@color@of@colormap@define#1{% + \pgfplots@color@of@colormap@parse{#1}% + % + \pgfplotscolormapifdefined{\pgfplots@color@of@colormap@name}{}{% + % hm... the colormap does not exist? Perhaps someone used '4 of colormap/cool'. Try to define it! + \pgfkeysifdefined{/pgfplots/\pgfplots@color@of@colormap@name/.@cmd}{% + \pgfkeysgetvalue{/pgfplots/colormap name}\pgfplots@color@of@colormap@name@old + \pgfplotsset{\pgfplots@color@of@colormap@name}% + \pgfkeysgetvalue{/pgfplots/colormap name}\pgfplots@color@of@colormap@name + \pgfkeyslet{/pgfplots/colormap name}\pgfplots@color@of@colormap@name@old + }{% + % let it run into an error... + }% + }% + % + \if m\pgfplots@color@of@colormap@access + \expandafter\pgfplotscolormapfind\expandafter[\pgfplotspointmetatransformedrange] + [1.0] + {\pgfplots@color@of@colormap@value} + {\pgfplots@color@of@colormap@name} + \else + \pgfplotscolormapgetindex{\pgfplots@color@of@colormap@value}{\pgfplots@color@of@colormap@name}% + \fi +}% +\def\pgfplots@color@of@colormap#1{% + \pgfplots@color@of@colormap@define{#1}% + \def\pgfplots@loc@TMPb{\pgfutil@definecolor{.}{\csname pgfpl@cm@\pgfplots@color@of@colormap@name @colspace\endcsname}}% + \expandafter\pgfplots@loc@TMPb\expandafter{\pgfmathresult}% + \tikzset{color=.}% +} + \newif\ifpgfplots@stackedmode \newif\ifpgfplotsplothandlermesh@shownormals @@ -658,6 +863,9 @@ /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 except legend/.style={}, + /pgfplots/every axis plot except legend/.belongs to family=/pgfplots/style commands, + /pgfplots/axis plot except legend style/.style={/pgfplots/every axis plot except legend/.append style={#1}}, /pgfplots/every axis plot post/.style={}, /pgfplots/every axis plot post/.append code={\pgfplotsdeprecatedstylecheck{/tikz/every axis plot}}, /pgfplots/trig format plots/.is choice, @@ -1067,6 +1275,21 @@ },% /pgfplots/colorbar sampled line/.default={scatter,only marks}, % + /pgfplots/colorbar as palette/.style={ + colorbar sampled={ + surf, + colormap access=direct, + shader=flat corner, + samples=\pgfplotscolormapsizeof + {\pgfkeysvalueof{/pgfplots/colormap name}}+1, + }, + colorbar style={ + point meta min=0, + point meta max=\pgfplotscolormapsizeof + {\pgfkeysvalueof{/pgfplots/colormap name}}, + }, + }, + % /pgfplots/colorbar sampled/.style={% colorbar, /pgfplots/colorbar/draw/.code={% @@ -1287,6 +1510,9 @@ /pgfplots/major tick length/.belongs to family=/pgfplots/tick, /pgfplots/major tick length/.initial=0.15cm, % + /pgfplots/xtick distance/.initial=, + /pgfplots/ytick distance/.initial=, + /pgfplots/ztick distance/.initial=, /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') @@ -1504,6 +1730,10 @@ /pgfplots/near ticklabel align/center/.code= \def\pgfplots@borderanchor@align{1}, /pgfplots/near ticklabel align/outside/.code=\def\pgfplots@borderanchor@align{2}, /pgfplots/near ticklabel align/center, + % + /tikz/near ticklabel at/.style={/pgfplots/near ticklabel at=#1}, + /pgfplots/near ticklabel at/.initial=, + % /pgfplots/cell picture/.is choice, /pgfplots/cell picture/false/.code=\def\pgfplots@cell@picture@mode{0}, /pgfplots/cell picture/true/.code=\def\pgfplots@cell@picture@mode{1}, @@ -1672,7 +1902,18 @@ /pgfplots/empty legend/.style={/pgfplots/legend image code/.code=}, /pgfplots/line legend/.style={% /pgfplots/legend image code/.code={% - \draw[mark repeat=2,mark phase=2,##1] + \draw[% + /pgfplots/mesh=false,% + % reset bar options. This is to address the strange + % backwards compatibility handling implemented by + % \pgfplots@install@local@bar@handlers (see its docs). + % This should not hurt at all since 'line legend' is + % unsuitable for bar plots anyway. + bar width=3pt,% + bar shift=0pt,% + % + mark repeat=2,% + mark phase=2,##1] plot coordinates { (0cm,0cm) (0.3cm,0cm) @@ -1812,6 +2053,10 @@ /pgfplots/stack plots/false/.code={\pgfplots@stackedmodefalse}, /pgfplots/stack plots/false/.belongs to family=/pgfplots, /pgfplots/stack plots=false, + /pgfplots/stack negative/.is choice, + /pgfplots/stack negative/on previous/.code={\def\pgfplots@stacked@negative@mode{P}}, + /pgfplots/stack negative/separate/.code={\def\pgfplots@stacked@negative@mode{S}}, + /pgfplots/stack negative/on previous, /pgfplots/reverse stacked plots/.is if=pgfplots@stacked@reverse, /pgfplots/reverse stacked plots/.belongs to family=/pgfplots, /pgfplots/reverse stacked plots/.default=true, @@ -2063,10 +2308,12 @@ /pgfplots/view/az={#1},% /pgfplots/view/el={#2}% },% - /pgfplots/cycle list/.code={% - \pgfplots@assign@list\autoplotspeclist{#1}% - \expandafter\let\csname pgfp@cyclist@auto@\endcsname=\autoplotspeclist - \pgfkeyssetvalue{/pgfplots/cycle multi list/@dim}{0}% de-activate. + /pgfplots/cycle list/.define/.code 2 args={% + \pgfplotscreateplotcyclelist{#1}{#2}% + }, + /pgfplots/cycle list/.style={% + /pgfplots/cycle list/.define={@internal@}{#1},% + /pgfplots/cycle list name={@internal@}% }, /pgfplots/cycle list/.belongs to family=/pgfplots, /pgfplots/cycle list name/.code={% @@ -2086,7 +2333,23 @@ % <first list spec>\nextlist <second list spec>\nextlist .... % where each list spec is EITHER a cycle list name OR a cycle list % argument. - /pgfplots/cycle multi list/.code={\pgfplots@cycle@multi@list{#1}}, + /pgfplots/cycle multi list/.code={% + \def\pgfplots@cycle@multi@list@sequence{L}% [L]exicographical + \pgfplots@cycle@multi@list{#1}% + }, + /pgfplots/cycle multi list/.belongs to family=/pgfplots, + /pgfplots/cycle multiindex list/.code={% + \def\pgfplots@cycle@multi@list@sequence{M}% [M]ultiindex + \def\pgfplots@cycle@multi@list@repeat{A}% [A]ll + \pgfplots@cycle@multi@list{#1}% + }, + /pgfplots/cycle multiindex list/.belongs to family=/pgfplots, + /pgfplots/cycle multiindex* list/.code={% + \def\pgfplots@cycle@multi@list@sequence{M}% [M]ultiindex + \def\pgfplots@cycle@multi@list@repeat{S}% [S]ingle + \pgfplots@cycle@multi@list{#1}% + }, + /pgfplots/cycle multiindex* list/.belongs to family=/pgfplots, % #1: list index % #2: maximum number of elements to use /pgfplots/cycle multi list/partial sublist/.code 2 args={% @@ -2099,6 +2362,7 @@ \fi },% /pgfplots/cycle multi list/@dim/.initial=0, + %/pgfplots/cycle multi list/@maxlen/.initial=0, %/pgfplots/cycle multi list/@list0/.style={}, %/pgfplots/cycle multi list/@N0/.initial=0,% %/pgfplots/cycle multi list/@totalN0/.initial=0,% @@ -2303,6 +2567,16 @@ /pgfplots/every boxed y axis/.style={}, /pgfplots/every boxed z axis/.style={}, % /pgfplots/hide axis/.belongs to family=/pgfplots, + % + /pgfplots/axis x line shift/.initial=, + /pgfplots/axis y line shift/.initial=, + /pgfplots/axis z line shift/.initial=, + /pgfplots/axis line shift/.style={% + /pgfplots/axis x line shift={#1},% + /pgfplots/axis y line shift={#1},% + /pgfplots/axis z line shift={#1},% + },% + % % sets \pgfplots@xaxislinesnum to % box=0 % bottom=1 @@ -2751,6 +3025,7 @@ }, /pgfplots/every error bar/.style={thin}, /pgfplots/every error bar/.append code={\pgfplotsdeprecatedstylecheck{/tikz/every error bar}}, + /pgfplots/error bars/allow name path/.is if=pgfplots@error@bars@allow@name@path, /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}% @@ -2762,6 +3037,9 @@ }; }, /pgfplots/every node near coord/.style={}, + /pgfplots/nodes near coords style/.style={/pgfplots/every node near coord/.append style={#1}}, + /pgfplots/node near coords style/.style={/pgfplots/every node near coord/.append style={#1}}, + /pgfplots/node near coord style/.style={/pgfplots/every node near coord/.append style={#1}}, % % Replaces the 'nodes near coords' CONFIGURATION by its default % settings. It does NOT activate 'nodes near coords'. @@ -2893,6 +3171,10 @@ /pgfplots/nodes near coords align={% anchor=center, }, + % + % ... just in case someone uses xbar stacked together with + % 'bar shift': + /pgfplots/every node near coord/.append style={yshift={\pgfplotbarshift}},% }, % Replaces the 'nodes near coords' CONFIGURATION by one suitable % for ybar stacked @@ -2924,6 +3206,10 @@ /pgfplots/nodes near coords align={% anchor=center, }, + % + % ... just in case someone uses ybar stacked together with + % 'bar shift': + /pgfplots/every node near coord/.append style={xshift={\pgfplotbarshift}},% }, % % @@ -2991,18 +3277,45 @@ /pgfplots/single ybar legend/.style={ /pgfplots/legend image code/.code={\draw[##1,/tikz/.cd,bar width=6pt,yshift=-0.2em,bar shift=0pt] plot coordinates {(0pt,0.8em)};}, }, + % + % A style which shifts bars automatically such that they are + % adjacent to each other. It applies to bars of the same type + % only. + % #1: the space between adjacent bars + /pgfplots/bar shift auto/.style={% + /pgf/bar shift={% + % total width = n*w + (n-1)*skip + % -> subtract half for centering + -0.5*(\numplotsofactualtype*\pgfplotbarwidth + (\numplotsofactualtype-1)*(#1)) + + % the '0.5*w' is for centering + (.5+\plotnumofactualtype)*\pgfplotbarwidth + \plotnumofactualtype*(#1)},% + }, + /pgfplots/bar shift auto/.default={2pt},% + % + % + % FIXME : never tested so far + % #1: width + % #2: separation space + /pgfplots/plot yshift auto/.style 2 args={/pgfplots/plot shift auto={y}{#1}{#2}},% + /pgfplots/plot xshift auto/.style 2 args={/pgfplots/plot shift auto={x}{#1}{#2}},% + /pgfplots/plot shift auto/.style args={#1#2#3}{% + /pgfplots/axis plot except legend style={% + #1shift={% + % total width = n*w + (n-1)*skip + % -> subtract half for centering + -0.5*(\numplotsofactualtype*(#1) + (\numplotsofactualtype-1)*(#2)) + + % the '0.5*w' is for centering + (.5+\plotnumofactualtype)*(#1) + \plotnumofactualtype*(#2)% + },% + }, + }, /pgfplots/ybar/.style={ bar direction=y, bar cycle list, xtick align=outside, ybar legend, /pgfplots/set point meta if empty=f(x),% - /pgf/bar shift={% - % total width = n*w + (n-1)*skip - % -> subtract half for centering - -0.5*(\numplotsofactualtype*\pgfplotbarwidth + (\numplotsofactualtype-1)*#1) + - % the '0.5*w' is for centering - (.5+\plotnumofactualtype)*\pgfplotbarwidth + \plotnumofactualtype*#1},% + /pgfplots/bar shift auto={#1}, /pgfplots/error bars/draw error bar/.code 2 args={% % FIXME: simplify this code! It is just a replication of the default error stuff together with an xshift! \pgfkeysgetvalue{/pgfplots/error bars/error mark}{\pgfplotserrorbarsmark}% @@ -3019,10 +3332,10 @@ }, /pgfplots/ybar/.default=2pt, /pgfplots/xbar legend/.style={ - /pgfplots/legend image code/.code={\draw[##1,/tikz/.cd,bar width=3pt,yshift=-0.2em,bar shift=0pt] plot coordinates {(0cm,0.8em) (2*\pgfplotbarwidth,0.6em)};}, + /pgfplots/legend image code/.code={\draw[##1,/tikz/.cd,bar width=3pt,yshift=-0.2em,bar shift=0pt] plot coordinates {(0.8em,0cm) (0.6em,2*\pgfplotbarwidth)};}, }, /pgfplots/single xbar legend/.style={ - /pgfplots/legend image code/.code={\draw[##1,/tikz/.cd,bar width=6pt,yshift=-0.2em,bar shift=0pt] plot coordinates {(0pt,0.8em)};}, + /pgfplots/legend image code/.code={\draw[##1,/tikz/.cd,bar width=6pt,yshift=0.2ex,bar shift=0pt] plot coordinates {(0.8em,0pt)};}, }, /pgfplots/bar direction/.is choice, /pgfplots/bar direction/auto/.code=\def\pgfplots@bar@direction@choice{a},% @@ -3036,12 +3349,7 @@ ytick align=outside, /pgfplots/xbar legend, /pgfplots/set point meta if empty=x,% - /pgf/bar shift={% - % total width = n*w + (n-1)*skip - % -> subtract half for centering - -0.5*(\numplotsofactualtype*\pgfplotbarwidth + (\numplotsofactualtype-1)*#1) + - % the '0.5*w' is for centering - (.5+\plotnumofactualtype)*\pgfplotbarwidth + \plotnumofactualtype*#1},% + /pgfplots/bar shift auto={#1}, /pgfplots/error bars/draw error bar/.code 2 args={% % FIXME: simplify this code! It is just a replication of the default error stuff together with an xshift! \pgfkeysgetvalue{/pgfplots/error bars/error mark}{\pgfplotserrorbarsmark}% @@ -3091,7 +3399,8 @@ /tikz/xbar interval, }, /pgfplots/xbar interval/.default=1, - /pgfplots/stacked since 1.9/.style={}, + /pgfplots/stacked since 1.9/.code={}, + /pgfplots/stacked since 1.13/.code=, /pgfplots/xbar stacked/.style={ bar direction=x, bar cycle list, @@ -3101,6 +3410,7 @@ /tikz/xbar, stacked since 1.9, activate nodes near coords xbar stacked, + stacked since 1.13, }, /pgfplots/xbar stacked/.default=plus, /pgfplots/ybar stacked/.style={ @@ -3112,6 +3422,7 @@ /tikz/ybar, stacked since 1.9, activate nodes near coords ybar stacked, + stacked since 1.13, }, /pgfplots/ybar stacked/.default=plus, /pgfplots/xbar interval stacked/.style={ @@ -3122,6 +3433,7 @@ stack plots=x, stack dir=#1, /tikz/xbar interval, + stacked since 1.13, }, /pgfplots/xbar interval stacked/.default=plus, /pgfplots/ybar interval stacked/.style={ @@ -3132,6 +3444,7 @@ stack plots=y, stack dir=#1, /tikz/ybar interval, + stacked since 1.13, }, /pgfplots/ybar interval stacked/.default=plus, /pgfplots/yticklabel interval boundaries/.style={% @@ -3208,6 +3521,7 @@ /pgfplots/mesh/true/.code={% \def\pgfplots@meshmode{m}% \let\tikz@plot@handler=\pgfplotsplothandlermesh + \pgfplots@perpointmeta@expandtrue \pgfkeysalso{/pgfplots/set point meta if empty=f(x),/pgfplots/every mesh,/pgfplots/mesh legend,/tikz/color=mapped color}% }, /pgfplots/mesh/false/.code={ @@ -3242,10 +3556,12 @@ % there is no point meta. Set it to "reasonable" defaults: \pgfkeysalso{/pgfplots/point meta/explicit symbolic}% }% + \pgfplots@perpointmeta@expandtrue },% /pgfplots/mesh/color input/explicit mathparse/.code={% \pgfkeysalso{/pgfplots/mesh/color input/explicit}% \def\pgfplotsplothandlermesh@colorinput@mathparse{1}% + \pgfplots@perpointmeta@expandtrue },% /pgfplots/mesh/color input=colormap, % @@ -3283,6 +3599,7 @@ /pgfplots/mesh input/.is choice, /pgfplots/mesh input/lattice/.code= {\def\pgfplotsplothandlermesh@matrixinput{1}}, /pgfplots/mesh input/patches/.code= {\def\pgfplotsplothandlermesh@matrixinput{0}}, + /pgfplots/mesh input/image/.code= {\def\pgfplotsplothandlermesh@matrixinput{2}}, /pgfplots/mesh input/lattice, /pgfplots/patch refines/.initial=0, /pgfplots/hide refined edges/.is if=pgfplotsplothandlermesh@hide@refined@edges, @@ -3299,6 +3616,28 @@ /pgfplots/mesh/show normals/.is if=pgfplotsplothandlermesh@shownormals, /pgfplots/mesh/show normals/.default=true, /pgfplots/mesh/show normals length factor/.initial=50, + % + /pgfplots/late options/.code={% + \pgfplotssetlateoptions{#1}% + }, + % + /pgfplots/matrix plot/.style={% + /pgfplots/late options={% + /pgfplots/y dir=reverse, + /pgfplots/axis on top, + }, + % + /pgfplots/matrix plot*, + }, + /pgfplots/matrix plot*/.style={% + /pgfplots/surf, + /pgfplots/mesh input=image, + /pgfplots/shader=flat corner, + /pgfplots/z buffer=none, + }, + /pgfplots/imagesc/.style={/pgfplots/matrix plot},% + /pgfplots/imagesc*/.style={/pgfplots/matrix plot*},% + % /pgfplots/every patch normal/.style={-stealth,red}, % /pgfplots/mesh/interior colormap/.code 2 args={% @@ -3517,20 +3856,61 @@ /pgfplots/point meta rel/axis wide,% /pgfplots/point meta min/.initial=,% /pgfplots/point meta max/.initial=,% + % + /pgfplots/point meta/expand/.is if=pgfplots@perpointmeta@expand, + /pgfplots/point meta/expand=false, + % /pgfplots/colormap name/.initial=hot, /pgfplots/colormap access/.is choice, /pgfplots/colormap access/direct/.code={\def\pgfplots@colormap@access{d}},% /pgfplots/colormap access/map/.code={\def\pgfplots@colormap@access{m}},% + /pgfplots/colormap access/piecewise constant/.code={\def\pgfplots@colormap@access{c}},% + /pgfplots/colormap access/piecewise linear/.style={/pgfplots/colormap access/map}, /pgfplots/colormap access/map,% %/pgfplots/colormap default colorspace/.initial=auto,% declared in pgfplotscolormap.code.tex /pgfplots/colormap/.code 2 args={% \pgfplotscreatecolormap{#1}{#2}% \pgfkeysalso{/pgfplots/colormap name=#1}% }, + % + % #1: a style name like '/pgfplots/colormap/hot' + /pgfplots/ensure colormap/.code={% + \pgfkeysgetvalue{/pgfplots/colormap name}\pgfplots@ensure@old@cm + \pgfkeysalso{#1}% + \pgfkeyslet{/pgfplots/colormap name}\pgfplots@ensure@old@cm + }, /pgfplots/colormap/hot/.style={ % attention: copied from pgfplots.colormap.code.tex: /pgfplots/colormap={hot}{color(0cm)=(blue); color(1cm)=(yellow); color(2cm)=(orange); color(3cm)=(red)} }, + /pgfplots/colormap/viridis/.style={% + /pgfplots/colormap={viridis}{% + rgb=(0.267,0.00487,0.32942) + rgb=(0.28192,0.08966,0.41241) + rgb=(0.28026,0.1657,0.4765) + rgb=(0.26366,0.23763,0.51877) + rgb=(0.23744,0.3052,0.54192) + rgb=(0.20862,0.36775,0.55267) + rgb=(0.18225,0.42618,0.55711) + rgb=(0.1592,0.48224,0.55807) + rgb=(0.13777,0.53749,0.5549) + rgb=(0.12115,0.59274,0.54465) + rgb=(0.12808,0.64775,0.5235) + rgb=(0.18065,0.7014,0.48819) + rgb=(0.27415,0.75198,0.4366) + rgb=(0.39517,0.79747,0.36775) + rgb=(0.53561,0.83578,0.2819) + rgb=(0.68895,0.86545,0.18272) + rgb=(0.84557,0.88733,0.0997) + rgb=(0.99324,0.90616,0.14394) + }% + }, + % instantiate viridis such that it is in memory by default: + /pgfplots/colormap/viridis, + % ... but reuse hot since it is used to be the default since the + % beginning: + /pgfplots/colormap name=hot, + % /pgfplots/colormap/hot2/.style={ /pgfplots/colormap={hot2}{[1cm]rgb255(0cm)=(0,0,0) rgb255(3cm)=(255,0,0) rgb255(6cm)=(255,255,0) rgb255(8cm)=(255,255,255)} }, @@ -3556,6 +3936,22 @@ /pgfplots/colormap={jet}{rgb255(0cm)=(0,0,128) rgb255(1cm)=(0,0,255) rgb255(3cm)=(0,255,255) rgb255(5cm)=(255,255,0) rgb255(7cm)=(255,0,0) rgb255(8cm)=(128,0,0)} }, % + % color of colormap={300} + % color of colormap={300 of viridis} + /pgfplots/color of colormap/.code={% + % colormap access=map + \def\pgfplots@color@of@colormap@access{m}% + \pgfplots@color@of@colormap{#1}% + },% + /tikz/color of colormap/.style={/pgfplots/color of colormap={#1}}, + % index of colormap={4} + % index of colormap={4 of viridis} + /pgfplots/index of colormap/.code={% + % colormap access=direct + \def\pgfplots@color@of@colormap@access{d}% + \pgfplots@color@of@colormap{#1}% + },% + /tikz/index of colormap/.style={/pgfplots/index of colormap={#1}}, % %% /pgfplots/scatter/.is choice, @@ -3731,9 +4127,27 @@ /pgfplots/ytick placement tolerance/.initial=0.05pt, /pgfplots/ztick placement tolerance/.initial=0.05pt, % + /pgfplots/correct polar positioning/.is choice, + /pgfplots/correct polar positioning/true/.code={\def\b@pgfplots@polaraxis@fix@positioning{1}}, + /pgfplots/correct polar positioning/false/.code={\def\b@pgfplots@polaraxis@fix@positioning{0}}, + % + /pgfplots/correct shader flat/.is choice, + /pgfplots/correct shader flat/true/.code={\def\b@pgfplots@correct@shader@flat{1}}, + /pgfplots/correct shader flat/false/.code={\def\b@pgfplots@correct@shader@flat{0}}, + % + /pgfplots/correct sampling/.is choice, + /pgfplots/correct sampling/true/.code={\let\pgfplotsforeachungroupeduniform@loop@mathengine=\pgfplotsforeachungroupeduniform@loop@mathengine@precise}, + /pgfplots/correct sampling/false/.code={\let\pgfplotsforeachungroupeduniform@loop@mathengine=\pgfplotsforeachungroupeduniform@loop@mathengine@legacy}, + % /pgfplots/compat/anchors/.is choice, - /pgfplots/compat/anchors/pre 1.3/.code={\pgfplots@deprecated@anchorstrue},% FIXME: WAS \global - /pgfplots/compat/anchors/1.3/.code= {\pgfplots@deprecated@anchorsfalse},% + /pgfplots/compat/anchors/pre 1.3/.code={% + \pgfplots@deprecated@anchorstrue + \pgfkeysalso{/pgfplots/correct polar positioning=false}% + }, + /pgfplots/compat/anchors/1.3/.code= {% + \pgfplots@deprecated@anchorsfalse + \pgfkeysalso{/pgfplots/correct polar positioning=false}% + },% /pgfplots/compat/anchors/1.4/.style= {/pgfplots/compat/anchors/1.3},% /pgfplots/compat/anchors/1.5/.style= {/pgfplots/compat/anchors/1.3},% /pgfplots/compat/anchors/1.5.1/.style= {/pgfplots/compat/anchors/1.3},% @@ -3744,6 +4158,7 @@ /pgfplots/compat/anchors/1.10/.style= {/pgfplots/compat/anchors/1.3},% /pgfplots/compat/anchors/1.11/.style= {/pgfplots/compat/anchors/1.3},% /pgfplots/compat/anchors/1.12/.style= {/pgfplots/compat/anchors/1.3},% + /pgfplots/compat/anchors/1.13/.style= {/pgfplots/compat/anchors/1.3,/pgfplots/correct polar positioning=true},% /pgfplots/compat/anchors/newest/.style= {/pgfplots/compat/anchors/1.3},% /pgfplots/compat/anchors/default/.style={/pgfplots/compat/anchors/1.3},% % @@ -3760,6 +4175,7 @@ /pgfplots/compat/empty line/1.10/.style= {/pgfplots/compat/empty line/1.4},% /pgfplots/compat/empty line/1.11/.style= {/pgfplots/compat/empty line/1.4},% /pgfplots/compat/empty line/1.12/.style= {/pgfplots/compat/empty line/1.4},% + /pgfplots/compat/empty line/1.13/.style= {/pgfplots/compat/empty line/1.4},% /pgfplots/compat/empty line/newest/.style= {/pgfplots/compat/empty line/1.4},% /pgfplots/compat/empty line/default/.style= {/pgfplots/compat/empty line/1.4},% % @@ -3776,6 +4192,7 @@ /pgfplots/compat/path replacement/1.10/.style= {/pgfplots/compat/path replacement/1.5.1}, /pgfplots/compat/path replacement/1.11/.style= {/pgfplots/compat/path replacement/1.5.1}, /pgfplots/compat/path replacement/1.12/.style= {/pgfplots/compat/path replacement/1.5.1}, + /pgfplots/compat/path replacement/1.13/.style= {/pgfplots/compat/path replacement/1.5.1}, /pgfplots/compat/path replacement/newest/.style= {/pgfplots/compat/path replacement/1.5.1},% /pgfplots/compat/path replacement/default/.style= {/pgfplots/compat/path replacement/pre 1.3},% % @@ -3792,6 +4209,7 @@ /pgfplots/compat/pgfpoint substitution/1.10/.style= {/pgfplots/compat/pgfpoint substitution/pre 1.3}, /pgfplots/compat/pgfpoint substitution/1.11/.code= {\pgfplots@substitute@pgfpointtrue}, /pgfplots/compat/pgfpoint substitution/1.12/.style= {/pgfplots/compat/pgfpoint substitution/1.11}, + /pgfplots/compat/pgfpoint substitution/1.13/.style= {/pgfplots/compat/pgfpoint substitution/1.11}, /pgfplots/compat/pgfpoint substitution/newest/.style= {/pgfplots/compat/pgfpoint substitution/1.11},% /pgfplots/compat/pgfpoint substitution/default/.style= {/pgfplots/compat/pgfpoint substitution/pre 1.3},% %ellipse/.is if=pgfplots@path@replace@ellipse, @@ -3818,6 +4236,7 @@ /pgfplots/compat/labels/1.10/.style= {/pgfplots/compat/labels/1.8},% /pgfplots/compat/labels/1.11/.style= {/pgfplots/compat/labels/1.8},% /pgfplots/compat/labels/1.12/.style= {/pgfplots/compat/labels/1.8},% + /pgfplots/compat/labels/1.13/.style= {/pgfplots/compat/labels/1.8},% /pgfplots/compat/labels/newest/.style= {/pgfplots/compat/labels/1.8},% /pgfplots/compat/labels/default/.style= {/pgfplots/compat/labels/pre 1.3},% maintain backwards compatibility % @@ -3826,6 +4245,9 @@ /pgfplots/stacked since 1.9/.style={ /pgfplots/stacked ignores zero=false,% backwards compatible. },% + /pgfplots/stacked since 1.13/.style={ + /pgfplots/stack negative=on previous,% backwards compatible. + },% % % empty - early versions did not know anything about them. % But people might have arrived at suitable work-arounds; do @@ -3858,6 +4280,12 @@ /pgfplots/compat/bar nodes/1.10/.style= {/pgfplots/compat/bar nodes/1.9},% /pgfplots/compat/bar nodes/1.11/.style= {/pgfplots/compat/bar nodes/1.9},% /pgfplots/compat/bar nodes/1.12/.style= {/pgfplots/compat/bar nodes/1.9},% + /pgfplots/compat/bar nodes/1.13/.style= { + /pgfplots/compat/bar nodes/1.9, + /pgfplots/stacked since 1.13/.style={ + /pgfplots/stack negative=separate, + },% + },% /pgfplots/compat/bar nodes/newest/.style= {/pgfplots/compat/bar nodes/1.9},% /pgfplots/compat/bar nodes/default/.style= {/pgfplots/compat/bar nodes/pre 1.3},% maintain backwards compatibility /pgfplots/compat/bar nodes/default, @@ -3889,6 +4317,7 @@ /pgfplots/compat/scaling/1.10/.style={/pgfplots/compat/scaling/1.6}, /pgfplots/compat/scaling/1.11/.style={/pgfplots/compat/scaling/1.6}, /pgfplots/compat/scaling/1.12/.style={/pgfplots/compat/scaling/1.6}, + /pgfplots/compat/scaling/1.13/.style={/pgfplots/compat/scaling/1.6}, /pgfplots/compat/scaling/newest/.style={/pgfplots/compat/scaling/1.6}, /pgfplots/compat/scaling/default/.style={/pgfplots/compat/scaling/1.4}, % @@ -3905,6 +4334,7 @@ /pgfplots/compat/scale mode/1.10/.style={/pgfplots/compat/scale mode/1.6}, /pgfplots/compat/scale mode/1.11/.style={/pgfplots/compat/scale mode/1.6}, /pgfplots/compat/scale mode/1.12/.style={/pgfplots/compat/scale mode/1.6}, + /pgfplots/compat/scale mode/1.13/.style={/pgfplots/compat/scale mode/1.6}, /pgfplots/compat/scale mode/newest/.style={/pgfplots/compat/scale mode/1.6}, /pgfplots/compat/scale mode/default/.style={/pgfplots/compat/scale mode/1.5}, % @@ -3922,6 +4352,7 @@ /pgfplots/compat/plot3graphics/1.10/.style= {/pgfplots/compat/plot3graphics/1.6},% /pgfplots/compat/plot3graphics/1.11/.style= {/pgfplots/compat/plot3graphics/1.6},% /pgfplots/compat/plot3graphics/1.12/.style= {/pgfplots/compat/plot3graphics/1.6},% + /pgfplots/compat/plot3graphics/1.13/.style= {/pgfplots/compat/plot3graphics/1.6},% /pgfplots/compat/plot3graphics/newest/.style= {/pgfplots/compat/plot3graphics/1.6},% /pgfplots/compat/plot3graphics/default/.style= {/pgfplots/compat/plot3graphics/1.5},% % @@ -3965,6 +4396,7 @@ /pgfplots/compat/bar width by units/1.10/.style= {/pgfplots/compat/bar width by units/1.7}, /pgfplots/compat/bar width by units/1.11/.style= {/pgfplots/compat/bar width by units/1.7}, /pgfplots/compat/bar width by units/1.12/.style= {/pgfplots/compat/bar width by units/1.7}, + /pgfplots/compat/bar width by units/1.13/.style= {/pgfplots/compat/bar width by units/1.7}, /pgfplots/compat/bar width by units/newest/.style= {/pgfplots/compat/bar width by units/1.7}, /pgfplots/compat/bar width by units/default/.style={/pgfplots/compat/bar width by units/pre 1.3}, % @@ -3981,6 +4413,7 @@ /pgfplots/compat/BB/1.10/.style= {/pgfplots/compat/BB/1.8},% /pgfplots/compat/BB/1.11/.style= {/pgfplots/compat/BB/1.8},% /pgfplots/compat/BB/1.12/.style= {/pgfplots/compat/BB/1.8},% + /pgfplots/compat/BB/1.13/.style= {/pgfplots/compat/BB/1.8},% /pgfplots/compat/BB/newest/.style= {/pgfplots/compat/BB/1.8}, /pgfplots/compat/BB/default/.style={/pgfplots/compat/BB/pre 1.3}, % @@ -3988,6 +4421,8 @@ /pgfplots/compat/general/pre 1.3/.style={ /pgfplots/log origin=infty, /pgfplots/enable tick line clipping=true, + /pgfplots/correct shader flat=false, + /pgfplots/correct sampling=false, /pgfplots/lua backend=false, /pgfplots/compat/library hook={statistics}{/pgfplots/boxplot/estimator=legacy,/pgfplots/boxplot/ensure mark=false}, },% @@ -4013,6 +4448,11 @@ /pgfplots/lua backend, /pgfplots/compat/library hook={statistics}{/pgfplots/boxplot/estimator=Excel,/pgfplots/boxplot/ensure mark=true}, },% + /pgfplots/compat/general/1.13/.style= {% + /pgfplots/compat/general/1.12, + /pgfplots/correct shader flat=true, + /pgfplots/correct sampling=true, + },% /pgfplots/compat/general/newest/.style= {/pgfplots/compat/general/1.12}, /pgfplots/compat/general/default/.style={/pgfplots/compat/general/1.11}, % @@ -4031,7 +4471,7 @@ /pgfplots/compat/show suggested version/.is if=pgfplots@show@suggested@version, /pgfplots/compat/show suggested version=true, /pgfplots/compat/current/.initial=, - /pgfplots/compat/mostrecent/.initial=1.12, + /pgfplots/compat/mostrecent/.initial=1.13, /pgfplots/compat/.style={% % ATTENTION: *every* /pgfplots/compat/ setting needs to accept % the same choices due to this construction: @@ -4192,12 +4632,16 @@ \pgfkeysgetvalue{/pgfplots/samples}\pgfplots@plot@samples \ifx\pgfplots@plot@samples\pgfutil@empty \pgfplots@gettikzinternal@keyval{samples}{tikz@plot@samples}{25}% - \pgfkeyslet{/pgfplots/samples}{\tikz@plot@samples}% \let\pgfplots@plot@samples=\tikz@plot@samples \def\pgfplots@loc@TMPa{0}% <- whether the tikz backw. compatibility shall resample \else \def\pgfplots@loc@TMPa{1}% \fi + % + \pgfplotscoordmath{default}{parse int}{\pgfplots@plot@samples}% + \let\pgfplots@plot@samples=\pgfmathresult + \pgfkeyslet{/pgfplots/samples}{\pgfplots@plot@samples}% + % \pgfkeysgetvalue{/pgfplots/domain}\pgfplots@plot@domain \pgfkeysgetvalue{/pgfplots/samples at}\pgfplots@plot@samples@at \ifx\pgfplots@plot@domain\pgfutil@empty @@ -4298,6 +4742,10 @@ } +% 'inner' means lines which pass through the origin (i.e. lines which +% are not on the outer bounding box). In other words: this has an +% effect if and only if 'axis #1 lines=center' +% % #1: the 'a' axis on the oriented surface (the same as \pgfplotspointonorientedsurfaceA) % #2: the 'b' axis on the orentied surface (the same as \pgfplotspointonorientedsurfaceB) \def\pgfplots@drawaxis@innerlines@onorientedsurf#1#2#3{% @@ -4314,6 +4762,7 @@ }] \pgfextra \csname pgfplotspointonorientedsurfaceabsetupforset#3\endcsname{\csname pgfplots@logical@ZERO@#3\endcsname}{2}% + \pgfplots@transformshift@along@outer@normal@on@line@of@oriented@surf v2% \pgfpathmoveto{\pgfplotspointonorientedsurfaceab{\csname pgfplots@#1min\endcsname}{\csname pgfplots@logical@ZERO@#2\endcsname}}% \pgfpathlineto{\pgfplotspointonorientedsurfaceab{\csname pgfplots@#1max\endcsname}{\csname pgfplots@logical@ZERO@#2\endcsname}}% \endpgfextra @@ -4321,6 +4770,10 @@ \fi }% +% Draws outer axis lines, i.e. those which are on the bounding box. +% This has an effect if and only if axis #1 lines!=center. +% +% % Ok, we don't mind whether edges with thick lines look ugly. We just % draw separate lines. This here is necessary if we want arrow heads. % @@ -4330,27 +4783,30 @@ \if2\csname pgfplots@#1axislinesnum\endcsname % centered axis lines handled elsewhere. \else - \scope[/pgfplots/every outer #1 axis line, - #1discont,decoration={pre length/.expand twice=\csname #1disstart\endcsname, post length/.expand twice=\csname #1disend\endcsname}] + \def\pgfplots@drawaxis@outerlines@separate@onorientedsurf@opts{% + /pgfplots/every outer #1 axis line, + #1discont,decoration={pre length/.expand twice=\csname #1disstart\endcsname, post length/.expand twice=\csname #1disend\endcsname}% + }% \pgfplots@ifaxisline@B@onorientedsurf@should@be@drawn{0}{% - \draw decorate { + \expandafter\draw\expandafter[\pgfplots@drawaxis@outerlines@separate@onorientedsurf@opts] decorate { \pgfextra % exchange roles of A <-> B axes: \pgfplotspointonorientedsurfaceabsetupfor{#2}{#1}{\pgfplotspointonorientedsurfaceN}% + \pgfplots@transformshift@along@outer@normal@on@line@of@oriented@surf 0v% \pgfplots@drawgridlines@onorientedsurf@fromto{\csname pgfplots@#2min\endcsname}% \endpgfextra }; }{}% \pgfplots@ifaxisline@B@onorientedsurf@should@be@drawn{1}{% - \draw decorate { + \expandafter\draw\expandafter[\pgfplots@drawaxis@outerlines@separate@onorientedsurf@opts] decorate { \pgfextra % exchange roles of A <-> B axes: \pgfplotspointonorientedsurfaceabsetupfor{#2}{#1}{\pgfplotspointonorientedsurfaceN}% + \pgfplots@transformshift@along@outer@normal@on@line@of@oriented@surf 1v% \pgfplots@drawgridlines@onorientedsurf@fromto{\csname pgfplots@#2max\endcsname}% \endpgfextra }; }{}% - \endscope \fi }% @@ -4496,49 +4952,99 @@ \edef\pgfplots@listindex{\the\c@pgf@counta}% \fi \ifnum\pgfplots@cycle@dim>0 - % use the 'cycle multi list' feature. - % - % it employs a scalar -> multiindex map like - % void fromScalar( size_t d, size_t scalar, size_t* Iout, const size_t* N ) - % { - % size_t ret=scalar; - % for( int i = d-1; i>=0; --i ) { - % Iout[i] = ret % N[i]; - % ret /= N[i]; - % } - % } - % to get the different indices into the cycle lists. - %-------------------------------------------------- - \c@pgf@counta=\pgfplots@cycle@dim\relax - \c@pgf@countb=\pgfplots@listindex\relax - \advance\c@pgf@counta by-1 - \pgfplotsloop{% - \ifnum\c@pgf@counta<0 - \pgfplotsloopcontinuefalse - \else - \pgfplotsloopcontinuetrue - \fi - }{% - \pgfkeysgetvalue{/pgfplots/cycle multi list/@N\the\c@pgf@counta}\pgfplots@cycle@N - % compute list index: - \pgfplotsmathmodint{\c@pgf@countb}{\pgfplots@cycle@N}% - \divide\c@pgf@countb by \pgfplots@cycle@N\relax + \if L\pgfplots@cycle@multi@list@sequence + % use the 'cycle multi list' feature. % - \expandafter\pgfplots@getautoplotspec@ - \csname pgfp@cyclist@/pgfplots/cycle multi list/@list\the\c@pgf@counta @\endcsname - {\pgfplots@cycle@N}% - {\pgfmathresult}% - \t@pgfplots@toka=\expandafter{#1,}% - \t@pgfplots@tokb=\expandafter{\pgfplotsretval}% - \edef#1{\the\t@pgfplots@toka\the\t@pgfplots@tokb}% + % it employs a scalar -> multiindex map like + % void fromScalar( size_t d, size_t scalar, size_t* Iout, const size_t* N ) + % { + % size_t ret=scalar; + % for( int i = d-1; i>=0; --i ) { + % Iout[i] = ret % N[i]; + % ret /= N[i]; + % } + % } + % to get the different indices into the cycle lists. + %-------------------------------------------------- + \c@pgf@counta=\pgfplots@cycle@dim\relax + \c@pgf@countb=\pgfplots@listindex\relax \advance\c@pgf@counta by-1 - }% + \pgfplotsloop{% + \ifnum\c@pgf@counta<0 + \pgfplotsloopcontinuefalse + \else + \pgfplotsloopcontinuetrue + \fi + }{% + \pgfkeysgetvalue{/pgfplots/cycle multi list/@N\the\c@pgf@counta}\pgfplots@cycle@N + % compute list index: + \pgfplotsmathmodint{\c@pgf@countb}{\pgfplots@cycle@N}% + \divide\c@pgf@countb by \pgfplots@cycle@N\relax + % + \expandafter\pgfplots@getautoplotspec@ + \csname pgfp@cyclist@/pgfplots/cycle multi list/@list\the\c@pgf@counta @\endcsname + {\pgfplots@cycle@N}% + {\pgfmathresult}% + \t@pgfplots@toka=\expandafter{#1,}% + \t@pgfplots@tokb=\expandafter{\pgfplotsretval}% + \edef#1{\the\t@pgfplots@toka\the\t@pgfplots@tokb}% + \advance\c@pgf@counta by-1 + }% + \else + \if M\pgfplots@cycle@multi@list@sequence + % + % take the i'th element of each sub-list where i + % =\pgfplots@listindex + \if A\pgfplots@cycle@multi@list@repeat + % 'cycle multiindex list' + % + % ensure that we respect the maxlen of the list: + \pgfplotsmathmodint{\pgfplots@listindex}{\pgfkeysvalueof{/pgfplots/cycle multi list/@maxlen}}% + \let\pgfplots@listindex=\pgfmathresult + \def\pgfplots@cycle@multi@list@cur##1{% + \ifnum\pgfplots@listindex<\pgfplots@cycle@N\relax + ##1% + \fi + }% + % + \else + % 'cycle multiindex* list': + \def\pgfplots@cycle@multi@list@cur##1{% + ##1% + }% + \fi + % + \c@pgf@counta=0 + \pgfplotsloop{% + \ifnum\c@pgf@counta<\pgfplots@cycle@dim\relax + \pgfplotsloopcontinuetrue + \else + \pgfplotsloopcontinuefalse + \fi + }{% + \pgfkeysgetvalue{/pgfplots/cycle multi list/@N\the\c@pgf@counta}\pgfplots@cycle@N + \pgfplots@cycle@multi@list@cur{% + \expandafter\pgfplots@getautoplotspec@ + \csname pgfp@cyclist@/pgfplots/cycle multi list/@list\the\c@pgf@counta @\endcsname + {\pgfplots@cycle@N}% + {\pgfplots@listindex}% + \t@pgfplots@toka=\expandafter{#1,}% + \t@pgfplots@tokb=\expandafter{\pgfplotsretval}% + \edef#1{\the\t@pgfplots@toka\the\t@pgfplots@tokb}% + }% + \advance\c@pgf@counta by1 + }% + \else + \pgfplots@error{Internal error: expected 'L' or 'M', not '\pgfplots@cycle@multi@list@sequence'}% + \fi + \fi \else % normal cycle list: \pgfplotslistsize\autoplotspeclist\to\c@pgf@countd \pgfplots@getautoplotspec@{\autoplotspeclist}{\c@pgf@countd}{\pgfplots@listindex}% \let#1=\pgfplotsretval \fi +%\message{[plot \the\pgfplots@numplots]: Returning options list \meaning#1^^J}% \pgfmath@smuggleone#1% \endgroup } @@ -6032,7 +6538,76 @@ \pgfplots@ticklabel@maxtickdimen@reset x% \pgfplots@ticklabel@maxtickdimen@reset y% \pgfplots@ticklabel@maxtickdimen@reset z% + % + \pgfplots@init@axis@shift } + +% executes '#2' if 'axis #1 line shift' is set and '#3' if not. +\def\pgfplots@if@has@axis@shift#1#2#3{% + \pgfkeysgetvalue{/pgfplots/axis #1 line shift}\pgfplots@loc@TMPb + \ifx\pgfplots@loc@TMPb\pgfutil@empty + #3% + \else + #2% + \fi +}% + +\def\pgfplots@init@axis@shift{% + \pgfplotsforeachentryinCSV{\pgfplots@loc@TMPa}{x,y,z}{% + % check if 'axis #1 line shift' is set and non-zero. + \expandafter\pgfplots@if@has@axis@shift\pgfplots@loc@TMPa{% + \pgfkeysgetvalue{/pgfplots/axis \pgfplots@loc@TMPa\space line shift}\pgfplots@loc@TMPb + \pgfmathparse{\pgfplots@loc@TMPb}% + \ifdim\pgfmathresult pt=0pt + \def\pgfplots@loc@TMPb{}% + \else + \ifpgfmathunitsdeclared + \else + \ifpgfplots@threedim + % ... I do not know which axis unit should be + % used here. + \pgfplots@error{Cannot process 'axis \pgfplots@loc@TMPa\space line shift=\pgfplots@loc@TMPb': please provide a dimension like 10pt. Shifting by axis units is only implemented for 2d axes}% + \else + % Ah - a shift by axis units. + % Ok, then determine the correct axis and + % compute the shift. + % + % This works because the outer normal is the + % same as one of the axes. + \let\pgfplots@loc@TMPb=\pgfmathresult + \if x\pgfplots@loc@TMPa + \pgfplotstransformdirectiony{\pgfplots@loc@TMPb}% + \let\pgfplots@loc@TMPb=\pgfmathresult + \pgfplotsqpointxy{0}{\pgfplots@loc@TMPb}% + \else + \pgfplotstransformdirectionx{\pgfplots@loc@TMPb}% + \let\pgfplots@loc@TMPb=\pgfmathresult + \pgfplotsqpointxy{\pgfplots@loc@TMPb}{0}% + \fi + \pgfmathveclen@{\pgf@sys@tonumber\pgf@x}{\pgf@sys@tonumber\pgf@y}% + \ifdim\pgfplots@loc@TMPb pt<0sp + % we have lost the sign... restore it. + \edef\pgfmathresult{-\pgfmathresult}% + \fi + \fi + \fi + % + \edef\pgfplots@loc@TMPb{\pgfmathresult}% NO unit here + \if z\pgfplots@loc@TMPa + \ifpgfplots@threedim + \pgfplots@separate@axis@linestrue + \fi + \else + \pgfplots@separate@axis@linestrue + \fi + \fi + % + % normalize the value - no need to parse it over and over again: + \pgfkeyslet{/pgfplots/axis \pgfplots@loc@TMPa\space line shift}\pgfplots@loc@TMPb + }{}% + }% +}% + \def\pgfplots@init@ticks@ready{}% \def\pgfplots@init@ticks@for#1{% \pgfplots@isuniformticktrue @@ -6420,10 +6995,7 @@ \pgfdeclareshape{pgfplots@low@level@shape}{% % The '(0,0)' point is the LOWER LEFT OUTER CORNER. \savedanchor\upperrightcorner{% - % FIXME : is this correct? \pgfplotspointupperrightcorner - %\global\pgf@x=\wd\pgfnodepartimagebox - %\global\pgf@y=\ht\pgfnodepartimagebox }% \savedanchor\lowerleftinnercorner{% \pgfplotspointlowerleftinnercorner% @@ -7920,6 +8492,9 @@ % Prepare special handling for these shifts: \pgfplots@has@cell@picturefalse \edef\pgfplots@anchorname@internal{\pgfplots@anchorname}% + % + % FIXME : do we need to renormalize this here? apparently + % not... %\def\pgfplots@anchorname{image}% % \let\pgfplots@BEGIN@cell@picture=\pgfplots@BEGIN@cell@picture@DISABLED @@ -8019,7 +8594,7 @@ \pgf@picmaxy=0pt\relax% \pgf@picminy=0pt\relax% \fi% - #1 + #1% \endgroup \endpgfinterruptpicture \egroup\egroup% end of pgfnodepartimagebox @@ -8045,6 +8620,10 @@ % That needs to be done globally, do avoid all those % \endgroup's in and after \endpgfinterruptpicture ... % + % + % \pgfplotspointorigininternal: + % used for anchor=<some node inside of the axis> and for + % 'cell picture=true' in order to correct remembered node positions: \xdef\pgfplotspointorigininternal{\global\pgf@x=\the\pgf@picminx\space\global\pgf@y=\the\pgf@picminy\space}% % \ifpgfplots@deprecated@anchors @@ -8108,27 +8687,43 @@ % Its intention is to re-define `\pgfplots@at': \pgfplots@colorbar@position@hook% % - \pgftransformshift{\pgfplots@at}% - % % prepare a priori anchor transformation (see % \pgfplots@prepare@cell@picture for details): - \pgftransformshift{% - \pgfqpointscale{-1}{\pgfplotspointdescriptionbyanchor{\pgfplots@anchorname@internal}}% - }% - % + % FIXME : \pgfplotspointdescriptionbyanchor invokes + % \pgfplotsqpointdescriptionxy{<x>}{<y>} -- but it is not + % merely a direction, it uses an offset. Is that correct!? + \pgfqpointscale{-1}{\pgfplotspointdescriptionbyanchor{\pgfplots@anchorname@internal}}% + \xdef\pgfplots@anchor@expanded{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}% + % + \scope[% + /utils/exec={% + % seems that \scope requires this complicated + % formulation: + \tikz@addtransform{% + \pgftransformshift{\pgfplots@cell@picture@DISABLED@shifts}% + }% + },% + #1,% + ]% \pgfplots@define@preliminary@current@axis@node - % - \scope[#1]% }% \def\pgfplots@END@cell@picture@DISABLED{% - \endscope% - \begingroup \pgfplots@END@cell@picture@preparepoints% - \endgroup + \endscope% \endpgfinterruptboundingbox \endgroup \global\let\pgfplots@cell@picture@remembered=\relax \global\let\pgfplots@cell@pictureid=\pgfutil@empty + % + % we need to re-add these trafos here since the \scope of the + % "not-cell-picture" is closed. But not the anchor which has to be + % handled by \pgfmultipartnode. See + % \pgfplots@cell@picture@DISABLED@shifts + \pgftransformshift{\pgfplots@at}% +}% + +\def\pgfplots@cell@picture@DISABLED@shifts{% + \pgfpointadd{\pgfplots@at}{\pgfplots@anchor@expanded}% }% \def\pgfplots@BEGIN@init@and@draw@axis{% @@ -8549,11 +9144,11 @@ \def\pgfplots@clip@to@clippath{% \pgf@xa=\pgf@x \pgf@ya=\pgf@y - \begingroup\pgf@process{\pgfplotspointbblowerleft}\endgroup% + \begingroup\pgf@process{\pgfplotspointbblowerleft\pgf@pos@transform\pgf@x\pgf@y}\endgroup% \ifdim\pgf@xa<\pgf@x \pgf@xa=\pgf@x \fi \ifdim\pgf@ya<\pgf@y \pgf@ya=\pgf@y \fi % - \begingroup\pgf@process{\pgfplotspointbbupperright}\endgroup + \begingroup\pgf@process{\pgfplotspointbbupperright\pgf@pos@transform\pgf@x\pgf@y}\endgroup \ifdim\pgf@xa>\pgf@x \pgf@xa=\pgf@x \fi \ifdim\pgf@ya>\pgf@y \pgf@ya=\pgf@y \fi % @@ -9429,16 +10024,19 @@ \pgfplotscolorbarCMYKworkaroundtrue \def\pgfplots@colorbar@draw@{% - \ifpgfplotscolorbarCMYKworkaround - % the default implementation for colorbars is based on - % \pgfplotscolormaptoshadingspec. - % This, in turn, does NOT work for CMYK. - % - % This here detects that case and switches to the (visually) - % equivalent 'colorbar sampled={surf,shader=interp}' style. - \if1\pgfplotscolormaptoshadingspectorgb - \pgfkeysgetvalue{/pgfplots/colorbar/draw/.@cmd}\pgfplots@loc@TMPa - \ifx\pgfplots@loc@TMPa\pgfplots@colorbar@draw@defaultimpl + \pgfkeysgetvalue{/pgfplots/colorbar/draw/.@cmd}\pgfplots@loc@TMPa + \ifx\pgfplots@loc@TMPa\pgfplots@colorbar@draw@defaultimpl + % Ah-- the default colorbar implementation is active! We may need to substitute it by a better one. + % Check that: + \def\b@pgfplots@colorbar@fallback@to@sampled{0}% + \ifpgfplotscolorbarCMYKworkaround + % the default implementation for colorbars is based on + % \pgfplotscolormaptoshadingspec. + % This, in turn, does NOT work for CMYK. + % + % This here detects that case and switches to the (visually) + % equivalent 'colorbar sampled={surf,shader=interp}' style. + \if1\pgfplotscolormaptoshadingspectorgb \pgfkeysgetvalue{/pgfplots/colormap name}\pgfplots@loc@TMPb \pgfplotscolormapgetcolorspace{\pgfplots@loc@TMPb}% \def\pgfplots@loc@TMPa{cmyk}% @@ -9447,10 +10045,24 @@ \pgfplotswarning{colorbar CMYK unsupported}{\pgfplots@loc@TMPb}\pgfeov% \expandafter\gdef\csname pgfplots@colorbar@CMYK@\pgfplots@loc@TMPb\endcsname{1}% }{}% - \pgfplotsset{colorbar sampled={surf,shader=interp}}% + \def\b@pgfplots@colorbar@fallback@to@sampled{1}% \fi \fi \fi + % + \def\pgfplots@colorbar@extra@options{}% + \if c\pgfplots@colormap@access + % colormap access=piecewise constant + % In this case, we want a sampled colorbar. 2x2 samples are enough since "shader=interp" + % automatically handles the correct interpolation scheme: + \def\b@pgfplots@colorbar@fallback@to@sampled{1}% + \def\pgfplots@colorbar@extra@options{samples=2} + \fi + % + \if 1\b@pgfplots@colorbar@fallback@to@sampled + \edef\pgfplots@loc@TMPa{\noexpand\pgfplotsset{colorbar sampled={surf,shader=interp,\pgfplots@colorbar@extra@options}}}% + \pgfplots@loc@TMPa + \fi \fi % % FIXME : the semicolon after ';' has a fixed catcode, namely @@ -9705,7 +10317,7 @@ % no warning. Its not that important anyway, I think. \def\pgfplots@at{\pgfpointorigin}% }{% - \def\pgfplots@at{\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}% + \edef\pgfplots@at{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}% }% % % Temporarily assign families to 'name' and 'alias' options. @@ -10052,6 +10664,9 @@ \let\pgfplots@late@options=\pgfutil@empty \def\pgfplotssetlateoptions#1{% + \pgfplotsset{#1}% +}% +\def\pgfplotssetlateoptions@late#1{% \t@pgfplots@toka=\expandafter{\pgfplots@late@options}% \t@pgfplots@tokb={#1}% \xdef\pgfplots@late@options{\the\t@pgfplots@toka,\the\t@pgfplots@tokb}% @@ -10603,7 +11218,6 @@ \def\pgfplots@is@in@axis{1}% \pgfplots@environment@opt@@setup@pgfpoint@restores % - \global\let\pgfplots@late@options=\pgfutil@empty \pgfplots@checkandpreparefor@active@semicolon % \pgfplots@install@abbrev@commands @@ -10623,6 +11237,8 @@ \pgfsetzvec{\pgfqpoint{0pt}{0pt}}% % \pgfplots@set@options{#1}% + \global\let\pgfplots@late@options=\pgfutil@empty + \let\pgfplotssetlateoptions=\pgfplotssetlateoptions@late % % % @@ -10853,9 +11469,9 @@ \fi \pgfplots@stored@current@postcmd }% - % \pgfplots@restorepgfpoint % + % \pgfplots@END@init@and@draw@axis % \pgfplots@create@axis@descriptions diff --git a/Master/texmf-dist/tex/generic/pgfplots/pgfplots.errorbars.code.tex b/Master/texmf-dist/tex/generic/pgfplots/pgfplots.errorbars.code.tex index 11299b16485..8e2a96a9054 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/pgfplots.errorbars.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/pgfplots.errorbars.code.tex @@ -568,7 +568,10 @@ \pgfplots@errorbar@draw{##1}{##2}% }% } - + +\newif\ifpgfplots@error@bars@allow@name@path + + % This thing here shall draw all error bar commands listed in '#2'. % % It will be invoked when any plotting commands take effect (that @@ -576,6 +579,12 @@ % transformations are set up...) \def\pgfplots@errorbars@finishwithstyleoptions[#1]#2{% \scope[/pgfplots/.cd,#1,/pgfplots/every error bar]% it uses the /pgfplots/.unknown handler + \ifpgfplots@error@bars@allow@name@path + \else + % 'name path=xxx' should NOT include errors bars! Only the + % main path. + \def\tikz@intersect@addto@path@names##1##2{}% + \fi #2% \endscope } diff --git a/Master/texmf-dist/tex/generic/pgfplots/pgfplots.revision.tex b/Master/texmf-dist/tex/generic/pgfplots/pgfplots.revision.tex index d716cdcdf07..9c6141e6680 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/pgfplots.revision.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/pgfplots.revision.tex @@ -5,10 +5,10 @@ \catcode`\:=12 \catcode`\+=12 \catcode`\-=12 -\gdef\pgfplotsrevision{1.12.1} -\gdef\pgfplotsversion{1.12.1} -\gdef\pgfplotsversiondatetime{2015-05-02 21:30:45 +0200} -\gdef\pgfplotsrevisiondatetime{2015-05-02 21:30:45 +0200} +\gdef\pgfplotsrevision{1.13} +\gdef\pgfplotsversion{1.13} +\gdef\pgfplotsversiondatetime{2016-01-06 21:00:24 +0100} +\gdef\pgfplotsrevisiondatetime{2016-01-06 21:00:24 +0100} \gdef\pgfplots@glob@TMPa#1-#2-#3 #4\relax{#1/#2/#3} \xdef\pgfplotsversiondate{\expandafter\pgfplots@glob@TMPa\pgfplotsversiondatetime\relax} \xdef\pgfplotsrevisiondate{\expandafter\pgfplots@glob@TMPa\pgfplotsrevisiondatetime\relax} diff --git a/Master/texmf-dist/tex/generic/pgfplots/pgfplots.scaling.code.tex b/Master/texmf-dist/tex/generic/pgfplots/pgfplots.scaling.code.tex index d2e76769a3a..283650ac54d 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/pgfplots.scaling.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/pgfplots.scaling.code.tex @@ -2168,7 +2168,6 @@ }% \expandafter\pgfplots@loc@TMPb\pgfplots@loc@TMPc \fi -%\message{\string\pgfplotsgetnormalforcurrentview: got (\pgfplots@view@dir@threedim)^^J}% }% % PRECONDITION: diff --git a/Master/texmf-dist/tex/generic/pgfplots/pgfplotscoordprocessing.code.tex b/Master/texmf-dist/tex/generic/pgfplots/pgfplotscoordprocessing.code.tex index eecf176414f..5ec05fd41a0 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/pgfplotscoordprocessing.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/pgfplotscoordprocessing.code.tex @@ -1180,6 +1180,8 @@ % vector (if there is one known). If there is no such value, % \pgfplotsretval will be empty. % #1 a three-character-string +% +% see \pgfplotspointouternormalvectorofaxissetv \def\pgfplotspointouternormalvectorofaxisgetv#1{% \edef\pgfplots@loc@TMPa{#1}% \expandafter\pgfplotspointouternormalvectorofaxisgetv@\pgfplots@loc@TMPa\relax\relax\relax\relax @@ -1484,6 +1486,9 @@ /pgfplots/sloped/execute for upside down/.initial=, /pgfplots/sloped/reset nontranslations/.is if=pgfplots@sloped@resets@nontranslations, /pgfplots/sloped/reset nontranslations/.default=true, + % + % only used by polar axes at the time of this writing: + /pgfplots/sloped/at position/.initial=, } % Installs a rotation transformation matrix such that labels or % whatever are aligned precisely in direction of one of the two/three @@ -1641,6 +1646,16 @@ % and the anchors of the node, I have to invert the matrix: \pgftransforminvert % + \pgfplotspointouternormalvectorofaxisgetv{#2}% + \ifx\pgfplotsretval\pgfutil@empty + \pgfkeysgetvalue{/pgfplots/near ticklabel at}\pgfplotsretval + \ifx\pgfplotsretval\pgfutil@empty + \else + % ah - we have one! + \csname pgfplotstransformcoordinate#1\endcsname{\pgfplotsretval}% + \pgfplotspointouternormalvectorofaxissetv{#2}{\pgfmathresult}% + \fi + \fi % % This here is the normal direction (points to the axis) \pgfqpointscale{#4}{\pgfplotspointouternormalvectorofaxis{#2}}% @@ -1901,6 +1916,16 @@ \pgfqkeys{/pgfplots/@declare coord math}{% initialise=, parse=\edef\pgfmathresult{##1}\expandafter\pgfmathparse\expandafter{\pgfmathresult}, + parse int={% + \begingroup + \pgfplotscoordmath{\pgfplotscoordmathid}{parse}{##1}% + \pgfplotscoordmath{\pgfplotscoordmathid}{tofixed}{\pgfmathresult}% + \afterassignment\pgfplots@gobble@until@relax + \c@pgf@countd=\pgfmathresult\relax + \edef\pgfmathresult{\the\c@pgf@countd}% + \pgfmath@smuggleone\pgfmathresult + \endgroup + }, parsenumber=\pgfmathfloatparsenumber{##1}\pgfmathfloattofixed{##1},% zero= \pgfplotscoordmath{\pgfplotscoordmathid}{parsenumber}{0}, one= \pgfplotscoordmath{\pgfplotscoordmathid}{parsenumber}{1}, @@ -1939,14 +1964,14 @@ max limit= \def\pgfmathresult{16300},% if less than= {\pgfplotsmathlessthan{##1}{##2}\ifpgfmathfloatcomparison ##3\else ##4\fi}, if is= {% - \if##20 - \ifdim##1pt=0pt ##2\else ##3\fi + \if##20% + \ifdim##1pt=0pt ##3\else ##4\fi \else - \if##2+\ifdim##1pt>0pt ##2\else ##3\fi + \if##2+\ifdim##1pt>0pt ##3\else ##4\fi \else - \if##2-\ifdim##1pt<0pt ##2\else ##3\fi + \if##2-\ifdim##1pt<0pt ##3\else ##4\fi \else - \def\pgfplots@loc@TMPd{##1}\ifx\pgfplots@loc@TMPd\pgfutil@empty ##2\else ##3\fi + \def\pgfplots@loc@TMPd{##1}\ifx\pgfplots@loc@TMPd\pgfutil@empty ##3\else ##4\fi \fi \fi \fi @@ -2024,6 +2049,8 @@ % required math library (which is not necessarily cheap) parse/.code= {\expandafter\def\csname pgfpmth\pgfplotsdeclarecoordmath@ parse\endcsname##1{#1}},% + parse int/.code= + {\expandafter\def\csname pgfpmth\pgfplotsdeclarecoordmath@ parse int\endcsname##1{#1}},% % % takes a parsed number and returns a fixed point number: tofixed/.code= @@ -2485,6 +2512,35 @@ \ifx\pgfplotspointmetainputhandler\pgfutil@empty #2\else #1\fi }% +\newif\ifpgfplots@perpointmeta@expand + +% Executes code '#2' if the point meta data #1 is bounded +% and '#3' otherwise +% +% If the point meta is symbolic, it will always return true if and +% only if the input is non-empty. +\def\pgfplotsifpointmetaisbounded#1#2#3{% + \ifpgfplots@perpointmeta@expand + \edef\pgfplots@loc@TMPc{#1}% + \else + % symbolic point meta may have expansion issues -- but support one + % level as we usually invoke it with a macro name: + \expandafter\def\expandafter\pgfplots@loc@TMPc\expandafter{#1}% + \fi + \ifx\pgfplots@loc@TMPc\pgfutil@empty + % an empty meta data is _never_ bounded. + #3\relax + \else + \if1\csname pgfpmeta@\pgfplotspointmetainputhandler @issymbolic\endcsname + % a (non-empty, see above) symbolic meta data is "bounded" + #2\relax + \else + % check the number: + \pgfplotscoordmath{meta}{if is bounded}{\pgfplots@loc@TMPc}{#2}{#3}% + \fi + \fi +}% + % Invokes '#1' if the axis contains the coordinate designated by % \pgfplots@current@point@[xyz] and '#2' if not. \def\pgfplotsaxisifcontainspoint#1#2{% @@ -2537,14 +2593,26 @@ % See the definitions below for examples. \def\pgfplotsdeclarepointmetasource#1#2{% \expandafter\def\csname pgfpmeta@#1@assign\endcsname{\let\pgfplots@current@point@meta=\pgfutil@empty}% - \expandafter\def\csname pgfpmeta@#1@initfor\endcsname##1{}% + \expandafter\def\csname pgfpmeta@#1@initfor\endcsname##1{% + \pgfplots@pointmeta@set@expand{#1}% + }% \expandafter\def\csname pgfpmeta@#1@issymbolic\endcsname{0}% \expandafter\def\csname pgfpmeta@#1@explicitinput\endcsname{0}% \expandafter\def\csname pgfpmeta@#1@activate\endcsname{}% \expandafter\def\csname pgfpmeta@#1@LUA class\endcsname{}% + \expandafter\def\csname pgfpmeta@#1@tostring\endcsname{#1}% \edef\pgfplotsdeclarepointmetasource@{#1}% \pgfqkeys{/pgfplots/@declare point meta src}{#2}% }% + +\def\pgfplots@pointmeta@set@expand#1{% + \if1\csname pgfpmeta@#1@explicitinput\endcsname + \pgfplots@perpointmeta@expandfalse + \else + \pgfplots@perpointmeta@expandtrue + \fi +}% + \pgfqkeys{/pgfplots/@declare point meta src}{% % % a macro used to initialise the point meta source when it is @@ -2613,6 +2681,9 @@ % there is none. LUA class/.code= {\expandafter\def\csname pgfpmeta@\pgfplotsdeclarepointmetasource@ @LUA class\endcsname{#1}},% + % + tostring/.code= + {\expandafter\def\csname pgfpmeta@\pgfplotsdeclarepointmetasource@ @tostring\endcsname{#1}},% }% % An empty one. This is simple to check with @@ -2687,6 +2758,7 @@ }{% \def\pgfpmeta@expr@LUA@class{pgfplots.ExpressionPointMetaHandler.new("#1")}% }% + \pgfplots@perpointmeta@expandtrue }, LUA class=\pgfpmeta@expr@LUA@class, }% @@ -2715,6 +2787,7 @@ },% initfor={% \pgfkeysdef{/pgfplots/point meta/code}{#1}% + \pgfplots@perpointmeta@expandtrue }, }% \pgfplotsdeclarepointmetasource{TeX code symbolic}{% @@ -2728,6 +2801,7 @@ },% initfor={% \pgfkeysdef{/pgfplots/point meta/code}{#1}% + \pgfplots@perpointmeta@expandfalse }, issymbolic=1% }% @@ -2878,7 +2952,6 @@ \expandafter\let\expandafter\pgfplotsscanlinelengthincrease \csname pgfplotsscanlinelength@\pgfplots@loc@TMPa @increase\endcsname \edef\pgfplotsscanlinecomplete{% \expandafter\noexpand\csname pgfplotsscanlinelength@\pgfplots@loc@TMPa @complete\endcsname - \noexpand\pgfplotsplothandlernotifyscanlinecomplete }% \expandafter\let\expandafter\pgfplotsscanlinelengthcleanup \csname pgfplotsscanlinelength@\pgfplots@loc@TMPa @cleanup\endcsname \pgfplotsscanlinelength@initzero @@ -2936,12 +3009,17 @@ % special marker which means 'inconsistent scan line length found' \def\pgfplots@scanlinelength{-2}% \fi + \pgfplotsplothandlernotifyscanlinecomplete \fi \else \ifnum\pgfplots@scanlinelength=-2 \else \edef\pgfplots@scanlinelength{\the\c@pgfplots@scanlineindex}% \fi + % + \ifnum\c@pgfplots@scanlineindex>0 + \pgfplotsplothandlernotifyscanlinecomplete + \fi \fi \c@pgfplots@scanlineindex=0 } @@ -2977,20 +3055,24 @@ \if1\pgfplotsscanlinelength@nan@isfirst \else \def\pgfplotsscanlinelength@nan@pendingwork{% - % this will be executed when the next point has been - % found. - \def\pgfplots@current@point@x{}% - \def\pgfplots@current@point@y{}% - \def\pgfplots@current@point@z{}% - % simply serialize an empty point. That works -- the - % visualization phase checks if the coordinates are empty and - % visualizes them as "jump" - % - % Note that \pgfplotsplothandlersurveypoint is not a good - % choice here unless one employs its 'unbounded coords=jump' - % feature - \def\pgfplotsaxisplothasjumps{1}% - \pgfplotsaxisserializedatapoint + \ifpgfplots@LUA@backend@supported + \pgfplotsutil@directlua{pgfplots.texSurveyAddJump()}% + \else + % this will be executed when the next point has been + % found. + \def\pgfplots@current@point@x{}% + \def\pgfplots@current@point@y{}% + \def\pgfplots@current@point@z{}% + % simply serialize an empty point. That works -- the + % visualization phase checks if the coordinates are empty and + % visualizes them as "jump" + % + % Note that \pgfplotsplothandlersurveypoint is not a good + % choice here unless one employs its 'unbounded coords=jump' + % feature + \def\pgfplotsaxisplothasjumps{1}% + \pgfplotsaxisserializedatapoint + \fi % \let\pgfplotsscanlinelength@nan@pendingwork=\relax }% @@ -3004,6 +3086,7 @@ \def\pgfplotsaxisfilteredcoordsaway{0}% \def\pgfplotsaxisplothasjumps{0}% +\def\pgfplotsaxisplothasunboundedpointmeta{0}% \newif\ifpgfplotsaxisparsecoordinateok % Initialises @@ -3070,6 +3153,7 @@ \fi \def\pgfplotsaxisfilteredcoordsaway{0}% \def\pgfplotsaxisplothasjumps{0}% + \def\pgfplotsaxisplothasunboundedpointmeta{0}% % % FIXME : these macros should not be redefined! They are defined % in \pgfplots@prepare@axis@API right during \begin{axis}... they @@ -3341,25 +3425,31 @@ \fi % \edef\pgfplots@set@perpointmeta@limits{% - \noexpand\ifx\noexpand\pgfplots@current@point@meta\noexpand\pgfutil@empty - \noexpand\else + \noexpand\pgfplotsifpointmetaisbounded{\noexpand\pgfplots@current@point@meta}{% \the\t@pgfplots@tokb - \noexpand\fi - }% - \def\pgfplotsaxisupdatelimitsforpointmeta##1{% - \begingroup - \def\pgfplots@current@point@meta{##1}% - \pgfplots@set@perpointmeta@limits - \endgroup + }{% + \noexpand\def\noexpand\pgfplotsaxisplothasunboundedpointmeta{1}% + }% }% \else % there is no point meta: \global\let\pgfplots@metamin=\pgfutil@empty \global\let\pgfplots@metamax=\pgfutil@empty - \let\pgfplots@set@perpointmeta@limits=\relax - \def\pgfplotsaxisupdatelimitsforpointmeta##1{}% + \def\pgfplots@set@perpointmeta@limits{% + \pgfplotsifpointmetaisbounded{\pgfplots@current@point@meta}{% + }{% + \def\pgfplotsaxisplothasunboundedpointmeta{1}% + }% + }% \fi }% + +\def\pgfplotsaxisupdatelimitsforpointmeta#1{% + \begingroup + \def\pgfplots@current@point@meta{#1}% + \pgfplots@set@perpointmeta@limits + \endgroup +}% % This is the \pgfplots@coord@stream@end@ routine which is invoked by % \pgfplots@PREPARE@COORD@STREAM. % @@ -3427,6 +3517,8 @@ % to share plot specifications between error bars and plot % coordinates. Unfortunately, it is NOT sufficient to use % \tikzset + % + %% FIXME : why is this here and not in the mesh plot handler!? \pgfplotspreparemeshkeydefaults% \pgfplots@PREPARE@COORD@STREAM@end@determinecoordsorting x% \pgfplots@PREPARE@COORD@STREAM@end@determinecoordsorting y% @@ -3516,8 +3608,10 @@ \noexpand\def\noexpand\pgfplots@visphase@names{\pgfplots@visphase@names}% \noexpand\def\noexpand\pgfplotsaxisfilteredcoordsaway{\pgfplotsaxisfilteredcoordsaway}% \noexpand\def\noexpand\pgfplotsaxisplothasjumps{\pgfplotsaxisplothasjumps}% + \noexpand\def\noexpand\pgfplotsaxisplothasunboundedpointmeta{\pgfplotsaxisplothasunboundedpointmeta}% \noexpand\pgfkeyssetvalue{/pgfplots/on layer}{\pgfkeysvalueof{/pgfplots/on layer}}% \noexpand\def\noexpand\pgfplots@serialized@afterpath{\the\t@pgfplots@tokc}% + \noexpand\def\noexpand\pgfplots@addplot@point@meta@description@of@explicit@value{\pgfplots@addplot@point@meta@description@of@explicit@value}% }% {% draw command: \noexpand\path% @@ -3550,11 +3644,12 @@ \t@pgfplots@tokc=\expandafter{\pgfplots@addplot@survey@@optionlist,% /pgfplots/.cd,/pgfplots/every axis plot post}% \edef\pgfplots@addplot@survey@@optionlist{\the\t@pgfplots@tokc}% + \edef\pgfplots@loc@TMPa{/pgfplots/every axis plot except legend/.code=,\the\t@pgfplots@tokc}% \ifpgfplots@curplot@isirrelevant % for \label commands: \expandafter\pgfplots@rememberplotspec@for@label\expandafter{\pgfplots@addplot@survey@@optionlist}% \else - \expandafter\pgfplots@rememberplotspec\expandafter{\pgfplots@addplot@survey@@optionlist}% + \expandafter\pgfplots@rememberplotspec\expandafter{\pgfplots@loc@TMPa}% \fi }% @@ -3639,7 +3734,11 @@ % SURVEY -- but not during a visualization. Check that here: \if m\pgfplots@colormap@access \else - \pgfplots@LUA@survey@log@deactivation{color map access=direct not supported (yet)}% + \if c\pgfplots@colormap@access + \pgfplots@LUA@survey@log@deactivation{color map access=piecewise constant not supported (yet)}% + \else + \pgfplots@LUA@survey@log@deactivation{color map access=direct not supported (yet)}% + \fi \pgfplots@LUA@backend@supportedfalse \fi % @@ -3691,10 +3790,15 @@ \def\pgfplots@LUA@backend@serialized@commands{% \noexpand\def\noexpand\pgfplots@LUA@backend@plotnum{\pgfplots@LUA@backend@plotnum}% }% + \def\pgfplotsapplistXXpushback##1{% + \pgfplots@error{Illegal internal state encountered: lua backend should have been invoked at this point}% + }% \fi \fi }% +\let\pgfplotsapplistXXpushback@orig=\pgfplotsapplistXXpushback + \def\pgfplots@LUA@survey@point{% \edef\pgfplots@loc@TMPa{pgfplots.texSurveyPoint("\pgfplots@current@point@x","\pgfplots@current@point@y","\pgfplots@current@point@z","\pgfplots@current@point@meta")}% \pgfplotsutil@directlua{\pgfplots@loc@TMPa}% @@ -3706,6 +3810,7 @@ % LUA defines a couple of TeX macros here... \pgfplotsutil@directlua{pgfplots.texSurveyEnd()}% % + \let\pgfplotsapplistXXpushback=\pgfplotsapplistXXpushback@orig \pgfplotsapplistXXpushback{--- acquire from LUA! --}% }% @@ -3980,7 +4085,10 @@ % -> note the absence of extra braces for the deserialization! \def\pgfplotsaxisserializedatapointtostring{% \pgfplotsplothandlerserializepointto\pgfplotsaxisserializedatapoint@val + \let\pgfplots@oldprotect=\protect + \let\protect=\noexpand \pgfplotsaxisserializedatapoint@private + \let\protect=\pgfplots@oldprotect \t@pgfplots@toka=\expandafter{\pgfplotsaxisserializedatapoint@val}% \t@pgfplots@tokb=\expandafter{\pgfplotsretval}% \edef\pgfplotsretval{{\the\t@pgfplots@tokb;\the\t@pgfplots@toka}}% @@ -4268,8 +4376,21 @@ \else \def\pgfplots@perpointmeta@unboundedwarning##1{}% \fi - \if m\pgfplots@colormap@access - % colormap access=map + \if d\pgfplots@colormap@access + % colormap access=direct + \def\pgfplots@perpointmeta@trafo##1{% + \pgfplotscoordmath{meta}{if is}{##1}{u}{% + \pgfplotscolorzero{\pgfplotscolormapcolorcompsof{\pgfkeysvalueof{/pgfplots/colormap name}}}% + \pgfplots@perpointmeta@unboundedwarning{##1}% + }{% + \pgfplotscoordmath{meta}{tofixed}{##1}% + \pgfplotscolormapgetindex{\pgfmathresult}{\pgfkeysvalueof{/pgfplots/colormap name}}% + }% + }% + \def\pgfplots@perpointmeta@traforange{0:0}% + \edef\pgfplotspointmetarange{\pgfplots@metamin:\pgfplots@metamax}% + \else + % colormap access=map|piecewise constant \ifx\pgfplots@metamax\pgfutil@empty \def\pgfplots@perpointmeta@trafo##1{% \pgfplotscoordmath{meta}{if is}{##1}{u} @@ -4295,18 +4416,6 @@ \pgfplots@perpointmeta@preparetrafo@initfrom{pgfplots@}% \fi \fi - \else - % colormap access=direct - \def\pgfplots@perpointmeta@trafo##1{% - \pgfplotscoordmath{meta}{if is}{##1}{u}{% - \def\pgfmathresult{0}% - \pgfplots@perpointmeta@unboundedwarning{##1}% - }{% - \pgfplotscoordmath{meta}{tofixed}{##1}% - }% - }% - \def\pgfplots@perpointmeta@traforange{0:0}% - \edef\pgfplotspointmetarange{\pgfplots@metamin:\pgfplots@metamax}% \fi \edef\pgfplotspointmetatransformedrange{\pgfplots@perpointmeta@traforange}% }{}% @@ -4406,7 +4515,15 @@ \else % numeric point meta may NOT be empty. \ifx\pgfplots@current@point@meta\pgfutil@empty% - \pgfplots@error{could not access the 'point meta' (used for example by scatter plots and color maps). Maybe you need to add '\string\addplot[point meta=y]' or something like that?}% + \pgfplots@error{% + could not access the 'point meta=\csname pgfpmeta@\pgfplotspointmetainputhandler @tostring\endcsname' for coordinate \the\c@pgfplots@coordindex: % + its value is empty. % + \if1\csname pgfpmeta@\pgfplotspointmetainputhandler @explicitinput\endcsname% + \pgfplots@addplot@point@meta@description@of@explicit@value + \else + Please ensure that the value exists and is not empty + \fi + }% \pgfplotscoordmath{meta}{one}% \let\pgfplotspointmeta=\pgfmathresult \def\pgfplotspointmetatransformed{1.0}% @@ -4418,6 +4535,9 @@ \fi \fi }% +\def\pgfplots@addplot@point@meta@description@of@explicit@value{% + Please use an input stream which provides 'explicit point meta' like \string\addplot\space table or \string\addplot\space coordinates +} \def\pgfplotsaxisvisphasetransformpointmetaifany{% \pgfplotsaxisifhaspointmeta{\pgfplotsaxisvisphasetransformpointmeta}{}% @@ -4895,8 +5015,14 @@ \def\pgfplots@addplot@survey@@optionlist{/pgfplots/every axis plot,/pgfplots/every forget plot}% \pgfplotsset{/pgfplots/every forget plot,/pgfplots/every axis plot post}% \else - \edef\pgfplots@addplot@survey@@optionlist{/pgfplots/every axis plot,/pgfplots/every axis plot no \the\pgfplots@numplots/.try}% - \pgfplotsset{/pgfplots/every axis plot no \the\pgfplots@numplots/.try,/pgfplots/every axis plot post}% + \edef\pgfplots@addplot@survey@@optionlist{% + /pgfplots/every axis plot,% + /pgfplots/every axis plot except legend,% + /pgfplots/every axis plot no \the\pgfplots@numplots/.try}% + \pgfplotsset{% + /pgfplots/every axis plot except legend, + /pgfplots/every axis plot no \the\pgfplots@numplots/.try,% + /pgfplots/every axis plot post}% \fi % \t@pgfplots@tokc=\expandafter{\pgfplots@addplot@survey@@optionlist,#1}% this allows '#' inside of '#1' @@ -5125,6 +5251,13 @@ \pgfkeysgetvalue{/pgfplots/samples at}\pgfplots@plot@samples@at \pgfkeysgetvalue{/pgfplots/variable y}\pgfplots@plot@var@y % + \ifx\pgfplots@plot@samples@y\pgfutil@empty + \else + \pgfplotscoordmath{default}{parse int}{\pgfplots@plot@samples@y}% + \let\pgfplots@plot@samples@y=\pgfmathresult + \pgfkeyslet{/pgfplots/samples y}{\pgfplots@plot@samples@y}% + \fi + % % \tikz@plot@var is '\x' be default: \pgfplots@gettikzinternal@keyval{variable}{tikz@plot@var}{\x}% % @@ -5208,6 +5341,7 @@ \fi \if1\b@pgfplots@should@sample@LINE \pgfkeyssetvalue{/pgfplots/sample dim}{1}% + \pgfkeyslet{/pgfplots/mesh/rows}\pgfplots@plot@samples \pgfkeyssetvalue{/pgfplots/mesh/cols}{1}% \else \pgfkeyssetvalue{/pgfplots/sample dim}{2}% @@ -5229,7 +5363,18 @@ \long\def\pgfplots@addplotimpl@expression@set@options#1#2{% \def\pgfplotssurveyphaseinputclass{expression}% - \pgfplots@start@plot@with@behavioroptions{#1,/pgfplots/.cd,#2,/pgfplots/mesh input=lattice,/pgfplots/mesh/ordering/x varies}% + \pgfplots@start@plot@with@behavioroptions{% + #1,% + /pgfplots/.cd,% + #2,% + /utils/exec={% + \if0\pgfplotsplothandlermesh@matrixinput + % mesh input=patches unsupported in this context. + \pgfkeysalso{/pgfplots/mesh input=lattice}% + \fi + },% + /pgfplots/mesh/ordering/x varies% + }% \pgfplots@plot@expression@preparekeys }% @@ -5441,13 +5586,8 @@ \expandafter\def\pgfplots@plot@var@y{\pgfplots@plot@var@y@nonmacro}% \expandafter\pgfplots@parse@domain\pgfplots@plot@domain\relax{pgfplots@plot@domain}% % - \pgfmathparse{\pgfplots@plot@samples}% - \let\pgfplots@plot@samples=\pgfmathresult - % \if0\b@pgfplots@should@sample@LINE \expandafter\pgfplots@parse@domain\pgfplots@plot@ydomain\relax{pgfplots@plot@ydomain}% - \pgfmathparse{\pgfplots@plot@samples@y}% - \let\pgfplots@plot@samples@y=\pgfmathresult \else \def\pgfplots@plot@ydomain@min{0}% \def\pgfplots@plot@ydomain@max{0}% @@ -6575,6 +6715,8 @@ \pgfplots@addplotimpl@table@check@createonuse@for{meta}% \fi % + \let\pgfplots@addplot@point@meta@description@of@explicit@value=\pgfplots@addplot@point@meta@description@of@explicit@value@table% + % \ifpgfplots@addplotimpl@readcompletely \pgfplotstableread{#3}\pgfplots@table \pgfplots@addplotimpl@table@fromstructure@{#1}{}{\pgfplots@table}{#4}% @@ -6632,6 +6774,9 @@ \pgfplots@coord@stream@end \fi } +\def\pgfplots@addplot@point@meta@description@of@explicit@value@table{% + Please add a non-empty value for \string\addplot\space table[meta=...] +}% \def\pgfplots@addplotimpl@table@check@createonuse@for#1{% \pgfkeysgetvalue{/pgfplots/table/#1}\pgfplots@addplotimpl@table@check@createonuse@for@ \expandafter\pgfplotstableifiscreateonuse\expandafter{\pgfplots@addplotimpl@table@check@createonuse@for@}{% @@ -6950,12 +7095,21 @@ \pgfplots@start@plot@with@behavioroptions{#1,/pgfplots/.cd,#2}% \pgfplots@PREPARE@COORD@STREAM{#4}% \ifpgfplots@curplot@threedim + \let\pgfplots@addplot@point@meta@description@of@explicit@value=\pgfplots@addplot@point@meta@description@of@explicit@value@coordinates@threedim \pgfplots@coord@stream@foreach@threedim{#3}% \else + \let\pgfplots@addplot@point@meta@description@of@explicit@value=\pgfplots@addplot@point@meta@description@of@explicit@value@coordinates@twodim \pgfplots@coord@stream@foreach{#3}% \fi }% +\def\pgfplots@addplot@point@meta@description@of@explicit@value@coordinates@twodim{% + Please add suffixes for every coordinate in order to specify explicit point meta. The suffixes must have the form '(x,y) [meta]' +}% +\def\pgfplots@addplot@point@meta@description@of@explicit@value@coordinates@threedim{% + Please add suffixes for every coordinate in order to specify explicit point meta. The suffixes must have the form '(x,y,z) [meta]' +}% + { % A block which handles active semicolons. % @@ -6996,7 +7150,7 @@ \let\pgfplots@addplotimpl@expression@curly=\pgfplots@addplotimpl@expression@curly@AS \let\pgfplots@addplotimpl@function@opt=\pgfplots@addplotimpl@function@opt@AS \let\pgfplots@addplotimpl@file@opt=\pgfplots@addplotimpl@file@opt@AS - \let\pgfplots@addplotimpl@fillbetween@opt=\pgfplots@addplotimpl@file@opt@AS + \let\pgfplots@addplotimpl@fillbetween@opt=\pgfplots@addplotimpl@fillbetween@opt@AS \let\pgfplots@addplotimpl@table@fromstructure=\pgfplots@addplotimpl@table@fromstructure@AS \let\pgfplots@addplotimpl@table@fromfile=\pgfplots@addplotimpl@table@fromfile@AS \let\pgfplots@addplotimpl@coordinates=\pgfplots@addplotimpl@coordinates@AS @@ -7417,6 +7571,15 @@ }% }% +\def\pgfplots@addplot@define@plot@cycle@threedim{% + \def\pgfplots@path@closed@cycle@std{% + \pgfextra{% + \pgfpathlineto{\pgfplotsqpointxyz{\pgfplots@currentplot@lastcoord@x}{\pgfplots@currentplot@lastcoord@y}{\pgfplots@logical@ZERO@z}}% + \pgfpathlineto{\pgfplotsqpointxyz{\pgfplots@currentplot@firstcoord@x}{\pgfplots@currentplot@firstcoord@y}{\pgfplots@logical@ZERO@z}}% + }% + -- cycle + }% +}% \def\pgfplots@addplot@get@named@startendpoints@command#1{% \ifx\pgfplots@currentplot@firstcoord@x\pgfutil@empty % empty plot. @@ -7430,6 +7593,9 @@ \noexpand\pgfcoordinate{current plot begin}{\noexpand\pgfplotsqpointxyz{\pgfplots@currentplot@firstcoord@x}{\pgfplots@currentplot@firstcoord@y}{\pgfplots@currentplot@firstcoord@z}}% \noexpand\pgfcoordinate{current plot end}{\noexpand\pgfplotsqpointxyz{\pgfplots@currentplot@lastcoord@x}{\pgfplots@currentplot@lastcoord@y}{\pgfplots@currentplot@lastcoord@z}}% }% + % FIXME : wouldn't this be a good idea for 2d axes as + % well!? + \pgfplots@addplot@define@plot@cycle@threedim \else \edef#1{% \noexpand\pgfcoordinate{current plot begin}{\noexpand\pgfplotsqpointxy{\pgfplots@currentplot@firstcoord@x}{\pgfplots@currentplot@firstcoord@y}}% @@ -8707,8 +8873,13 @@ \pgfmath@smuggleone\pgfplots@loc@TMPc \endgroup % - \def\pgfplots@loc@TMPa{\pgfkeysvalueof{/pgfplots/plot graphics/includegraphics cmd}}% - \expandafter\pgfplots@loc@TMPa\expandafter[\pgfplots@loc@TMPc]{\pgfplots@loc@TMPd}% + \t@pgfplots@toka=\expandafter{\pgfplots@loc@TMPc}% + \t@pgfplots@tokb=\expandafter{\pgfplots@loc@TMPd}% + \edef\pgfplots@loc@TMPc{% + \noexpand\pgfkeysvalueof{/pgfplots/plot graphics/includegraphics cmd}% + [\the\t@pgfplots@toka] + {\the\t@pgfplots@tokb}}% + \pgfplots@loc@TMPc \fi }% @@ -8838,8 +9009,18 @@ % only need to know whether [xy] coordinates are sorted % ascending or descending. This information is already ready. % - \if1\pgfplotsplothandlermesh@matrixinput - % mesh input=lattice + \ifcase\pgfplotsplothandlermesh@matrixinput + % mesh input=patches + \ifpgfplots@threedim + \if\pgfplots@meshmode n% + \else + \pgfkeys{/pgfplots/z buffer=sort}% + \fi + \else + \pgfkeys{/pgfplots/z buffer=none}% + \fi + \else + % mesh input=lattice|image \begingroup \if+\pgfkeysvalueof{/pgfplots/x coord sorting}% \def\pgfplots@minmaxvalue@x{0}% @@ -8879,16 +9060,6 @@ \endgroup % 'z buffer' is no longer 'auto' now: \pgfplots@apply@zbuffer - \else - % mesh input=patches - \ifpgfplots@threedim - \if\pgfplots@meshmode n% - \else - \pgfkeys{/pgfplots/z buffer=sort}% - \fi - \else - \pgfkeys{/pgfplots/z buffer=none}% - \fi \fi \or % z buffer=default. @@ -8896,7 +9067,15 @@ % mesh mode deactivated! \else % mesh=true - \pgfkeysalso{/pgfplots/z buffer=auto}% + \if2\pgfplotsplothandlermesh@matrixinput + % mesh input=image + % we do not want z buffering by default because it + % leads to undefined color associations. + % Use 'z buffer=auto' to re-enable it + \pgfkeys{/pgfplots/z buffer=none}% + \else + \pgfkeysalso{/pgfplots/z buffer=auto}% + \fi \pgfplots@apply@zbuffer% \fi \fi diff --git a/Master/texmf-dist/tex/generic/pgfplots/pgfplotscore.code.tex b/Master/texmf-dist/tex/generic/pgfplots/pgfplotscore.code.tex index e446999cb80..54e02d4496f 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/pgfplotscore.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/pgfplotscore.code.tex @@ -57,11 +57,19 @@ }% \newif\ifpgfplots@LUA@supported -\pgfutil@IfUndefined{directlua}{% - \pgfplots@LUA@supportedfalse -}{% - \pgfplots@LUA@supportedtrue -}% +\pgfkeys{ + /pgfplots/lua support/.is choice, + /pgfplots/lua support/true/.code={\pgfplots@LUA@supportedtrue},% + /pgfplots/lua support/false/.code={\pgfplots@LUA@supportedfalse},% + /pgfplots/lua support/auto/.code={% + \pgfutil@IfUndefined{directlua}{% + \pgfplots@LUA@supportedfalse + }{% + \pgfplots@LUA@supportedtrue + }% + },% + /pgfplots/lua support/auto,% this is the default anyway +} % this is an emergency key which allows to switch off LUA support in % pgfplots early at boot time. @@ -113,6 +121,7 @@ }% }% \pgfplots@log3{Initializing with LUA version \pgfplotsutil@directlua{tex.print(_VERSION)}}% + % attention: this can set 'lua support=false' as a side-effect: \pgfplotsutil@directlua{require("pgfplots"); pgfplots.pgfplotsversion = "\pgfplotsversion";}% % \pgfplots@alloc@catcodetable @@ -121,19 +130,6 @@ \pgfplotsutil@directlua{pgfplots.LOAD_TIME_CATCODETABLE = \the\c@pgf@counta}% \fi -\pgfkeys{ - /pgfplots/lua support/.is choice, - /pgfplots/lua support/true/.code={\pgfplots@LUA@supportedtrue},% - /pgfplots/lua support/false/.code={\pgfplots@LUA@supportedfalse},% - /pgfplots/lua support/auto/.code={% - \pgfutil@IfUndefined{directlua}{% - \pgfplots@LUA@supportedfalse - }{% - \pgfplots@LUA@supportedtrue - }% - },% - %/pgfplots/lua support/auto,% this is the default anyway -} \def\pgfplots@error#1{\PackageError{pgfplots}{#1}{}}% \def\pgfplotstable@error@pkg#1{\PackageError{pgfplotstable}{#1}{}}% @@ -251,6 +247,13 @@ \fi \let#1=\pgfutil@empty },% + /pgfplots/exception/cycle list instantiation needed/.code={% + \ifx\pgfplotsexceptionmsg\relax + \pgfplots@error{Please invoke \string\pgfplotsset{cycle list/#1} before using cycle list '#1'}% + \else + \pgfplots@error{\pgfplotsexceptionmsg}% + \fi + },% % #1: an error message /pgfplots/exception/unsupported operation/.code={% \ifx\pgfplotsexceptionmsg\relax @@ -270,6 +273,13 @@ \fi \let#1=\relax }, + /pgfplots/exception/dimension too small in ticks/.code args={#1}{% + \ifx\pgfplotsexceptionmsg\relax + \pgfplots@error{The argument(s) for #1tick resulted in a tick distance which is too small. Please reconfigure the xtick argument(s)}% + \else + \pgfplots@error{\pgfplotsexceptionmsg}% + \fi + }, % % % @@ -295,6 +305,9 @@ /pgfplots/warning/no such addplot label/.code={% \pgfplotsthrow@warning{There is no \string\addplot\space label `#1', sorry. I am skipping it}% }, + /pgfplots/warning/missing near ticklabel at/.code={% + \pgfplotsthrow@warning{The anchor 'near ticklabel' cannot be computed correctly because the position is missing. Please add 'near ticklabel at=coordinate' with a suitable coordinate}% + }, /pgfplots/warning/enlargelimits respects figure size failed/.code={% \pgfplotsthrow@warning{enlargelimits respects figure size=true: could not respect the prescribed width/height (\pgfplotsretval). The size and/or aspect ratio of your image will be different than expected. You can try to modify BOTH width and height.}% }, @@ -305,9 +318,15 @@ /pgfplots/warning/approx empty range enlarged/.code args={#1#2#3}{% \pgfplotsthrow@warning{Axis range for axis #1 is approximately empty; enlarging it (it is [#2:#3])}% }, + /pgfplots/warning/dimension too large in ticks/.code args={#1#2#3}{% + \pgfplotsthrow@warning{The argument for #1tick distance=#2 was capped to #3 in order to avoid 'dimension too large'}% + }, /pgfplots/warning/lossy colormap rgb conversion/.code 2 args={% \pgfplotsthrow@warning{I am about to convert colormap '#1' from #2\space to rgb (which might be lossy). Perhaps the choice 'colorbar sampled={surf,shader=interp}' yields better results since it supports #2.}% }, + /pgfplots/warning/cycle list size limit reached/.code={% + \pgfplotsthrow@warning{Reached /pgfplots/@cycle/max size=\pgfkeysvalueof{/pgfplots/@cycle/max size}. Omitting all following entries.}% + }, /pgfplots/warning/colorbar uninitialised/.code={% \pgfplotsthrow@warning{Sorry, the colorbar is uninitialised - your axis has no color data. Consider using 'point meta=f(x)' or something like that. I am using a color range of [0,1] for the colorbar.}% }, @@ -349,7 +368,16 @@ as sqrt(num points) = sqrt(#3) [ = #4].}% }, /pgfplots/warning/matrix check/.code args={#1#2#3#4#5}{% - #1{the arguments of [mesh/rows=#2,mesh/cols=#3] assume #5\space points, but I got actually N = #4\space points! The data matrix appears to be incomplete or overcomplete!? [Use mesh/check=false to disable this message]}% + #1{the arguments of [mesh/rows=#2,mesh/cols=#3] assume #5\space points, but I actually got N = #4\space points! The data matrix appears to be incomplete or overcomplete!? [Use mesh/check=false to disable this message]}% + }, + /pgfplots/warning/imagesc limits incomplete/.code args={#1}{% + \pgfkeysgetvalue{/pgfplots/empty line}\pgfplots@loc@TMPa% + \def\pgfplots@loc@TMPb{scanline} + \ifx\pgfplots@loc@TMPb\pgfplots@loc@TMPa + \pgfplotsthrow@warning{Automatic computation of axis limits for 'matrix plot' is INACCURATE. Please add the key '#1'. You can also ignore this warning and deal with axis limits manually}% + \else + \pgfplotsthrow@warning{Automatic computation of axis limits for 'matrix plot' is INACCURATE. Please add the keys '#1,empty line=scanline' (current value is empty line=\pgfplots@loc@TMPa). You can also ignore this warning and deal with axis limits manually}% + \fi }, /pgfplots/warning/tick computation failed/.code 2 args={% \pgfplotsthrow@warning{Tick computation for direction #1 failed; there are always too few tick labels (try min ticks has already been advanced to #2)}% diff --git a/Master/texmf-dist/tex/generic/pgfplots/pgfplotsmeshplothandler.code.tex b/Master/texmf-dist/tex/generic/pgfplots/pgfplotsmeshplothandler.code.tex index fb3ab9b42e2..e6d957d842d 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/pgfplotsmeshplothandler.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/pgfplotsmeshplothandler.code.tex @@ -7,7 +7,7 @@ % % It is based on Till Tantau's PGF package. % -% Copyright 2007-2010 by Christian Feuersänger. +% Copyright 2007-2015 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 @@ -133,19 +133,30 @@ % END OF EXAMPLE % -> see also the legend image for mesh plots. % + +\input pgfplotsmeshplotimage.code.tex + \def\pgfplotsplothandlermesh{% \def\pgfplotsplothandlername{mesh}% + % + % acquire values as they are known right now. Note that these values may change during the survey phase, so they will be updated later. + \pgfkeysgetvalue{/pgfplots/mesh/rows}\pgfplotsplothandlermesh@rows + \pgfkeysgetvalue{/pgfplots/mesh/cols}\pgfplotsplothandlermesh@cols + \pgfkeysgetvalue{/pgfplots/mesh/num points}\pgfplotsplothandlermesh@numpoints + \edef\pgfplotsplothandlermesh@numpoints{\pgfplotsplothandlermesh@numpoints}% + \edef\pgfplotsplothandlermesh@cols{\pgfplotsplothandlermesh@cols}% + \edef\pgfplotsplothandlermesh@rows{\pgfplotsplothandlermesh@rows}% + % \pgfkeysgetvalue{/pgfplots/patch type}\pgfplotsplothandlermesh@patchclass \ifx\pgfplotsplothandlermesh@patchclass\pgfplotsplothandlermesh@patchclass@defaulttext \let\pgfplotsplothandlermesh@patchclass=\pgfutil@empty \fi - % FIXME : detect 1d mode here! \ifx\pgfplotsplothandlermesh@patchclass\pgfutil@empty % assign default patch class. - \if1\pgfplotsplothandlermesh@matrixinput - \def\pgfplotsplothandlermesh@patchclass{rectangle}% - \else + \if0\pgfplotsplothandlermesh@matrixinput \def\pgfplotsplothandlermesh@patchclass{triangle}% + \else + \def\pgfplotsplothandlermesh@patchclass{rectangle}% \fi \pgfkeyslet{/pgfplots/patch type}\pgfplotsplothandlermesh@patchclass \fi @@ -156,10 +167,17 @@ \fi % \let\pgfplotsplothandlersurveystart=\pgfplotsplothandlersurveystart@mesh + \let\pgfplotsplothandlersurveypoint=\pgfplotsplothandlersurveypoint@mesh \let\pgfplotsplothandlersurveyend=\pgfplotsplothandlersurveyend@mesh \let\pgfplotsplothandlersurveyaftersetpointmeta=\pgfplotsplothandlersurveyaftersetpointmeta@mesh@cdatanormalize + \let\pgfplotsplothandlernotifyscanlinecomplete=\pgfplotsplothandlersurvey@mesh@scanlinecomplete % \def\pgfplotsplothandlerLUAfactory{pgfplots.MeshPlothandler.new}% + \if2\pgfplotsplothandlermesh@matrixinput + % mesh input=image + % this is currently unsupported in LUA: + \let\pgfplotsplothandlerLUAfactory=\pgfutil@empty + \fi % \pgfkeysgetvalue{/pgfplots/patch table/value}\pgfplotsplothandlermesh@patchtable \ifx\pgfplotsplothandlermesh@patchtable\pgfutil@empty @@ -272,7 +290,19 @@ \fi % % assign boolean: - \let\b@pgfplotsplothandlermesh@matrixoutput=\pgfplotsplothandlermesh@matrixinput + \ifcase\pgfplotsplothandlermesh@matrixinput + % mesh input=patches + \def\b@pgfplotsplothandlermesh@matrixoutput{0}% + \or + % mesh input=lattice + \def\b@pgfplotsplothandlermesh@matrixoutput{1}% + \or + % mesh input=image + % while it _could_ potentially provide matrix output, the + % implementation is quite involved. We don't have it. + \def\b@pgfplotsplothandlermesh@matrixoutput{0}% + \fi + % \pgfplotspatchclass{\pgfplotsplothandlermesh@patchclass@output}{allow matrix}% \if0\pgfplotsretval \def\b@pgfplotsplothandlermesh@matrixoutput{0}% @@ -283,6 +313,9 @@ \if1\pgfplotsaxisplothasjumps \def\b@pgfplotsplothandlermesh@matrixoutput{0}% \fi + \if1\pgfplotsaxisplothasunboundedpointmeta + \def\b@pgfplotsplothandlermesh@matrixoutput{0}% + \fi \if\pgfplotsplothandlermesh@zbuffer@choice4% 'z buffer=sort': \def\b@pgfplotsplothandlermesh@matrixoutput{0}% \fi @@ -413,6 +446,8 @@ \def\pgfplots@autocomplete@meshkeys#1{% % For #1 = 0, the values are only partially completed (which is % also compatible with patch plots) + % + % get (potentially) updated values: \pgfkeysgetvalue{/pgfplots/mesh/rows}\pgfplotsplothandlermesh@rows \pgfkeysgetvalue{/pgfplots/mesh/cols}\pgfplotsplothandlermesh@cols \pgfkeysgetvalue{/pgfplots/mesh/num points}\pgfplotsplothandlermesh@numpoints @@ -597,6 +632,49 @@ \def\pgfplotspatchvertexdepth{#4}% \def\pgfplotspatchvertexcoords{#5}% }% + +% Assumes that #1 expands to an argument of \pgfplotspatchvertex and +% that #2 is a macro containing another patch vertex. +% +% It then replaces #2 by a new vector which is equal to #2 except for +% the point meta which is taken from #1. +\def\pgfplotspatchvertexcopymeta#1\to#2{% + \begingroup + \expandafter\pgfplotspatchvertex#1\endvertex + \let\pgfplots@loc@TMPa=\pgfplotspatchvertexmeta + \expandafter\pgfplotspatchvertex#2\endvertex + \xdef\pgfplots@glob@TMPc{% + {\pgfplotspatchvertexx}% + {\pgfplotspatchvertexy}% + {\pgfplots@loc@TMPa}% + \pgfplotspatchvertexdepth:\pgfplotspatchvertexcoords + }% + \endgroup + \let#2=\pgfplots@glob@TMPc +}% + +% Same as \pgfplotspatchvertexcopymeta but it becomes a no-op if the +% point meta in #1 is bounded (according to +% \pgfplotsifpointmetaisbounded) +\def\pgfplotspatchvertexcopymetaifbounded#1\to#2{% + \begingroup + \expandafter\pgfplotspatchvertex#1\endvertex + \let\pgfplots@loc@TMPa=\pgfplotspatchvertexmeta + \pgfplotsifpointmetaisbounded{\pgfplots@loc@TMPa}{% + \expandafter\pgfplotspatchvertex#2\endvertex + \xdef\pgfplots@glob@TMPc{% + {\pgfplotspatchvertexx}% + {\pgfplotspatchvertexy}% + {\pgfplots@loc@TMPa}% + \pgfplotspatchvertexdepth:\pgfplotspatchvertexcoords + }% + }{% + \global\let\pgfplots@glob@TMPc=#2% + }% + \endgroup + \let#2=\pgfplots@glob@TMPc +}% + \def\pgfplotspointpatchvertex#1#2#3#4:#5\endvertex{% \global\pgf@x=#1 \global\pgf@y=#2 @@ -617,9 +695,23 @@ \pgf@xa=0pt \pgf@ya=0pt \pgf@yb=0pt + \def\b@pgfplotspatchvertexaccum@ignore@unbounded@metadata{0}% \if0\pgfplotsplothandlermesh@colorinput % mesh/color input=colormap - \pgfplotscoordmath{meta}{zero}% + %\if m\pgfplots@colormap@access + \iftrue + % colormap access=map + \pgfplotscoordmath{meta}{zero}% + \else + % colormap access=direct + % FIXME : this causes lots of problems because the result is + % of an unexpected format at consumer side: + \begingroup + \pgfplotscolorzero{\pgfplotsplothandlermesh@explicit@color@num@comps}% + \let\pgfmathresult=\pgfplotsretval + \pgfmath@smuggleone\pgfmathresult + \endgroup + \fi \else % mesh/color input=explicit \begingroup @@ -630,6 +722,71 @@ \fi }% +% if this is called, all following accumulation commands will replace unbounded point meta by the fixed zero value. +\def\pgfplotspatchvertexaccum@configure@ignore@unboundedmetadata{% + \def\b@pgfplotspatchvertexaccum@ignore@unbounded@metadata{1}% +}% + +% #1 scale +% #2 meta +\def\pgfplotspatchvertexaddscaledmeta@if@applicable@colormap#1#2{% + \let\pgfmathresult@=\pgfmathresult + \if1\b@pgfplotspatchvertexaccum@ignore@unbounded@metadata + \pgfplotsifpointmetaisbounded{#2}{\pgfplots@loc@tmptrue}{\pgfplots@loc@tmpfalse}% + \else + \pgfplots@loc@tmptrue + \fi + \ifpgfplots@loc@tmp + %\if m\pgfplots@colormap@access + \iftrue + % colormap access=map + \pgfplotscoordmath{meta}{parsenumber}{#1}% + \pgfplotscoordmath{meta}{op}{multiply}{{#2}{\pgfmathresult}}% + \pgfplotscoordmath{meta}{op}{add}{{\pgfmathresult@}{\pgfmathresult}}% + \else + % colormap access=direct + % FIXME : this causes lots of problems because the result is + % of an unexpected format at consumer side: + % colormap access=direct + % interpolate colors, not their indices: + \begingroup + \pgfplotscoordmath{meta}{parsenumber}{#1}% + \pgfplotscoordmath{meta}{tofixed}{\pgfmathresult}% + \pgfplotscolormapgetindex{\pgfmathresult}{\pgfplotsplothandlermesh@colormapname}% + \global\let\pgfplots@glob@TMPc=\pgfmathresult + \endgroup + \pgfplotspatchvertexaddscaledmeta@if@applicable@explicit{#1}{\pgfplots@glob@TMPc}% + \fi + \else + \pgfplotscoordmath{meta}{op}{multiply}{{\pgfplots@metamin}{\pgfmathresult}}% + \pgfplotscoordmath{meta}{op}{add}{{\pgfmathresult@}{\pgfmathresult}}% + \fi +}% + +% #1 scale +% #2 meta +\def\pgfplotspatchvertexaddscaledmeta@if@applicable@explicit#1#2{% + \if1\b@pgfplotspatchvertexaccum@ignore@unbounded@metadata + \edef\pgfmathresult@{#2}% + \ifx\pgfmathresult@\pgfutil@empty + \pgfplots@loc@tmpfalse + \else + \pgfplots@loc@tmptrue + \fi + \else + \pgfplots@loc@tmptrue + \fi + \let\pgfmathresult@=\pgfmathresult + \ifpgfplots@loc@tmp + \begingroup + \pgfplotscoloraddweighted{\pgfplotsplothandlermesh@explicit@color@num@comps} + {\pgfmathresult@}{#1}{#2}% + \let\pgfmathresult=\pgfplotsretval + \pgfmath@smuggleone\pgfmathresult + \endgroup + \fi +} + % #1: the patch's x coordinate % #2: the patch's y coordinate % #3: the patch's point meta value @@ -640,20 +797,12 @@ \global\pgf@y=#2 % \advance\pgf@xa by#6\pgf@x \advance\pgf@ya by#6\pgf@y - \let\pgfmathresult@=\pgfmathresult \if0\pgfplotsplothandlermesh@colorinput % mesh/color input=colormap - \pgfplotscoordmath{meta}{parsenumber}{#6}% - \pgfplotscoordmath{meta}{op}{multiply}{{#3}{\pgfmathresult}}% - \pgfplotscoordmath{meta}{op}{add}{{\pgfmathresult@}{\pgfmathresult}}% + \pgfplotspatchvertexaddscaledmeta@if@applicable@colormap{#6}{#3}% \else % mesh/color input=explicit - \begingroup - \pgfplotscoloraddweighted{\pgfplotsplothandlermesh@explicit@color@num@comps} - {\pgfmathresult@}{#6}{#3}% - \let\pgfmathresult=\pgfplotsretval - \pgfmath@smuggleone\pgfmathresult - \endgroup + \pgfplotspatchvertexaddscaledmeta@if@applicable@explicit{#6}{#3}% \fi \def\pgfplotspatchvertexdepth{#4}% \ifx\pgfplotspatchvertexdepth\pgfutil@empty @@ -923,6 +1072,11 @@ % issues \pgfplotspatchvertex{...}\endvertex for the first vertex. first vertex/.code= {\expandafter\def\csname pgfpptch\pgfplotsdeclarepatchclass@ first vertex\endcsname{#1}},% + % issues \pgfplotspatchvertex{...}\endvertex for the vertex which + % was the first BEFORE any z buffer reorderings changed the + % sequence (i.e. it undoes the effect of z buffer for the patch). + first vertex before z buffer/.code= + {\expandafter\def\csname pgfpptch\pgfplotsdeclarepatchclass@ first vertex before z buffer\endcsname{#1}},% % % invokes % \pgfplotspatchvertex...\endvertex @@ -1181,6 +1335,7 @@ get dimension=\def\pgfplotsretval{1}, supports global path=\def\pgfplotsretval{1}, first vertex=\expandafter\pgfplotspatchvertex\pgfplotspatchclass@line@A\endvertex, + first vertex before z buffer=\expandafter\pgfplotspatchvertex\pgfplotspatchclass@line@A\endvertex, foreach vertex={% \expandafter\pgfplotspatchvertex\pgfplotspatchclass@line@A\endvertex #1% \expandafter\pgfplotspatchvertex\pgfplotspatchclass@line@B\endvertex #1% @@ -1407,6 +1562,67 @@ #6% }% +% implements 'first vertex before z buffer' for rectangle +% Note that 'mesh input=lattice' generates the rectangle patch as +% follows: if the input matrix has the form +% +% (i-1,j-1) (i,j-1) +% +% (i-1,j) (i,j) +% +% it generates the rectangle +% +% A B +% +% D C +% +% (if you try to map this to a plot, ensure that you have 'y dir=reverse') +\def\pgfplotspatchclass@rect@first@before@z@buffer{% + \if\pgfplots@plot@mesh@ordering0% + % ordering = rowwise -> scanline is cols! + \ifcase\pgfplotsplothandlermesh@zbuffer@choice\relax + % none + \let\pgfplots@loc@TMPa\pgfplotspatchclass@rect@A + \or + % reverse x seq + \let\pgfplots@loc@TMPa\pgfplotspatchclass@rect@B + \or + % reverse y seq + \let\pgfplots@loc@TMPa\pgfplotspatchclass@rect@D + \or + % reverse xy seq + \let\pgfplots@loc@TMPa\pgfplotspatchclass@rect@C + \or + % sort + \let\pgfplots@loc@TMPa\pgfplotspatchclass@rect@A + \else + % the choices 'default' or 'auto' should have been expanded already. Nothing to do here: + \let\pgfplots@loc@TMPa\pgfplotspatchclass@rect@A + \fi + \else + % ordering = colwise: scanline is rows! + \ifcase\pgfplotsplothandlermesh@zbuffer@choice\relax + % none + \let\pgfplots@loc@TMPa\pgfplotspatchclass@rect@A + \or + % reverse x seq + \let\pgfplots@loc@TMPa\pgfplotspatchclass@rect@D + \or + % reverse y seq + \let\pgfplots@loc@TMPa\pgfplotspatchclass@rect@B + \or + % reverse xy seq + \let\pgfplots@loc@TMPa\pgfplotspatchclass@rect@C + \or + % sort + \let\pgfplots@loc@TMPa\pgfplotspatchclass@rect@A + \else + % the choices 'default' or 'auto' should have been expanded already. Nothing to do here: + \let\pgfplots@loc@TMPa\pgfplotspatchclass@rect@A + \fi + \fi + \expandafter\pgfplotspatchvertex\pgfplots@loc@TMPa\endvertex +}% % A rectangle specified in the sequence % D <-- C @@ -1449,6 +1665,7 @@ \pgfplotspatchready },% first vertex=\expandafter\pgfplotspatchvertex\pgfplotspatchclass@rect@A\endvertex, + first vertex before z buffer=\pgfplotspatchclass@rect@first@before@z@buffer, foreach vertex={% \expandafter\pgfplotspatchvertex\pgfplotspatchclass@rect@A\endvertex #1% \expandafter\pgfplotspatchvertex\pgfplotspatchclass@rect@B\endvertex #1% @@ -1789,10 +2006,48 @@ \pgfplotspatchclass{\pgfplotsplothandlermesh@patchclass}{foreach vertex}{% \pgfplotsplothandlermesh@check@unbounded% }% + % + \ifpgfplots@loc@tmp + \pgfplotsplothandlermesh@PIPE@CHECKJUMP@meta + \fi + % \ifpgfplots@loc@tmp \expandafter\pgfplotsplothandlermesh@PIPE@REFINE \fi }% + +\def\pgfplotsplothandlermesh@PIPE@CHECKJUMP@meta@noop{% +} + +\let\pgfplotsplothandlermesh@PIPE@CHECKJUMP@meta=\pgfplotsplothandlermesh@PIPE@CHECKJUMP@meta@noop + +\def\pgfplotsplothandlermesh@PIPE@CHECKJUMP@meta@everyvertex{% + \pgfplotspatchclass{\pgfplotsplothandlermesh@patchclass}{foreach cdata vertex}{% + \pgfplotsplothandlermesh@PIPE@CHECKJUMP@meta@check + }% +}% +\def\pgfplotsplothandlermesh@PIPE@CHECKJUMP@meta@firstvertex{% + \pgfplotspatchclass{\pgfplotsplothandlermesh@patchclass}{first vertex before z buffer}% + \pgfplotsplothandlermesh@PIPE@CHECKJUMP@meta@check +}% +\def\pgfplotsplothandlermesh@PIPE@CHECKJUMP@meta@firstvertex@legacy{% + \pgfplotspatchclass{\pgfplotsplothandlermesh@patchclass}{first vertex}% + \pgfplotsplothandlermesh@PIPE@CHECKJUMP@meta@check +}% +\def\pgfplotsplothandlermesh@PIPE@CHECKJUMP@meta@check{% + \if0\pgfplotsplothandlermesh@colorinput + % mesh/color input=colormap + \pgfplotsifpointmetaisbounded{\pgfplotspatchvertexmeta}{}{% + \pgfplots@loc@tmpfalse + }% + \else + % mesh/color input=explicit + \ifx\pgfplotspatchvertexmeta\pgfutil@empty + \pgfplots@loc@tmpfalse + \fi + \fi +} + \def\pgfplotsplothandlermesh@PIPE@REFINE@no@op{% \pgfplotsplothandlermesh@PIPE@FINISH }% @@ -1833,8 +2088,10 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \def\pgfplotsplothandlermesh@init@DECODE{% - \if1\pgfplotsplothandlermesh@matrixinput - % mesh input=lattice + \if0\pgfplotsplothandlermesh@matrixinput +%\message{initialised DECODE for patch output (from patch).^^J}% + \else + % mesh input=lattice|image % Init memory: % % And now finally: initialise the conversion from @@ -1842,14 +2099,20 @@ \if\pgfplots@plot@mesh@ordering0% % x varies (=rowwise): \let\pgfplotsplothandlermesh@scanlinelength=\pgfplotsplothandlermesh@cols + \let\pgfplotsplothandlermesh@numscanlines=\pgfplotsplothandlermesh@rows \else % y varies (=colwise): \let\pgfplotsplothandlermesh@scanlinelength=\pgfplotsplothandlermesh@rows + \let\pgfplotsplothandlermesh@numscanlines=\pgfplotsplothandlermesh@cols \fi % \if1\pgfplotsplothandlermesh@ONEDIMMODE %\message{initialised DECODE for 1d mode.^^J}% % FIXME : needs LUA support... + \if2\pgfplotsplothandlermesh@matrixinput + % mesh input=image + \pgfplots@error{'matrix input=image' is unsupported for line plots (or matrix plots with just 1 row or 1 column). Please provide at least 2 rows and 2 cols for 'matrix input=image'}% + \fi \let\pgfplotsplothandlermesh@PIPE@DECODE=\pgfplotsplothandlermesh@PIPE@DECODE@matrix@ONEDIMMODE \else \if0\b@pgfplotsplothandlermesh@matrixoutput @@ -1861,17 +2124,35 @@ \c@pgfplots@scanlineindex=\pgfplotsplothandlermesh@scanlinelength\relax \advance\c@pgfplots@scanlineindex by1 \pgfplotsdequenewempty{lastscanline}\capacity{\the\c@pgfplots@scanlineindex}% - \let\pgfplotsplothandlermesh@PIPE@DECODE=\pgfplotsplothandlermesh@PIPE@DECODE@matrix@fillscanline + \if1\pgfplotsplothandlermesh@matrixinput + % mesh input=lattice + \let\pgfplotsplothandlermesh@PIPE@DECODE=\pgfplotsplothandlermesh@PIPE@DECODE@matrix@fillscanline %\message{initialised DECODE for patch output (from matrix).^^J}% + \else + % mesh input=image + % lastinterpscanline contains a line of + % interpolated points, and there is one more than points. Preallocate it: + \advance\c@pgfplots@scanlineindex by1 + \pgfplotsdequenewempty{lastinterpscanline}\capacity{\the\c@pgfplots@scanlineindex}% + % NOTE: implementation is in a separate file. + \let\pgfplotsplothandlermesh@PIPE@DECODE=\pgfplotsplothandlermesh@PIPE@DECODE@image@fillscanline +%\message{initialised DECODE for IMAGE output (from matrix).^^J}% + \fi \fi \else % SPECIAL HANDLING! - \let\pgfplotsplothandlermesh@PIPE@DECODE=\pgfplotsplothandlermesh@PIPE@DECODE@to@shader + \if1\pgfplotsplothandlermesh@matrixinput + % mesh input=lattice + \let\pgfplotsplothandlermesh@PIPE@DECODE=\pgfplotsplothandlermesh@PIPE@DECODE@to@shader + \else + % mesh input=image + % this should never happen because matrix output + % is off for mesh input=image + \pgfplots@error{Illegal internal state encountered}% + \fi %\message{initialised DECODE for direct matrix output (from matrix).^^J}% \fi \fi - \else -%\message{initialised DECODE for patch output (from patch).^^J}% \fi }% @@ -1940,7 +2221,108 @@ context message={point meta '\pgfplots@current@point@meta' of coord no \the\c@pgfplots@coordindex\space (\pgfplots@current@point@x,\pgfplots@current@point@y\ifpgfplots@curplot@threedim,\pgfplots@current@point@z\fi)}, ]% \fi + % + \if2\pgfplotsplothandlermesh@matrixinput + % mesh input=image + \pgfplotsplothandlersurveystart@mesh@image + \pgfplotsplothandlermesh@needs@scanlinecomplete@notificationstrue + \fi + % + \pgfplotsplothandlersurveypoint@mesh@check@scanline@length@init +}% + +\def\pgfplotsplothandlersurveypoint@mesh{% + \pgfplotsplothandlersurveypoint@default + % + \pgfplotsplothandlersurveypoint@mesh@common +} + +\def\pgfplotsplothandlersurveypoint@mesh@common{% + \if2\pgfplotsplothandlermesh@matrixinput + \pgfplotsplothandlersurveypoint@mesh@image + \fi + % + \ifcase\pgfplotsplothandlermesh@matrixinput + \else + % mesh input=lattice|image + \pgfplotsplothandlersurveypoint@mesh@check@scanline@length + \fi +}% + +\def\pgfplotsplothandlersurveypoint@pseudoconstant@row@index{% + \if\pgfplots@plot@mesh@ordering0% + % ordering = x varies= rowwise -> scanline is cols! + \else + % ordering = y varies = colwise: scanline is rows! + \ifx\pgfplotsplothandlermesh@rows\pgfutil@empty + \fi }% + +% initializes \pgfplotsplothandlersurveypoint@mesh@check@scanline@length, see its comments. +\def\pgfplotsplothandlersurveypoint@mesh@check@scanline@length@init{% + \pgfkeysgetvalue{/pgfplots/empty line}\pgfplots@loc@TMPa% + \def\pgfplots@loc@TMPb{scanline} + \ifx\pgfplots@loc@TMPb\pgfplots@loc@TMPa + \else + % without end-of-scanline markers, the notification + % \pgfplotsscanlinecomplete does not make sense anyway in this + % context. Disable it: + \let\pgfplotsplothandlersurveypoint@mesh@check@scanline@length=\relax + \fi + \if\pgfplots@plot@mesh@ordering0% + % ordering = x varies= rowwise -> scanline is cols! + \ifx\pgfplotsplothandlermesh@cols\pgfutil@empty + % ... and without columns, we cannot generate the notification. + \let\pgfplotsplothandlersurveypoint@mesh@check@scanline@length=\relax + \fi + \else + % ordering = y varies = colwise: scanline is rows! + \ifx\pgfplotsplothandlermesh@rows\pgfutil@empty + % ... and without rows, we cannot generate the notification. + \let\pgfplotsplothandlersurveypoint@mesh@check@scanline@length=\relax + \fi + \fi +} + +% Invokes \pgfplotsscanlinecomplete if the scanline is complete according to the keys 'mesh/rows' and/or 'mesh/cols' +% +% This routine improves the precision of the scanline computation, but not much. +% At the time of this writing, its only purpose is to help 'matrix input=image' +% as that requires information about the current scanline in order to update its +% axis limits. +% +% Note that this macro is unnecessary in many cases: if the user input _contains_ end-of-scanline markers, it is redundant. +% +% Limitations of this routine: +% 1. it requires 'empty line=scanline'. +% 2. if mesh/ordering=x varies, it requires that mesh/cols is set. +% if mesh/ordering=y varies, it requires that mesh/rows is set. +% +% In all other cases, it simply becomes a no-op without further notice (i.e. it will be \let to \relax) +\def\pgfplotsplothandlersurveypoint@mesh@check@scanline@length{% +%\message{checking scanline length for \the\c@pgfplots@scanlineindex. cols=\pgfplotsplothandlermesh@cols, rows=\pgfplotsplothandlermesh@rows. ordering = \pgfplots@plot@mesh@ordering^^J}% + \if\pgfplots@plot@mesh@ordering0% + % ordering = x varies= rowwise -> scanline is cols! + \ifnum\pgfplotsplothandlermesh@cols=\c@pgfplots@scanlineindex\relax + % it does not hurt to invoke this here multiple times -- it has to handle that case anyway: + \pgfplotsscanlinecomplete + \fi + \else + % ordering = y varies = colwise: scanline is rows! + \ifnum\pgfplotsplothandlermesh@rows=\c@pgfplots@scanlineindex\relax + % it does not hurt to invoke this here multiple times -- it has to handle that case anyway: + \pgfplotsscanlinecomplete + \fi + \fi +}% + +\def\pgfplotsplothandlersurveypoint@mesh@noreset@of@pointmeta{% + \pgfplotsplothandlersurveypoint@default@noreset@of@pointmeta + \pgfplotsplothandlersurveypoint@mesh@common +}% + +\newif\ifpgfplotsplothandlermesh@needs@scanlinecomplete@notifications + \def\pgfplotsplothandlersurveyend@mesh{% \pgfplotsplothandlersurveyend@default \if0\pgfplotsplothandlermesh@colorinput @@ -1949,8 +2331,61 @@ % mesh/color input=explicit \endpgfplotscolornormalizesequence \fi + % + \if2\pgfplotsplothandlermesh@matrixinput + % mesh input=image + \pgfplotsplothandlersurveyend@mesh@image + \fi + % + \ifpgfplotsplothandlermesh@needs@scanlinecomplete@notifications + % + % OK, we EXPECT that the code generated + % notifications of sorts \pgfplotsscanlinecomplete. + % + % If this turns out to be NOT the case, we generate a + % warning/error. + % + % This, in turn, is restricted to the following cases: + % 1. there have been end-of-scanline markers in the input + % stream (that's why we can only decide it here, after the + % input has been surveyed) + % 2. OR \pgfplotsscanlinecomplete has been called due to scan + % line length comparison with mesh/cols or mesh/rows. In this + % case, the required argument must have been set, see + % \pgfplotsplothandlersurveypoint@mesh@check@scanline@length@init + % + \ifnum\c@pgfplotsplothandlermesh@image@numscanlines<2 + \pgfplotsautocompletemeshkeys% + \ifx\pgfplotsplothandlersurveypoint@mesh@check@scanline@length\relax + % ah -- this routine has been cleared because the keys are + % missing. + % + % Please see the comments on + % \pgfplotsplothandlersurveypoint@mesh@check@scanline@length + % for details. + % + \if\pgfplots@plot@mesh@ordering0% + % ordering = x varies= rowwise -> scanline is cols! + \pgfplotswarning{imagesc limits incomplete}{mesh/cols=\pgfplotsplothandlermesh@cols}\pgfeov% + \else + % ordering = y varies = colwise: scanline is rows! + \pgfplotswarning{imagesc limits incomplete}{mesh/rows=\pgfplotsplothandlermesh@rows}\pgfeov% + \fi + \fi + \fi + \fi + % } +\def\pgfplotsplothandlersurvey@mesh@scanlinecomplete{% + % + % + \if2\pgfplotsplothandlermesh@matrixinput + % mesh input=image + \pgfplotsplothandlersurveyend@mesh@image@scanlinecomplete + \fi +}% + \def\pgfplotsplothandlersurveyaftersetpointmeta@mesh@cdatanormalize{% \pgfplotsplothandlersurveyaftersetpointmeta@default \if0\pgfplotsplothandlermesh@colorinput @@ -2010,7 +2445,7 @@ \pgfplotsplothandlersurveyend@mesh \let\pgfplotsplothandlersurveystart=\pgfplotsplothandlersurveystart@default \let\pgfplotsplothandlersurveyend=\pgfplotsplothandlersurveyend@default - \let\pgfplotsplothandlersurveypoint=\pgfplotsplothandlersurveypoint@default@noreset@of@pointmeta + \let\pgfplotsplothandlersurveypoint=\pgfplotsplothandlersurveypoint@mesh@noreset@of@pointmeta \pgfplotsplothandlersurveystart \expandafter\pgfplotstable@isloadedtable\expandafter{\pgfplotsplothandlermesh@patchtable}{% \pgfplots@error{Sorry, 'patch table={<loaded table>}' has not been implemented; it would probably be too slow :-(. Please provide a file name or inline table data}% @@ -2113,8 +2548,11 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \def\pgfplotsplothandlermesh@init@meshkeys{% - \if1\pgfplotsplothandlermesh@matrixinput - % mesh input=lattice + \ifcase\pgfplotsplothandlermesh@matrixinput\relax + % mesh input=patches + \pgfkeys{/pgfplots/mesh/ordering/x varies}% disable any special handling. + \else + % mesh input=lattice|image \pgfplotsautocompletemeshkeys% \pgfkeysgetvalue{/pgfplots/mesh/rows}\pgfplotsplothandlermesh@rows \pgfkeysgetvalue{/pgfplots/mesh/cols}\pgfplotsplothandlermesh@cols @@ -2134,9 +2572,6 @@ \def\pgfplotsplothandlermesh@patchclass{line}% \pgfkeyslet{/pgfplots/patch type}\pgfplotsplothandlermesh@patchclass \fi - \else - % mesh input=patches - \pgfkeys{/pgfplots/mesh/ordering/x varies}% disable any special handling. \fi % \pgfplotspatchclass{\pgfkeysvalueof{/pgfplots/patch type}}{get dimension}% @@ -2200,19 +2635,26 @@ \pgfkeyslet{/pgfplots/surf shading/colormap}\pgfplotsplothandlermesh@shader@colormap@interior }% \def\pgfplotsplothandlermesh@is@exterior{% -%\let\pgfplotsplothandlermesh@usepath=\pgfusepathqfillstroke +%\let\pgfplotsplothandlermesh@usepath=\pgfplotsplothandlermeshusepathfillstroke \pgfkeyslet{/pgfplots/colormap name}\pgfplotsplothandlermesh@colormapname \pgfkeyslet{/pgfplots/surf shading/colormap}\pgfplotsplothandlermesh@shader@colormap }% \def\pgfplotsplothandlermesh@init@cdata{% % Ok, we have color data. + \pgfkeysgetvalue{/pgfplots/colormap name}\pgfplotsplothandlermesh@colormapname % - \pgfkeysgetvalue{/pgfplots/mesh/colorspace explicit color output}\pgfplots@loc@TMPa - \pgfplotscolorspacegetcomponents{\pgfplots@loc@TMPa}% - \let\pgfplotsplothandlermesh@explicit@color@num@comps=\pgfplotsretval % - \pgfkeysgetvalue{/pgfplots/colormap name}\pgfplotsplothandlermesh@colormapname + \if0\pgfplotsplothandlermesh@colorinput + % mesh/color input=colormap + \pgfplotscolormapgetcolorcomps{\pgfplotsplothandlermesh@colormapname}% + \let\pgfplotsplothandlermesh@explicit@color@num@comps=\pgfplotsretval + \else + % mesh/color input=explicit + \pgfkeysgetvalue{/pgfplots/mesh/colorspace explicit color output}\pgfplots@loc@TMPa + \pgfplotscolorspacegetcomponents{\pgfplots@loc@TMPa}% + \let\pgfplotsplothandlermesh@explicit@color@num@comps=\pgfplotsretval + \fi % \pgfkeysgetvalue{/pgfplots/mesh/interior colormap name}\pgfplotsplothandlermesh@colormapname@interior \ifx\pgfplotsplothandlermesh@colormapname@interior\pgfutil@empty @@ -2247,7 +2689,21 @@ \def\pgfplotsplothandlermesh@definemappedcolor#1{% \if0\pgfplotsplothandlermesh@colorinput % mesh/color input=colormap - \pgfplotscolormapdefinemappedcolor{#1}% + \if d\pgfplots@colormap@access + % colormap access=direct + % we assume that the color *is* already normalized, + % i.e. it is {<comma-separate-components>} and to be + % interpreted in the correct color space. + \edef\pgfplots@loc@TMPb{% + \noexpand\pgfutil@definecolor{mapped color} + {\pgfplotscolormapcolorspaceof{\pgfplotsplothandlermesh@colormapname}}% + {#1}% + }% + \pgfplots@loc@TMPb + \else + % colormap access=map|piecewise constant + \pgfplotscolormapdefinemappedcolor{#1}% + \fi \else % mesh/color input=explicit % @@ -2453,6 +2909,10 @@ \fi }% +\def\pgfplotsplothandlermeshusepathstroke{\pgfusepathqstroke}% +\def\pgfplotsplothandlermeshusepathfill{\pgfusepathqfill}% +\def\pgfplotsplothandlermeshusepathfillstroke{\pgfusepathqfillstroke}% + \def\pgfplotsplothandlermesh@init@flat@color@visualize@pipe@step{% \ifx\pgfplotsplothandlermesh@PIPE@REFINE\pgfplotsplothandlermesh@PIPE@REFINE@no@op \let\pgfplotsplothandlermesh@VISUALIZE@std=\pgfplotsplothandlermesh@VISUALIZE@std@fill@andor@stroke @@ -2474,13 +2934,13 @@ % OVERDRAWS edges: once with the correct stroke color; % once with the fill color. % - \ifx\pgfplotsplothandlermesh@usepath\pgfusepathqstroke + \ifx\pgfplotsplothandlermesh@usepath\pgfplotsplothandlermeshusepathstroke \let\pgfplotsplothandlermesh@usepathfill=\relax - \let\pgfplotsplothandlermesh@usepathstroke=\pgfusepathqstroke + \let\pgfplotsplothandlermesh@usepathstroke=\plotsplothandlermeshusepathstroke \else - \ifx\pgfplotsplothandlermesh@usepath\pgfusepathqfillstroke - \let\pgfplotsplothandlermesh@usepathfill=\pgfusepathqfillstroke - \let\pgfplotsplothandlermesh@usepathstroke=\pgfusepathqstroke + \ifx\pgfplotsplothandlermesh@usepath\pgfplotsplothandlermeshusepathfillstroke + \let\pgfplotsplothandlermesh@usepathfill=\pgfplotsplothandlermeshusepathfillstroke + \let\pgfplotsplothandlermesh@usepathstroke=\pgfplotsplothandlermeshusepathstroke \else \let\pgfplotsplothandlermesh@usepathfill=\relax \let\pgfplotsplothandlermesh@usepathstroke=\relax @@ -2494,13 +2954,13 @@ % 'mesh' plot: stroke only and use the 'flat' code % here just to define the color for each mesh % segment. - \let\pgfplotsplothandlermesh@usepath=\pgfusepathqstroke + \let\pgfplotsplothandlermesh@usepath=\pgfplotsplothandlermeshusepathstroke \else % 'surf' plot: - \let\pgfplotsplothandlermesh@usepath=\pgfusepathqfillstroke + \let\pgfplotsplothandlermesh@usepath=\pgfplotsplothandlermeshusepathfillstroke \if\pgfplotsplothandlermesh@shader3% faceted interp % it has an extra fill command (shading) - \let\pgfplotsplothandlermesh@usepath=\pgfusepathqstroke + \let\pgfplotsplothandlermesh@usepath=\pgfplotsplothandlermeshusepathstroke \fi % % the distinction between 'faceted' and 'flat' is @@ -2521,7 +2981,7 @@ % oh. no faceted color. Then: fill only, use % whatever color is available. \def\pgfplots@loc@TMPa{0}% - %\let\pgfplotsplothandlermesh@usepath=\pgfusepathqfill + %\let\pgfplotsplothandlermesh@usepath=\pgfplotsplothandlermeshusepathfill \fi \fi \if\pgfplotsplothandlermesh@shader3% faceted interp @@ -2550,53 +3010,88 @@ % % use colordata of ONE corner point. That's easy, not % much to do. - \def\pgfplotsplothandlermesh@get@flat@color{% - \pgfplotspatchclass{\pgfplotsplothandlermesh@patchclass@output}{first vertex}% - \let\pgfplots@current@point@meta=\pgfplotspatchvertexmeta - \pgfplotsaxisvisphasetransformpointmeta - \let\pgfplotsretval=\pgfplotspointmetatransformed% - }% + \if1\b@pgfplots@correct@shader@flat + \def\pgfplotsplothandlermesh@get@flat@color{% + \pgfplotspatchclass{\pgfplotsplothandlermesh@patchclass@output}{first vertex before z buffer}% + \let\pgfplots@current@point@meta=\pgfplotspatchvertexmeta + \pgfplotsaxisvisphasetransformpointmeta + \let\pgfplotsretval=\pgfplotspointmetatransformed% + }% + \else + \def\pgfplotsplothandlermesh@get@flat@color{% + \pgfplotspatchclass{\pgfplotsplothandlermesh@patchclass@output}{first vertex}% + \let\pgfplots@current@point@meta=\pgfplotspatchvertexmeta + \pgfplotsaxisvisphasetransformpointmeta + \let\pgfplotsretval=\pgfplotspointmetatransformed% + }% + \fi \else % 'flat mean': % % use colordata as mean of all corners for shading. \if0\pgfplotsplothandlermesh@colorinput % mesh/color input=colormap - \def\pgfplotsplothandlermesh@get@flat@color{% - \global\pgfplots@tmpa=0pt - \pgfplotspatchclass{\pgfplotsplothandlermesh@patchclass@output}{foreach cdata vertex}{% - \let\pgfplots@current@point@meta=\pgfplotspatchvertexmeta - \pgfplotsaxisvisphasetransformpointmeta - \global\advance\pgfplots@tmpa by\pgfplotspointmetatransformed pt + \if d\pgfplots@colormap@access + % colormap access=direct + % interpolate adjacent colors, not their indices: + \pgfplotsplothandlermesh@get@flat@color@explicit@prepare + \def\pgfplotsplothandlermesh@get@flat@color{% + \pgfplotsplothandlermesh@get@flat@color@explicit@accum{% + \begingroup + \let\pgfplots@current@point@meta=\pgfplotspatchvertexmeta + \pgfplotsaxisvisphasetransformpointmeta + \let\pgfplotspatchvertexmeta=\pgfplotspointmetatransformed + \pgfmath@smuggleone\pgfplotspatchvertexmeta + \endgroup + }% }% - \pgfplotspatchclass{\pgfplotsplothandlermesh@patchclass@output}{get num cdata vertices}% - \global\divide\pgfplots@tmpa by\pgfplotsretval\relax - \edef\pgfplotsretval{\pgf@sys@tonumber\pgfplots@tmpa}% - \global\pgfplots@tmpa=0pt - }% + \else + % colormap access=map|piecewise constant + \def\pgfplotsplothandlermesh@get@flat@color{% + \global\pgfplots@tmpa=0pt + \pgfplotspatchclass{\pgfplotsplothandlermesh@patchclass@output}{foreach cdata vertex}{% + \let\pgfplots@current@point@meta=\pgfplotspatchvertexmeta + \pgfplotsaxisvisphasetransformpointmeta + \global\advance\pgfplots@tmpa by\pgfplotspointmetatransformed pt + }% + \pgfplotspatchclass{\pgfplotsplothandlermesh@patchclass@output}{get num cdata vertices}% + \global\divide\pgfplots@tmpa by\pgfplotsretval\relax + \edef\pgfplotsretval{\pgf@sys@tonumber\pgfplots@tmpa}% + \global\pgfplots@tmpa=0pt + }% + \fi \else % mesh/color input=explicit - \pgfplotspatchclass{\pgfplotsplothandlermesh@patchclass@output}{get num cdata vertices}% - \pgf@xa=1pt % - \divide\pgf@xa by\pgfplotsretval\relax - \edef\pgfplotsplothandlermesh@get@flat@color@@{\pgf@sys@tonumber\pgf@xa}% + \pgfplotsplothandlermesh@get@flat@color@explicit@prepare % \def\pgfplotsplothandlermesh@get@flat@color{% - \pgfplotscolorzero{\pgfplotsplothandlermesh@explicit@color@num@comps}% - \pgfplotspatchclass{\pgfplotsplothandlermesh@patchclass@output}{foreach cdata vertex}{% - \pgfplotscoloraddweighted - {\pgfplotsplothandlermesh@explicit@color@num@comps}% - {\pgfplotsretval} - {\pgfplotsplothandlermesh@get@flat@color@@}% - {\pgfplotspatchvertexmeta}% - }% - \let\pgfplots@current@point@meta=\pgfplotspatchvertexmeta + \pgfplotsplothandlermesh@get@flat@color@explicit@accum{}% \pgfplotsaxisvisphasetransformpointmeta }% \fi \fi }% +\def\pgfplotsplothandlermesh@get@flat@color@explicit@prepare{% + \pgfplotspatchclass{\pgfplotsplothandlermesh@patchclass@output}{get num cdata vertices}% + \pgf@xa=1pt % + \divide\pgf@xa by\pgfplotsretval\relax + \edef\pgfplotsplothandlermesh@get@flat@color@@{\pgf@sys@tonumber\pgf@xa}% +}% +\def\pgfplotsplothandlermesh@get@flat@color@explicit@accum#1{% + \pgfplotscolorzero{\pgfplotsplothandlermesh@explicit@color@num@comps}% + \pgfplotspatchclass{\pgfplotsplothandlermesh@patchclass@output}{foreach cdata vertex}{% + #1% + \pgfplotscoloraddweighted + {\pgfplotsplothandlermesh@explicit@color@num@comps}% + {\pgfplotsretval} + {\pgfplotsplothandlermesh@get@flat@color@@}% + {\pgfplotspatchvertexmeta}% + }% + % FIXME : this here sounds wrong: !? what is this good for: + \let\pgfplots@current@point@meta=\pgfplotspatchvertexmeta +}% + \def\pgfplotsplothandlermesh@init@jumphandling{% % For matrix input, a "jump" should result in something % visible although it must not destroy the matrix structure. @@ -2606,8 +3101,49 @@ \pgfplotstreampoint{\global\pgf@x=-16000.0pt \global\pgf@y=-16000.0pt }% }% % + % Prepare jumps according to point meta: + \ifx\pgfplotspointmetainputhandler\pgfutil@empty% + % oh. No point meta!? + \let\pgfplotsplothandlermesh@PIPE@CHECKJUMP@meta=\pgfplotsplothandlermesh@PIPE@CHECKJUMP@meta@noop + \else + % we have point meta. This is the standard case. + % + % prepare the routine for "jump on unbounded point meta": + \ifcase\pgfplotsplothandlermesh@shader + % 0 == 'flat' + \def\pgfplots@loc@TMPa{1}% + \or + % 1 == 'faceted' + \def\pgfplots@loc@TMPa{1}% + \else + \def\pgfplots@loc@TMPa{0}% + \fi + % + \if 1\pgfplots@loc@TMPa + % ok, this uses (only) 'shader=flat' + \if c\pgfplotsplothandlermesh@flatmode + % 'flat corner': + \if1\b@pgfplots@correct@shader@flat + \let\pgfplotsplothandlermesh@PIPE@CHECKJUMP@meta=\pgfplotsplothandlermesh@PIPE@CHECKJUMP@meta@firstvertex + \else + \let\pgfplotsplothandlermesh@PIPE@CHECKJUMP@meta=\pgfplotsplothandlermesh@PIPE@CHECKJUMP@meta@firstvertex@legacy + \fi + \else + % 'flat mean': + \let\pgfplotsplothandlermesh@PIPE@CHECKJUMP@meta=\pgfplotsplothandlermesh@PIPE@CHECKJUMP@meta@everyvertex + \fi + \else + \let\pgfplotsplothandlermesh@PIPE@CHECKJUMP@meta=\pgfplotsplothandlermesh@PIPE@CHECKJUMP@meta@everyvertex + \fi + \fi + % + \if0\pgfplotsaxisplothasunboundedpointmeta + \let\pgfplotsplothandlermesh@PIPE@CHECKJUMP@meta=\pgfplotsplothandlermesh@PIPE@CHECKJUMP@meta@noop + \fi \if0\pgfplotsaxisplothasjumps - \pgfplotsplothandlermesh@PIPE@CHECKJUMP@disable + \ifx\pgfplotsplothandlermesh@PIPE@CHECKJUMP@meta\pgfplotsplothandlermesh@PIPE@CHECKJUMP@meta@noop + \pgfplotsplothandlermesh@PIPE@CHECKJUMP@disable + \fi \fi }% @@ -2694,9 +3230,16 @@ \def\pgfplotsplothandlermesh@set@shader@colormap{% \if0\pgfplotsplothandlermesh@colorinput % mesh/color input=colormap - \pgfkeysgetvalue{/pgfplots/colormap name}\pgfplots@loc@TMPa - \expandafter\pgfplotscolormaptopdffunction\expandafter{\pgfplots@loc@TMPa}% - \pgfkeyslet{/pgfplots/surf shading/colormap}\pgfplotsretval + \if d\pgfplots@colormap@access + % colormap access=direct + % tell it to expect explicit colors: + \pgfkeyslet{/pgfplots/surf shading/colormap}\pgfutil@empty + \else + % colormap access=map|piecewise constant + \pgfkeysgetvalue{/pgfplots/colormap name}\pgfplots@loc@TMPa + \expandafter\pgfplotscolormaptopdffunction\expandafter{\pgfplots@loc@TMPa}% + \pgfkeyslet{/pgfplots/surf shading/colormap}\pgfplotsretval + \fi \else % mesh/color input=explicit % @@ -2705,8 +3248,9 @@ \fi }% +\def\pgfplotsplothandlermesh@check@unbounded@value{-16000.0pt}% { -\dimen0=-16000.0pt +\dimen0=\pgfplotsplothandlermesh@check@unbounded@value \xdef\pgfplotsplothandlermesh@check@unbounded@text{\the\dimen0}% } @@ -2831,8 +3375,7 @@ \let\pgfplotsplothandlermesh@im=\pgfplotsplothandlermesh@i }% -% the pgf@plotstreampoint routine for the first scan line: -\def\pgfplotsplothandlermesh@PIPE@DECODE@matrix@fillscanline#1{% +\def\pgfplotsplothandlermesh@PIPE@DECODE@matrix@fillscanline@common#1{% \pgfplotsplothandlermesh@compute@vertex@depth% <-- this modifies \pgfplotsretval \let\pgfplots@view@depth=\pgfplotsretval \pgf@process{#1}% @@ -2840,12 +3383,18 @@ \edef\pgfplots@loc@TMPa{{\the\pgf@x}{\the\pgf@y}{\pgfplots@current@point@meta}\pgfplots@view@depth:\pgfplotsretval}% \expandafter\pgfplotsdequepushback\pgfplots@loc@TMPa\to{lastscanline}% \advance\c@pgfplots@scanlineindex by1 +}% + +% the pgf@plotstreampoint routine for the first scan line: +\def\pgfplotsplothandlermesh@PIPE@DECODE@matrix@fillscanline#1{% + \pgfplotsplothandlermesh@PIPE@DECODE@matrix@fillscanline@common{#1}% \ifnum\c@pgfplots@scanlineindex=\pgfplotsplothandlermesh@scanlinelength\relax % second line! \let\pgfplotsplothandlermesh@PIPE@DECODE=\pgfplotsplothandlermesh@PIPE@DECODE@matrix%% \c@pgfplots@scanlineindex=0 \fi }% + % This is the pgf@plotstreampoint for all scan lines starting with the % second. % @@ -2868,7 +3417,10 @@ % end % % This is a SWEEP through the data matrix. -\def\pgfplotsplothandlermesh@PIPE@DECODE@matrix#1{% +% #1: the current point of the linearized data matrix +% #2: a callback (TeX code) which will be executed for each point with j>0 +% #3: a callback (TeX code) which will be executed if the scanline is completed, i.e. j=cols +\def\pgfplotsplothandlermesh@PIPE@DECODE@matrix@collect@and@callback#1#2#3{% % NOTATION: % 'im == (i-1)' % 'jm == (j-1)' @@ -2881,19 +3433,29 @@ \pgfplotsdequepopfront{lastscanline}\to\pgfplotsplothandlermesh@im@j \expandafter\pgfplotsdequepushback\pgfplotsplothandlermesh@i@j\to{lastscanline}% \ifnum\c@pgfplots@scanlineindex>0 - \let\pgfplotsplothandlermesh@patchclass\pgfplotsplothandlermesh@patchclass@input - \expandafter\pgfplotsplothandlermesh@setnextvertex\expandafter{\pgfplotsplothandlermesh@im@jm}% - \expandafter\pgfplotsplothandlermesh@setnextvertex\expandafter{\pgfplotsplothandlermesh@im@j}% - \expandafter\pgfplotsplothandlermesh@setnextvertex\expandafter{\pgfplotsplothandlermesh@i@j}% - \expandafter\pgfplotsplothandlermesh@setnextvertex\expandafter{\pgfplotsplothandlermesh@i@jm}% + #2% \fi \let\pgfplotsplothandlermesh@im@jm=\pgfplotsplothandlermesh@im@j \let\pgfplotsplothandlermesh@i@jm=\pgfplotsplothandlermesh@i@j \advance\c@pgfplots@scanlineindex by1 \ifnum\c@pgfplots@scanlineindex=\pgfplotsplothandlermesh@scanlinelength\relax - \c@pgfplots@scanlineindex=0 + #3% \fi }% +\def\pgfplotsplothandlermesh@PIPE@DECODE@matrix#1{% + \pgfplotsplothandlermesh@PIPE@DECODE@matrix@collect@and@callback{#1}{% + \let\pgfplotsplothandlermesh@patchclass\pgfplotsplothandlermesh@patchclass@input + \expandafter\pgfplotsplothandlermesh@setnextvertex\expandafter{\pgfplotsplothandlermesh@im@jm}% + \expandafter\pgfplotsplothandlermesh@setnextvertex\expandafter{\pgfplotsplothandlermesh@im@j}% + \expandafter\pgfplotsplothandlermesh@setnextvertex\expandafter{\pgfplotsplothandlermesh@i@j}% + \expandafter\pgfplotsplothandlermesh@setnextvertex\expandafter{\pgfplotsplothandlermesh@i@jm}% + }{% + % if scan line is completed, start the next one: + \c@pgfplots@scanlineindex=0 + }% +}% + + \def\pgfplotsplothandlermesh@shader@interp@incremental@transpose#1{% \pgfplotsaxisvisphasetransformpointmeta \pgf@process{#1}% diff --git a/Master/texmf-dist/tex/generic/pgfplots/pgfplotsmeshplotimage.code.tex b/Master/texmf-dist/tex/generic/pgfplots/pgfplotsmeshplotimage.code.tex new file mode 100644 index 00000000000..b5a51cd3b2a --- /dev/null +++ b/Master/texmf-dist/tex/generic/pgfplots/pgfplotsmeshplotimage.code.tex @@ -0,0 +1,545 @@ +%-------------------------------------------- +% +% 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-2015 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 essentially belongs to the 'mesh' plot handler. +% It implements the (rather involved) feature 'mesh input=image'. +% +% 'mesh input=image' is implemented during the visualization phase +% and, partially, during the survey phase. The survey phase merely +% updates the data limits. The visualization phase has the complete +% knowledge about the input matrix size and can compute the cells. + +\def\pgfplotsplothandlersurveystart@mesh@image{% + \let\pgfplotsplothandlermesh@image@lastA=\pgfutil@empty + \let\pgfplotsplothandlermesh@image@lastlastA=\pgfutil@empty + \let\pgfplotsplothandlermesh@image@lastB=\pgfutil@empty + \def\b@pgfplotsplothandlermesh@image@updatedlimits@A@next{1}% + \def\b@pgfplotsplothandlermesh@image@updatedlimits@B@next{0}% + \def\c@pgfplotsplothandlermesh@image@numscanlines{0}% + % + \if\pgfplots@plot@mesh@ordering0% + % ordering = x varies= rowwise -> scanline is cols! + \def\pgfplotsplothandlermesh@image@A@dir{x}% + \def\pgfplotsplothandlermesh@image@B@dir{y}% + \def\pgfplotsplothandlermesh@image@updatelimits@AB##1##2##3{% + \pgfplotsaxisupdatelimitsforcoordinate{##1}{##2}{##3}% + }% + \else + % ordering = y varies = colwise: scanline is rows! + \def\pgfplotsplothandlermesh@image@A@dir{y}% + \def\pgfplotsplothandlermesh@image@B@dir{x}% + \def\pgfplotsplothandlermesh@image@updatelimits@AB##1##2##3{% + \pgfplotsaxisupdatelimitsforcoordinate{##2}{##1}{##3}% + }% + \fi +}% +\def\pgfplotsplothandlersurveyend@mesh@image{% + \if1\pgfplotsaxisplothasjumps + % the approach to interpolate cell corners using the adjacent cell midpoints becomes extremely complicated once + % we allow all kinds of holes in the input matrix. + % If you want to make invisible cells, you can add "nan" as color data + \pgfplots@error{Sorry, 'matrix plot' supports no holes (jumps) in the input data. Please implement jumps using an unbounded point meta value (i.e. inf or nan)}% + \fi + % +}% +\def\pgfplotsplothandlersurveypoint@mesh@image{% + % already called: + %\pgfplotsplothandlersurveypoint@default + % + % The 'update limits' routine for 'mesh input=image' is a + % HEURISTICS. + % + % It works well for "real" image plots, i.e. for those which are + % not skewed or changed parametrically. + % + % The main challenge is that we have to update the matrix limits + % while we pass through the scanlines. + % + % The idea is: + % - update cell midpoint limits using the standard PGFPlots + % methods. We would like to have the cell limits instead, + % though... to this end: + % - update the lower x cell limit for the first encountered X in every + % scanline + % - update the upper x cell limit for the last encountered X in every + % scanline + % - update the lower AND upper y cell limit for the first encountered Y + % in every scanline. + % + % That means: + % - we do NOT update X limits for mid points + % - we do NOT update Y limits for the second, third, ..., nth + % point on scanlines. Only for the first. + % + % For parametric image plots, these limits will be inaccurate. I + % suppose these are rather exotic anyway, so I accept that to + % simplify the implementation. + % + \expandafter\let\expandafter\pgfplotsplothandlermesh@cur\csname pgfplots@current@point@\pgfplotsplothandlermesh@image@A@dir\endcsname + \expandafter\let\expandafter\pgfplotsplothandlermesh@cur@B\csname pgfplots@current@point@\pgfplotsplothandlermesh@image@B@dir\endcsname + % + \if1\b@pgfplotsplothandlermesh@image@updatedlimits@A@next + \ifx\pgfplotsplothandlermesh@cur\pgfutil@empty + \else + \ifx\pgfplotsplothandlermesh@image@lastA\pgfutil@empty + \else + \pgfplotscoordmath{x}{parse}{\pgfplotsplothandlermesh@image@lastA - 0.5*(\pgfplotsplothandlermesh@cur - \pgfplotsplothandlermesh@image@lastA)}% + \let\pgfplots@current@point@xh=\pgfmathresult + \pgfplotsplothandlermesh@image@updatelimits@AB\pgfplots@current@point@xh\pgfplotsplothandlermesh@cur@B\pgfplots@current@point@z + % + \def\b@pgfplotsplothandlermesh@image@updatedlimits@A@next{0}% + \fi + \fi + \fi + % + \if1\b@pgfplotsplothandlermesh@image@updatedlimits@B@next + \ifx\pgfplotsplothandlermesh@cur@B\pgfutil@empty + \else + \ifx\pgfplotsplothandlermesh@image@lastB\pgfutil@empty + \else + \pgfplotscoordmath{y}{parse}{\pgfplotsplothandlermesh@image@lastB - 0.5*(\pgfplotsplothandlermesh@cur@B - \pgfplotsplothandlermesh@image@lastB)}% + \let\pgfplots@current@point@yh=\pgfmathresult + \pgfplotsplothandlermesh@image@updatelimits@AB\pgfplotsplothandlermesh@cur\pgfplots@current@point@yh\pgfplots@current@point@z + % + % + \pgfplotscoordmath{y}{parse}{\pgfplotsplothandlermesh@cur@B + 0.5*(\pgfplotsplothandlermesh@cur@B - \pgfplotsplothandlermesh@image@lastB)}% + \let\pgfplots@current@point@yh=\pgfmathresult + \pgfplotsplothandlermesh@image@updatelimits@AB\pgfplotsplothandlermesh@cur\pgfplots@current@point@yh\pgfplots@current@point@z + % + \def\b@pgfplotsplothandlermesh@image@updatedlimits@B@next{0}% + \fi + \fi + \fi + \let\pgfplotsplothandlermesh@image@lastlastA=\pgfplotsplothandlermesh@image@lastA + \let\pgfplotsplothandlermesh@image@lastA=\pgfplotsplothandlermesh@cur + % + \let\pgfplotsplothandlermesh@image@lastB=\pgfplotsplothandlermesh@cur@B +}% + +\def\pgfplotsplothandlersurveyend@mesh@image@scanlinecomplete{% + \ifx\pgfplotsplothandlermesh@image@lastlastA\pgfutil@empty + \else + \ifx\pgfplotsplothandlermesh@image@lastA\pgfutil@empty + \else + \expandafter\let\expandafter\pgfplotsplothandlermesh@cur@B\csname pgfplots@current@point@\pgfplotsplothandlermesh@image@B@dir\endcsname + \pgfplotscoordmath{x}{parse}{\pgfplotsplothandlermesh@image@lastA + 0.5*(\pgfplotsplothandlermesh@image@lastA - \pgfplotsplothandlermesh@image@lastlastA)}% + \let\pgfplots@current@point@xh=\pgfmathresult + \pgfplotsplothandlermesh@image@updatelimits@AB\pgfplots@current@point@xh\pgfplotsplothandlermesh@cur@B\pgfplots@current@point@z + \fi + \fi + % + \def\b@pgfplotsplothandlermesh@image@updatedlimits@B@next{1}% + % + \let\pgfplotsplothandlermesh@image@lastlastA=\pgfutil@empty + \let\pgfplotsplothandlermesh@image@lastA=\pgfutil@empty + \def\b@pgfplotsplothandlermesh@image@updatedlimits@A@next{1}% + % + \pgfplotsutil@advancestringcounter\c@pgfplotsplothandlermesh@image@numscanlines +}% + +% +% The 'mesh' plot handler has a "visualization pipeline" as part of +% its visualization: +% +% if it is active, the coordinate stream used for the visualization +% (\pgfplotsplothandlermesh@stream) invokes +% \pgfplotsplothandlermesh@PIPE@DECODE as first item. This, in turn, +% fires other elements of the mesh plot pipeline, but its most +% important task is to assemble patches while it goes. +% +% That's where 'mesh input=image' hooks in: it simply generates special patches. + +% this is part of the implementation of mesh input=image +% the pgf@plotstreampoint routine for the first scan line: +\def\pgfplotsplothandlermesh@PIPE@DECODE@image@fillscanline#1{% + \pgfplotsplothandlermesh@PIPE@DECODE@matrix@fillscanline@common{#1}% + \ifnum\c@pgfplots@scanlineindex=\pgfplotsplothandlermesh@scanlinelength\relax + % second line! + \let\pgfplotsplothandlermesh@PIPE@DECODE=\pgfplotsplothandlermesh@PIPE@DECODE@image@secondscanline%% + \c@pgfplots@scanlineindex=0 + \def\c@pgfplotsplothandlermesh@image@nextrownum{2}% + \fi +}% + +% IDEA: +% +% 1. The first scanline is merely buffered and collected into the deque 'lastscanline' (just as any mesh plot). +% 2. The second scanline +% - generates cells for the first scanline _and_ +% - appends the computed intermediate vertices to the deque 'lastinterpscanline'. +% - during the sweep, a single cell of the first scanline is +% generated +% - only the _last_ element of the scanline generates two cells +% 3. All scanlines after the second +% - pop the intermediate vertices from the deque +% - use them to construct cells for the previous scanline +% - append their computed intermediate vertices to the deque 'lastinterpscanline'. +% - during the sweep, a single cell of the first scanline is +% generated +% - only the _last_ element of the scanline generates two cells (just as in step 2) +% 4. the last scanline is special in that it generates cells for the +% previous scanline _and_ the last scanline. +% +% The "computed intermediate vertices" are mean values and +% extrapolation points. My idea is to make this special cell-based +% mesh more flexible than a simple imagesc, hoping that this pays off. +\def\pgfplotsplothandlermesh@PIPE@DECODE@image@secondscanline#1{% + \pgfplotsplothandlermesh@PIPE@DECODE@matrix@collect@and@callback{#1}{% + % + % create cell: + \pgfplotsplothandlermesh@PIPE@DECODE@image@sweep@create@cell{1}% + % + \advance\c@pgfplots@scanlineindex by1 + \ifnum\c@pgfplots@scanlineindex=\pgfplotsplothandlermesh@scanlinelength\relax + % ok, we have to extrapolate the last column. + \pgfplotsplothandlermesh@PIPE@DECODE@image@sweep@create@cell@lastcolumn{1}% + \fi + \advance\c@pgfplots@scanlineindex by-1 + }{% + % if scanline is completed, switch states: + \let\pgfplotsplothandlermesh@PIPE@DECODE=\pgfplotsplothandlermesh@PIPE@DECODE@image@after@second%% + \c@pgfplots@scanlineindex=0 + \pgfplotsutil@advancestringcounter\c@pgfplotsplothandlermesh@image@nextrownum + }% +}% +\def\pgfplotsplothandlermesh@PIPE@DECODE@image@after@second#1{% + \pgfplotsplothandlermesh@PIPE@DECODE@matrix@collect@and@callback{#1}{% + \pgfplotsplothandlermesh@PIPE@DECODE@image@sweep@create@cell{0}% + % + \advance\c@pgfplots@scanlineindex by1 + \ifnum\c@pgfplots@scanlineindex=\pgfplotsplothandlermesh@scanlinelength\relax + % ok, we have to extrapolate the last column. + \pgfplotsplothandlermesh@PIPE@DECODE@image@sweep@create@cell@lastcolumn{0}% + \fi + \advance\c@pgfplots@scanlineindex by-1 + }{% + % if scanline is completed: advance to next + \c@pgfplots@scanlineindex=0 + \pgfplotsutil@advancestringcounter\c@pgfplotsplothandlermesh@image@nextrownum + }% +}% + +% To be used within the DECODE "loop" only! It assembles temporary +% variables for the next iteration (and consumes it). +% +% #1: '1' if topmost row is to be extrapolated, '0' if it should be +% acquired from the datastructure 'lastinterpscanline' +\def\pgfplotsplothandlermesh@PIPE@DECODE@image@sweep@create@cell#1{% + \let\pgfplotsplothandlermesh@patchclass\pgfplotsplothandlermesh@patchclass@input + % + % we have to compute the four corners by means of + % averaging/extrapolation. + % + % We place the rectangle around (i-1,j-1), i.e. imjm + % Notation: the four corners are aa, ab, ba, and bb. + % aa ----- ab + % | | + % | | + % | imjm | + % | | + % | | + % ba ------ bb + % + % bb is the average of the four cell mid points of our + % scanline, the others are acquired from previous iterations + % or from extrapolation schemes. + % + % compute bb: + \pgfplotspatchvertexaccumstart + \pgfplotspatchvertexaccum@configure@ignore@unboundedmetadata + \expandafter\pgfplotspatchvertexadd\pgfplotsplothandlermesh@im@jm\times{0.25}% + \expandafter\pgfplotspatchvertexadd\pgfplotsplothandlermesh@im@j\times{0.25}% + \expandafter\pgfplotspatchvertexadd\pgfplotsplothandlermesh@i@j\times{0.25}% + \expandafter\pgfplotspatchvertexadd\pgfplotsplothandlermesh@i@jm\times{0.25}% + \pgfplotspatchvertexfinish\pgfplotsplothandlermesh@bb + \pgfplotspatchvertexcopymetaifbounded\pgfplotsplothandlermesh@i@j\to\pgfplotsplothandlermesh@bb + % + % + \if1#1% + % Ah -- this here is the very first row! That means we + % have to extrapolate the topmost coordinates. + % + % Apply extrapolation for ab: + % + % compute ab = bb + 2* ( 1/2 (imj + imjm) - bb) + % which resolves to the following: + \pgfplotspatchvertexaccumstart + \pgfplotspatchvertexaccum@configure@ignore@unboundedmetadata + \expandafter\pgfplotspatchvertexadd\pgfplotsplothandlermesh@bb\times{-1.0}% + \expandafter\pgfplotspatchvertexadd\pgfplotsplothandlermesh@im@j\times{1.0}% + \expandafter\pgfplotspatchvertexadd\pgfplotsplothandlermesh@im@jm\times{1.0}% + \pgfplotspatchvertexfinish\pgfplotsplothandlermesh@ab + \pgfplotspatchvertexcopymetaifbounded\pgfplotsplothandlermesh@im@j\to\pgfplotsplothandlermesh@ab + \else + \ifnum\c@pgfplots@scanlineindex=1 + \pgfplotsdequepopfront{lastinterpscanline}\to\pgfplotsplothandlermesh@aa + \fi + \pgfplotsdequepopfront{lastinterpscanline}\to\pgfplotsplothandlermesh@ab + \fi + % + \ifnum\c@pgfplots@scanlineindex=1 + % ah, we have to apply special treatment for the leftmost + % cell. + % + % + % compute ba = bb + 2* ( 1/2 (imjm + ijm) - bb) + % which resolves to the following: + \pgfplotspatchvertexaccumstart + \pgfplotspatchvertexaccum@configure@ignore@unboundedmetadata + \expandafter\pgfplotspatchvertexadd\pgfplotsplothandlermesh@bb\times{-1.0}% + \expandafter\pgfplotspatchvertexadd\pgfplotsplothandlermesh@i@jm\times{1.0}% + \expandafter\pgfplotspatchvertexadd\pgfplotsplothandlermesh@im@jm\times{1.0}% + \pgfplotspatchvertexfinish\pgfplotsplothandlermesh@ba + \pgfplotspatchvertexcopymetaifbounded\pgfplotsplothandlermesh@i@jm\to\pgfplotsplothandlermesh@ba + % + \if1#1% + % ok, extrapolate 'aa' as well: + % + % compute aa = ba + (ab - bb) + % which resolves to the following: + \pgfplotspatchvertexaccumstart + \pgfplotspatchvertexaccum@configure@ignore@unboundedmetadata + \expandafter\pgfplotspatchvertexadd\pgfplotsplothandlermesh@bb\times{-1.0}% + \expandafter\pgfplotspatchvertexadd\pgfplotsplothandlermesh@ba\times{1.0}% + \expandafter\pgfplotspatchvertexadd\pgfplotsplothandlermesh@ab\times{1.0}% + \pgfplotspatchvertexfinish\pgfplotsplothandlermesh@aa + \pgfplotspatchvertexcopymetaifbounded\pgfplotsplothandlermesh@im@jm\to\pgfplotsplothandlermesh@aa + \else + % in this case, 'aa' has been fetched from the deque + % (from the previous scanline) + \fi + % + % as soon as we process the next scanline, we need to know the + % interpolated values -- they will become the top row of the + % next scanline's cells. + \expandafter\pgfplotsdequepushback\pgfplotsplothandlermesh@ba\to{lastinterpscanline}% + \else + % ok, we take the left edge (ba and aa) from the previous + % iteration (see the end of this code where the previous + % loop iteration prepared them). + \fi + % + \pgfplotsplothandlermesh@image@set@first@color@to\pgfplotsplothandlermesh@im@jm\to\pgfplotsplothandlermesh@aa + \expandafter\pgfplotsplothandlermesh@setnextvertex\expandafter{\pgfplotsretval}% + \expandafter\pgfplotsplothandlermesh@setnextvertex\expandafter{\pgfplotsplothandlermesh@ab}% + \expandafter\pgfplotsplothandlermesh@setnextvertex\expandafter{\pgfplotsplothandlermesh@bb}% + \expandafter\pgfplotsplothandlermesh@setnextvertex\expandafter{\pgfplotsplothandlermesh@ba}% + % + % ... and communicate this as well to the next scanline (see + % \pgfplotsplothandlermesh@PIPE@DECODE@image@after@second) + \expandafter\pgfplotsdequepushback\pgfplotsplothandlermesh@bb\to{lastinterpscanline}% + % + \ifnum\c@pgfplotsplothandlermesh@image@nextrownum=\pgfplotsplothandlermesh@numscanlines\relax + \pgfplotsplothandlermesh@PIPE@DECODE@image@sweep@create@cell@lastrow + \fi + % + % merely shift the current points such that the next loop + % iteration can use them without modifications: + \let\pgfplotsplothandlermesh@ba=\pgfplotsplothandlermesh@bb + \let\pgfplotsplothandlermesh@aa=\pgfplotsplothandlermesh@ab + % +}% + +% The color handling of 'matrix input=image' is quite involved. +% There are the following requirements: +% 1. the point meta of the cell's first vertex _must_ be equal to the point meta of the cell mid point, i.e. equal to the user input. +% 2. All other vertices should be interpolated "as smart as possible". This interpolation scheme should work even if adjacent cell midpoints have _no_ bounded meta data! +% 3. The routines which glue adjacent cells together have to ensure that they do not accidentally intermix (1) and (2). This is complicated since the sweep loop intermingles both responsibilities (sigh). +% +% This helper function ensures (1): it copies the point meta of the \pgfplotspatchvertex #1 to the values of of #2 and assigns the result to \pgfplotsretval. +% #1 a valid \pgfplotspatchvertex +% #2 a valid \pgfplotspatchvertex +% +% POSTCONDITION: \pgfplotsretval contains the result, i.e. a copy of '#2' which contains the point meta of '#1'. +\def\pgfplotsplothandlermesh@image@set@first@color@to#1\to#2{% + \let\pgfplotsretval=#2% + \pgfplotspatchvertexcopymeta#1\to\pgfplotsretval +}% + +\def\pgfplotsplothandlermesh@PIPE@DECODE@image@sweep@create@cell@lastrow{% + % + \let\pgfplotsplothandlermesh@last@aa=\pgfplotsplothandlermesh@ba + \let\pgfplotsplothandlermesh@last@ab=\pgfplotsplothandlermesh@bb + % + % ASSUMPTION: we want to compute Laa, Lab, Lba and Lbb in the following setup: + % + % aa ----- ab + % | | + % | | + % | imjm | + % | | + % | | + % ba ------ bb + % =Laa =Lab + % | | + % | | + % | ijm | + % | | + % | | + % Lba------ Lbb + % + % compute Lbb = bb + 2 * (1/2 ( ijm + ij) - bb ). We assume that + % we can still access 'bb', the coordinate of the current point. + % This resolves to the following: + \pgfplotspatchvertexaccumstart + \pgfplotspatchvertexaccum@configure@ignore@unboundedmetadata + \expandafter\pgfplotspatchvertexadd\pgfplotsplothandlermesh@bb\times{-1.0}% + \expandafter\pgfplotspatchvertexadd\pgfplotsplothandlermesh@i@jm\times{1.0}% + \expandafter\pgfplotspatchvertexadd\pgfplotsplothandlermesh@i@j\times{1.0}% + \pgfplotspatchvertexfinish\pgfplotsplothandlermesh@last@bb + % FIXME : which is the correctly extrapolated cdata!? + %\pgfplotspatchvertexcopymetaifbounded\pgfplotsplothandlermesh@i@j\to\pgfplotsplothandlermesh@last@bb + % + \ifnum\c@pgfplots@scanlineindex=1 + % compute Lba = Lbb + Laa - Lab + \pgfplotspatchvertexaccumstart + \pgfplotspatchvertexaccum@configure@ignore@unboundedmetadata + \expandafter\pgfplotspatchvertexadd\pgfplotsplothandlermesh@last@bb\times{1.0}% + \expandafter\pgfplotspatchvertexadd\pgfplotsplothandlermesh@last@aa\times{1.0}% + \expandafter\pgfplotspatchvertexadd\pgfplotsplothandlermesh@last@ab\times{-1.0}% + \pgfplotspatchvertexfinish\pgfplotsplothandlermesh@last@ba + % FIXME : which is the correctly extrapolated cdata!? + %\pgfplotspatchvertexcopymetaifbounded\pgfplotsplothandlermesh@i@jm\to\pgfplotsplothandlermesh@last@ba + \else + % transported from previous iteration. + \fi + % + \pgfplotsplothandlermesh@image@set@first@color@to\pgfplotsplothandlermesh@i@jm\to\pgfplotsplothandlermesh@last@aa + \expandafter\pgfplotsplothandlermesh@setnextvertex\expandafter{\pgfplotsretval}% + \expandafter\pgfplotsplothandlermesh@setnextvertex\expandafter{\pgfplotsplothandlermesh@last@ab}% + \expandafter\pgfplotsplothandlermesh@setnextvertex\expandafter{\pgfplotsplothandlermesh@last@bb}% + \expandafter\pgfplotsplothandlermesh@setnextvertex\expandafter{\pgfplotsplothandlermesh@last@ba}% + % + \let\pgfplotsplothandlermesh@last@ba=\pgfplotsplothandlermesh@last@bb +}% + +\def\pgfplotsplothandlermesh@PIPE@DECODE@image@sweep@create@cell@lastrow@lastcol{% + % + % ASSUMPTION: we want to compute Laa, Lab, Lba and Lbb in the following setup: + % + % aa ----- ab + % | | + % | | + % | imj | + % | | + % | | + % ba ------ bb + % =Laa =Lab + % | | + % | | + % | ij | + % | | + % | | + % Lba------ Lbb + \let\pgfplotsplothandlermesh@last@aa=\pgfplotsplothandlermesh@ba + \let\pgfplotsplothandlermesh@last@ab=\pgfplotsplothandlermesh@bb + % + % I mirrored the formula for lastrow. + \pgfplotspatchvertexaccumstart + \pgfplotspatchvertexaccum@configure@ignore@unboundedmetadata + \expandafter\pgfplotspatchvertexadd\pgfplotsplothandlermesh@last@bb\times{1.0}% + \expandafter\pgfplotspatchvertexadd\pgfplotsplothandlermesh@last@aa\times{-1.0}% + \expandafter\pgfplotspatchvertexadd\pgfplotsplothandlermesh@last@ab\times{1.0}% + \pgfplotspatchvertexfinish\pgfplotsplothandlermesh@last@bb + \pgfplotspatchvertexcopymetaifbounded\pgfplotsplothandlermesh@i@j\to\pgfplotsplothandlermesh@last@bb + % + \pgfplotsplothandlermesh@image@set@first@color@to\pgfplotsplothandlermesh@i@j\to\pgfplotsplothandlermesh@last@aa + \expandafter\pgfplotsplothandlermesh@setnextvertex\expandafter{\pgfplotsretval}% + \expandafter\pgfplotsplothandlermesh@setnextvertex\expandafter{\pgfplotsplothandlermesh@last@ab}% + \expandafter\pgfplotsplothandlermesh@setnextvertex\expandafter{\pgfplotsplothandlermesh@last@bb}% + % this value is transported from previous iteration: + \expandafter\pgfplotsplothandlermesh@setnextvertex\expandafter{\pgfplotsplothandlermesh@last@ba}% +}% + +\def\pgfplotsplothandlermesh@PIPE@DECODE@image@sweep@create@cell@lastcolumn#1{% + \let\pgfplotsplothandlermesh@patchclass\pgfplotsplothandlermesh@patchclass@input + % + % we have to compute the four corners by means of + % averaging/extrapolation. + % + % We place the rectangle around (i-1,j), i.e. imj. + % This is in contrast to + % \pgfplotsplothandlermesh@PIPE@DECODE@image@sweep@create@cell + % where we placed the rectange around (i-1,j-1). + % + % Notation: the four corners are aa, ab, ba, and bb. + % aa ----- ab + % | | + % | | + % | imj | + % | | + % | | + % ba ------ bb + % + % We can simply copy aa and ba from the previous cell (as in + % the standard case). Note that this has already been prepared + % for us, i.e. the variables have already been set by the + % previous iteration. + % + % compute ab and bb by means of extrapolation: + % + % compute bb: + \pgfplotspatchvertexaccumstart + \pgfplotspatchvertexaccum@configure@ignore@unboundedmetadata + \expandafter\pgfplotspatchvertexadd\pgfplotsplothandlermesh@ba\times{-1.0}% + \expandafter\pgfplotspatchvertexadd\pgfplotsplothandlermesh@im@j\times{1.0}% + \expandafter\pgfplotspatchvertexadd\pgfplotsplothandlermesh@i@j\times{1.0}% + \pgfplotspatchvertexfinish\pgfplotsplothandlermesh@bb + % FIXME : which is the correctly extrapolated cdata!? + % + % + \if1#1% + % Ah -- this here is the very first row! That means we + % have to extrapolate the topmost coordinates. + % + % Apply extrapolation for ab: + % + % compute ab = bb + (aa - ba) + \pgfplotspatchvertexaccumstart + \pgfplotspatchvertexaccum@configure@ignore@unboundedmetadata + \expandafter\pgfplotspatchvertexadd\pgfplotsplothandlermesh@bb\times{1.0}% + \expandafter\pgfplotspatchvertexadd\pgfplotsplothandlermesh@aa\times{1.0}% + \expandafter\pgfplotspatchvertexadd\pgfplotsplothandlermesh@ba\times{-1.0}% + \pgfplotspatchvertexfinish\pgfplotsplothandlermesh@ab + % FIXME : which is the correctly extrapolated cdata!? + \else + \pgfplotsdequepopfront{lastinterpscanline}\to\pgfplotsplothandlermesh@ab + \fi + % + \pgfplotsplothandlermesh@image@set@first@color@to\pgfplotsplothandlermesh@im@j\to\pgfplotsplothandlermesh@aa + \expandafter\pgfplotsplothandlermesh@setnextvertex\expandafter{\pgfplotsretval}% + \expandafter\pgfplotsplothandlermesh@setnextvertex\expandafter{\pgfplotsplothandlermesh@ab}% + \expandafter\pgfplotsplothandlermesh@setnextvertex\expandafter{\pgfplotsplothandlermesh@bb}% + \expandafter\pgfplotsplothandlermesh@setnextvertex\expandafter{\pgfplotsplothandlermesh@ba}% + % + % ... and communicate this as well to the next scanline (see + % \pgfplotsplothandlermesh@PIPE@DECODE@image@after@second) + \expandafter\pgfplotsdequepushback\pgfplotsplothandlermesh@bb\to{lastinterpscanline}% + % + \ifnum\c@pgfplotsplothandlermesh@image@nextrownum=\pgfplotsplothandlermesh@numscanlines\relax + \pgfplotsplothandlermesh@PIPE@DECODE@image@sweep@create@cell@lastrow@lastcol + \fi +}% diff --git a/Master/texmf-dist/tex/generic/pgfplots/pgfplotsplothandlers.code.tex b/Master/texmf-dist/tex/generic/pgfplots/pgfplotsplothandlers.code.tex index 192d6a8abc0..46fddb9dd11 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/pgfplotsplothandlers.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/pgfplotsplothandlers.code.tex @@ -298,7 +298,11 @@ % This macro expands to '1' if the current plot has jumps and '0' % if not.During the visualization phase, a jump is usually indicated % by an empty coordinate. -% +% \pgfplotsaxisplothasunboundedpointmeta +% This macro expands to '1' if the current plot has a point with +% unbounded point meta and '0' +% if not. Currently used by some plot handlers as synomym for +% "visualize a jump" \def\pgfplotssurveyphaseinputclass{direct} @@ -540,6 +544,19 @@ % \pgfplotsplothandlersurveyend % Called at the end of each survey phase. \def\pgfplotsplothandlersurveyend@default{} + +% A callback which will be called as soon as a scanline is complete. +% +% The callback can differ from plot handler to plot handler; its +% purpose is to update data structures. +% +% Implementational note for those who _call_ the callback: the +% The callback will be triggered by the 'empty line' handling, see +% \pgfplotsscanlinelengthinitzero. However, a coordinate generator can +% safely invoke it directly. It must not be invoked twice for the same +% scanline. +% +% FIXME: only 'empty line=scanline' currently calls this callback! \let\pgfplotsplothandlernotifyscanlinecomplete=\relax% % \pgfplotsplothandlersurveypoint is called for each encountered data diff --git a/Master/texmf-dist/tex/generic/pgfplots/pgfplotsstackedplots.code.tex b/Master/texmf-dist/tex/generic/pgfplots/pgfplotsstackedplots.code.tex index 7f6cda54930..b063bf72a55 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/pgfplotsstackedplots.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/pgfplotsstackedplots.code.tex @@ -92,7 +92,9 @@ % space. \def\pgfplots@stacked@finalize{% \global\pgfplotslistnewempty\pgfplots@stacked@zerolevellist - \global\pgfplotslistnewempty\pgfplots@stacked@nextzerolevellist + \global\pgfplotslistnewempty\pgfplots@stacked@zerolevellist@neg + \global\pgfplotslistnewempty\pgfplots@stacked@nextzerolevellist@pos + \global\pgfplotslistnewempty\pgfplots@stacked@nextzerolevellist@neg \pgfplots@stacked@isinitialisedfalse }% @@ -114,49 +116,94 @@ \pgfplots@error{LOGIC ERROR: please call \string\pgfplots@stacked@initialise.}% \fi \def\pgfplots@stacked@zerolevel@current{}% + \def\pgfplots@stacked@zerolevel@current@pos{}% + \def\pgfplots@stacked@zerolevel@current@neg{}% \pgfplots@stacked@prepare@value@serialization % accumulate this command here for \closedcycle: \ifpgfplots@stacked@isfirstplot \global\pgfplotslistnewempty\pgfplots@stacked@zerolevellist + \global\pgfplotslistnewempty\pgfplots@stacked@zerolevellist@neg % only work with float if its really necessary - for % example if the scaling trafo which maps to pgfmath is % not yet initialised. - \ifpgfplots@datascaletrafo@initialised % FIXME : should be '!ifsurvey' - \def\pgfplots@stacked@zerolevelpoint@x{0}% - \def\pgfplots@stacked@zerolevelpoint@y{0}% - \def\pgfplots@stacked@zerolevelpoint@z{0}% - \else - % note that log plots are special: their "stacked zero" is - % computed with \pgfplotscoordmath{default} - % - \pgfplots@if{pgfplots@xislinear}{\pgfplotscoordmath{x}{zero}}{\pgfplotscoordmath{default}{zero}}% - \let\pgfplots@stacked@zerolevelpoint@x=\pgfmathresult - % - \pgfplots@if{pgfplots@yislinear}{\pgfplotscoordmath{y}{zero}}{\pgfplotscoordmath{default}{zero}}% - \let\pgfplots@stacked@zerolevelpoint@y=\pgfmathresult - % - \pgfplots@if{pgfplots@xislinear}{\pgfplotscoordmath{z}{zero}}{\pgfplotscoordmath{default}{zero}}% - \let\pgfplots@stacked@zerolevelpoint@z=\pgfmathresult - \fi + \pgfplots@stacked@zerolevel@fallback x% + \pgfplots@stacked@zerolevel@fallback y% + \pgfplots@stacked@zerolevel@fallback z% % - \def\pgfplots@stacked@getnextzerolevelpoint{}% will remain constant anyway. + \def\pgfplots@stacked@getnextzerolevelpoint{% + % keep \pgfplots@stacked@zerolevel@current = {} + % there is special handling in place which will use the + % '0' level in this case + % + % omit this: + %\pgfplots@stacked@ensure{}% + %\let\pgfplots@stacked@zerolevel@current=\pgfplotsretval + }% \else {\globaldefs=1 - \pgfplotslistcopy\pgfplots@stacked@nextzerolevellist\to\pgfplots@stacked@zerolevellist + \pgfplotslistcopy\pgfplots@stacked@nextzerolevellist@pos\to\pgfplots@stacked@zerolevellist + \pgfplotslistcopy\pgfplots@stacked@nextzerolevellist@neg\to\pgfplots@stacked@zerolevellist@neg }% \def\pgfplots@stacked@getnextzerolevelpoint{% - \pgfplotslistcheckempty\pgfplots@stacked@zerolevellist - \ifpgfplotslistempty - \pgfplots@stacked@wrong@count@error + % + \pgfplots@stacked@getnextzerolevelpoint@pos + % + \if P\pgfplots@stacked@negative@mode + % stack negative=on previous: + % just use one list in order to remember the + % zerolevel: + \expandafter\pgfplots@stacked@parsezerolevelpoint\expandafter{\pgfplots@stacked@zerolevel@current@pos}% \else - {\globaldefs=1 - \pgfplotslistpopfront\pgfplots@stacked@zerolevellist\to\pgfmathresult - }% - \expandafter\pgfplots@stacked@parsezerolevelpoint\expandafter{\pgfmathresult}% + % stack negative=separate: + % use two levels, one for '+' and one for '-': + \pgfplots@stacked@getnextzerolevelpoint@neg + % + \if+\pgfplots@stacked@sign + \expandafter\pgfplots@stacked@parsezerolevelpoint\expandafter{\pgfplots@stacked@zerolevel@current@pos}% + \else + \expandafter\pgfplots@stacked@parsezerolevelpoint\expandafter{\pgfplots@stacked@zerolevel@current@neg}% + \fi \fi }% \fi - \global\pgfplotslistnewempty\pgfplots@stacked@nextzerolevellist + \global\pgfplotslistnewempty\pgfplots@stacked@nextzerolevellist@pos + \global\pgfplotslistnewempty\pgfplots@stacked@nextzerolevellist@neg +}% + +\def\pgfplots@stacked@getnextzerolevelpoint@pos{% + \pgfplotslistcheckempty\pgfplots@stacked@zerolevellist + \ifpgfplotslistempty + \pgfplots@stacked@wrong@count@error + \else + {\globaldefs=1 + \pgfplotslistpopfront\pgfplots@stacked@zerolevellist\to\pgfplots@stacked@zerolevel@current@pos + }% + \fi +}% +\def\pgfplots@stacked@getnextzerolevelpoint@neg{% + \pgfplotslistcheckempty\pgfplots@stacked@zerolevellist@neg + \ifpgfplotslistempty + \pgfplots@stacked@wrong@count@error + \else + {\globaldefs=1 + \pgfplotslistpopfront\pgfplots@stacked@zerolevellist@neg\to\pgfplots@stacked@zerolevel@current@neg + }% + \fi +} + +\def\pgfplots@stacked@zerolevel@fallback#1{% + \pgfplots@stacked@zerolevel@fallback@{#1}% + \expandafter\let\csname pgfplots@stacked@zerolevelpoint@#1\endcsname=\pgfmathresult% +}% +\def\pgfplots@stacked@zerolevel@fallback@#1{% + \ifpgfplots@datascaletrafo@initialised % FIXME : should be '!ifsurvey' + \def\pgfmathresult{0}% + \else + % note that log plots are special: their "stacked zero" is + % computed with \pgfplotscoordmath{default} + % + \pgfplots@if{pgfplots@#1islinear}{\pgfplotscoordmath{#1}{zero}}{\pgfplotscoordmath{default}{zero}}% + \fi }% % ATTENTION: install this before 'visualization depends on' - it @@ -198,6 +245,7 @@ % The zero'th level has an empty zero level point. \expandafter\def\expandafter\pgfplotsaxisserializedatapoint@private\expandafter{% \pgfplotsaxisserializedatapoint@private + % at deserialization time, this will become \pgfplots@stacked@zerolevel : \t@pgfplots@toka=\expandafter{\pgfplots@stacked@zerolevel@current}% \t@pgfplots@tokb=\expandafter{\pgfplotsretval}% \edef\pgfplotsretval{% @@ -254,6 +302,16 @@ \else \pgfplots@stacked@wrong@count@error \fi + \if P\pgfplots@stacked@negative@mode + % stack negative=on previous: + \else + % stack negative=separate: + \pgfplotslistcheckempty\pgfplots@stacked@zerolevellist@neg + \ifpgfplotslistempty + \else + \pgfplots@stacked@wrong@count@error + \fi + \fi \fi \ifpgfplots@stacked@isfirstplot \def\pgfplots@stacked@serialized@commands{\noexpand\pgfplots@stacked@isfirstplottrue}% @@ -291,11 +349,6 @@ \fi }% -% #1: a point as (x,y) (or (x,y,z) ) -\def\pgfplots@stacked@rememberzerolevelpoint@for@next@plot#1{% - \expandafter\pgfplotslistpushbackglobal\expandafter{#1}\to\pgfplots@stacked@nextzerolevellist -} - % Provides public access to zero levels into some key-value pairs. % Returns the values into a set of keys in the /data point/ prefix. % @@ -383,12 +436,18 @@ % % Note that it is not necessarily the first one which is % processed (compare reverse stacked plots). + \begingroup + % FIXME : eliminate this special handling by recording the + % correct '0' values during the survey phase! + \pgfutil@namelet{pgfplots@current@point@\pgfplots@stacked@dir}{pgfplots@logical@ZERO@\pgfplots@stacked@dir}% + \pgfplotsaxis@toPGF@coords \if\pgfplots@stacked@dir x - \edef\pgfplots@loc@TMPa{\pgfplots@logical@ZERO@x pt}% + \edef\pgfplots@stacked@PGF@zerolevel{\the\pgf@x}% \else - \edef\pgfplots@loc@TMPa{\pgfplots@logical@ZERO@y pt}% + \edef\pgfplots@stacked@PGF@zerolevel{\the\pgf@y}% \fi - \let\pgfplots@stacked@PGF@zerolevel\pgfplots@loc@TMPa + \pgfmath@smuggleone\pgfplots@stacked@PGF@zerolevel + \endgroup % \else \begingroup @@ -455,8 +514,6 @@ % POSTCONDITION: % - \pgfplots@current@point@[xyz] are adjusted. \def\pgfplots@stacked@preparepoint@inmacro{% - \pgfplots@stacked@getnextzerolevelpoint - % \ifpgfplots@stacked@plus \def\pgfplots@stacked@op{add}% \else @@ -465,6 +522,15 @@ % \pgfutil@namelet{pgfplots@stacked@diff}{pgfplots@current@point@\pgfplots@stacked@dir}% % + \pgfmathfloatparsenumber{\pgfplots@stacked@diff}% + \expandafter\pgfmathfloatifflags\expandafter{\pgfmathresult}{2}{% + \def\pgfplots@stacked@sign{-}% + }{% + \def\pgfplots@stacked@sign{+}% + }% + \pgfplots@stacked@getnextzerolevelpoint + % + % \pgfplots@if{pgfplots@\pgfplots@stacked@dir islinear}{% \pgfplotscoordmath{\pgfplots@stacked@dir}{op}{\pgfplots@stacked@op}{% {\csname pgfplots@stacked@zerolevelpoint@\pgfplots@stacked@dir\endcsname}% @@ -490,7 +556,6 @@ % this here would also be ok, but it would only store the coords % of the zero level... %\pgfplotsplothandlerserializepointto\pgfplotsretval -%\message{serializing current value current value to \meaning\pgfplotsretval^^J}% % \begingroup % @@ -499,7 +564,28 @@ \pgfplots@stacked@strip@parents@zerolevel % \pgfplotsaxisserializedatapointtostring - \pgfplots@stacked@rememberzerolevelpoint@for@next@plot{\pgfplotsretval}% + % +%\message{Current value is '\pgfplots@stacked@sign'. Serializing: \meaning\pgfplotsretval^^J}% + \if P\pgfplots@stacked@negative@mode + % stack negative=on previous: + % just track one list + \expandafter\pgfplotslistpushbackglobal\expandafter{\pgfplotsretval}\to\pgfplots@stacked@nextzerolevellist@pos + \else + % stack negative=separate: + % keep track of both separate zerolevel lists: + \if+\pgfplots@stacked@sign + \expandafter\pgfplotslistpushbackglobal\expandafter{\pgfplotsretval}\to\pgfplots@stacked@nextzerolevellist@pos + % + \pgfplots@stacked@ensure\pgfplots@stacked@zerolevel@current@neg + \expandafter\pgfplotslistpushbackglobal\expandafter{\pgfplotsretval}\to\pgfplots@stacked@nextzerolevellist@neg + \else + \expandafter\pgfplotslistpushbackglobal\expandafter{\pgfplotsretval}\to\pgfplots@stacked@nextzerolevellist@neg + % + \pgfplots@stacked@ensure\pgfplots@stacked@zerolevel@current@pos + \expandafter\pgfplotslistpushbackglobal\expandafter{\pgfplotsretval}\to\pgfplots@stacked@nextzerolevellist@pos + \fi + \fi + % \endgroup % % @@ -507,6 +593,17 @@ \pgfplots@stacked@logarithm@if@needed } +\def\pgfplots@stacked@ensure#1{% + \ifx#1\pgfutil@empty + \pgfplots@stacked@zerolevel@fallback@{\pgfplots@stacked@dir}% + \expandafter\let\csname pgfplots@current@point@\pgfplots@stacked@dir\endcsname=\pgfmathresult + \else + \expandafter\pgfplotsaxisdeserializedatapointfrom#1% no braces + \fi + \pgfplotsaxisserializedatapointtostring +%\message{UNUSED value serialized as \meaning\pgfplotsretval^^J}% +}% + % % We store the normal values for zero levels. Consequently, we may % need to (re)apply the log if we have a log axis. diff --git a/Master/texmf-dist/tex/generic/pgfplots/pgfplotsticks.code.tex b/Master/texmf-dist/tex/generic/pgfplots/pgfplotsticks.code.tex index facc28cbe67..76abf78a92d 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/pgfplotsticks.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/pgfplotsticks.code.tex @@ -301,6 +301,8 @@ % #5: ticknumber \def\pgfplots@show@ticklabel#1#2(#3,#4+#5)#6{% \begingroup% + \edef\pgfmathresult{#2}% + \pgfkeyslet{/pgfplots/sloped/at position}\pgfmathresult% \csname ifpgfplots@#1ticklabel@interval\endcsname % Special case for the INTERVAL feature: % we have to do additional work here. @@ -639,6 +641,11 @@ % Check if a label does not cross the x-axis \def\pgfplots@ytick@check@tickshow{% \pgfplots@tickshowtrue + % + \pgfplots@if@has@axis@shift x{% + \pgfplots@hide@obscured@ytickfalse + }{}% + % \ifpgfplots@hide@obscured@ytick \if\pgfplots@yaxislinesnum2% center \ifcase\pgfplots@xaxislinesnum\relax @@ -682,6 +689,13 @@ } \def\pgfplots@ztick@check@tickshow{% \pgfplots@tickshowtrue + % + \pgfplots@if@has@axis@shift x{% + \pgfplots@if@has@axis@shift y{% + \pgfplots@hide@obscured@ztickfalse + }{}% + }{}% + % \ifpgfplots@hide@obscured@ztick \if\pgfplots@zaxislinesnum2% center \pgfplotsmath@ifapproxequal@dim @@ -755,15 +769,13 @@ % % Assemble the \pgfplots@drawticklines@for@placecomputedtick % command. - \def\pgfplots@drawticklines@for@placecomputedtick{% - \if\pgfplots@drawticklines@for@placecomputedtick@LOWEROK1% - \pgfpathmoveto{\pgfplotspointonorientedsurfaceabwithbshift{\pgfplots@curtickpos}{\pgfplots@tick@LOWER@b}{\pgfplots@tick@LOWER@shiftbeg pt}}% - \pgfpathlineto{\pgfplotspointonorientedsurfaceabwithbshift{\pgfplots@curtickpos}{\pgfplots@tick@LOWER@b}{\pgfplots@tick@LOWER@shiftend pt}}% - \fi - \if\pgfplots@drawticklines@for@placecomputedtick@UPPEROK1% - \pgfpathmoveto{\pgfplotspointonorientedsurfaceabwithbshift{\pgfplots@curtickpos}{\pgfplots@tick@UPPER@b}{\pgfplots@tick@UPPER@shiftbeg pt}}% - \pgfpathlineto{\pgfplotspointonorientedsurfaceabwithbshift{\pgfplots@curtickpos}{\pgfplots@tick@UPPER@b}{\pgfplots@tick@UPPER@shiftend pt}}% - \fi + \def\pgfplots@drawticklines@for@placecomputedtick@LOWER{% + \pgfpathmoveto{\pgfplotspointonorientedsurfaceabwithbshift{\pgfplots@curtickpos}{\pgfplots@tick@LOWER@b}{\pgfplots@tick@LOWER@shiftbeg pt}}% + \pgfpathlineto{\pgfplotspointonorientedsurfaceabwithbshift{\pgfplots@curtickpos}{\pgfplots@tick@LOWER@b}{\pgfplots@tick@LOWER@shiftend pt}}% + }% + \def\pgfplots@drawticklines@for@placecomputedtick@UPPER{% + \pgfpathmoveto{\pgfplotspointonorientedsurfaceabwithbshift{\pgfplots@curtickpos}{\pgfplots@tick@UPPER@b}{\pgfplots@tick@UPPER@shiftbeg pt}}% + \pgfpathlineto{\pgfplotspointonorientedsurfaceabwithbshift{\pgfplots@curtickpos}{\pgfplots@tick@UPPER@b}{\pgfplots@tick@UPPER@shiftend pt}}% }% %\message{place computed tick: LOWEROK=\pgfplots@drawticklines@for@placecomputedtick@LOWEROK; UPPEROK=\pgfplots@drawticklines@for@placecomputedtick@UPPEROK.}% }% @@ -827,6 +839,11 @@ % This is just a special case for centered axis lines. \def\pgfplots@xtick@check@tickshow{% \pgfplots@tickshowtrue + % + \pgfplots@if@has@axis@shift y{% + \pgfplots@hide@obscured@xtickfalse + }{}% + % \ifpgfplots@hide@obscured@xtick \if\pgfplots@xaxislinesnum2% center \ifcase\pgfplots@yaxislinesnum\relax @@ -1217,6 +1234,64 @@ \pgfpathlineto{\pgfplotspointonorientedsurfaceab{#1}{\csname pgfplots@\pgfplotspointonorientedsurfaceB max\endcsname}}% }% +% Implements 'axis x line shift' and its friends. +% +% It is called by grid line drawing instructions, tick lines, and tick +% labels and installs a common shift. The purpose is to shift the +% _entire_ axis along the outer normal. +% +% The operation is supposed to be used when an oriented surf is +% installed. +% +% #1 used to determine the axis for which the outer normal is to be +% determined. #1 is the 'a' value of the current oriented surf, i.e. +% one of 0, 1, 2, or v. +% +% #2 same as '#1', but this here determines the 'b' value of the +% current oriented surf. +% +% exactly one of '#1' or '#2' must be 'v' such that a unique line can +% be identified. +\def\pgfplots@transformshift@along@outer@normal@on@line@of@oriented@surf#1#2{% + \if v#1% + \let\pgfplots@loc@TMPa=\pgfplotspointonorientedsurfaceA% + \if v#2% + \pgfplots@error{Exactly one of '#1' or '#2' must be 'v', not both}% + \fi + \else + \if v#2% + \let\pgfplots@loc@TMPa=\pgfplotspointonorientedsurfaceB% + \else + \pgfplots@error{One of '#1' or '#2' must be 'v'}% + \fi + \fi + % + \pgfkeysgetvalue{/pgfplots/axis \pgfplots@loc@TMPa\space line shift}\pgfplots@loc@TMPb + \ifx\pgfplots@loc@TMPb\pgfutil@empty + \else + % in this case, we KNOW that is is + % (a) parsed and + % (b) nonzero and + % (c) a dimension WITHOUT unit + % See \pgfplots@init@axis@shift + \ifpgfplots@separate@axis@lines + \else + \pgfplots@error{Internal error encountered: separate axis lines=false but axis shift found}% + \fi + \pgftransformshift{% + \expandafter\pgfqpointscale\expandafter{\pgfplots@loc@TMPb}{% + \begingroup + \pgf@process{% + \pgfplotspointonorientedsurfaceabtolinespec{#1}{#2}% + \expandafter\pgfplotspointouternormalvectorofaxis\expandafter{\pgfplotsretval}% + }% + \endgroup + }% + }% + \fi +}% +\let\pgfplots@transformshift@along@outer@normal@on@line@of@oriented@surf@orig=\pgfplots@transformshift@along@outer@normal@on@line@of@oriented@surf + % Draws ticks on the currently active "oriented surface". % % The oriented surface is two dimensional and has been initialised @@ -1384,12 +1459,29 @@ \let\pgfplots@subtickwidth@=\pgfmathresult \let\pgfplots@subtickwidth=\pgfmathresult \pgfplots@prepare@tick@offsets@for@{#1}{\pgfplots@subtickwidth@}% - \pgfplotslistforeach\pgfplots@prepared@tick@positions@minor@\as\pgfplots@curtickpos{% - \expandafter\pgfplots@prepared@tick@pos@unpack\pgfplots@curtickpos - \let\pgfplots@curtickpos=\pgfplots@tick - \pgfplotspointouternormalvectorofaxissetv{}{\pgfplots@curtickpos}% - \pgfplots@drawticklines@for@placecomputedtick - }% + \if\pgfplots@drawticklines@for@placecomputedtick@LOWEROK1% + \begingroup + \pgfplots@transformshift@along@outer@normal@on@line@of@oriented@surf v0% + \pgfplotslistforeach\pgfplots@prepared@tick@positions@minor@\as\pgfplots@curtickpos{% + \expandafter\pgfplots@prepared@tick@pos@unpack\pgfplots@curtickpos + \let\pgfplots@curtickpos=\pgfplots@tick + \pgfplotspointouternormalvectorofaxissetv{}{\pgfplots@curtickpos}% + \pgfplots@drawticklines@for@placecomputedtick@LOWER + }% + \endgroup + \fi + % + \if\pgfplots@drawticklines@for@placecomputedtick@UPPEROK1% + \begingroup + \pgfplots@transformshift@along@outer@normal@on@line@of@oriented@surf v1% + \pgfplotslistforeach\pgfplots@prepared@tick@positions@minor@\as\pgfplots@curtickpos{% + \expandafter\pgfplots@prepared@tick@pos@unpack\pgfplots@curtickpos + \let\pgfplots@curtickpos=\pgfplots@tick + \pgfplotspointouternormalvectorofaxissetv{}{\pgfplots@curtickpos}% + \pgfplots@drawticklines@for@placecomputedtick@UPPER + }% + \endgroup + \fi \endpgfextra; }{}% % @@ -1405,12 +1497,29 @@ \let\pgfplots@tickwidth@=\pgfmathresult \let\pgfplots@tickwidth=\pgfmathresult \pgfplots@prepare@tick@offsets@for@{#1}{\pgfplots@tickwidth@}% - \pgfplotslistforeach\pgfplots@prepared@tick@positions@major@\as\pgfplots@curtickpos{% - \expandafter\pgfplots@prepared@tick@pos@unpack\pgfplots@curtickpos - \let\pgfplots@curtickpos=\pgfplots@tick - \pgfplotspointouternormalvectorofaxissetv{}{\pgfplots@curtickpos}% - \pgfplots@drawticklines@for@placecomputedtick - }% + \if\pgfplots@drawticklines@for@placecomputedtick@LOWEROK1% + \begingroup + \pgfplots@transformshift@along@outer@normal@on@line@of@oriented@surf v0% + \pgfplotslistforeach\pgfplots@prepared@tick@positions@major@\as\pgfplots@curtickpos{% + \expandafter\pgfplots@prepared@tick@pos@unpack\pgfplots@curtickpos + \let\pgfplots@curtickpos=\pgfplots@tick + \pgfplotspointouternormalvectorofaxissetv{}{\pgfplots@curtickpos}% + \pgfplots@drawticklines@for@placecomputedtick@LOWER + }% + \endgroup + \fi + % + \if\pgfplots@drawticklines@for@placecomputedtick@UPPEROK1% + \begingroup + \pgfplots@transformshift@along@outer@normal@on@line@of@oriented@surf v1% + \pgfplotslistforeach\pgfplots@prepared@tick@positions@major@\as\pgfplots@curtickpos{% + \expandafter\pgfplots@prepared@tick@pos@unpack\pgfplots@curtickpos + \let\pgfplots@curtickpos=\pgfplots@tick + \pgfplotspointouternormalvectorofaxissetv{}{\pgfplots@curtickpos}% + \pgfplots@drawticklines@for@placecomputedtick@UPPER + }% + \endgroup + \fi \endpgfextra; }{}% % @@ -1551,6 +1660,7 @@ \def\pgfmathlogtologten@{\pgfplotscoordmath{#1}{log to log 10}}% % \xdef\pgfplots@show@ticklabel@LASTTICK{}% + \pgfplots@transformshift@along@outer@normal@on@line@of@oriented@surf{v}{\pgfplots@ticklabelside}% \pgfplotslistforeachungrouped\pgfplots@prepared@tick@positions@major@\as\pgfplots@curtickpos{% \expandafter\pgfplots@prepared@tick@pos@unpack\pgfplots@curtickpos \let\pgfplots@curtickpos=\pgfplots@tick @@ -1684,9 +1794,18 @@ \fi \fi \fi + % + % + % + % suppress this warning. We cannot avoid it currently. + \pgfkeysgetvalue{/pgfplots/warning/missing near ticklabel at/.@cmd}\pgfplots@loc@neartickllabel@at + \pgfkeysdef{/pgfplots/warning/missing near ticklabel at}{}% + % \pgfplots@ticklabel@maxtickdimen@prepare@for@normalvec {#1}% {\pgfplotspointouternormalvectorofticklabelaxis{#1}}% + % + \pgfkeyslet{/pgfplots/warning/missing near ticklabel at/.@cmd}\pgfplots@loc@neartickllabel@at% }% \newif\ifpgfplots@checkuniform@isfirst @@ -1792,6 +1911,400 @@ }% } +% This is part of \pgfplots@assign@default@tick@foraxis and relies on +% its temporary variables. +% +% INPUT: +% \MIN : the lower axis limit of #1 (a TeX register, in transformed range) +% \MAX : same with upper axis limit of #1 +% OUTPUT: +% \H : will contain the (transformed) distance between adjacent ticks +% \aftergroup\pgfplots@isuniformticktrue set if it applies +% +% +\def\pgfplots@ticks@compute@tick@distance#1{% + % compute step size 'H': + \H=\MAX + \advance\H by-\MIN + \ifdim\H<0pt \H=-1\H \fi +%\message{Axis limit #1: [\the\MIN:\the\MAX], diff = \the\H.^^J}% + \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^^J}% + % + % 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. + \pgfplotscoordmath{#1}{datascaletrafo noshift inverse}{\Hmacro}% + \let\Hmacro=\pgfmathresult + \else + \pgfmathfloatparsenumber{\Hmacro}% + \let\Hmacro=\pgfmathresult + \fi +%\message{Got T^{-1}(H#1) = \Hmacro^^J}% + % + \pgfplots@assign@default@tick@foraxis@normalizetickdist#1\Hmacro + \let\Hmacro=\pgfmathresult + % + % Ok, we are ready. + % Now, convert everything into the fixed point data + % range: + \ifpgfplots@is@datascaled + \pgfplotscoordmath{#1}{datascaletrafo noshift}{\Hmacro}% + \H=\pgfmathresult pt + \else + \pgfmathfloattofixed\Hmacro + \H=\pgfmathresult pt + \fi + % +%\message{snapped-to-nicest = \Hmacro^^J}% + \aftergroup\pgfplots@isuniformticktrue + \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). + \pgfmath@basic@multiply@{\Hmacro}{\pgfplots@loc@log@from@display@log@scale}% + \let\Hmacrobaseten=\pgfmathresult + \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 + \aftergroup\pgfplots@isuniformticktrue + \pgfplots@isuniformticktrue + \else + \aftergroup\pgfplots@isuniformtickfalse + \pgfplots@isuniformtickfalse + \fi +%\message{final H=\pgf@sys@tonumber{\H} * log(10)}% + \H=\pgfplots@loc@log@to@display@log@scale\H + \fi + % +} + +% This is part of \pgfplots@assign@default@tick@foraxis +% +% It overwrites the internal macros of +% \pgfplots@assign@default@tick@foraxis +\def\pgfplots@assign@default@tick@foraxis@autoadjust@result#1{% + \pgfplots@if{pgfplots@#1islinear}{% + \begingroup + \def\pgfplots@tick@returnval@ready{1}% + \pgfutil@ifundefined{pgfplots@assign@default@tick@foraxis@recurselevel}{% + \def\pgfplots@assign@default@tick@foraxis@recurselevel{1}% + }{% + \pgfplotsutil@advancestringcounter\pgfplots@assign@default@tick@foraxis@recurselevel + }% + \ifnum\pgfplots@assign@default@tick@foraxis@recurselevel<15 + \c@pgf@counta=\axisdefaulttryminticks\relax + \advance\c@pgf@counta by1 + \edef\axisdefaulttryminticks{\the\c@pgf@counta}% +%\message{**TOO FEW TICK LABELS FOR #1. RECURSION with try min ticks=\axisdefaulttryminticks.**^^J}% + % recurse. + \pgfplots@assign@default@tick@foraxis{#1}% + \expandafter\global\expandafter\let\expandafter\pgfplots@glob@TMPa\csname pgfplots@#1tick\endcsname + \expandafter\global\expandafter\let\expandafter\pgfplots@glob@TMPb\csname pgfplots@tick@distance@#1\endcsname + \else + \pgfplotswarning{tick computation failed}{#1}{\axisdefaulttryminticks}\pgfeov% + \def\pgfplots@tick@returnval@ready{0}% + \fi + \pgfmath@smuggleone\pgfplots@tick@returnval@ready + \endgroup + }{% + % Case logarithmic axes and too few ticks. + \aftergroup\pgfplots@isuniformtickfalse + % ok, do something special. + % + % The idea is now to place ticks at + % 10^{i*h} with properly choosen 'h'. + % + % So: apply basically the SAME code as above for linear + % axis, just everything log 10! And keep in mind that all + % coordinates are actually given as natural logarithms. + \MIN\csname pgfplots@#1min\endcsname pt + \H=\MAX + \advance\H by-\MIN + \ifdim\H<0pt \H=-1\H \fi + \H=\pgfplots@loc@log@from@display@log@scale \H +%\message{Axis limit #1: [\the\MIN:\the\MAX], diff/log(10) = \the\H.}% + \c@pgf@counta=\desirednumticks\relax + \advance\c@pgf@counta by-1 + \ifnum\c@pgf@counta>2 + % subtract one more. This algorithm here produces more + % ticks than the normal one which is designed for 10^i + \advance\c@pgf@counta by-1 + \fi + \divide\H by\c@pgf@counta\relax +%\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}% + \pgfmathfloatparsenumber{\Hmacro}% + \pgfplots@assign@default@tick@foraxis@normalizetickdist#1\pgfmathresult + % + \expandafter\pgfmathfloattofixed\expandafter{\pgfmathresult}% + \let\Hmacro=\pgfmathresult + \H=\Hmacro pt % + % Ok, our step size h for 10^{i*h} is ready! +%\message{determined step size 10^{\Hmacro}}% + % Now, we want to activate the Tick set {10^{i*H}, i in \Z} + % compute I such that + % 10^{min} = 10^{I * H + rest}; |rest| < H + % -> I = round(xmin/H) + % -> MIN = I * H + % BUT EVERYTHING to log(10) basis! + \MIN=\pgfplots@loc@log@from@display@log@scale \MIN + \pgfmathlog@invoke@expanded\pgfmathdivide@{% + {\pgf@sys@tonumber\MIN}% + {\Hmacro}% + }% + \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\relax + \multiply\MIN by\c@pgf@counta\relax + % + % convert back to basis 'e': + \MIN=\pgfplots@loc@log@to@display@log@scale\MIN\relax + \H=\pgfplots@loc@log@to@display@log@scale\H\relax + \MINH=\MIN\relax + \advance\MINH by\H\relax + }% +}% + +% The key 'xtick distance' can have any value. This routine avoids +% 'dimension too large' programmatically +\def\pgfplots@assign@default@tick@foraxis@cap#1#2{% + \ifpgfplots@is@datascaled + \pgfplotscoordmath{#1}{datascaletrafo noshift inverse}{16000}% + \let\pgfplots@loc@TMPb=\pgfmathresult + \pgfplotscoordmath{#1}{min}{\pgfplots@loc@TMPb}{#2}% + \edef\pgfplots@loc@TMPc{#2}% + \ifx\pgfplots@loc@TMPc\pgfmathresult + \def\pgfplotsretval{0}% + \else + \def\pgfplotsretval{1}% + \fi + \else + \pgfplotscoordmath{#1}{parsenumber}{16000}% + \let\pgfplots@loc@TMPb=\pgfmathresult + \pgfplotscoordmath{#1}{parsenumber}{#2}% + \let\pgfplots@loc@TMPc=\pgfmathresult + \pgfplotscoordmath{#1}{min}{\pgfplots@loc@TMPb}{\pgfplots@loc@TMPc}% + % + \ifx\pgfplots@loc@TMPc\pgfmathresult + \def\pgfplotsretval{0}% + \else + \def\pgfplotsretval{1}% + \fi + \fi + % + \ifx1\pgfplotsretval + \pgfplotswarning{dimension too large in ticks}{#1}{#2}{\pgfmathresult}\pgfeov% + \fi +} + +% This macro is NECESSARILY part of +% \pgfplots@assign@default@tick@foraxis: +% +% OUTPUT: +% \csname pgfplots@#1tick\endcsname +% \csname pgfplots@tick@distance@#1\endcsname +% FIXME : some \aftergroup trickery... +\def\pgfplots@assign@default@tick@foraxis@compute#1{% + % 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=\pgf@ya + \let\MIN=\pgf@yb + % + \MAX=\csname pgfplots@#1max\endcsname pt % + \advance\MAX by0.001pt % avoid round errors + %\expandafter\MIN\the\c@pgf@counta pt + \MIN=\csname pgfplots@#1min\endcsname pt % + % + \pgfkeysgetvalue{/pgfplots/#1tick distance}\Hmacro + \ifx\Hmacro\pgfutil@empty + \pgfplots@ticks@compute@tick@distance#1% + \def\b@pgfplots@ticks@computed@tick@distance@is@final{0}% + \else + % ah - a user argument. OK, prefer that one over the default: + \pgfplotscoordmath{default}{parse}{abs(\Hmacro)}% + \let\Hmacro=\pgfmathresult + \pgfplots@assign@default@tick@foraxis@cap{#1}{\Hmacro}% + \let\Hmacro=\pgfmathresult + \ifpgfplots@cur@is@linear + \ifpgfplots@is@datascaled + \pgfplotscoordmath{#1}{datascaletrafo noshift}{\pgfmathresult}% + \else + \pgfplotscoordmath{#1}{tofixed}{\pgfmathresult}% + \fi + \H=\pgfmathresult pt + \pgfplots@isuniformticktrue + \aftergroup\pgfplots@isuniformticktrue + \else + \pgfplotscoordmath{#1}{log}{\pgfmathresult}% + \let\Hmacro=\pgfmathresult + \H=\pgfmathresult pt + % + % we don't know it. check it. + \pgfplots@isuniformtickfalse + \aftergroup\pgfplots@isuniformtickfalse + \fi + \def\b@pgfplots@ticks@computed@tick@distance@is@final{1}% + \fi +%\message{Got H=\the\H\space(\Hmacro)^^J}% + % + % OK, now compute MIN/MAX : + \ifpgfplots@cur@is@linear + % The following code is carried out in floating point + % arithmetics because it requires large data ranges. + % + % I want to compute MIN@new := I*H where I is chosen + % such that MIN = I*H + rest with rest < H. + % The problem is the possibly large range of MIN. I + % can't work completely in the transformed datarange, + % so numbers get too large. + % + % So, compute I := int( MIN / H ) (integer truncation) + % in float arithmetics and then MIN@new := I*H + \pgfmathfloatdivide@{\csname pgfplots@#1min@unscaled@as@float\endcsname}{\Hmacro}% + \pgfmathfloatint@{\pgfmathresult}% + \pgfmathfloatmultiply@{\pgfmathresult}{\Hmacro}% + \let\MIN@new=\pgfmathresult + % + % Now, convert everything into the fixed point data + % range: + \ifpgfplots@is@datascaled + \pgfplotscoordmath{#1}{datascaletrafo}{\MIN@new}% + \MIN=\pgfmathresult pt + \else + \pgfmathfloattofixed\MIN@new + \MIN=\pgfmathresult pt + \fi + % + % And, since we have used finite precision, I is most + % likely to be large. So: subtract one H. In the worst + % case, this produces one tick position too much (but + % it won't be printed). + \advance\MIN by-\H\relax + \else + % 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: + \MIN=\pgfplots@loc@log@from@display@log@scale \MIN + \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 + \MIN=\pgfplots@loc@log@to@display@log@scale 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 + \advance\MIN \pgfplots@loc@log@to@display@log@scale pt + \fi + \fi + \fi + \MINH=\MIN + \advance\MINH by\H + % Ok, now it can happen that only ONE tick label is placed in + % this range. + % That's useless, so check for it. + % + % That's the case if + % MIN < ORIGMIN && MAX < MIN+2 H + % MIN < ORIGMIN by construction (ok, MIN <= ORIGMIN by + % construction, but I don't care about this case). + % So: check only the second condition. +%\message{Got MIN=\pgf@sys@tonumber\MIN; H=\pgf@sys@tonumber\H; MAX=\pgf@sys@tonumber\MAX.^^J}% + \def\pgfplots@tick@returnval@ready{0}% + % + \pgfplots@tmpa=\MINH + \advance\pgfplots@tmpa by\H + \ifdim\MAX<\pgfplots@tmpa + \if1\b@pgfplots@ticks@computed@tick@distance@is@final + % OK, we cannot auto adjust tick labels -- if if there are + % too few of them. + \else + \pgfplots@assign@default@tick@foraxis@autoadjust@result#1% + \fi + \fi + % + % assert that we have at least a minimal tick distance. + % FIXME :this minimum might actually be too small... + \ifdim\MINH=\MIN + \pgfplotsthrow{dimension too small in ticks}{#1}\pgfeov% + % + % make sure that the compilation succeeds: + \H=1pt % + \advance\MINH by\H + \fi + % + \if0\pgfplots@tick@returnval@ready + \xdef\pgfplots@glob@TMPb{\pgf@sys@tonumber{\H}}% + \advance\MAX by0.5\H % avoid rounding inaccuracies: + \xdef\pgfplots@glob@TMPa{\pgf@sys@tonumber{\MIN},\pgf@sys@tonumber{\MINH},...,\pgf@sys@tonumber{\MAX}}% + \fi +%\message{final H=\the\H; returning \pgfplots@glob@TMPa.}% + \expandafter\let\csname pgfplots@#1tick\endcsname=\pgfplots@glob@TMPa + \expandafter\let\csname pgfplots@tick@distance@#1\endcsname=\pgfplots@glob@TMPb +}% + % Computes tick positions using the current axis limits. % % Parameters: @@ -1884,7 +2397,7 @@ \afterassignment\pgfplots@gobble@until@relax \desirednumticks=\the\Wr\relax \advance\desirednumticks by1 - \csname ifpgfplots@#1islinear\endcsname + \ifpgfplots@cur@is@linear \ifnum\axisdefaulttryminticks>\desirednumticks\relax \desirednumticks=\axisdefaulttryminticks\relax \fi @@ -1914,272 +2427,18 @@ \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=\pgf@ya - \let\MIN=\pgf@yb - % compute step size 'H': - \MAX=\csname pgfplots@#1max\endcsname pt % - \advance\MAX by0.001pt % avoid round errors - %\expandafter\MIN\the\c@pgf@counta pt - \MIN=\csname pgfplots@#1min\endcsname pt % - \H=\MAX - \advance\H by-\MIN - \ifdim\H<0pt \H=-1\H \fi -%\message{Axis limit #1: [\the\MIN:\the\MAX], diff = \the\H.^^J}% - \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^^J}% % - % 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. - \pgfplotscoordmath{#1}{datascaletrafo noshift inverse}{\Hmacro}% - \let\Hmacro=\pgfmathresult - \else - \pgfmathfloatparsenumber{\Hmacro}% - \let\Hmacro=\pgfmathresult - \fi -%\message{Got T^{-1}(H#1) = \Hmacro^^J}% - % - \pgfplots@assign@default@tick@foraxis@normalizetickdist#1\Hmacro - \let\Hmacro=\pgfmathresult - % -%\message{snapped-to-nicest = \Hmacro^^J}% - \aftergroup\pgfplots@isuniformticktrue - % The following code is carried out in floating point - % arithmetics because it requires large data ranges. - % - % I want to compute MIN@new := I*H where I is chosen - % such that MIN = I*H + rest with rest < H. - % The problem is the possibly large range of MIN. I - % can't work completely in the transformed datarange, - % so numbers get too large. - % - % So, compute I := int( MIN / H ) (integer truncation) - % in float arithmetics and then MIN@new := I*H - \pgfmathfloatdivide@{\csname pgfplots@#1min@unscaled@as@float\endcsname}{\Hmacro}% - \pgfmathfloatint@{\pgfmathresult}% - \pgfmathfloatmultiply@{\pgfmathresult}{\Hmacro}% - \let\MIN@new=\pgfmathresult - % Ok, we are ready. - % Now, convert everything into the fixed point data - % range: - \ifpgfplots@is@datascaled - \pgfplotscoordmath{#1}{datascaletrafo}{\MIN@new}% - \MIN=\pgfmathresult pt - \pgfplotscoordmath{#1}{datascaletrafo noshift}{\Hmacro}% - \H=\pgfmathresult pt - \else - \pgfmathfloattofixed\MIN@new - \MIN=\pgfmathresult pt - \pgfmathfloattofixed\Hmacro - \H=\pgfmathresult pt - \fi - % - % And, since we have used finite precision, I is most - % likely to be large. So: subtract one H. In the worst - % case, this produces one tick position too much (but - % it won't be printed). - \advance\MIN by-\H\relax - \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). - \pgfmath@basic@multiply@{\Hmacro}{\pgfplots@loc@log@from@display@log@scale}% - \let\Hmacrobaseten=\pgfmathresult - \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 - \aftergroup\pgfplots@isuniformticktrue - \pgfplots@isuniformticktrue - \else - \aftergroup\pgfplots@isuniformtickfalse - \pgfplots@isuniformtickfalse - \fi -%\message{final H=\pgf@sys@tonumber{\H} * log(10)}% - \H=\pgfplots@loc@log@to@display@log@scale\H - % 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: - \MIN=\pgfplots@loc@log@from@display@log@scale \MIN - \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 - \MIN=\pgfplots@loc@log@to@display@log@scale 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 - \advance\MIN \pgfplots@loc@log@to@display@log@scale pt - \fi - \fi - \fi - \MINH=\MIN - \advance\MINH by\H - % Ok, now it can happen that only ONE tick label is placed in - % this range. - % That's useless, so check for it. + % OK, automatically compute ticks: + \pgfplots@assign@default@tick@foraxis@compute#1% % - % That's the case if - % MIN < ORIGMIN && MAX < MIN+2 H - % MIN < ORIGMIN by construction (ok, MIN <= ORIGMIN by - % construction, but I don't care about this case). - % So: check only the second condition. -%\message{Got MIN=\pgf@sys@tonumber\MIN; H=\pgf@sys@tonumber\H; MAX=\pgf@sys@tonumber\MAX.^^J}% - \def\pgfplots@tick@returnval@ready{0}% - \pgfplots@tmpa=\MINH - \advance\pgfplots@tmpa by\H - \ifdim\MAX<\pgfplots@tmpa - \pgfplots@if{pgfplots@#1islinear}{% - \begingroup - \def\pgfplots@tick@returnval@ready{1}% - \pgfutil@ifundefined{pgfplots@assign@default@tick@foraxis@recurselevel}{% - \def\pgfplots@assign@default@tick@foraxis@recurselevel{1}% - }{% - \pgfplotsutil@advancestringcounter\pgfplots@assign@default@tick@foraxis@recurselevel - }% - \ifnum\pgfplots@assign@default@tick@foraxis@recurselevel<15 - \c@pgf@counta=\axisdefaulttryminticks\relax - \advance\c@pgf@counta by1 - \edef\axisdefaulttryminticks{\the\c@pgf@counta}% -%\message{**TOO FEW TICK LABELS FOR #1. RECURSION with try min ticks=\axisdefaulttryminticks.**^^J}% - % recurse. - \pgfplots@assign@default@tick@foraxis{#1}% - \expandafter\global\expandafter\let\expandafter\pgfplots@glob@TMPa\csname pgfplots@#1tick\endcsname - \expandafter\global\expandafter\let\expandafter\pgfplots@glob@TMPb\csname pgfplots@tick@distance@#1\endcsname - \else - \pgfplotswarning{tick computation failed}{#1}{\axisdefaulttryminticks}\pgfeov% - \def\pgfplots@tick@returnval@ready{0}% - \fi - \pgfmath@smuggleone\pgfplots@tick@returnval@ready - \endgroup - }{% - % Case logarithmic axes and too few ticks. - \aftergroup\pgfplots@isuniformtickfalse - % ok, do something special. - % - % The idea is now to place ticks at - % 10^{i*h} with properly choosen 'h'. - % - % So: apply basically the SAME code as above for linear - % axis, just everything log 10! And keep in mind that all - % coordinates are actually given as natural logarithms. - \MIN\csname pgfplots@#1min\endcsname pt - \H=\MAX - \advance\H by-\MIN - \ifdim\H<0pt \H=-1\H \fi - \H=\pgfplots@loc@log@from@display@log@scale \H -%\message{Axis limit #1: [\the\MIN:\the\MAX], diff/log(10) = \the\H.}% - \c@pgf@counta=\desirednumticks\relax - \advance\c@pgf@counta by-1 - \ifnum\c@pgf@counta>2 - % subtract one more. This algorithm here produces more - % ticks than the normal one which is designed for 10^i - \advance\c@pgf@counta by-1 - \fi - \divide\H by\c@pgf@counta\relax -%\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}% - \pgfmathfloatparsenumber{\Hmacro}% - \pgfplots@assign@default@tick@foraxis@normalizetickdist#1\pgfmathresult - % - \expandafter\pgfmathfloattofixed\expandafter{\pgfmathresult}% - \let\Hmacro=\pgfmathresult - \H=\Hmacro pt % - % Ok, our step size h for 10^{i*h} is ready! -%\message{determined step size 10^{\Hmacro}}% - % Now, we want to activate the Tick set {10^{i*H}, i in \Z} - % compute I such that - % 10^{min} = 10^{I * H + rest}; |rest| < H - % -> I = round(xmin/H) - % -> MIN = I * H - % BUT EVERYTHING to log(10) basis! - \MIN=\pgfplots@loc@log@from@display@log@scale \MIN - \pgfmathlog@invoke@expanded\pgfmathdivide@{% - {\pgf@sys@tonumber\MIN}% - {\Hmacro}% - }% - \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\relax - \multiply\MIN by\c@pgf@counta\relax - % - % convert back to basis 'e': - \MIN=\pgfplots@loc@log@to@display@log@scale\MIN\relax - \H=\pgfplots@loc@log@to@display@log@scale\H\relax - \MINH=\MIN\relax - \advance\MINH by\H\relax - }% - \fi -%\message{final H=\the\H.}% - \if0\pgfplots@tick@returnval@ready - \xdef\pgfplots@glob@TMPb{\pgf@sys@tonumber{\H}}% - \advance\MAX by0.5\H % avoid rounding inaccuracies: - \xdef\pgfplots@glob@TMPa{\pgf@sys@tonumber{\MIN},\pgf@sys@tonumber{\MINH},...,\pgf@sys@tonumber{\MAX}}% + \expandafter\global\expandafter\let\expandafter\pgfplots@glob@TMPa\csname pgfplots@#1tick\endcsname + \expandafter\global\expandafter\let\expandafter\pgfplots@glob@TMPb\csname pgfplots@tick@distance@#1\endcsname + \ifpgfplots@isuniformtick + \aftergroup\pgfplots@determinedefaultvalues@needs@check@uniformtickfalse + \else + % in this case, we better check... + \aftergroup\pgfplots@determinedefaultvalues@needs@check@uniformticktrue \fi - \aftergroup\pgfplots@determinedefaultvalues@needs@check@uniformtickfalse \else \expandafter\global\expandafter\let\expandafter\pgfplots@glob@TMPa\csname pgfplots@#1tick\endcsname \gdef\pgfplots@glob@TMPb{}% will be computed later, in 'check uniform tick' diff --git a/Master/texmf-dist/tex/generic/pgfplots/sys/pgflibrarypgfplots.surfshading.pgfsys-dvipdfmx.def b/Master/texmf-dist/tex/generic/pgfplots/sys/pgflibrarypgfplots.surfshading.pgfsys-dvipdfmx.def index 59662c4edfa..4ef45fea3b0 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/sys/pgflibrarypgfplots.surfshading.pgfsys-dvipdfmx.def +++ b/Master/texmf-dist/tex/generic/pgfplots/sys/pgflibrarypgfplots.surfshading.pgfsys-dvipdfmx.def @@ -55,7 +55,7 @@ % transformation matrix and it is UNDONE in the /Matrix argument of % the pattern dictionary. This last step can't be done with the /sh % operator which is why I am using pattern dictionaries. -\def\pgfplotslibrarysurfdraw{% +\def\pgfplotslibrarysurfdraw@sys{% \begingroup \setbox\pgfutil@tempboxa=\hbox {% diff --git a/Master/texmf-dist/tex/generic/pgfplots/sys/pgflibrarypgfplots.surfshading.pgfsys-dvips.def b/Master/texmf-dist/tex/generic/pgfplots/sys/pgflibrarypgfplots.surfshading.pgfsys-dvips.def index 85ed333152c..0e1221e3286 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/sys/pgflibrarypgfplots.surfshading.pgfsys-dvips.def +++ b/Master/texmf-dist/tex/generic/pgfplots/sys/pgflibrarypgfplots.surfshading.pgfsys-dvips.def @@ -42,7 +42,7 @@ % It appears the dvips implementation is simpler than the pdftex % implementation - I did not need to adjust the matrix (don't know % why). -\def\pgfplotslibrarysurfdraw{% +\def\pgfplotslibrarysurfdraw@sys{% \pgfpicture \pgfplotssys@do@surfshading@fillpaths\pgfplots@loc@TMPa% \global\let\pgfplots@glob@TMPa=\pgfplots@loc@TMPa diff --git a/Master/texmf-dist/tex/generic/pgfplots/sys/pgflibrarypgfplots.surfshading.pgfsys-pdftex.def b/Master/texmf-dist/tex/generic/pgfplots/sys/pgflibrarypgfplots.surfshading.pgfsys-pdftex.def index 70d1c1e889e..b73f495cd83 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/sys/pgflibrarypgfplots.surfshading.pgfsys-pdftex.def +++ b/Master/texmf-dist/tex/generic/pgfplots/sys/pgflibrarypgfplots.surfshading.pgfsys-pdftex.def @@ -41,7 +41,7 @@ % transformation matrix and it is UNDONE in the /Matrix argument of % the pattern dictionary. This last step can't be done with the /sh % operator which is why I am using pattern dictionaries. -\def\pgfplotslibrarysurfdraw{% +\def\pgfplotslibrarysurfdraw@sys{% \begingroup %\pgfinterruptpicture% needed? \setbox\pgfutil@tempboxa=\hbox{% diff --git a/Master/texmf-dist/tex/generic/pgfplots/test/pgfplots.assert.code.tex b/Master/texmf-dist/tex/generic/pgfplots/test/pgfplots.assert.code.tex index 4f913922266..7ca9e48a74d 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/test/pgfplots.assert.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/test/pgfplots.assert.code.tex @@ -21,7 +21,7 @@ \def\pgfplotsassertequalstoknoexpand#1#2#3{% \ifx#1#2% \else - \pgfplotsassertfail{#3 expected '\meaning#1' but was '\meaning#2'}% + \pgfplotsassertfail{#3 expected ^^J '\meaning#1' but was ^^J '\meaning#2'}% \fi }% diff --git a/Master/texmf-dist/tex/generic/pgfplots/util/pgfplotscolormap.code.tex b/Master/texmf-dist/tex/generic/pgfplots/util/pgfplotscolormap.code.tex index c80b2c7b848..fe79bad2665 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/util/pgfplotscolormap.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/util/pgfplotscolormap.code.tex @@ -84,6 +84,9 @@ \endpgfplotscolornormalizesequence% \expandafter\let\csname\pgfplots@createcolormap@name @colspace\endcsname=\pgfplotsretval \expandafter\let\csname\pgfplots@createcolormap@name @col@comps\endcsname=\pgfplotsretvalb + \c@pgf@counta=\expandafter\pgfplotsarraysizeof\expandafter{\pgfplots@createcolormap@name}\relax + \advance\c@pgf@counta by-1 % + \expandafter\edef\csname\pgfplots@createcolormap@name @lastindex\endcsname{\the\c@pgf@counta}% %\pgfplots@colormap@showdebuginfofor{#1}% \pgfplots@colormap@LUA@new{#1}% } @@ -184,18 +187,142 @@ \pgfplots@createcolormap@grabnext@complete }% +%%%%%%%%%% + +% defines \pgfplotsretval to contain the argument and \pgfplotsretvalb +% to contain the colormap name. +\def\pgfplots@createcolormap@special@split#1{% + \pgfutil@in@{of }{#1}% + \ifpgfutil@in@ + \pgfplots@createcolormap@special@split@#1\pgfplots@EOI + \else + \pgfkeys@spdef\pgfplotsretval{#1}% + \pgfkeysgetvalue{/pgfplots/colormap name}\pgfplotsretvalb + \fi + \pgfplots@createcolormap@special@ensure@source@cm{\pgfplotsretvalb}% +}% +\def\pgfplots@createcolormap@special@split@#1of #2\pgfplots@EOI{% + \pgfkeys@spdef\pgfplotsretval{#1}% + \pgfkeys@spdef\pgfplotsretvalb{#2}% +} +\def\pgfplots@createcolormap@special@ensure@source@cm#1{% + \pgfplotscolormapifdefined{#1}{% + }{% + \pgfplots@error{The argument '#1' is no valid colormap.}% + }% +}% + +% defines \pgfplotsretval to contain an expanded color definition +% series +% #1: position +% #2: argument(s) +\expandafter\def\csname pgfplots@createcolormap@grabnextspecial@colors of colormap\endcsname#1#2{% + \pgfplots@createcolormap@special@split{#2}% + \pgfplots@createcolormap@special@process{#1}{color of colormap}% +%\message{colors of colormap(#1)=(#2): resulted in \meaning\pgfplotsretval^^J}% +} +\expandafter\def\csname pgfplots@createcolormap@grabnextspecial@samples of colormap\endcsname#1#2{% + \pgfplots@createcolormap@special@split{#2}% + \begingroup + \let\pgfplots@source=\pgfplotsretval + \let\pgfplots@sourcecm=\pgfplotsretvalb + \pgfplots@domain@to@foreach 0:1000\relax{\pgfplots@source}% + \t@pgfplots@toka=\expandafter{\pgfplotsretval}% + \edef\pgfplotsretval{colors of colormap(#1)=({\the\t@pgfplots@toka} of \pgfplots@sourcecm)}% + \pgfmath@smuggleone\pgfplotsretval + \endgroup +%\message{samples of colormap(#1)=(#2): resulted in \meaning\pgfplotsretval^^J}% +} +\expandafter\def\csname pgfplots@createcolormap@grabnextspecial@indices of colormap\endcsname#1#2{% + \pgfplots@createcolormap@special@split{#2}% + \pgfplots@createcolormap@special@process{#1}{index of colormap}% +%\message{indices of colormap(#1)=(#2): resulted in \meaning\pgfplotsretval^^J}% +} +\expandafter\def\csname pgfplots@createcolormap@grabnextspecial@color of colormap\endcsname#1#2{% + \begingroup + % colormap access=map + \def\pgfplots@color@of@colormap@access{m}% + \pgfplots@color@of@colormap@define{#2}% + \edef\pgfplotsretval{% + \csname pgfpl@cm@\pgfplots@color@of@colormap@name @colspace\endcsname(#1)=(\pgfmathresult)% + }% + \pgfmath@smuggleone\pgfplotsretval + \endgroup +} +\expandafter\def\csname pgfplots@createcolormap@grabnextspecial@index of colormap\endcsname#1#2{% + \begingroup + % colormap access=direct + \def\pgfplots@color@of@colormap@access{d}% + \pgfplots@color@of@colormap@define{#2}% + \edef\pgfplotsretval{% + \csname pgfpl@cm@\pgfplots@color@of@colormap@name @colspace\endcsname(#1)=(\pgfmathresult)% + }% + \pgfmath@smuggleone\pgfplotsretval + \endgroup +} +\def\pgfplots@createcolormap@special@process#1#2{% + \begingroup + \let\pgfplots@source=\pgfplotsretval + \let\pgfplots@sourcecm=\pgfplotsretvalb + \def\pgfplots@temp@pos{(#1)}% + % + \pgfplotsapplistXnewempty\pgfplots@createcolormap@special@process@result + \def\pgfplots@loc@TMPa{\pgfplotsforeachungrouped \x in }% + \expandafter\pgfplots@loc@TMPa\expandafter{\pgfplots@source}{% + \t@pgfplots@tokb=\expandafter{\pgfplots@sourcecm}% + % + \edef\currentValue{#2\pgfplots@temp@pos=(\x\space of \the\t@pgfplots@tokb) }% + % + \expandafter\pgfplotsapplistXpushback\currentValue\to\pgfplots@createcolormap@special@process@result + % + % all following ones receive auto-positions: + \let\pgfplots@temp@pos=\pgfutil@empty + }% + \pgfplotsapplistXlet\pgfplotsretval=\pgfplots@createcolormap@special@process@result + \global\let\pgfplots@glob@TMPa=\pgfplotsretval + \endgroup + \let\pgfplotsretval=\pgfplots@glob@TMPa +}% +%%%%%%%%%% + \def\pgfplots@createcolormap@grabnext@complete{% - \edef\pgfplots@loc@TMPa{% - {\pgfplots@loc@TMPb}% position - {% - \pgfplots@loc@TMPa% colorspace - =\pgfplots@loc@TMPc% color data + \pgfutil@IfUndefined{pgfplots@createcolormap@grabnextspecial@\pgfplots@loc@TMPa}{% + % ok, this is a 'normal' color specification with position, + % colorspace, and color data. + % + \edef\pgfplots@loc@TMPa{% + {\pgfplots@loc@TMPb}% position + {% + \pgfplots@loc@TMPa% colorspace + =\pgfplots@loc@TMPc% color data + }% + }% + \expandafter\pgfplots@createcolormap@nextcolor\pgfplots@loc@TMPa + % + % continue loop: + \def\pgfplots@loc@TMPd{\pgfplots@createcolormap@}% + }{% + % ah - a special one based on another colormap! + % convert it into the standard format: + % + \t@pgfplots@tokb=\expandafter{\pgfplots@loc@TMPc}% + \edef\pgfplots@loc@TMPd{% + \expandafter\noexpand\csname pgfplots@createcolormap@grabnextspecial@\pgfplots@loc@TMPa\endcsname + % position: + {\pgfplots@loc@TMPb} + % argument: + {\the\t@pgfplots@tokb}% + }% + \pgfplots@loc@TMPd + % + \def\pgfplots@loc@TMPd{% + \expandafter\pgfplots@createcolormap@\pgfplotsretval }% }% - \expandafter\pgfplots@createcolormap@nextcolor\pgfplots@loc@TMPa + % % % continue loop: - \pgfplots@createcolormap@ + \pgfplots@loc@TMPd }% \def\pgfplots@createcolormap@grabnext@computenextposition{% @@ -375,13 +502,117 @@ \begingroup \c@pgf@counta=0 \pgfplotsarrayforeachungrouped{pgfpl@cm@#1}\as\elem{% - \message{\#\the\c@pgf@counta: \elem; }% - \advance\c@pgf@counta by1 + \pgfmath@basic@multiply@{\the\c@pgf@counta}{\csname pgfpl@cm@#1@h\endcsname}% + \message{\#\the\c@pgf@counta=(\pgfmathresult)=(\elem);^^J}% + \advance\c@pgf@counta by1 % }% \message{^^J}% \endgroup } +% #1: comma-separated list of values for the current entry +% #2: color map name +% #3: the current index into the colormap +% #4: the "x coordinate", i.e. the offset within the colormap +% +% Defines \pgfplotsretval +% +% Example: +% \pgfplotscolormaptodatafile[ +% output each nth=1, +% output format=csv, +% ]{viridis} +% {viridis.dat} +\def\pgfplotscolormaptodatafile@elem#1#2#3#4{ + \let\pgfplotsretval=\pgfutil@empty +}% + +\begingroup +\catcode`\[=1 +\catcode`\]=2 +\catcode`\{=12 +\catcode`\}=12 +\xdef\pgfplots@lbrace[{]% +\xdef\pgfplots@rbrace[}]% +\endgroup + + +\pgfkeys{ + /pgfplots/colormap/output each nth/.initial=1, + /pgfplots/colormap/output format/.is choice, + /pgfplots/colormap/output format/csv/.code={% + \def\pgfplotscolormaptodatafile@head##1{% + \let\pgfplotsretval=\pgfutil@empty + }% + \def\pgfplotscolormaptodatafile@elem##1##2##3##4{% + \edef\pgfplotsretval{##4,##1}% + }% + \def\pgfplotscolormaptodatafile@foot##1{% + \let\pgfplotsretval=\pgfutil@empty + }% + }, + /pgfplots/colormap/output format/native/.code={% + \def\pgfplotscolormaptodatafile@head##1{% + \edef\pgfplotsretval{\string\pgfplotsset\pgfplots@lbrace colormap={##1}\pgfplots@lbrace}% + }% + \def\pgfplotscolormaptodatafile@elem##1##2##3##4{% + \edef\pgfplotsretval{\csname pgfpl@cm@##2@colspace\endcsname=(##1)}% + }% + \def\pgfplotscolormaptodatafile@foot##1{% + \edef\pgfplotsretval{\pgfplots@rbrace\pgfplots@rbrace}% + }% + }, + /pgfplots/colormap/output format=csv, +} + + +% An export of a color map. +% #1: options. Can use 'output each nth=2' and 'output format=csv|native' +% #2: a color map +% #3: a data file +\def\pgfplotscolormaptodatafile{\pgfutil@ifnextchar[{\pgfplotscolormaptodatafile@}{\pgfplotscolormaptodatafile@[]}}% +\def\pgfplotscolormaptodatafile@[#1]#2#3{% + \begingroup + \pgfqkeys{/pgfplots/colormap}{#1}% + \pgfkeysgetvalue{/pgfplots/colormap/output each nth}{\pgfplots@eachnth}% + \immediate\openout\w@pgf@writea=#3\relax + \pgfplotscolormaptodatafile@head{#2}% + \ifx\pgfplotsretval\pgfutil@empty + \else + \immediate\write\w@pgf@writea{% + \pgfplotsretval + }% + \fi + \gdef\pgfplots@eachnth@cur{0}% + \pgfplotsarrayforeach{pgfpl@cm@#2}\as\elem{% + \ifnum\pgfplots@eachnth@cur=0\relax + \gdef\pgfplots@eachnth@cur{0}% + \pgfmath@basic@multiply@{\pgfplotsarrayforeachindex}{\csname pgfpl@cm@#2@h\endcsname}% + \edef\pgfplots@loc@TMPa{{\elem}{#2}{\pgfplotsarrayforeachindex}{\pgfmathresult}}% + \expandafter\pgfplotscolormaptodatafile@elem\pgfplots@loc@TMPa + \ifx\pgfplotsretval\pgfutil@empty + \else + \immediate\write\w@pgf@writea{% + \pgfplotsretval + }% + \fi + \fi + \pgfplotsutil@advancestringcounter@global\pgfplots@eachnth@cur% + \ifnum\pgfplots@eachnth@cur=\pgfplots@eachnth\relax + \gdef\pgfplots@eachnth@cur{0}% + \fi + }% + \pgfplotscolormaptodatafile@foot{#2}% + \ifx\pgfplotsretval\pgfutil@empty + \else + \immediate\write\w@pgf@writea{% + \pgfplotsretval + }% + \fi + \immediate\closeout\w@pgf@writea + \endgroup +} + % Defines \pgfplotsretval to contain the mesh width of colormap #1 \def\pgfplotscolormapgetmeshwidth#1{% \expandafter\let\expandafter\pgfplotsretval\csname pgfpl@cm@#1@h\endcsname% @@ -419,6 +650,7 @@ \toks3=\expandafter{\pgfplots@serialize@list}% \toks4=\expandafter{\expandafter\def\csname pgfpl@cm@#1@colspace\endcsname}% \toks5=\expandafter{\expandafter\def\csname pgfpl@cm@#1@col@comps\endcsname}% + \toks6=\expandafter{\expandafter\def\csname pgfpl@cm@#1@lastindex\endcsname}% \xdef\pgfplots@glob@TMPa{% \the\toks0 {\csname pgfpl@cm@#1@h\endcsname}% \the\toks1 {\csname pgfpl@cm@#1@invh\endcsname}% @@ -426,6 +658,7 @@ \the\toks2 \the\toks4 {\csname pgfpl@cm@#1@colspace\endcsname}% \the\toks5 {\csname pgfpl@cm@#1@col@comps\endcsname}% + \the\toks6 {\csname pgfpl@cm@#1@lastindex\endcsname}% }% \endgroup \let#2=\pgfplots@glob@TMPa @@ -434,32 +667,96 @@ % this is a CONSTANT! Do NOT change it! % Just read it -- just in case \pgfplotscolormaptopdffunction will use % a different upper bound in the future. -\def\pgfplotscolormappdfmax{1}% +\def\pgfplotscolormappdfmax{1}% FIXME : why? 1000 would be more precise...? + +% Expands to the size of colormap #1 . +\def\pgfplotscolormapsizeof#1{% + \pgfplotscolormapifdefined{#1}{% + \pgfplotsarraysizeof{pgfpl@cm@#1}% + }{% + 0% + }% +}% + +% Expands to the last index of colormap #1 (or -1) +\def\pgfplotscolormaplastindexof#1{% + \pgfplotscolormapifdefined{#1}{% + \csname pgfpl@cm@#1@lastindex\endcsname% + }{% + -1% + }% +}% % Writes a PDF function of /FunctionType 3 to \pgfplotsretval % % The /Domain argument will be set to [ 0 \pgfplotscolormappdfmax ] and bounds will be % computed accordingly. % +% Note that the value depends on 'colormap access' +% % #1: the colormap \def\pgfplotscolormaptopdffunction#1{% \begingroup - \gdef\pgfplotsretval{% + \pgfplotscolormapassertexists{#1}% + \pgfplotsapplistXnewempty\pgfplots@resultaccum + \pgfplotsapplistXpushback{ << /FunctionType 3 /Domain [0 \pgfplotscolormappdfmax] - % /Range [0 1 0 1 0 1] % INCOMPATIBLE WITH ACROBAT 6.0 ! /Functions [ - }% + }\to\pgfplots@resultaccum% \c@pgf@counta=0 \c@pgf@countb=\pgfplotsarraysizeof{pgfpl@cm@#1} % \advance\c@pgf@countb by-1 \def\pgfplots@loc@TMPa{}% - \def\pgfplots@loc@TMPb{}% - \def\pgfplots@loc@TMPc{}% + \pgfplotsapplistXnewempty\pgfplots@bounds@accum% + \pgfplotsapplistXnewempty\pgfplots@encode@accum \ifnum\csname pgfpl@cm@#1@col@comps\endcsname>4 \pgfplots@error{Sorry, processing more than 4 color components (as required for color map #1) is unsupported in this context}% \fi + % + \if m\pgfplots@colormap@access + % colormap access=map + \def\pgfplots@order{1}% + \global\pgf@x=\csname pgfpl@cm@#1@h\endcsname pt % + \def\pgfplots@C@left{C0}% + \def\pgfplots@C@right{C1}% + \else + \if c\pgfplots@colormap@access + % colormap access=piecewise constant + % This has a dedicated special interval at the rightmost + % end. + % See comments in pgfplotscolormapfindpiecewiseconst@precomputed@ + \def\pgfplots@order{0}% + % + % advance the number of intervals by 1. + % To this end, we have to compute + % N = n+1 + % and + % H = 1000 / (N-1) = 1000/n. + % Store H in \pgf@x: + \c@pgf@countd=\pgfplotscolormapsizeof{#1}\relax + % + \global\pgf@x=1000pt % + \global\divide\pgf@x by\c@pgf@countd + % + % interchange the sequence in the PDF function as it is + % defined as + % y = C0 + x^0 * (C1 - C0) = C1 + % -> we want the left interval boundary. + \def\pgfplots@C@left{C1}% + \def\pgfplots@C@right{C0}% + \else + % colormap access=direct + \pgfplots@error{This should never happen}% + % ? + \def\pgfplots@order{0}% + \global\pgf@x=\csname pgfpl@cm@#1@h\endcsname pt % + \def\pgfplots@C@left{C0}% + \def\pgfplots@C@right{C1}% + \fi + \fi + % \pgfplotsarrayforeachungrouped{pgfpl@cm@#1}\as\cdata{% \edef\cdata{% \expandafter @@ -468,35 +765,61 @@ \cdata\relax }% \ifnum\c@pgf@counta>0 - \t@pgfplots@toka=\expandafter{\pgfplotsretval}% - \xdef\pgfplotsretval{% - \the\t@pgfplots@toka + \edef\pgfplots@loc@TMPd{% << /FunctionType 2 /Domain [0 \pgfplotscolormappdfmax] - /C0 [\pgfplots@loc@TMPa] /C1 [\cdata] /N 1 + /\pgfplots@C@left\space [\pgfplots@loc@TMPa] /\pgfplots@C@right\space [\cdata] + /N \pgfplots@order >> }% + \expandafter\pgfplotsapplistXpushback\expandafter{\pgfplots@loc@TMPd}\to\pgfplots@resultaccum \ifnum\c@pgf@counta<\c@pgf@countb\relax - \pgf@xa=\csname pgfpl@cm@#1@h\endcsname pt + \pgf@xa=\pgf@x \multiply\pgf@xa by\c@pgf@counta\relax - \divide\pgf@xa by1000 % we want [ 0 1 ] not [0 1000] as domain - \edef\pgfplots@loc@TMPb{\pgfplots@loc@TMPb\space \pgf@sys@tonumber\pgf@xa}% + \divide\pgf@xa by1000 % we want [ 0 1 ] not [0 1000] as domain XXX : why!? + \edef\pgfplots@loc@TMPc{ \pgf@sys@tonumber\pgf@xa}% + \expandafter\pgfplotsapplistXpushback\expandafter{\pgfplots@loc@TMPc}\to\pgfplots@bounds@accum% \fi - \edef\pgfplots@loc@TMPc{\pgfplots@loc@TMPc\space 0 1}% + \pgfplotsapplistXpushback{ 0 1}\to\pgfplots@encode@accum% \fi \let\pgfplots@loc@TMPa=\cdata \advance\c@pgf@counta by1 }% + \if 0\pgfplots@order + % add an artificial interval. + \edef\pgfplots@loc@TMPd{% + << + /FunctionType 2 + /Domain [0 \pgfplotscolormappdfmax] + /\pgfplots@C@left\space [\cdata] /\pgfplots@C@right\space [\cdata] + /N \pgfplots@order + >> + }% + \expandafter\pgfplotsapplistXpushback\expandafter{\pgfplots@loc@TMPd}\to\pgfplots@resultaccum + \pgf@xa=\pgf@x + \advance\c@pgf@counta by-1 % + \multiply\pgf@xa by\c@pgf@counta\relax + \divide\pgf@xa by1000 % we want [ 0 1 ] not [0 1000] as domain XXX : why!? + \edef\pgfplots@loc@TMPc{ \pgf@sys@tonumber\pgf@xa}% + \expandafter\pgfplotsapplistXpushback\expandafter{\pgfplots@loc@TMPc}\to\pgfplots@bounds@accum% + \pgfplotsapplistXpushback{ 0 1}\to\pgfplots@encode@accum% + \fi + \pgfplotsapplistXlet\pgfplotsretval=\pgfplots@resultaccum + \pgfplotsapplistXlet\pgfplotsbounds=\pgfplots@bounds@accum + \pgfplotsapplistXlet\pgfplotsencode=\pgfplots@encode@accum \t@pgfplots@toka=\expandafter{\pgfplotsretval}% - \xdef\pgfplotsretval{% + \t@pgfplots@tokb=\expandafter{\pgfplotsbounds}% + \t@pgfplots@tokc=\expandafter{\pgfplotsencode}% + \xdef\pgfplots@glob@TMPa{% \the\t@pgfplots@toka ] - /Bounds [\pgfplots@loc@TMPb] - /Encode [\pgfplots@loc@TMPc] + /Bounds [\the\t@pgfplots@tokb] + /Encode [\the\t@pgfplots@tokc] >> }% \endgroup + \let\pgfplotsretval=\pgfplots@glob@TMPa }% \expandafter\def\csname pgfplotscolormaptopdffunction@convertcdata@1\endcsname#1\relax{#1}% \expandafter\def\csname pgfplotscolormaptopdffunction@convertcdata@2\endcsname#1,#2\relax{#1 #2}% @@ -594,6 +917,12 @@ \def\pgfplotscolormapgetcolorcomps#1{% \edef\pgfplotsretval{\csname pgfpl@cm@#1@col@comps\endcsname}% }% +\def\pgfplotscolormapcolorspaceof#1{% + \csname pgfpl@cm@#1@colspace\endcsname% +}% +\def\pgfplotscolormapcolorcompsof#1{% + \csname pgfpl@cm@#1@col@comps\endcsname% +}% % Linearly maps the number #4 into the colormap #5 and returns the @@ -645,9 +974,7 @@ \expandafter\gdef\csname pgfplotscolormapfind@precomputed@warn@LUA@#1\endcsname{1}% \fi }% -\def\pgfplotscolormapfind@precomputed@[#1:#2][#3]#4#5{% - \pgfplotscolormapassertexists{#5}% - \begingroup +\def\pgfplotscolormapfind@@@[#1:#2][#3]#4#5{% % Step 0: compute #3 if it is missing and write it into % \pgfplots@loc@TMPa. \def\pgfplots@loc@TMPa{#3}% @@ -677,24 +1004,34 @@ \def\pgfmathresult{1000}% \fi \fi +}% +\def\pgfplotscolormapfind@precomputed@[#1:#2][#3]#4#5{% + \pgfplotscolormapassertexists{#5}% + \begingroup + \pgfplotscolormapfind@@@[#1:#2][#3]{#4}{#5}% + % + % Now, we have it in [0,1000]. Find the correct interval: \let\pgfplotscolormapfind@transformedx=\pgfmathresult - \expandafter\pgfmathmultiply@\expandafter{\pgfmathresult}{\csname pgfpl@cm@#5@invh\endcsname}% + \pgfmathmultiply@{\pgfplotscolormapfind@transformedx}{\csname pgfpl@cm@#5@invh\endcsname}% \let\pgfplotscolormapfind@transformedx@divh=\pgfmathresult \expandafter\pgfmathfloor@\expandafter{\pgfmathresult}% % assign \pgfplotscolormapfind@intervalno := \pgfmathresult % without '.0' suffix: \def\pgfplots@discardperiod##1.##2\relax{\def\pgfplotscolormapfind@intervalno{##1}}% \expandafter\pgfplots@discardperiod\pgfmathresult\relax - \pgfmathsubtract@{\pgfplotscolormapfind@transformedx@divh}{\pgfplotscolormapfind@intervalno}% - \let\pgfplots@loc@factor=\pgfmathresult - \pgfmathsubtract@{1}{\pgfplots@loc@factor}% - \let\pgfplots@loc@factor@two=\pgfmathresult % Step 2: interpolate the desired RGB value using vector valued % interpolation on the identified interval. \c@pgf@counta=\pgfplotscolormapfind@intervalno\relax %\message{mapping [#1,#2] -> [0,\pgfplotscolormaprange] yielded phi(#4) = \pgfplotscolormapfind@transformedx, situated in interval no \the\c@pgf@counta.^^J}% \pgfplotsarrayselect\c@pgf@counta\of{pgfpl@cm@#5}\to\pgfplotscolormapfind@rgb@LEFT % + % do the stuff which is specific to linear interpolation: + % + \pgfmathsubtract@{\pgfplotscolormapfind@transformedx@divh}{\pgfplotscolormapfind@intervalno}% + \let\pgfplots@loc@factor=\pgfmathresult + \pgfmathsubtract@{1}{\pgfplots@loc@factor}% + \let\pgfplots@loc@factor@two=\pgfmathresult + % \pgfplotsarraysize{pgfpl@cm@#5}\to\c@pgf@countb \advance\c@pgf@countb-1 % \ifnum\c@pgf@counta<\c@pgf@countb @@ -731,6 +1068,115 @@ }% +% Maps the number #4 into the colormap #5 using piecewise constant +% interpolation. It returns the interpolated colors into \pgfmathresult. The result will be a triple +% for an RGB colormap and it will contain four numbers for CMYK. The +% components of the result will be in the range [0:1]. +% +% [#1:#2] the number range of the data source (i.e. of #4). This is required to +% map into the colormap. +% [#3] (optional) the quantity +% s := \pgfplotscolormaprange / (#2-#1). +% Precomputing this quantity may save a lot of time because +% divisions are expensive in TeX. You can omit [#3] or +% provide an empty string here. +% #4 the number to map. +% #5 the colormap's name. Must be defined with +% \pgfplotscreatecolormap before. +% +% Example: +% \pgfplotscolormapfindpiecewiseconst[-1:1]{0.2}{my colormap} +\def\pgfplotscolormapfindpiecewiseconst[#1:#2]{% + \pgfutil@ifnextchar[{% + \pgfplotscolormapfindpiecewiseconst@precomputed[#1:#2]% + }{% + \pgfplotscolormapfindpiecewiseconst@precomputed[#1:#2][]% + }% +}% +\def\pgfplotscolormapfindpiecewiseconst@precomputed[#1:#2][#3]#4#5{% + %\ifpgfplots@LUA@supported + \iffalse + % FIXME : implement + \edef\pgfmathresult{% + \pgfplotsutil@directlua{% + pgfplots.texColorMapPrecomputed("#5", #1,#2,#4) + }% + }% + \ifx\pgfmathresult\pgfutil@empty + \pgfplotscolormapfindpiecewiseconst@precomputed@warn@LUA{#5}% + \pgfplotscolormapfindpiecewiseconst@precomputed@[#1:#2][#3]{#4}{#5}% + \else + %\message{LUA colormapfindpiecewiseconst[#1:#2](#4)(#5) = \pgfmathresult^^J}% + \fi + \else + \pgfplotscolormapfindpiecewiseconst@precomputed@[#1:#2][#3]{#4}{#5}% + \fi +} + +\def\pgfplotscolormapfindpiecewiseconst@precomputed@warn@LUA#1{% + \expandafter\ifx\csname pgfplotscolormapfindpiecewiseconst@precomputed@warn@LUA@#1\endcsname\relax + \pgfplotswarning{lua colormap unavailable}{#1}\pgfeov% + \expandafter\gdef\csname pgfplotscolormapfindpiecewiseconst@precomputed@warn@LUA@#1\endcsname{1}% + \fi +}% + +\def\pgfplotscolormapfindpiecewiseconst@precomputed@[#1:#2][#3]#4#5{% + \pgfplotscolormapassertexists{#5}% + \begingroup + \pgfplotscolormapfind@@@[#1:#2][#3]{#4}{#5}% + \let\pgfplotscolormapfind@transformedx=\pgfmathresult + % + % Now, we have it in [0,1000]. Find the correct interval: + % In principle, we could easily find the correct interval. But the + % native approach has one distinct disadvantage: we will never + % assign the rightmost color unless #4=1000! That means that our + % colormap is not used entirely. + % + % I decided to enlarge the colormap artificially such that the + % rightmost color receives its own interval. + % + % To this end, I recompute the coordinates at which colors "live". + % The operations sounds more involved than it is: I simply need a NEW mesh width locally + % inside of this function. The new mesh width H can be computed as + % follows, assuming that the OLD colormap has mesh width h. + % + % H := 1000/ (N-1) + % + % N := n+1 + % n := 1000/h + 1 = \pgfplotscolormapsizeof{#5} + % + % what I really need is: + % 1/H = N/1000 = (1000 h^{-1} +1)/ 1000 = h^{-1} + 1/1000 + % + % compute 1/H here: + \pgfmathadd@{\csname pgfpl@cm@#5@invh\endcsname}{0.001}% + \let\pgfplots@piecewiseconst@invh=\pgfmathresult% + \pgfmathmultiply@{\pgfplotscolormapfind@transformedx}{\pgfplots@piecewiseconst@invh}% + \let\pgfplotscolormapfind@transformedx@divh=\pgfmathresult + \expandafter\pgfmathfloor@\expandafter{\pgfmathresult}% + % assign \pgfplotscolormapfind@intervalno := \pgfmathresult + % without '.0' suffix: + \def\pgfplots@discardperiod##1.##2\relax{\def\pgfplotscolormapfind@intervalno{##1}}% + \expandafter\pgfplots@discardperiod\pgfmathresult\relax + % Step 2: interpolate the desired RGB value using vector valued + % interpolation on the identified interval. + \c@pgf@counta=\pgfplotscolormapfind@intervalno\relax + % + \ifnum\c@pgf@counta=\pgfplotscolormapsizeof{#5}\relax + % we have artificially increased the "h" (see the comments + % above) -- meaning that this 'if' can happen. + % ->Map the rightmost point to the rightmost interval: + \advance\c@pgf@counta by-1 + \fi + % +%\message{mapping [#1,#2] -> [0,\pgfplotscolormaprange] yielded phi(#4) = \pgfplotscolormapfind@transformedx, situated in interval no \the\c@pgf@counta.^^J}% + \pgfplotsarrayselect\c@pgf@counta\of{pgfpl@cm@#5}\to\pgfplotscolormapfind@rgb@LEFT + \let\pgfmathresult=\pgfplotscolormapfind@rgb@LEFT + \pgfmath@smuggleone\pgfmathresult + \endgroup +}% + + % Performs a direct color access into color map '#2' using an index % '#1'. % @@ -760,7 +1206,8 @@ \endgroup } -% Invokes either \pgfplotscolormapfind or \pgfplotscolormapgetindex, +% Invokes one of \pgfplotscolormapfind, +% \pgfplotscolormapfindpiecewiseconst, or \pgfplotscolormapgetindex, % depending on the value of '/pgfplots/colormap access'. \def\pgfplotscolormapaccess[#1:#2]{% \pgfutil@ifnextchar[{% @@ -771,9 +1218,16 @@ } \def\pgfplotscolormapaccess@precomputed[#1:#2][#3]#4#5{% \if m\pgfplots@colormap@access + % colormap access=map \pgfplotscolormapfind@precomputed[#1:#2][#3]{#4}{#5}% \else - \pgfplotscolormapgetindex{#4}{#5}% + \if c\pgfplots@colormap@access + % colormap access=piecewise constant + \pgfplotscolormapfindpiecewiseconst@precomputed[#1:#2][#3]{#4}{#5}% + \else + % colormap access=direct + \pgfplotscolormapgetindex{#4}{#5}% + \fi \fi }% @@ -782,6 +1236,7 @@ % ATTENTION: replicated in pgfplots.code.tex : \pgfplotscreatecolormap{hot}{color(0cm)=(blue); color(1cm)=(yellow); color(2cm)=(orange); color(3cm)=(red)} + \def\pgfplotspointmetatransformedrange{0:1000} % Defines the 'mapped color' on the basis of diff --git a/Master/texmf-dist/tex/generic/pgfplots/util/pgfplotsutil.code.tex b/Master/texmf-dist/tex/generic/pgfplots/util/pgfplotsutil.code.tex index 8af2ed312c6..ad8f8bd36a9 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/util/pgfplotsutil.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/util/pgfplotsutil.code.tex @@ -1,3 +1,6 @@ +% +% +% %-------------------------------------------- % % Package pgfplots @@ -522,7 +525,9 @@ % % This is the (accidentally) the same as \pgfplotsforeachentryinCSV. \long\def\pgfplotsutilforeachcommasep#1\as#2#3{% - \pgfplotsforeachentryinCSVisterminated@loop{#2}{#3}#1,\pgfplots@EOI + \pgfplots@for@reset@break{% + \pgfplotsforeachentryinCSVisterminated@loop{#2}{#3}#1,\pgfplots@EOI + }% }% % Usage: @@ -538,7 +543,9 @@ % @see \pgfplotsforeachungrouped % This loop can be nested. \long\def\pgfplotsforeachentryinCSV#1#2#3{% - \pgfplotsforeachentryinCSVisterminated@loop{#1}{#3}#2,\pgfplots@EOI + \pgfplots@for@reset@break{% + \pgfplotsforeachentryinCSVisterminated@loop{#1}{#3}#2,\pgfplots@EOI + }% }% % A variant of \pgfplotsforeachentryinCSV where a trailing comma % indicates the end of input. @@ -551,7 +558,9 @@ % % This loop can be nested. \long\def\pgfplotsforeachentryinCSVisterminated#1#2#3{% - \pgfplotsforeachentryinCSVisterminated@loop{#1}{#3}#2\pgfplots@EOI + \pgfplots@for@reset@break{% + \pgfplotsforeachentryinCSVisterminated@loop{#1}{#3}#2\pgfplots@EOI + }% }% % #1 : the loop macro % #2 : the loop BODY @@ -567,7 +576,12 @@ \long\def\pgfplotsforeachentryinCSV@next#1#2#3,{% \def#1{#3}% #2\relax - \pgfplotsforeachentryinCSVisterminated@loop{#1}{#2}% + \ifpgffor@continue + \expandafter\pgfplotsforeachentryinCSVisterminated@loop + \else + \expandafter\pgfplots@gobble@until@EOI + \fi + {#1}{#2}% }% @@ -606,22 +620,38 @@ \pgfplots@error{Found unexpected characters: expected 'in '.}% }% } + +\long\def\pgfplots@for@reset@break#1{% + \ifpgffor@continue + \pgffor@continuetrue + #1\relax + \pgffor@continuetrue + \else + \pgffor@continuetrue + #1\relax + \pgffor@continuefalse + \fi +}% + \long\def\pgfplotsforeachungrouped@@#1#2#3#4{% - \def\pgfplots@foreach@loc@TMPa{#2}% - \ifx\pgfplots@foreach@loc@TMPa\pgfutil@empty - \pgfplotsforeachungrouped@isuniform{#3}% - \ifpgfplots@loc@tmp - % special handling: - % \foreach #1 in {a,b,...,c} can be improved: - \pgfplotsforeachungroupeduniform@{#1}#3\relax{#4}% + \pgfplots@for@reset@break{% + % + \def\pgfplots@foreach@loc@TMPa{#2}% + \ifx\pgfplots@foreach@loc@TMPa\pgfutil@empty + \pgfplotsforeachungrouped@isuniform{#3}% + \ifpgfplots@loc@tmp + % special handling: + % \foreach #1 in {a,b,...,c} can be improved: + \pgfplotsforeachungroupeduniform@{#1}#3\relax{#4}% + \else + % invoke \foreach #1 in {#3} and transport results: + \pgfplotsforeachungroupednonuniform@#1{#3}{#4}% + \fi \else - % invoke \foreach #1 in {#3} and transport results: - \pgfplotsforeachungroupednonuniform@#1{#3}{#4}% + % invoke \foreach #1/#2 in {#3} and transport results: + \pgfplotsforeachungroupedslashed@#1/#2{#3}{#4}% \fi - \else - % invoke \foreach #1/#2 in {#3} and transport results: - \pgfplotsforeachungroupedslashed@#1/#2{#3}{#4}% - \fi + }% } \let\pgfplots@original@pgfmathadd@=\pgfmathadd@ @@ -667,10 +697,21 @@ % This here is much more accurate and does not suffer from the % numerical stability issues of the other loop. % -% TO DO: test it (optimize it?) and enable it for some future compat=<version> -% switch! -\long\def\pgfplotsforeachungroupeduniform@loop@mathengine@PRECISE@CURRENTLY@UNUSED@#1#2#3#4#5#6#7{% - \pgfmathparse{#2+#7*#5}% is this significantly slower than the direct calls? +% #1: comparison fct +% #2: lower limit +% #3: upper limit +% #4: the loop macro name +% #5: h +% #6: code to invoke +% #7: the loop variable (number samples) +\long\def\pgfplotsforeachungroupeduniform@loop@mathengine@precise#1#2#3#4#5#6#7{% + \pgflibraryfpuifactive{% + \pgfmathfloatparsenumber{#7}% + }{% + \edef\pgfmathresult{#7}% + }% + \expandafter\pgfmathmultiply@\expandafter{\pgfmathresult}{#5}% + \expandafter\pgfmathadd@\expandafter{\pgfmathresult}{#2}% \let#4=\pgfmathresult #1{#4}{#3}% substitute this by integer arithmetics \ifdim\pgfmathresult pt=0pt % @@ -695,32 +736,37 @@ \expandafter\pgfplots@loc@TMPa \fi }% -\long\def\pgfplotsforeachungroupeduniform@loop@mathengine#1#2#3#4#5#6#7{% +\long\def\pgfplotsforeachungroupeduniform@loop@mathengine@legacy#1#2#3#4#5#6#7{% #1{#2}{#3}% - \ifdim\pgfmathresult pt=0pt - \pgfutil@in@{.0\relax}{#2\relax}% - \ifpgfutil@in@ - \def\pgfplotsforeach@loc@TMP##1.0\relax{% - \def#4{##1}% - }% - \pgfplotsforeach@loc@TMP#2\relax - \else - \def#4{#2}% + \ifpgffor@continue + \ifdim\pgfmathresult pt=0pt + \pgfutil@in@{.0\relax}{#2\relax}% + \ifpgfutil@in@ + \def\pgfplotsforeach@loc@TMP##1.0\relax{% + \def#4{##1}% + }% + \pgfplotsforeach@loc@TMP#2\relax + \else + \def#4{#2}% + \fi + #6\relax + \pgfmathadd@{#2}{#5}% + \t@pgfplots@toka={{#1}}% + \t@pgfplots@tokb=\expandafter{\pgfmathresult}% + \t@pgfplots@tokc={{#3}{#4}{#5}{#6}{--}}% + % loop! + \edef\pgfplots@loc@TMPa{\noexpand\pgfplotsforeachungroupeduniform@loop@mathengine + \the\t@pgfplots@toka + {\the\t@pgfplots@tokb}% + \the\t@pgfplots@tokc}% + \expandafter\expandafter\expandafter\pgfplots@loc@TMPa \fi - #6\relax - \pgfmathadd@{#2}{#5}% - \t@pgfplots@toka={{#1}}% - \t@pgfplots@tokb=\expandafter{\pgfmathresult}% - \t@pgfplots@tokc={{#3}{#4}{#5}{#6}{--}}% - % loop! - \edef\pgfplots@loc@TMPa{\noexpand\pgfplotsforeachungroupeduniform@loop@mathengine - \the\t@pgfplots@toka - {\the\t@pgfplots@tokb}% - \the\t@pgfplots@tokc}% - \expandafter\pgfplots@loc@TMPa \fi }% +\let\pgfplotsforeachungroupeduniform@loop@mathengine=\pgfplotsforeachungroupeduniform@loop@mathengine@legacy + + \long\def\pgfplotsforeachungroupednonuniform@#1#2#3{% \pgfplotsapplistXXglobalnewempty \foreach\pgfplots@foreach@loc@TMPa in {#2} {% diff --git a/Master/texmf-dist/tex/latex/pgfplots/libs/tikzlibrarypgfplots.clickable.code.tex b/Master/texmf-dist/tex/latex/pgfplots/libs/tikzlibrarypgfplots.clickable.code.tex index 5fce5642009..fb0e9a0812c 100644 --- a/Master/texmf-dist/tex/latex/pgfplots/libs/tikzlibrarypgfplots.clickable.code.tex +++ b/Master/texmf-dist/tex/latex/pgfplots/libs/tikzlibrarypgfplots.clickable.code.tex @@ -441,11 +441,11 @@ var pgfplotsAxisRegistry = new Object(); pgfplotsAxisRegistry["rectangle"] = function( axisAnnotObj ) { return new PGFPlotsAxis( axisAnnotObj ); } pgfplotsAxisRegistry["ternary"] = function( axisAnnotObj ) { return new PGFPlotsTernaryAxis( axisAnnotObj ); } -function PGFPlotsClassExtend( child, super ) +function PGFPlotsClassExtend( child, superClass ) { - for (var property in super.prototype) { + for (var property in superClass.prototype) { if (typeof child.prototype[property] == "undefined") - child.prototype[property] = super.prototype[property]; + child.prototype[property] = superClass.prototype[property]; } return child; } |