summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pgfplots/pgfplots.code.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgfplots/pgfplots.code.tex')
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/pgfplots.code.tex321
1 files changed, 277 insertions, 44 deletions
diff --git a/Master/texmf-dist/tex/generic/pgfplots/pgfplots.code.tex b/Master/texmf-dist/tex/generic/pgfplots/pgfplots.code.tex
index 38c2f5c3578..bbf7d10db86 100644
--- a/Master/texmf-dist/tex/generic/pgfplots/pgfplots.code.tex
+++ b/Master/texmf-dist/tex/generic/pgfplots/pgfplots.code.tex
@@ -58,6 +58,10 @@
\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
@@ -127,6 +131,7 @@
\newif\ifpgfplotsplothandlermesh@internaldepth
\newif\ifpgfplotsplothandlermesh@hide@refined@edges
\newif\ifpgfplots@has@cell@picture
+\newif\ifpgfplots@substitute@pgfpoint
\newif\ifpgfplots@collect@firstplot@astick
\newif\ifpgfplots@units@use
@@ -611,6 +616,11 @@
/pgfplots/every axis plot/.belongs to family=/pgfplots/style commands,
/pgfplots/every axis plot post/.style={},
/pgfplots/every axis plot post/.append code={\pgfplotsdeprecatedstylecheck{/tikz/every axis plot}},
+ /pgfplots/trig format plots/.is choice,
+ /pgfplots/trig format plots/deg/.code={\def\pgfplots@set@trig@format@plots{\pgfkeys{/pgf/trig format=deg}}},%
+ /pgfplots/trig format plots/rad/.code={\def\pgfplots@set@trig@format@plots{\pgfkeys{/pgf/trig format=rad}}},%
+ /pgfplots/trig format plots/default/.code={\let\pgfplots@set@trig@format@plots=\relax},%
+ /pgfplots/trig format plots/default,
/pgfplots/no marks/.style={/pgfplots/no markers},
/pgfplots/no markers/.style={/pgfplots/every axis plot post/.append style={mark=none}},
/pgfplots/every axis label/.style={},
@@ -774,6 +784,7 @@
/pgfplots/every x tick label/.belongs to family=/pgfplots/style commands,
/pgfplots/every extra x tick/.style={
/pgfplots/log identify minor tick positions=true,
+ /pgfplots/hide obscured x ticks=false,
},
/pgfplots/every extra x tick/.append code={\pgfplotsdeprecatedstylecheck{/tikz/every extra x tick}},
/pgfplots/every extra x tick/.belongs to family=/pgfplots/style commands,
@@ -795,6 +806,7 @@
/pgfplots/every y tick label/.belongs to family=/pgfplots/style commands,
/pgfplots/every extra y tick/.style={
/pgfplots/log identify minor tick positions=true,
+ /pgfplots/hide obscured y ticks=false,
},
/pgfplots/every extra y tick/.append code={\pgfplotsdeprecatedstylecheck{/tikz/every extra y tick}},
/pgfplots/every extra y tick/.belongs to family=/pgfplots/style commands,
@@ -810,6 +822,7 @@
/pgfplots/every z tick label/.belongs to family=/pgfplots/style commands,
/pgfplots/every extra z tick/.style={
/pgfplots/log identify minor tick positions=true,
+ /pgfplots/hide obscured z ticks=false,
},
/pgfplots/every extra z tick/.append code={\pgfplotsdeprecatedstylecheck{/tikz/every extra z tick}},
/pgfplots/every extra z tick/.belongs to family=/pgfplots/style commands,
@@ -1765,6 +1778,16 @@
/pgfplots/stack dir=plus,
/pgfplots/stacked ignores zero/.is if=pgfplots@stacked@ignores@zero,
/pgfplots/stacked ignores zero/.default=true,
+ %
+ % The purpose of the following key is to control the case 'stacked ignores zero=true'
+ % (it has no effect if 'stacked ignores zero=false').
+ % The feature "stacked ignores zero" is active *if and only if*
+ % 1. stacked ignores zero=true and
+ % 2. stacked ignores zero/<phasename>=true
+ % Valid <phasename>s are 'default', 'markers', 'errorbars'.
+ /pgfplots/stacked ignores zero/\pgfplotsaxis@visphase@name@default/.initial=true,
+ /pgfplots/stacked ignores zero/\pgfplotsaxis@visphase@name@markers/.initial=true,
+ /pgfplots/stacked ignores zero/\pgfplotsaxis@visphase@name@errorbars/.initial=false,
/pgfplots/filter discard warning/.is if=pgfplots@warn@for@filter@discards,
/pgfplots/filter discard warning=true,
/pgfplots/pre filter/.code={},
@@ -2169,8 +2192,8 @@
/pgfplots/major y grid style/.code={%
\pgfkeysalso{/pgfplots/every major y grid/.append style={#1}}%
},
- /pgfplots/y grid style/.belongs to family=/pgfplots/style commands,
- /pgfplots/y grid style/.code={%
+ /pgfplots/z grid style/.belongs to family=/pgfplots/style commands,
+ /pgfplots/z grid style/.code={%
\pgfkeysalso{/pgfplots/every axis z grid/.append style={#1}}%
},
/pgfplots/minor z grid style/.belongs to family=/pgfplots/style commands,
@@ -2536,6 +2559,14 @@
},%
/pgfplots/axis z line/none/.style ={axis z line*/none,hide z axis},
},
+ %
+ /pgfplots/hide obscured x ticks/.is if=pgfplots@hide@obscured@xtick,
+ /pgfplots/hide obscured y ticks/.is if=pgfplots@hide@obscured@ytick,
+ /pgfplots/hide obscured z ticks/.is if=pgfplots@hide@obscured@ztick,
+ /pgfplots/hide obscured x ticks=true,
+ /pgfplots/hide obscured y ticks=true,
+ /pgfplots/hide obscured z ticks=true,
+ %
/pgfplots/3d box/.is choice,
/pgfplots/3d box/background/.code ={\def\pgfplots@threedimbox@choice{0}},%
/pgfplots/3d box/complete/.code ={\def\pgfplots@threedimbox@choice{1}},%
@@ -3329,22 +3360,38 @@
/pgfplots/z coord trafo/.code={},
/pgfplots/z coord inv trafo/.code={},
%
+ /pgfplots/symbolic coords/magic prefix/.initial={[normalized]},
% #1 : the coordinate in question. Can be x,y,z, or even hist/data
% or similar constructs.
% #2 : {<symbol1>,<symbol2>,....<symboln>}
/pgfplots/symbolic coords/.code 2 args={%
\expandafter\pgfplotsarraynew\csname pgfplots@symbolic@coords@#1@inverse\endcsname{#2}%
\expandafter\pgfplotsarrayforeachungrouped\csname pgfplots@symbolic@coords@#1@inverse\endcsname\as\pgfplots@loc@TMPa{%
+ \pgfplots@command@to@string\pgfplots@loc@TMPa\pgfplots@loc@TMPa
+% \message{Defining symb coords \pgfplots@loc@TMPa^^J}%
\expandafter\edef\csname pgfp@symb@coords@#1@\pgfplots@loc@TMPa\endcsname{\pgfplotsarrayforeachindex}%
}%
+ \pgfkeysgetvalue{/pgfplots/symbolic coords/magic prefix}\pgfplots@symb@magic@prefix
\pgfkeysdef{/pgfplots/#1 coord trafo}{%
- \pgfutil@ifundefined{pgfp@symb@coords@#1@##1}{%
- \pgfplots@error{Sorry, the input coordinate `##1' has not been defined with 'symbolic #1 coords={#2}... Maybe it has been misspelled?}%
- \def\pgfmathresult{0}%
+ \expandafter\pgfplotsutilifstartswith\expandafter{\pgfplots@symb@magic@prefix}{##1}{%
+ % Ah - something like [normalized]1.5
+ % we need to assign the suffix 1.5:
+ \edef\pgfmathresult{\pgfplotsretval}%
}{%
- \edef\pgfmathresult{\csname pgfp@symb@coords@#1@##1\endcsname}%
+ % ensure that special (unexpandable) characters are
+ % preserved:
+ \def\pgfplots@loc@TMPa{##1}%
+ \pgfplots@command@to@string\pgfplots@loc@TMPa\pgfplots@loc@TMPa
+ \pgfutil@ifundefined{pgfp@symb@coords@#1@\pgfplots@loc@TMPa}{%
+ \t@pgfplots@toka={##1}%
+ \t@pgfplots@tokb={#2}%
+ \pgfplots@error{Sorry, the input coordinate `\the\t@pgfplots@toka' has not been defined with 'symbolic #1 coords={\the\t@pgfplots@tokb}... Maybe it has been misspelled? Or did you mean something like \pgfplots@symb@magic@prefix\the\t@pgfplots@toka?}%
+ \def\pgfmathresult{0}%
+ }{%
+ \edef\pgfmathresult{\csname pgfp@symb@coords@#1@\pgfplots@loc@TMPa\endcsname}%
+ }%
}%
-%\message{#1 coord trafo{##1} --> \pgfmathresult^^J}%
+%\message{#1 coord trafo{\pgfplots@loc@TMPa} --> \pgfmathresult^^J}%
}%
\pgfkeysdef{/pgfplots/#1 coord inv trafo}{%
\begingroup
@@ -3364,13 +3411,13 @@
\fi
\fi
\expandafter\pgfplotsarrayselect\expandafter\count\expandafter0\expandafter\of\csname pgfplots@symbolic@coords@#1@inverse\endcsname\to\pgfmathresult
-%\message{#1 coord inv trafo{##1} -->\the\count0 --> \pgfmathresult^^J}%
+%\message{#1 coord inv trafo{##1} -->\the\count0 --> \meaning\pgfmathresult^^J}%
\pgfmath@smuggleone\pgfmathresult
\endgroup
}%
\pgfkeysifdefined{/pgfplots/#1ticklabel/.@cmd}{%
\pgfkeysalso{%
- /pgfplots/#1ticklabel={\tick},%
+ /pgfplots/#1ticklabel={\pgfplots@ticklabel@typeset@arg\tick},%
/pgfplots/scaled #1 ticks=false,%
/pgfplots/plot coordinates/math parser=false,%
}%
@@ -3629,6 +3676,7 @@
/pgfplots/cube/size x=\pgfplotmarksize,
/pgfplots/cube/size y=\pgfplotmarksize,
/pgfplots/cube/size z=\pgfplotmarksize,
+ /pgfplots/trig format/.style={/pgf/trig format={#1}},
/pgfplots/xtick placement tolerance/.initial=0.05pt,
/pgfplots/ytick placement tolerance/.initial=0.05pt,
/pgfplots/ztick placement tolerance/.initial=0.05pt,
@@ -3644,6 +3692,7 @@
/pgfplots/compat/anchors/1.8/.style= {/pgfplots/compat/anchors/1.3},%
/pgfplots/compat/anchors/1.9/.style= {/pgfplots/compat/anchors/1.3},%
/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/newest/.style= {/pgfplots/compat/anchors/1.3},%
/pgfplots/compat/anchors/default/.style={/pgfplots/compat/anchors/1.3},%
%
@@ -3658,6 +3707,7 @@
/pgfplots/compat/empty line/1.8/.style= {/pgfplots/compat/empty line/1.4},%
/pgfplots/compat/empty line/1.9/.style= {/pgfplots/compat/empty line/1.4},%
/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/newest/.style= {/pgfplots/compat/empty line/1.4},%
/pgfplots/compat/empty line/default/.style= {/pgfplots/compat/empty line/1.4},%
%
@@ -3672,8 +3722,24 @@
/pgfplots/compat/path replacement/1.8/.style= {/pgfplots/compat/path replacement/1.5.1},
/pgfplots/compat/path replacement/1.9/.style= {/pgfplots/compat/path replacement/1.5.1},
/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/newest/.style= {/pgfplots/compat/path replacement/1.5.1},%
/pgfplots/compat/path replacement/default/.style= {/pgfplots/compat/path replacement/pre 1.3},%
+ %
+ /pgfplots/compat/pgfpoint substitution/.is choice,
+ /pgfplots/compat/pgfpoint substitution/pre 1.3/.code= {\pgfplots@substitute@pgfpointfalse},
+ /pgfplots/compat/pgfpoint substitution/1.3/.style= {/pgfplots/compat/pgfpoint substitution/pre 1.3},%
+ /pgfplots/compat/pgfpoint substitution/1.4/.style= {/pgfplots/compat/pgfpoint substitution/pre 1.3},
+ /pgfplots/compat/pgfpoint substitution/1.5/.style= {/pgfplots/compat/pgfpoint substitution/pre 1.3},%
+ /pgfplots/compat/pgfpoint substitution/1.5.1/.style= {/pgfplots/compat/pgfpoint substitution/pre 1.3},%
+ /pgfplots/compat/pgfpoint substitution/1.6/.style= {/pgfplots/compat/pgfpoint substitution/pre 1.3},
+ /pgfplots/compat/pgfpoint substitution/1.7/.style= {/pgfplots/compat/pgfpoint substitution/pre 1.3},
+ /pgfplots/compat/pgfpoint substitution/1.8/.style= {/pgfplots/compat/pgfpoint substitution/pre 1.3},
+ /pgfplots/compat/pgfpoint substitution/1.9/.style= {/pgfplots/compat/pgfpoint substitution/pre 1.3},
+ /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/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,
%
/pgfplots/compat/labels/.is choice,
@@ -3696,6 +3762,7 @@
},%
/pgfplots/compat/labels/1.9/.style= {/pgfplots/compat/labels/1.8},%
/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/newest/.style= {/pgfplots/compat/labels/1.8},%
/pgfplots/compat/labels/default/.style= {/pgfplots/compat/labels/pre 1.3},% maintain backwards compatibility
%
@@ -3734,6 +3801,7 @@
},
},%
/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/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,
@@ -3763,6 +3831,7 @@
/pgfplots/compat/scaling/1.8/.style={/pgfplots/compat/scaling/1.6},
/pgfplots/compat/scaling/1.9/.style={/pgfplots/compat/scaling/1.6},
/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/newest/.style={/pgfplots/compat/scaling/1.6},
/pgfplots/compat/scaling/default/.style={/pgfplots/compat/scaling/1.4},
%
@@ -3777,6 +3846,7 @@
/pgfplots/compat/scale mode/1.8/.style={/pgfplots/compat/scale mode/1.6},
/pgfplots/compat/scale mode/1.9/.style={/pgfplots/compat/scale mode/1.6},
/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/newest/.style={/pgfplots/compat/scale mode/1.6},
/pgfplots/compat/scale mode/default/.style={/pgfplots/compat/scale mode/1.5},
%
@@ -3792,6 +3862,7 @@
/pgfplots/compat/plot3graphics/1.8/.style= {/pgfplots/compat/plot3graphics/1.6},%
/pgfplots/compat/plot3graphics/1.9/.style= {/pgfplots/compat/plot3graphics/1.6},%
/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/newest/.style= {/pgfplots/compat/plot3graphics/1.6},%
/pgfplots/compat/plot3graphics/default/.style= {/pgfplots/compat/plot3graphics/1.5},%
%
@@ -3833,6 +3904,7 @@
/pgfplots/compat/bar width by units/1.8/.style= {/pgfplots/compat/bar width by units/1.7},
/pgfplots/compat/bar width by units/1.9/.style= {/pgfplots/compat/bar width by units/1.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/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},
%
@@ -3847,27 +3919,41 @@
/pgfplots/compat/BB/1.8/.style= {/pgfplots/clip bounding box=upper bound},%
/pgfplots/compat/BB/1.9/.style= {/pgfplots/compat/BB/1.8},%
/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/newest/.style= {/pgfplots/compat/BB/1.8},
/pgfplots/compat/BB/default/.style={/pgfplots/compat/BB/pre 1.3},
%
/pgfplots/compat/general/.is choice,
- /pgfplots/compat/general/pre 1.3/.style={/pgfplots/log origin=infty},%
+ /pgfplots/compat/general/pre 1.3/.style={/pgfplots/log origin=infty,/pgfplots/enable tick line clipping=true},%
/pgfplots/compat/general/1.3/.style= {/pgfplots/compat/general/pre 1.3},
/pgfplots/compat/general/1.4/.style= {/pgfplots/compat/general/pre 1.3},%
- /pgfplots/compat/general/1.5/.style= {/pgfplots/log origin=0},%
+ /pgfplots/compat/general/1.5/.style= {/pgfplots/log origin=0,/pgfplots/enable tick line clipping=true},%
/pgfplots/compat/general/1.5.1/.style= {/pgfplots/compat/general/1.5},%
/pgfplots/compat/general/1.6/.style= {/pgfplots/compat/general/1.5},%
/pgfplots/compat/general/1.7/.style= {/pgfplots/compat/general/1.5},%
/pgfplots/compat/general/1.8/.style= {/pgfplots/compat/general/1.5},%
/pgfplots/compat/general/1.9/.style= {/pgfplots/compat/general/1.5},%
/pgfplots/compat/general/1.10/.style= {/pgfplots/compat/general/1.5},%
- /pgfplots/compat/general/newest/.style= {/pgfplots/compat/general/1.8},
- /pgfplots/compat/general/default/.style={/pgfplots/compat/general/1.5},
+ /pgfplots/compat/general/1.11/.style= {/pgfplots/compat/general/1.5,/pgfplots/enable tick line clipping=false},%
+ /pgfplots/compat/general/newest/.style= {/pgfplots/compat/general/1.11},
+ /pgfplots/compat/general/default/.style={/pgfplots/compat/general/1.11},
+ %
+ /pgfplots/enable tick line clipping/.is if=pgfplots@enable@tick@line@clipping,
+ /pgfplots/enable tick line clipping/.default=true,
+ %
+ /pgfplots/default typeset ticklabel/.style={
+ /pgfplots/typeset ticklabel/.code={##1},
+ },
+ /pgfplots/default typeset ticklabel,
+ /pgfplots/typeset ticklabels with strut/.style={
+ /pgfplots/typeset ticklabel/.code={\strut ##1},
+ },
+ %
%
/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.10, % this is OK since 1.10 did not change anything.
+ /pgfplots/compat/mostrecent/.initial=1.11,
/pgfplots/compat/.style={%
% ATTENTION: *every* /pgfplots/compat/ setting needs to accept
% the same choices due to this construction:
@@ -3883,6 +3969,7 @@
/pgfplots/compat/plot3graphics=#1,%
/pgfplots/compat/bar width by units=#1,%
/pgfplots/compat/bar nodes=#1,%
+ /pgfplots/compat/pgfpoint substitution=#1,%
},%
/pgfplots/compat/.default=pre 1.3,% this is used if you type '\pgfplotsset{compat}' without value
/pgfplots/compat=default,% this is the initial config.
@@ -3953,6 +4040,8 @@
},%
}
+\def\pgfplots@ticklabel@typeset@arg#1{\pgfkeysvalueof{/pgfplots/typeset ticklabel/.@cmd}{#1}\pgfeov}%
+
% backwards compatibility:
\def\pgfplots@tickwidth{\pgfkeysvalueof{/pgfplots/major tick length}}%
\def\pgfplots@subtickwidth{\pgfkeysvalueof{/pgfplots/minor tick length}}%
@@ -8495,6 +8584,34 @@
\tikzdeclarecoordinatesystem{axis}{\edef\pgfplots@loc@TMPa{#1}\expandafter\pgfplots@evalute@tikz@coord@system@interface\pgfplots@loc@TMPa,\pgfplots@coord@end}
\def\pgfplotspointaxisxy#1#2{\pgfplots@evalute@tikz@coord@system@interface{#1},{#2},\pgfplots@coord@end}%
\def\pgfplotspointaxisxyz#1#2#3{\pgfplots@evalute@tikz@coord@system@interface{#1},{#2},{#3},\pgfplots@coord@end}%
+\def\pgfplotsqpointaxisxy#1#2{%
+ \edef\pgfplotspointaxis@restore{%
+ \ifpgfplots@plot@coords@mathparser
+ \noexpand\pgfplots@plot@coords@mathparsertrue
+ \else
+ \noexpand\pgfplots@plot@coords@mathparserfalse
+ \fi
+ }%
+ \pgfplots@plot@coords@mathparserfalse
+ %
+ \pgfplotspointaxisxy{#1}{#2}%
+ %
+ \pgfplotspointaxis@restore
+}
+\def\pgfplotsqpointaxisxyz#1#2#3{%
+ \edef\pgfplotspointaxis@restore{%
+ \ifpgfplots@plot@coords@mathparser
+ \noexpand\pgfplots@plot@coords@mathparsertrue
+ \else
+ \noexpand\pgfplots@plot@coords@mathparserfalse
+ \fi
+ }%
+ \pgfplots@plot@coords@mathparserfalse
+ %
+ \pgfplotspointaxisxyz{#1}{#2}{#3}%
+ %
+ \pgfplotspointaxis@restore
+}
% definition of 'normalized axis cs':
\tikzdeclarecoordinatesystem{normalized axis}{\edef\pgfplots@loc@TMPa{#1}\expandafter\pgfplots@evalute@tikz@coord@system@interface@normalized\pgfplots@loc@TMPa,\pgfplots@coord@end}
@@ -8548,10 +8665,10 @@
% trafo (typically an empty string)
\long\def\pgfplots@evalute@tikz@coord@system@interface@for[#1]#2#3{%
\pgfkeysgetvalue{/pgfplots/#2 coord trafo/.@cmd}\pgfplots@loc@TMPc
- \edef\pgfmathresult{#3}%
\ifx\pgfplots@loc@TMPc\pgfplots@empty@command@key
+ \edef\pgfmathresult{#3}% do not expand it - might contain unexpandable input for coord trafo.
\else
- \expandafter\pgfplots@loc@TMPc\expandafter{\pgfmathresult}\pgfeov
+ \pgfplots@loc@TMPc{#3}\pgfeov
\fi
\ifpgfplots@plot@coords@mathparser
\pgfplotscoordmath{default}{parse}{\pgfmathresult}%
@@ -8629,14 +8746,17 @@
% Defines \pgfplots@evaluate@tikz@coord@[xyz]
\def\pgfplots@evalute@tikz@coord@system@interface@tocoords[#1]{%
- \pgfplots@evalute@tikz@coord@system@interface@for[#1]{x}{\pgfplots@evaluate@tikz@coord@x}%
+ \def\pgfplots@evalute@tikz@coord@@##1##2{%
+ \pgfplots@evalute@tikz@coord@system@interface@for[#1]{##2}{##1}%
+ }%
+ \expandafter\pgfplots@evalute@tikz@coord@@\expandafter{\pgfplots@evaluate@tikz@coord@x}{x}%
\let\pgfplots@evaluate@tikz@coord@x=\pgfmathresult
- \pgfplots@evalute@tikz@coord@system@interface@for[#1]{y}{\pgfplots@evaluate@tikz@coord@y}%
+ \expandafter\pgfplots@evalute@tikz@coord@@\expandafter{\pgfplots@evaluate@tikz@coord@y}{y}%
\let\pgfplots@evaluate@tikz@coord@y=\pgfmathresult
%
\ifx\pgfplots@evaluate@tikz@coord@z\pgfutil@empty
\else
- \pgfplots@evalute@tikz@coord@system@interface@for[#1]{z}{\pgfplots@evaluate@tikz@coord@z}%
+ \expandafter\pgfplots@evalute@tikz@coord@@\expandafter{\pgfplots@evaluate@tikz@coord@z}{z}%
\let\pgfplots@evaluate@tikz@coord@z=\pgfmathresult
\fi
}%
@@ -8744,8 +8864,15 @@
\else
% Apply external coordinate trafo to all input values:
\expandafter\edef\csname pgfplots@prepare@#1coord\endcsname##1{%
- \noexpand\edef\noexpand\pgfmathresult{##1}%
+ % do not expand it here - might contain unexpandable
+ % material which is processed by the #1 coord trafo:
+ % FIXME : this might produce an endless loop if ##1 = \pgfmathresult!
+ \noexpand\def\noexpand\pgfmathresult{##1}%
+ % this becomes
\expandafter\noexpand\csname pgfplots@highlevel@trafo@#1\endcsname{##1}\noexpand\pgfeov
+ %
+ % ensure that it is expanded.
+ \noexpand\edef\noexpand\pgfmathresult{\noexpand\pgfmathresult}%
}%
%
% The transformation is now \pgfplots@loc@TMPc
@@ -9517,6 +9644,10 @@
\pgfkeyssetfamily{/pgf/bar width}{/pgfplots}%
\pgfkeyssetfamily{/pgf/bar shift}{/pgfplots}%
%
+ \pgfkeyssetfamily{/pgf/trig format}{/pgfplots}%
+ \pgfkeyssetfamily{/pgf/trig format/deg}{/pgfplots}%
+ \pgfkeyssetfamily{/pgf/trig format/rad}{/pgfplots}%
+ %
\pgfkeysinstallkeyfilterhandler{/pgf/key filter handlers/append filtered to}{\pgfplots@rmopts}%
%
\let\tikz@alias=\pgfutil@empty
@@ -9572,19 +9703,7 @@
\pgfkeysdeactivatefamily{/pgfplots/naming commands}%
\pgfkeysdeactivatefamily{/pgfplots/shared with tikz}%
%
- \ifpgfplots@axis@on@top
- \ifpgfplots@layered@graphics
- \pgfplots@log3{the combination of 'axis on top' and 'activate layers' implies 'set layers=axis on top'. Deactivate 'axis on top' if you want other layers.}%
- \pgfplotsset{set layers=axis on top}%
- \fi
- \fi
- % retrieve layer configurations (the one set with 'set layers*').
- \pgfkeysgetvalue{/pgfplots/@set layers arg}\pgfplots@loc@TMPa
- \ifx\pgfplots@loc@TMPa\pgfutil@empty
- \else
- % ah, yes: then set its style:
- \pgfqkeys{/pgfplots/layers}{\pgfplots@loc@TMPa}% note that this here should not need key filtering; it adjusts only styles (hopefully ;) )
- \fi
+ \pgfplots@set@options@of@layered@graphics
%
% Now, any 'name' and 'alias' options have been processed.
%
@@ -9740,6 +9859,22 @@
\pgfplots@notify@options@are@set
}
+\def\pgfplots@set@options@of@layered@graphics{%
+ \ifpgfplots@axis@on@top
+ \ifpgfplots@layered@graphics
+ \pgfplots@log3{the combination of 'axis on top' and 'activate layers' implies 'set layers=axis on top'. Deactivate 'axis on top' if you want other layers.}%
+ \pgfplotsset{set layers=axis on top}%
+ \fi
+ \fi
+ % retrieve layer configurations (the one set with 'set layers*').
+ \pgfkeysgetvalue{/pgfplots/@set layers arg}\pgfplots@loc@TMPa
+ \ifx\pgfplots@loc@TMPa\pgfutil@empty
+ \else
+ % ah, yes: then set its style:
+ \pgfqkeys{/pgfplots/layers}{\pgfplots@loc@TMPa}% note that this here should not need key filtering; it adjusts only styles (hopefully ;) )
+ \fi
+}%
+
\def\pgfplots@set@patched@options{%
\pgfkeysdef{/pgfplots/@@@tmp}{%
\let\tikz@intersect@def=\gdef
@@ -9818,10 +9953,12 @@
\or2.197224
\fi
}%
- \def\axisdefaultticklabel{\pgfmathprintnumber{\tick}}%
+ \def\axisdefaultticklabel{\pgfplots@ticklabel@typeset@arg{\pgfmathprintnumber{\tick}}}%
\def\axisdefaultticklabellog{%
- \pgfkeysgetvalue{/pgfplots/log number format code/.@cmd}\pgfplots@log@label@style
- \expandafter\pgfplots@log@label@style\tick\pgfeov
+ \pgfplots@ticklabel@typeset@arg{%
+ \pgfkeysgetvalue{/pgfplots/log number format code/.@cmd}\pgfplots@log@label@style
+ \expandafter\pgfplots@log@label@style\tick\pgfeov
+ }%
}%
%
\let\legend=\pgfplots@command@legend
@@ -10326,10 +10463,8 @@
position}%
}{}%
\def\pgfplots@is@in@axis{1}%
- \let\pgfpointxy@orig=\pgfpointxy
- \let\pgfqpointxy@orig=\pgfqpointxy
- \let\pgfpointxyz@orig=\pgfpointxyz
- \let\pgfqpointxyz@orig=\pgfqpointxyz
+ \pgfplots@environment@opt@@setup@pgfpoint@restores
+ %
\global\let\pgfplots@late@options=\pgfutil@empty
\pgfplots@checkandpreparefor@active@semicolon
%
@@ -10351,10 +10486,6 @@
%
\pgfplots@set@options{#1}%
%
- \pgfplots@prepare@layered@graphics
- %
- \pgfplots@prepare@cell@picture
- %
%
%
% --------------------
@@ -10523,6 +10654,10 @@
%
\expandafter\pgfplotsset\expandafter{\pgfplots@late@options}%
%
+ \pgfplots@prepare@layered@graphics
+ %
+ \pgfplots@prepare@cell@picture
+ %
%\end{axis}:
%
% --------------------
@@ -10544,6 +10679,10 @@
% NEW \pgfplots@stored@plotlist!
\pgfplots@stacked@finalize@stored@plots
\fi
+ %
+ % ensure that (1,2) is automatically converted to (axis cs:1,2) :
+ \pgfplots@change@pgfpoints@to@axiscs
+ %
% make it ungrouped: we must not destroy group nesting of tikz
% path instructions at this point.
\pgfplotslistforeachungrouped\pgfplots@stored@plotlist\as\pgfplots@loc@TMPa{%
@@ -10565,11 +10704,15 @@
%
% this code here means we REALLY have a plotting
% command!
+ % This is the heart component of the visualization
+ % phase.
\pgfplots@stored@plotlist@visualize@selected@phases{\pgfplots@visphase@names}%
\fi
\pgfplots@stored@current@postcmd
}%
%
+ \pgfplots@restorepgfpoint
+ %
\pgfplots@END@init@and@draw@axis
%
\pgfplots@create@axis@descriptions
@@ -10655,6 +10798,54 @@
\aftergroup\pgfplots@cell@picture@remembered
}
+\def\pgfplots@environment@opt@@setup@pgfpoint@restores{%
+ % There are places in pgfplots where the default coordinate system
+ % (i.e. the one used whenever one writes (1,2)) needs to be
+ % replaced:
+ % - during axis descriptions (see \pgfplots@change@pgfpoints@to@descriptioncs)
+ % - during the visualization phase (where it is substituted by
+ % (axis cs:1,2), compare XXXX)
+ %
+ % However, as soon as someone writes \pgfsetxvec (or its y/z
+ % variants), we want to *restore* the original PGF functionality.
+ %
+ % Prepare that here:
+ \let\pgfpointxy@orig=\pgfpointxy
+ \let\pgfqpointxy@orig=\pgfqpointxy
+ \let\pgfpointxyz@orig=\pgfpointxyz
+ \let\pgfqpointxyz@orig=\pgfqpointxyz
+ \let\pgfsetxvec@orig=\pgfsetxvec
+ \let\pgfsetyvec@orig=\pgfsetyvec
+ \let\pgfsetzvec@orig=\pgfsetzvec
+ \let\tikz@checkunit@orig=\tikz@checkunit
+ %
+ \let\pgfsetxvec=\pgfplots@setxvec@restorepgfpoint
+ \let\pgfsetyvec=\pgfplots@setyvec@restorepgfpoint
+ \let\pgfsetzvec=\pgfplots@setzvec@restorepgfpoint
+}%
+
+\def\pgfplots@restorepgfpoint{%
+ \let\pgfpointxy=\pgfpointxy@orig
+ \let\pgfqpointxy=\pgfqpointxy@orig
+ \let\pgfpointxyz=\pgfpointxyz@orig
+ \let\pgfqpointxyz=\pgfqpointxyz@orig
+ \let\tikz@checkunit=\tikz@checkunit@orig
+}%
+
+\def\pgfplots@setxvec@restorepgfpoint#1{%
+ \pgfsetxvec@orig{#1}%
+ \pgfplots@restorepgfpoint
+}%
+\def\pgfplots@setyvec@restorepgfpoint#1{%
+ \pgfsetyvec@orig{#1}%
+ \pgfplots@restorepgfpoint
+}%
+\def\pgfplots@setzvec@restorepgfpoint#1{%
+ \pgfsetzvec@orig{#1}%
+ \pgfplots@restorepgfpoint
+}%
+
+
\def\pgfplots@replace@path@commands{%
\let\pgfplots@orig@scope=\scope
\let\pgfplots@orig@endscope=\endscope
@@ -10731,6 +10922,10 @@
% #1: the list of phases to execute. This excludes marker phases.
\def\pgfplots@stored@plotlist@visualize@clippedpart#1{%
\scope[current plot style] % this does set BOTH pgfplots and tikz options.
+ %
+ % do this here after options are set.
+ \pgfplots@initzerolevelhandler
+ %
% FIXME : what, precisely, was the motivation to use a
% scope here? It causes a lot of problems and
% work-arounds. Is it worth the effort!?
@@ -10771,12 +10966,50 @@
\def\pgfplots@visphase@markers{%
\begingroup
+ \pgfplots@change@pgfpoints@to@axiscs
\pgfplots@markers@install@plotmark@handler
\let\pgfplots@visphase@name=\pgfplotsaxis@visphase@name@markers
\expandafter\pgfplots@coord@stream@finalize@storedcoords@START\pgfplots@stored@current@data\pgfplots@EOI
\endgroup
}%
+% Inside of an axis, the default coordinate system for any draw
+% command should be (axis cs:1,2) instead of (1,2). Install that here:
+%
+% see \pgfplots@restorepgfpoint
+\def\pgfplots@change@pgfpoints@to@axiscs{%
+ %
+ \ifpgfplots@substitute@pgfpoint
+ \let\pgfpointxy=\pgfplotspointaxisxy
+ \let\pgfpointxyz=\pgfplotspointaxisxyz
+ \let\pgfqpointxy=\pgfplotsqpointaxisxy
+ \let\pgfqpointxyz=\pgfplotsqpointaxisxyz
+ %
+ % tikz checks for units before it calls \pgfpointxy . This must
+ % not suffer from TeX's math restrictions, so we have to use the
+ % FPU for this task. Patch the command as well:
+ \let\tikz@checkunit=\pgfplots@checkunit@fpu
+ \fi
+}%
+
+\def\pgfplots@checkunit@fpu#1{%
+ \ifpgfplots@usefpu
+ \edef\pgfplots@checkunit@fpu@restore{%
+ \pgflibraryfpuifactive{%
+ % ok, leave it active
+ }{%
+ \noexpand\pgfkeys{/pgf/fpu=false}%
+ }%
+ }%
+ \pgfkeys{/pgf/fpu}%
+ \tikz@checkunit@orig{#1}%
+ \pgfmathfloattofixed{\pgfmathresult}%
+ \pgfplots@checkunit@fpu@restore
+ \else
+ \tikz@checkunit@orig{#1}%
+ \fi
+}%
+
\def\pgfplots@execute@at@end@plot@visualization@internal{%
}%