%-------------------------------------------- % % 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-2013 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 . % %-------------------------------------------- \edef\pgfplots@oldcatcodesemicolon{\the\catcode`\;}% \edef\pgfplots@oldcatcodedoublequote{\the\catcode`\"}% \catcode`\;=12 \catcode`\"=12 \input pgfplotscore.code.tex \input pgfplotslibrary.code.tex \input pgfplotsoldpgfsupp_loader.code.tex \input pgfplotsutil.code.tex \input pgfplotscolormap.code.tex \input pgfplotsstackedplots.code.tex \input pgfplotsplothandlers.code.tex \input pgfplots.scaling.code.tex \input pgfplotscoordprocessing.code.tex \input pgfplots.errorbars.code.tex \input pgfplots.markers.code.tex \input pgfplotsticks.code.tex \input pgfplots.paths.code.tex \usetikzlibrary{decorations,decorations.pathmorphing,decorations.pathreplacing} % FIXME: reduce number of variables! \newif\ifpgfplots@bb@isactive \newif\ifpgfplots@xislinear \newif\ifpgfplots@has@label@information \newif\ifpgfplots@yislinear \newif\ifpgfplots@zislinear \newif\ifpgfplots@reverse@legend \newif\ifpgfplots@transpose@legend \newif\ifpgfplots@allow@reversal@of@rel@axis@cs \newif\ifpgfplots@scanline@verbose \newif\ifpgfplots@plot@graphics@autoadjustaxis \newif\ifpgfplots@scaleuniformly@warning \newif\ifpgfplots@hide@obscured@xtick \newif\ifpgfplots@hide@obscured@ytick \newif\ifpgfplots@hide@obscured@ztick \newif\ifpgfplots@enable@tick@line@clipping \newcount\pgfplots@numplots \newdimen\pgfplots@xmin@reg \newdimen\pgfplots@xmax@reg \newdimen\pgfplots@ymin@reg \newdimen\pgfplots@ymax@reg \newdimen\pgfplots@zmin@reg \newdimen\pgfplots@zmax@reg \newif\ifpgfplots@warn@for@filter@discards \newif\ifpgfplots@isuniformtick \newif\ifpgfplotsplothandlermesh@patch@type@sampling \newif\ifpgfplots@clip@limits@compatmode \newif\ifpgfplots@clip@limits@x \newif\ifpgfplots@clip@limits@y \newif\ifpgfplots@clip@limits@z \newif\ifpgfplots@clip \newif\ifpgfplots@plot@coords@mathparser \pgfplots@plot@coords@mathparsertrue \newif\ifpgfplots@enlargelimits \newif\ifpgfplots@enlargelimits@respect@figure@size \pgfplots@enlargelimits@respect@figure@sizetrue \newif\ifpgfplots@enlargelimits@rel@thresh \newif\ifpgfplots@enlargelimits@auto \newif\ifpgfplots@tickshow \newif\ifpgfplots@scatterplotenabled \newif\ifpgfplots@xminorticks \newif\ifpgfplots@xmajorticks \newif\ifpgfplots@yminorticks \newif\ifpgfplots@ymajorticks \newif\ifpgfplots@zminorticks \newif\ifpgfplots@zmajorticks \newif\ifpgfplots@xminorgrids \newif\ifpgfplots@xmajorgrids \newif\ifpgfplots@yminorgrids \newif\ifpgfplots@ymajorgrids \newif\ifpgfplots@zminorgrids \newif\ifpgfplots@zmajorgrids \newif\ifpgfplots@clip@marker@paths \newif\ifpgfplots@axis@on@top \newif\ifpgfplots@separate@axis@lines \newif\ifpgfplots@identify@log@minor@tick@pos \newif\ifpgfplots@disablelogfilter@x \newif\ifpgfplots@disablelogfilter@y \newif\ifpgfplots@disablelogfilter@z \newif\ifpgfplots@disabledatascaling \newif\ifpgfplots@hide@x \newif\ifpgfplots@hide@y \newif\ifpgfplots@hide@z \newif\ifpgfplots@shownothingof@x \newif\ifpgfplots@shownothingof@y \newif\ifpgfplots@shownothingof@z \newif\ifpgfplots@is@old@list@format \newif\ifpgfplots@errorbars@enabled \newif\ifpgfplots@scale@only@axis \newif\ifpgfplots@xticklabel@interval \newif\ifpgfplots@yticklabel@interval \newif\ifpgfplots@zticklabel@interval \newif\ifpgfplots@stacked@reverse \newif\ifpgfplots@stacked@plus \newif\ifpgfplots@stacked@ignores@zero \newif\ifpgfplots@plot@file@skipfirst \newif\ifpgfplots@threedim \newif\ifpgfplots@curplot@threedim \newif\ifpgfplotsthreedim \newif\ifpgfplots@curplot@isirrelevant \newif\ifpgfplots@colorbar \newif\ifpgfplots@deprecated@anchors \newif\ifpgfplots@translategnuplot \pgfplots@translategnuplottrue \let\pgfnodepartimagebox=\pgfnodeparttextbox \newif\ifpgfplotsplothandlermesh@internaldepth \newif\ifpgfplotsplothandlermesh@hide@refined@edges \newif\ifpgfplots@has@cell@picture \newif\ifpgfplots@substitute@pgfpoint \newif\ifpgfplots@LUA@backend@supported \newif\ifpgfplots@threedim@log@sampling \newif\ifpgfplots@collect@firstplot@astick \newif\ifpgfplots@units@use \def\pgfplots@errorbars@xdirection{0}% pre-init, see below \def\pgfplots@errorbars@ydirection{0}% \def\pgfplots@errorbars@zdirection{0}% \def\axisdefaultwidth{240pt} \def\axisdefaultheight{207pt} \def\pgfplotsifaxisthreedim#1#2{\ifpgfplots@threedim #1\else #2\fi}% \def\pgfplotsifcurplotthreedim#1#2{\ifpgfplots@curplot@threedim #1\else #2\fi}% % 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@}{% \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{% \ifpgfplots@threedim \pgfplotswarning{center lines upgrade required}\pgfeov% \global\let\pgfplots@label@upgrade@warning=\relax \fi }% % Creates a named plot cycle list. % % #1: the name of the final list. Can be used in 'cycle list name' % #2: the list entries. % It accepts the following formats: % \pgfplotscreateplotcyclelist{name}{[of colormap]}% % \pgfplotscreateplotcyclelist{name}{[of colormap=]}% % \pgfplotscreateplotcyclelist{name}{[colors of colormap={ of }]}% % \pgfplotscreateplotcyclelist{name}{[indices of colormap={ of }]}% % \pgfplotscreateplotcyclelist{name}{[* of colormap as it is also available inside of colormap definitions]} % \pgfplotscreateplotcyclelist{name}{comma-separated-list} % \pgfplotscreateplotcyclelist{name}{'\\'-separated list(requires the last item to be terminated by '\\')} \def\pgfplotscreateplotcyclelist#1#2{% \pgfplotscreateplotcyclelist@check@specials{#1}{#2}#2\pgfplots@EOI% }% \def\pgfplotscreateplotcyclelist@check@specials#1#2{% \pgfutil@ifnextchar[{% \pgfplotscreateplotcyclelist@check@specials@{#1}% }{% \pgfplotscreateplotcyclelist@check@specials@@{#1}{#2}% }% }% \def\pgfplotscreateplotcyclelist@check@specials@#1[#2]{% % the 'of colormap' feature uses the very same functionality as % the related functionality in colormap definitions. % We only replace two routines: % \begingroup \let\pgfplots@createcolormap@special@process@single@define=\pgfplots@createcolormap@special@process@single@define@CYCLE \let\pgfplots@createcolormap@special@process@list@separator=\pgfplots@createcolormap@special@process@list@separator@CYCLE \pgfplots@of@colormap@getresult{#2}% \global\let\pgfplots@glob@TMPa=\pgfplotsretval \endgroup % \t@pgfplots@tokb={#1}% \t@pgfplots@toka=\expandafter{\pgfplots@glob@TMPa}% \edef\pgfplots@loc@TMPa{\noexpand\pgfplotscreateplotcyclelist{\the\t@pgfplots@tokb}{\the\t@pgfplots@toka}}% %\message{#2->^^J \meaning\pgfplots@loc@TMPa^^J}% \pgfplots@loc@TMPa % % FIXME implement: %-------------------------------------------------- % \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 %-------------------------------------------------- % \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}% } \pgfqkeys{/pgfplots/@cycle}{% max size/.initial=80, } \pgfplotscreateplotcyclelist{black white}{% every mark/.append style={fill=gray},mark=*\\% every mark/.append style={fill=gray},mark=square*\\% every mark/.append style={fill=gray},mark=otimes*\\% mark=star\\% every mark/.append style={fill=gray},mark=diamond*\\% densely dashed,every mark/.append style={solid,fill=gray},mark=*\\% densely dashed,every mark/.append style={solid,fill=gray},mark=square*\\% densely dashed,every mark/.append style={solid,fill=gray},mark=otimes*\\% densely dashed,every mark/.append style={solid},mark=star\\% densely dashed,every mark/.append style={solid,fill=gray},mark=diamond*\\% } \pgfplotscreateplotcyclelist{color}{% blue,every mark/.append style={fill=blue!80!black},mark=*\\% red,every mark/.append style={fill=red!80!black},mark=square*\\% brown!60!black,every mark/.append style={fill=brown!80!black},mark=otimes*\\% black,mark=star\\% blue,every mark/.append style={fill=blue!80!black},mark=diamond*\\% red,densely dashed,every mark/.append style={solid,fill=red!80!black},mark=*\\% brown!60!black,densely dashed,every mark/.append style={solid,fill=brown!80!black},mark=square*\\% black,densely dashed,every mark/.append style={solid,fill=gray},mark=otimes*\\% blue,densely dashed,mark=star,every mark/.append style=solid\\% red,densely dashed,every mark/.append style={solid,fill=red!80!black},mark=diamond*\\% } \pgfplotscreateplotcyclelist{linestyles}{solid,dashed,dotted} \pgfplotscreateplotcyclelist{linestyles*}{solid,dashed,dotted,dashdotted,dashdotdotted} \pgfplotscreateplotcyclelist{color list}{red,blue,black,yellow,brown,teal,orange,violet,cyan,green!70!black,magenta,gray} \pgfplotscreateplotcyclelist{mark list}{% every mark/.append style={solid,fill=\pgfplots@mark@list@fill},mark=*\\% every mark/.append style={solid,fill=\pgfplots@mark@list@fill},mark=square*\\% every mark/.append style={solid,fill=\pgfplots@mark@list@fill},mark=triangle*\\% every mark/.append style={solid},mark=star\\% every mark/.append style={solid,fill=\pgfplots@mark@list@fill},mark=diamond*\\% every mark/.append style={solid,fill=\pgfplots@mark@list@fill!40},mark=otimes*\\% every mark/.append style={solid},mark=|\\% every mark/.append style={solid,fill=\pgfplots@mark@list@fill},mark=pentagon*\\% every mark/.append style={solid},mark=text,text mark=p\\% every mark/.append style={solid},mark=text,text mark=a\\% } \pgfplotscreateplotcyclelist{mark list*}{% every mark/.append style={solid,fill=\pgfplots@mark@list@fill},mark=*\\% every mark/.append style={solid,fill=\pgfplots@mark@list@fill},mark=square*\\% every mark/.append style={solid,fill=\pgfplots@mark@list@fill},mark=triangle*\\% every mark/.append style={solid,fill=\pgfplots@mark@list@fill},mark=halfsquare*\\% every mark/.append style={solid,fill=\pgfplots@mark@list@fill},mark=pentagon*\\% every mark/.append style={solid,fill=\pgfplots@mark@list@fill},mark=halfcircle*\\% every mark/.append style={solid,fill=\pgfplots@mark@list@fill,rotate=180},mark=halfdiamond*\\% every mark/.append style={solid,fill=\pgfplots@mark@list@fill!40},mark=otimes*\\% every mark/.append style={solid,fill=\pgfplots@mark@list@fill},mark=diamond*\\% every mark/.append style={solid,fill=\pgfplots@mark@list@fill},mark=halfsquare right*\\% 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*\\% cyan!60!black,every mark/.append style={fill=cyan!80!black},mark=otimes*\\% red!70!white,mark=star\\% lime!80!black,every mark/.append style={fill=lime},mark=diamond*\\% red,densely dashed,every mark/.append style={solid,fill=red!80!black},mark=*\\% yellow!60!black,densely dashed,every mark/.append style={solid,fill=yellow!80!black},mark=square*\\% black,every mark/.append style={solid,fill=gray},mark=otimes*\\% blue,densely dashed,mark=star,every mark/.append style=solid\\% red,densely dashed,every mark/.append style={solid,fill=red!80!black},mark=diamond*\\% } % backwards compatibility: \let\pgfcreateplotcyclelist=\pgfplotscreateplotcyclelist \pgfplots@letcsname{pgfp@cyclist@\string\blackwhiteplotspeclist @}={pgfp@cyclist@black white@}% \pgfplots@letcsname{pgfp@cyclist@\string\coloredplotspeclist @}={pgfp@cyclist@color@}% %%%% \def\pgfplotsdeprecatedstylecheck#1{% \pgfkeysifdefined{#1/.@cmd}{% \begingroup \edef\pgfkeyscurrentkey{#1}% \pgfkeyssplitpath \pgfplots@warning{Loading deprecated style option \pgfkeyscurrentpath/\pgfkeyscurrentname. Please replace '\string\tikzstyle{\pgfkeyscurrentname}' with '\string\pgfplotsset{\pgfkeyscurrentname/.style={}}' (or '\string\pgfplotsset{\pgfkeyscurrentname/.append style={}}').}% \endgroup \pgfkeysvalueof{#1/.@cmd}\pgfeov }{}% }% \def\pgfplots@scaled@ticks@setargs#1#2{% \pgfutil@in@{:}{#2}% \ifpgfutil@in@ \pgfplots@scaled@ticks@setargs@{#1}#2\pgfplots@EOI \else \expandafter\pgfutil@in@\expandafter{\pgfplots@activecolon}{#2}% \ifpgfutil@in@ \pgfplots@scaled@ticks@setargs@active{#1}#2\pgfplots@EOI \else \pgfkeysalso{/pgfplots/scaled #1 ticks/#2}% \fi \fi }% \def\pgfplots@scaled@ticks@setargs@#1#2:#3\pgfplots@EOI{% \pgfkeysalso{/pgfplots/scaled #1 ticks/#2=#3}% } { \catcode`\:=\active \gdef\pgfplots@scaled@ticks@setargs@active#1#2:#3\pgfplots@EOI{% \pgfkeysalso{/pgfplots/scaled #1 ticks/#2=#3}% } } \expandafter\def\csname pgfplots@nodesnearcoordsalign@isanchor@center\endcsname{1} \expandafter\def\csname pgfplots@nodesnearcoordsalign@isanchor@south west\endcsname{1} \expandafter\def\csname pgfplots@nodesnearcoordsalign@isanchor@south\endcsname{1} \expandafter\def\csname pgfplots@nodesnearcoordsalign@isanchor@south east\endcsname{1} \expandafter\def\csname pgfplots@nodesnearcoordsalign@isanchor@east\endcsname{1} \expandafter\def\csname pgfplots@nodesnearcoordsalign@isanchor@north east\endcsname{1} \expandafter\def\csname pgfplots@nodesnearcoordsalign@isanchor@north\endcsname{1} \expandafter\def\csname pgfplots@nodesnearcoordsalign@isanchor@north west\endcsname{1} \expandafter\def\csname pgfplots@nodesnearcoordsalign@isanchor@west\endcsname{1} \expandafter\def\csname pgfplots@nodesnearcoordsalign@isanchor@baseline\endcsname{1} % Sets the keys for /pgfplots/[xyz]ticklabel anchor. % #1: one of [xyz] % #2: the value \def\pgfplots@setticklabel@anchor@for#1#2{% \def\pgfplots@loc@TMPa{#2}% \def\pgfplots@loc@TMPb{auto}% \ifx\pgfplots@loc@TMPa\pgfplots@loc@TMPb \expandafter\def\csname pgfplots@ticklabel@anchor@#1\endcsname{0}% \else \def\pgfplots@loc@TMPb{near ticklabel}% \ifx\pgfplots@loc@TMPa\pgfplots@loc@TMPb \expandafter\def\csname pgfplots@ticklabel@anchor@#1\endcsname{1}% \else \def\pgfplots@loc@TMPb{tikz}% \ifx\pgfplots@loc@TMPa\pgfplots@loc@TMPb \expandafter\def\csname pgfplots@ticklabel@anchor@#1\endcsname{2}% \else \pgfplots@error{Sorry, I got an unexpected value for '#1ticklabel anchor': '#2'. Expected one of 'auto', 'near ticklabel' or 'tikz'.}% \fi \fi \fi }% % Does the work for '[xyz]ticklabel pos'. % % #1: the axis (x,y or z). % #2: the key argument. Accepts % 'lower', % 'upper', % 'default' -> depends on 'tick pos' % 'left' = 'lower', % 'bottom' = 'lower', % 'right' = 'upper' % 'top' = 'upper'. % \def\pgfplots@setkey@ticklabelpos#1#2{% \def\pgfplots@loc@TMPa{#2}% \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 \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 \fi \fi }% % Sets 'x dir={normal,reverse}' % #1: an axis % #2: the key's value to apply \def\pgfplots@setkey@axisdir@for#1#2{% \def\pgfplots@loc@TMPa{#2}% \def\pgfplots@loc@TMPb{normal}% \ifx\pgfplots@loc@TMPa\pgfplots@loc@TMPb \pgfkeyssetvalue{/pgfplots/#1 dir/value}{n}% \else \def\pgfplots@loc@TMPb{reverse}% \ifx\pgfplots@loc@TMPa\pgfplots@loc@TMPb \pgfkeyssetvalue{/pgfplots/#1 dir/value}{r}% \else \pgfkeyssetvalue{/pgfplots/#1 dir/value}{n}% \pgfplots@error{Sorry, the key '#1 dir' does not know what to do with '#2'... accepted values are 'normal' or 'reverse'.}% \fi \fi }% \def\pgfplots@meshmode{n}% none \def\pgfplotsplothandlermesh@flatmode{m}% mean \def\pgfplots@cycle@multi@list@EOI{\pgfplots@cycle@multi@list@EOI}% \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{% \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 % 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 \ifx\pgfplots@glob@TMPa\pgfutil@empty % create it: \pgfplotscreateplotcyclelist{/pgfplots/cycle multi list/@list\pgfplots@loc@TMPb}{#1}% \else % ok, take an existing one \expandafter\let\csname pgfp@cyclist@/pgfplots/cycle multi list/@list\pgfplots@loc@TMPb @\endcsname=\pgfplots@glob@TMPa \fi \begingroup \expandafter\pgfplotslistsize\csname pgfp@cyclist@/pgfplots/cycle multi list/@list\pgfplots@loc@TMPb @\endcsname\to\c@pgf@counta \edef\pgfmathresult{\the\c@pgf@counta}% \pgfmath@smuggleone\pgfmathresult \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}^^J}% \pgfplotsutil@advancestringcounter\pgfplots@loc@TMPb \fi % \pgfutil@ifnextchar{\pgfplots@cycle@multi@list@EOI}{% \pgfplots@cycle@multi@list@finalize }{% \pgfplots@cycle@multi@list@ }% }% \def\pgfplots@colormap@catcodemagic{colormap} \pgfplots@command@to@string\pgfplots@colormap@catcodemagic\pgfplots@colormap@catcodemagic % checks for % - % - [ of] % POSTCONDITION: % 1. pgfplots@loc@TMPa will be \pgfutil@empty if there is no such % list. % 2. \pgfplots@loc@TMPa will be \let to the list if there is one. % 3. \pgfplots@cycle@multi@list@finalize@ will contain any 'partial sublist' % commands. \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 \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 } % #1: (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@}% \t@pgfplots@tokb={#1}% \xdef\pgfplots@cycle@multi@list@finalize@{\the\t@pgfplots@toka \noexpand\pgfkeys{/pgfplots/cycle multi list/partial sublist={\pgfplots@loc@TMPb}{\the\t@pgfplots@tokb}}% }% \endgroup } \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{% % \pgfutil@in@{=}{#1}% \ifpgfutil@in@ \def\pgfplots@loc@TMPa##1=##2\pgfplots@EOI{% % remove spaces from ##1 and ##2: \pgfkeys@spdef\pgfplots@loc@TMPa{##1}% \pgfkeys@spdef\pgfplots@loc@TMPb{##2}% % % check if the argument is known: \pgfkeysifdefined{/pgfplots/point meta/\pgfplots@loc@TMPa/.@cmd}{% \def\pgfplots@loc@TMPc{% \pgfplots@invoke@pgfkeyscode{/pgfplots/point meta/\pgfplots@loc@TMPa/.@cmd}% }% \expandafter\pgfplots@loc@TMPc\expandafter{\pgfplots@loc@TMPb}% }{% % oh, then it will be a math expression. \pgfplots@invoke@pgfkeyscode{/pgfplots/point meta/expr/.@cmd}{#1}% }% }% % disassemble key'='value: \pgfplots@loc@TMPa#1\pgfplots@EOI \else % the following code allows % 'point meta=\thisrow{xcol}' even though % \thisrow might be undefined in the context where keys are set. % I convert the argument to a string. \def\pgfplots@loc@TMPa{#1}% \pgfplots@command@to@string\pgfplots@loc@TMPa\pgfplots@loc@TMPb % \pgfkeysifdefined{/pgfplots/point meta/\pgfplots@loc@TMPb/.@cmd}{% % ok, use it! \pgfplots@invoke@pgfkeyscode{/pgfplots/point meta/\pgfplots@loc@TMPb/.@cmd}{}% }{% % oh, then it will be a math expression. \pgfplots@invoke@pgfkeyscode{/pgfplots/point meta/expr/.@cmd}{#1}% }% \fi % % }% \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 % colormap access=map \expandafter\pgfplotscolormapfind\expandafter[\pgfplotspointmetatransformedrange]% {\pgfplots@color@of@colormap@value}% {\pgfplots@color@of@colormap@name}% \else \if c\pgfplots@color@of@colormap@access % colormap access=piecewise constant \expandafter\pgfplotscolormapfindpiecewiseconst\expandafter[\pgfplotspointmetatransformedrange]% {\pgfplots@color@of@colormap@value}% {\pgfplots@color@of@colormap@name}% \else % colormap access=direct \pgfplotscolormapgetindex{\pgfplots@color@of@colormap@value}{\pgfplots@color@of@colormap@name}% \fi \fi }% \def\pgfplots@createcolormap@special@process@list@separator@CYCLE{\\}% \def\pgfplots@createcolormap@special@process@single@define@CYCLE{% \edef\pgfplotsretval{% /tikz/color/.define=% {.}% {\csname pgfpl@cm@\pgfkeysvalueof{/pgfplots/colormap name}@colspace\endcsname}% {\pgfmathresult},% /tikz/color=.,% }% }% \def\pgfplots@color@of@colormap#1{% \begingroup \def\pgfplots@createcolormap@special@process@single@define{% \edef\pgfplotsretval{% \noexpand\pgfutil@definecolor{.}{\csname pgfpl@cm@\pgfkeysvalueof{/pgfplots/colormap name}@colspace\endcsname}{\pgfmathresult}% }% \let\pgfplots@createcolormap@special@process@single@define=\relax }% \pgfplots@of@colormap@getresult{#1}% \global\let\pgfplots@glob@TMPa=\pgfplotsretval \endgroup \pgfplots@glob@TMPa \tikzset{color=.}% %\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 \pgfkeys{% % /.define layer set={}{