diff options
Diffstat (limited to 'Master/texmf-dist/tex')
13 files changed, 693 insertions, 73 deletions
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 6f0d12ee115..acc5ec7c53b 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/liststructure/pgfplotsarray.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/liststructure/pgfplotsarray.code.tex @@ -42,6 +42,12 @@ \pgfplotsarray@@def{#1@size}{0}% } +% Invokes code '#2' if the array named '#1' exists and '#3' if it does +% not exist. +\def\pgfplotsarrayifdefined#1#2#3{% + \pgfutil@ifundefined{#1@size}{#3}{#2}% +}% + % Creates a new array with an abirtrary number of elements. % Arguments: % #1: the array's name (a macro name) 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 91caf2a033f..aa21ad13dc4 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/liststructure/pgfplotsliststructure.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/liststructure/pgfplotsliststructure.code.tex @@ -290,13 +290,55 @@ \newif\ifpgfplotslistforeachungroupedrunning % The same but without groups around #3. +% +% The list can be nested. \long\def\pgfplotslistforeachungrouped#1\as#2#3{% - \ifpgfplotslistforeachungroupedrunning - \pgfplots@error{Sorry, you can't nest pgfplotslistforeachungrouped.}% + \t@pgfplots@tokb={{#2}{#3}}% + \t@pgfplots@tokc=\expandafter{#1}% + \edef\pgfplotslist@loc@TMPa{% + \noexpand\pgfplotslistforeachungrouped@ + \the\t@pgfplots@tokb% + \the\t@pgfplots@tokc + \noexpand\pgfpl@@\noexpand\pgfplotslistforeachungrouped@EOI + }% + \pgfplotslist@loc@TMPa +}% + +% Technical helper method which performs the loop. +% ASSUMPTION: +% \pgfplotslistforeachungrouped@ +% {<macro name>} +% {<code to execute>} +% \pgfpl@@{<list elem>}\pgfpl@@{<list elem>}\pgfpl@@{<list elem>}\pgfpl@@\pgfplotslistforeachungrouped@EOI +% +% -> iterate through argument until \pgfplotslistforeachungrouped@EOI +% comes. +\long\def\pgfplotslistforeachungrouped@#1#2\pgfpl@@#3{% + \def\pgfplots@loc@TMPa{#3}% + \ifx\pgfplots@loc@TMPa\pgfplotslistforeachungrouped@EOI + % ok, terminate loop. + \let\pgfplotslistforeachungrouped@next=\relax \else - \pgfplotslistforeachungroupedrunningtrue - \long\def\pgfpl@@##1{\def#2{##1}#3}% - #1\relax - \pgfplotslistforeachungroupedrunningfalse + % perform loop iteration ... + \def#1{#3}% + #2\relax + % and continue iterating. + \def\pgfplotslistforeachungrouped@next{\pgfplotslistforeachungrouped@{#1}{#2}}% \fi -} + \pgfplotslistforeachungrouped@next +}% +\def\pgfplotslistforeachungrouped@EOI{\pgfplotslistforeachungrouped@EOI}% equals only itself in \ifx + +%-------------------------------------------------- +% \long\def\pgfplotslistforeachungrouped#1\as#2#3{% +% \ifpgfplotslistforeachungroupedrunning +% \pgfplots@error{Sorry, you can't nest pgfplotslistforeachungrouped.}% +% \else +% \pgfplotslistforeachungroupedrunningtrue +% \long\def\pgfpl@@##1{\def#2{##1}#3}% +% #1\relax +% \pgfplotslistforeachungroupedrunningfalse +% \fi +% } +%-------------------------------------------------- + diff --git a/Master/texmf-dist/tex/generic/pgfplots/numtable/pgfplotstable.code.tex b/Master/texmf-dist/tex/generic/pgfplots/numtable/pgfplotstable.code.tex index 2d0ec9c1911..1c074e70bf7 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/numtable/pgfplotstable.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/numtable/pgfplotstable.code.tex @@ -1055,6 +1055,40 @@ \pgfplotstable@copy@globalbuffers@to#3 }% +% \pgfplotstablevertcat{<table1>}{<table2>} +% appends the contents of <table2> to <table1>. To be more precise, +% only columns which exist already in <table1> will be used. +% +% If <table1> is undefined, <table2> will be copied completely to +% <table1>. +% +% #1 a table macro. +% #2 either a file name or a table macro. +\def\pgfplotstablevertcat#1#2{% + \pgfplotstable@isloadedtable{#2}{% + \pgfplotstable@isloadedtable{#1}{% + % for each column in '#1': + \pgfplotslistforeachungrouped#1\as\pgfplotstable@loc@TMPa{% + % for each row in the corresponding column of '#2': + \expandafter\pgfplotstablegetcolumnbyname\expandafter{\pgfplotstable@loc@TMPa}\of{#2}\to\pgfplotstable@loc@TMPb + \pgfplotslistforeachungrouped\pgfplotstable@loc@TMPb\as\pgfplotstable@loc@TMPc{% + \t@pgfplots@toka=\expandafter{\pgfplotstable@loc@TMPc}% + \edef\pgfplotstable@loc@TMPd{% + \noexpand\pgfplotslistpushback{\the\t@pgfplots@toka}\to\expandafter\noexpand\csname\string#1@\pgfplotstable@loc@TMPa\endcsname + }% + \pgfplotstable@loc@TMPd + }% + }% + }{% + \pgfplotstablecopy{#2}\to{#1}% + }% + }{% + % FIXME : restore memory here !? SCOPING BUG + \pgfplotstableread{#2}\pgfplotstable@tmptbl + \pgfplotstablevertcat{#1}{\pgfplotstable@tmptbl}% + }% +} + \def\pgfplotstablegetcolumnlist#1\to#2{\let#2=#1} % Returns a column vector in form of \pgfplotslist @@ -1172,8 +1206,8 @@ \def\pgfplotstablecopy#1\to#2{% \let#2=#1% - \pgfplotstablegetname#2\pgfplotstable@loc@TMPa - \expandafter\let\csname\string#1@@table@name\endcsname=\pgfplotstable@loc@TMPa + \pgfplotstablegetname#1\pgfplotstable@loc@TMPa + \expandafter\let\csname\string#2@@table@name\endcsname=\pgfplotstable@loc@TMPa \pgfplotslistforeachungrouped#1\as\pgfplotstable@loc@TMPa{% \def\pgfplotstable@loc@TMPb{% \expandafter\let\csname\string#2@\pgfplotstable@loc@TMPa\endcsname}% 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 6d89fd79532..26e55e00402 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 @@ -9,8 +9,8 @@ % The development of pgfplots and pgf is intermingled, so pgfplots % always uses up-to-date pgf CVS versions - the relevant complements between % PGF 2.00 and PGF CVS are loaded here: -\pgfutil@ifundefined{pgfmathfloatparsenumber@handleerror}{% - %\pgfkeysifdefined{/pgf/number format/min exponent for 1000 sep}{\endinput}{} +%\pgfutil@ifundefined{pgfmathfloatparsenumber@handleerror}{% +\pgfkeysifdefined{/pgf/text mark}{\relax}{% \immediate\write16{Package pgfplots: loading complementary code for your PGF version...} \input pgfplotsoldpgfsupp_misc.code.tex \input pgfplotsoldpgfsupp_pgfkeysfiltered.code.tex diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_misc.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_misc.code.tex index 8911ac2f14b..749c547563a 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_misc.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_misc.code.tex @@ -179,3 +179,56 @@ \pgfmath@smuggleone\pgfmathresult \endgroup% } + +\newif\ifpgfmarktext@usetikznode +\pgfkeys{ + /pgf/text mark/.initial=p, + /pgf/text mark/style/.initial=, + /pgf/text mark/as node/.is if=pgfmarktext@usetikznode, + /pgf/text mark/.default=true, +}% + +\pgfdeclareplotmark{text} +{ + \pgfkeysgetvalue{/pgf/text mark/style}\pgfmarktext@style + \pgfkeysgetvalue{/pgf/text mark}\pgfmarktext@ + \ifpgfmarktext@usetikznode + \expandafter\node\expandafter[\pgfmarktext@style]{\pgfmarktext@}; + \else + \expandafter\pgftext\expandafter[\pgfmarktext@style]{\pgfmarktext@}% + \fi +} + +% A fix for the overlay option and matrices: +\def\pgf@matrix@startcell{% + % + % Step 1: Init the list of nodes for this cell + % + \let\pgf@nodecallback=\pgf@matrix@nodecallback% + % + % Step 2: Setup the bounding box + % + \pgfinterruptboundingbox% + % + % Step 3: Reset the transformation matrix + % + \pgftransformreset% + % + % Step 4: Collect everything in a cell box + % + \setbox\pgf@matrix@cell=\hbox\bgroup\bgroup% + % make sure that cell pictures are not affected if matrizes have + % 'overlay' option on: + \pgf@relevantforpicturesizetrue + \pgfsys@beginpicture% + \normalbaselines% + % Find out whether the cell is empty: + \pgfutil@ifnextchar\let% + {% ok, candidate, check following symbol + \afterassignment\pgf@matrix@empty@check\let\pgf@matrix@temp=% get rid of \let + }% + {% no, not empty + \pgf@matrix@empty@cell@false% + \pgfmatrixbegincode% + }% +} diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryplothandlers.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryplothandlers.code.tex index 871bb8b03b0..a3a1410968b 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryplothandlers.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryplothandlers.code.tex @@ -7,7 +7,7 @@ % % See the file doc/generic/pgf/licenses/LICENSE for more details. -\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibraryplothandlers.code.tex,v 1.13 2008/05/22 14:32:36 ludewich Exp $ +\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgfplots/pgfplots/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryplothandlers.code.tex,v 1.7 2009/02/13 21:00:47 ludewich Exp $ \newif\ifpgf@plot@started diff --git a/Master/texmf-dist/tex/generic/pgfplots/pgfplots.code.tex b/Master/texmf-dist/tex/generic/pgfplots/pgfplots.code.tex index 03b56e28bdc..d386b2195a3 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/pgfplots.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/pgfplots.code.tex @@ -56,6 +56,8 @@ \newif\ifpgfplots@warn@for@filter@discards \newif\ifpgfplots@isuniformtick \newif\ifpgfplots@clip@limits +\newif\ifpgfplots@clip +\pgfplots@cliptrue \newif\ifpgfplots@enlargelimits \newif\ifpgfplots@enlargelimits@rel@thresh \newif\ifpgfplots@enlargelimits@auto @@ -908,6 +910,7 @@ /pgfplots/clip limits/.default=true, /pgfplots/clip limits=true, /pgfplots/clip limits/.belongs to family=/pgfplots, + /pgfplots/clip/.is if=pgfplots@clip, /pgfplots/axis equal/.is if=pgfplots@axis@equal, /pgfplots/axis equal/.default=true, /pgfplots/axis equal image/.is if=pgfplots@axis@equal@image, @@ -1672,6 +1675,24 @@ \let\pgfplots@table@curkeyname=\pgfkeyscurrentname \pgfqkeys{/pgfplots}{\pgfplots@table@curkeyname=##1}% }, + /pgfplots/plot graphics/.code={\let\tikz@plot@handler=\pgfplotsplothandlergraphics},% + /pgfplots/plot graphics/src/.initial=, + /pgfplots/plot graphics/includegraphics/.initial=, + /pgfplots/plot graphics/xmin/.initial=, + /pgfplots/plot graphics/xmax/.initial=, + /pgfplots/plot graphics/ymin/.initial=, + /pgfplots/plot graphics/ymax/.initial=, + /pgfplots/plot graphics/zmin/.initial=, + /pgfplots/plot graphics/zmax/.initial=, + /pgfplots/plot graphics/node/.style={ + transform shape, + inner sep=0pt, + outer sep=0pt, + every node/.style={}, + anchor=south west, + at={(0pt,0pt)}, + rectangle + }, /pgfplots/clip marker paths/.is if=pgfplots@clip@marker@paths, /pgfplots/clip marker paths/.default=true, /pgfplots/axis on top/.is if=pgfplots@axis@on@top, @@ -1721,7 +1742,25 @@ /pgfplots/colormap name/.initial=hot, /pgfplots/colormap/.code 2 args={ \pgfplotscreatecolormap{#1}{#2}% - \pgfkeysdef{/pgfplots/colormap name}{#1}% + \pgfkeysalso{/pgfplots/colormap name=#1}% + }, + /pgfplots/colormap/hot/.style={ + colormap name=hot + }, + /pgfplots/colormap/bluered/.style={ + /pgfplots/colormap={bluered}{rgb255(0cm)=(0,0,180); rgb255(1cm)=(0,255,255); rgb255(2cm)=(100,255,0); rgb255(3cm)=(255,255,0); rgb255(4cm)=(255,0,0); rgb255(5cm)=(128,0,0)} + }, + /pgfplots/colormap/cool/.style={ + /pgfplots/colormap={cool}{rgb255(0cm)=(255,255,255); rgb255(1cm)=(0,128,255); rgb255(2cm)=(255,0,255)} + }, + /pgfplots/colormap/greenyellow/.style={ + /pgfplots/colormap={greenyellow}{rgb255(0cm)=(0,128,0); rgb255(1cm)=(255,255,0)} + }, + /pgfplots/colormap/redyellow/.style={ + /pgfplots/colormap={redyellow}{rgb255(0cm)=(255,0,0); rgb255(1cm)=(255,255,0)} + }, + /pgfplots/colormap/blackwhite/.style={ + colormap={blackwhite}{gray(0cm)=(0); gray(1cm)=(1)} }, /pgfplots/scatter/.is choice, /pgfplots/scatter/false/.code={% @@ -1761,9 +1800,9 @@ {\pgfplotspointmetatransformed} {\pgfkeysvalueof{/pgfplots/colormap name}} %\message{Color for current point is RGB '\pgfmathresult' (determined using meta 'phi(\pgfplotspointmeta) = \pgfplotspointmetatransformed')}% - \def\pgfplots@loc@TMPb{\definecolor{mapped color}{rgb}} - \expandafter\pgfplots@loc@TMPb\expandafter{\pgfmathresult} - \scope[#1] + \def\pgfplots@loc@TMPb{\definecolor{mapped color}{rgb}}% + \expandafter\pgfplots@loc@TMPb\expandafter{\pgfmathresult}% + \scope[#1]% }, /pgfplots/scatter/@post marker code/.code={\endscope} }, @@ -1848,6 +1887,26 @@ },% /pgfplots/forget plot/.is if=pgfplots@curplot@isirrelevant, /pgfplots/forget plot/.default=true, + /pgfplots/normalsize/.style={ + /pgfplots/width=240pt, + /pgfplots/height=207pt, + /pgfplots/max space between ticks=35, + }, + /pgfplots/small/.style={ + /pgfplots/width=6.5cm, + /pgfplots/height=, + /pgfplots/max space between ticks=25, + }, + /pgfplots/footnotesize/.style={ + /pgfplots/width=5cm, + /pgfplots/height=, + legend style={font=\footnotesize}, + tick label style={font=\footnotesize}, + label style={font=\small}, + /pgfplots/max space between ticks=15, + every mark/.append style={mark size=8}, + ylabel style={yshift=-0.3cm}, + }, } { @@ -1899,22 +1958,34 @@ % - \pgfplots@plot@samples = value of '/pgfplots/samples', % the values after any backwards compatibility issues will be used. \def\pgfplots@validate@plot@domain@arguments{% + \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 \pgfkeysgetvalue{/pgfplots/domain}\pgfplots@plot@domain \pgfkeysgetvalue{/pgfplots/samples at}\pgfplots@plot@samples@at \ifx\pgfplots@plot@domain\pgfutil@empty \ifx\pgfplots@plot@samples@at\pgfutil@empty + \if 1\pgfplots@loc@TMPa + % Resample! See above. + \tikzset{samples=\pgfplots@plot@samples}% + \fi \pgfplots@gettikzinternal@keyval{samples at}{tikz@plot@samplesat}{-5,-4.6,...,5}% \pgfkeyslet{/pgfplots/samples at}{\tikz@plot@samplesat}% \let\pgfplots@plot@samples@at=\tikz@plot@samplesat \else % routines should use \pgfplots@plot@samples@at. \fi - \fi - \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 + \else + % do that such that any active ':' sign will be expanded - for + % french babel support. + \edef\pgfplots@plot@domain{\pgfplots@plot@domain}% + \pgfkeyslet{/pgfplots/domain}\pgfplots@plot@domain \fi }% @@ -3226,7 +3297,7 @@ % The same as \pgfplots@initsizes@getXscale, just for the height. \def\pgfplots@initsizes@getYscale#1\into#2{% \begingroup - \expandafter\pgf@xa\pgfplots@height\relax + \pgf@xa=\pgfplots@height\relax % EXPECTED WIDTH = X = \pgfplots@width % ACTUAL WIDTH = c + x * (xmax-xmin) % where c is a CONSTANT (for the axis labels/tick labels). @@ -4644,7 +4715,9 @@ \fi % CLIPPING: \pgfplots@clippath@prepare - \pgfplots@clippath@install + \ifpgfplots@clip + \pgfplots@clippath@install + \fi } % Defines \pgfplots@clippath@install. @@ -4699,6 +4772,8 @@ \else \pgfplotslistforeach\pgfplots@stored@markerlist\as\pgfplots@loc@TMPa{% \scope% make sure that 'fill opacity' and 'dotted' styles remain local! +%\message{Executing marker stuff: \meaning\pgfplots@loc@TMPa]]]]]}% +%\tracingmacros=2\tracingcommands=2 \pgfplots@loc@TMPa \endscope }% @@ -5919,10 +5994,6 @@ % All plotting commands have been read. % -> apply postponed drawing commands! % -------------------- - - - - \ifpgfplots@draw@at@end% ALWAYS TRUE - this is obsolete \def\pgfplots@nextcommand{% \pgfplots@BEGIN@init@and@draw@axis diff --git a/Master/texmf-dist/tex/generic/pgfplots/pgfplotscoordprocessing.code.tex b/Master/texmf-dist/tex/generic/pgfplots/pgfplotscoordprocessing.code.tex index 4e00a678252..7d08f6667cb 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/pgfplotscoordprocessing.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/pgfplotscoordprocessing.code.tex @@ -37,21 +37,25 @@ % The meaning of coordinates #1 and #2 will be redefined depending on % which surface we are currently processing. You can get the axis % names for '#1' (a) and '#2' (b) using the macros -% \pgfplotspointonorientedsurfaceA +% \pgfplotspointonorientedsurfaceA (one of the characters x,y or z) % and % \pgfplotspointonorientedsurfaceB. +% The surface normal direction is +% \pgfplotspointonorientedsurfaceN. % % Example: % \pgfplotspointonorientedsurfaceabsetupforxyz{0} % -> % \pgfplotspointonorientedsurfaceA = x % \pgfplotspointonorientedsurfaceB = y +% \pgfplotspointonorientedsurfaceN = z % \pgfplotspointonorientedsurfaceab{3}{4} = \pgfqpointxyz{3}{4}{0} % % \pgfplotspointonorientedsurfaceabsetupforyxz{0} % -> % \pgfplotspointonorientedsurfaceA = y % \pgfplotspointonorientedsurfaceB = x +% \pgfplotspointonorientedsurfaceN = z % \pgfplotspointonorientedsurfaceab{3}{4} = \pgfqpointxyz{4}{3}{0} % % @see \pgfplotspointonorientedsurfaceabsetupforxyz @@ -93,6 +97,7 @@ \def\pgfplotspointonorientedsurfaceab##1##2{\pgfplotsqpointxyz{##1}{##2}{\pgfplotspointonorientedsurfaceabsetupfor@fixedZ}}% \def\pgfplotspointonorientedsurfaceA{x}% \def\pgfplotspointonorientedsurfaceB{y}% + \def\pgfplotspointonorientedsurfaceN{z}% \edef\pgfplotspointonorientedsurfacespec{ab\pgfplotspointonorientedsurfaceabsetupfor@fixedsymbol}% \edef\pgfplotspointonorientedsurfacespecunordered{vv\pgfplotspointonorientedsurfaceabsetupfor@fixedsymbol}% }% @@ -100,6 +105,7 @@ \def\pgfplotspointonorientedsurfaceab##1##2{\pgfplotsqpointxyz{##2}{##1}{\pgfplotspointonorientedsurfaceabsetupfor@fixedZ}}% \def\pgfplotspointonorientedsurfaceA{y}% \def\pgfplotspointonorientedsurfaceB{x}% + \def\pgfplotspointonorientedsurfaceN{z}% \edef\pgfplotspointonorientedsurfacespec{ba\pgfplotspointonorientedsurfaceabsetupfor@fixedsymbol}% \edef\pgfplotspointonorientedsurfacespecunordered{vv\pgfplotspointonorientedsurfaceabsetupfor@fixedsymbol}% }% @@ -107,6 +113,7 @@ \def\pgfplotspointonorientedsurfaceab##1##2{\pgfplotsqpointxyz{##1}{\pgfplotspointonorientedsurfaceabsetupfor@fixedY}{##2}}% \def\pgfplotspointonorientedsurfaceA{x}% \def\pgfplotspointonorientedsurfaceB{z}% + \def\pgfplotspointonorientedsurfaceN{y}% \edef\pgfplotspointonorientedsurfacespec{a\pgfplotspointonorientedsurfaceabsetupfor@fixedsymbol b}% \edef\pgfplotspointonorientedsurfacespecunordered{v\pgfplotspointonorientedsurfaceabsetupfor@fixedsymbol v}% }% @@ -114,6 +121,7 @@ \def\pgfplotspointonorientedsurfaceab##1##2{\pgfplotsqpointxyz{##2}{\pgfplotspointonorientedsurfaceabsetupfor@fixedY}{##1}}% \def\pgfplotspointonorientedsurfaceA{z}% \def\pgfplotspointonorientedsurfaceB{x}% + \def\pgfplotspointonorientedsurfaceN{y}% \edef\pgfplotspointonorientedsurfacespec{b\pgfplotspointonorientedsurfaceabsetupfor@fixedsymbol a}% \edef\pgfplotspointonorientedsurfacespecunordered{v\pgfplotspointonorientedsurfaceabsetupfor@fixedsymbol v}% }% @@ -121,6 +129,7 @@ \def\pgfplotspointonorientedsurfaceab##1##2{\pgfplotsqpointxyz{\pgfplotspointonorientedsurfaceabsetupfor@fixedX}{##1}{##2}}% \def\pgfplotspointonorientedsurfaceA{y}% \def\pgfplotspointonorientedsurfaceB{z}% + \def\pgfplotspointonorientedsurfaceN{x}% \edef\pgfplotspointonorientedsurfacespec{\pgfplotspointonorientedsurfaceabsetupfor@fixedsymbol ab}% \edef\pgfplotspointonorientedsurfacespecunordered{\pgfplotspointonorientedsurfaceabsetupfor@fixedsymbol vv}% }% @@ -128,6 +137,7 @@ \def\pgfplotspointonorientedsurfaceab##1##2{\pgfplotsqpointxyz{\pgfplotspointonorientedsurfaceabsetupfor@fixedX}{##2}{##1}}% \def\pgfplotspointonorientedsurfaceA{z}% \def\pgfplotspointonorientedsurfaceB{y}% + \def\pgfplotspointonorientedsurfaceN{x}% \edef\pgfplotspointonorientedsurfacespec{\pgfplotspointonorientedsurfaceabsetupfor@fixedsymbol ba}% \edef\pgfplotspointonorientedsurfacespecunordered{\pgfplotspointonorientedsurfaceabsetupfor@fixedsymbol vv}% }% @@ -136,12 +146,12 @@ % \pgfplotspointonorientedsurfaceabsetupforzyx and % \pgfplotspointonorientedsurfaceabsetupforyzx. % -% #1: The fixed value for 'x'. +% #1: The fixed value for 'x' (a coordinate in transformed range). % #2: a one-character symbol describing 'x'. % Command characters are -% - 0 : x is the lower x-axis range. -% - 1 : x is the upper x-axis range. -% - 2 : other. +% 0 : x is the lower x-axis range. +% 1 : x is the upper x-axis range. +% 2 : other. \def\pgfplotspointonorientedsurfaceabsetupforsetx#1#2{% \edef\pgfplotspointonorientedsurfaceabsetupfor@fixedX{#1}% \edef\pgfplotspointonorientedsurfaceabsetupfor@fixedsymbol{#2}% @@ -162,6 +172,7 @@ \def\pgfplotspointonorientedsurfaceab##1##2{\pgfplotsqpointxy{##1}{##2}}% \def\pgfplotspointonorientedsurfaceA{x}% \def\pgfplotspointonorientedsurfaceB{y}% + \def\pgfplotspointonorientedsurfaceN{z}% \edef\pgfplotspointonorientedsurfacespec{ab\pgfplotspointonorientedsurfaceabsetupfor@fixedsymbol}% \edef\pgfplotspointonorientedsurfacespecunordered{vv\pgfplotspointonorientedsurfaceabsetupfor@fixedsymbol}% }% @@ -170,6 +181,7 @@ \def\pgfplotspointonorientedsurfaceab##1##2{\pgfplotsqpointxy{##2}{##1}}% \def\pgfplotspointonorientedsurfaceA{y}% \def\pgfplotspointonorientedsurfaceB{x}% + \def\pgfplotspointonorientedsurfaceN{z}% \edef\pgfplotspointonorientedsurfacespec{ba\pgfplotspointonorientedsurfaceabsetupfor@fixedsymbol}% \edef\pgfplotspointonorientedsurfacespecunordered{vv\pgfplotspointonorientedsurfaceabsetupfor@fixedsymbol}% }% @@ -181,7 +193,7 @@ % - b=1: 'v01' % - b=2: 'v02' % -% To check which of them should be drawn, this macro here convert 'a' +% To check which of them should be drawn, this macro here converts 'a' % to 'v' and 'b' to '#1'. % % The resulting three-character-string is written into '#2'. @@ -341,8 +353,8 @@ % oriented. % #3 The return value is encoded as integer into the macro #3 as % described in \pgfplotspointonorientedsurfaceabmatchaxisline: -% '#3' will be EMPTY if '#1' NOT in '#2'. -% '#3' will be NON-EMPTY if '#1' IN '#2'. +% '#3' will be EMPTY if '#1' is NOT in '#2'. +% '#3' will be NON-EMPTY if '#1' IS in '#2'. \def\pgfplotsmatchcubeparts#1#2#3{% \edef\pgfplots@loc@TMPa{#1:#2}% \expandafter\pgfplotspointonorientedsurfaceabmatchaxisline@\pgfplots@loc@TMPa\pgfplots@EOI @@ -460,7 +472,8 @@ % OUTPUT: % - #3 : a macro which will be set to '1' if and only if % the viewport is the standard XY axis (i.e. pitch=0,yaw=0). -% - \pgfplots@[xyz]@veclength +% - [xyz] vectors, +% \pgfplots@[xyz]@veclength, % \pgfplots@[xyz]@inverseveclength % are set properly \def\pgfplotssetaxesfrompitchyaw#1#2#3{% @@ -494,21 +507,152 @@ \def\pgfplots@x@inverseveclength{1.0}% \def\pgfplots@y@inverseveclength{1.0}% \def\pgfplots@z@inverseveclength{1.0}% -% FIXME : -\def\scale{200}% -\pgfmathreciprocal@{\scale}% -\let\invscale=\pgfmathresult -\pgfsetxvec{\pgfpointscale{\scale}{\pgfplots@glob@TMPa}}% -\pgfsetyvec{\pgfpointscale{\scale}{\pgfplots@glob@TMPb}}% -\pgfsetzvec{\pgfpointscale{\scale}{\pgfplots@glob@TMPc}}% -\let\pgfplots@x@veclength=\scale% -\let\pgfplots@y@veclength=\scale% -\let\pgfplots@z@veclength=\scale% -\let\pgfplots@x@inverseveclength=\invscale% -\let\pgfplots@y@inverseveclength=\invscale% -\let\pgfplots@z@inverseveclength=\invscale% +\iftrue + \pgfplots@scaleaxes@to@BB{\pgfplots@width}{\pgfplots@height}% FIXME : width and height is wrong: labels missing +\else + % FIXME : + \def\pgfplots@x@veclength{200}% + \pgfmathreciprocal@{\pgfplots@x@veclength}% + \let\pgfplots@x@inverseveclength=\pgfmathresult + \def\pgfplots@y@veclength{200}% + \pgfmathreciprocal@{\pgfplots@y@veclength}% + \let\pgfplots@y@inverseveclength=\pgfmathresult + \def\pgfplots@z@veclength{200}% + \pgfmathreciprocal@{\pgfplots@z@veclength}% + \let\pgfplots@z@inverseveclength=\pgfmathresult + \pgfsetxvec{\pgfpointscale{\pgfplots@x@veclength}{\pgfplots@glob@TMPa}}% + \pgfsetyvec{\pgfpointscale{\pgfplots@y@veclength}{\pgfplots@glob@TMPb}}% + \pgfsetzvec{\pgfpointscale{\pgfplots@z@veclength}{\pgfplots@glob@TMPc}}% +\fi +\message{After scaling: + x = (\the\pgf@xx,\the\pgf@xy), + y = (\the\pgf@yx,\the\pgf@yy), + z = (\the\pgf@zx,\the\pgf@zy).}% }% +% Takes the current PGF x,y and z unit vectors and scales them such +% that the bounding box of the final image has width #1 and height #2. +% +% The length of the input vectors is important for the 3D case: it +% will be scaled as-is. +% +% PRECONDITION +% - the x, y and z unit vectors have been set to the proper +% DIRECTIONS. Their relative vector lengths are set-up properly +% (i.e. y is twice as large as x and half as large as z or so). +% - \pgfplots@[xyz]@veclength and +% \pgfplots@[xyz]@inverseveclength +% are set correctly. +% - the \ifpgfplots@threedim boolean is set. +% - the data limits have been initialised and transformed according +% to the data transformation. +% +% POSTCONDITION +% - the unit vectors have been re-scaled such that the final plot +% has the desired dimensions. +% - the @veclength and @inverseveclength have been re-scaled as +% well. +\def\pgfplots@scaleaxes@to@BB#1#2{% + \begingroup + \pgfinterruptboundingbox + % STEP 1: compute the bounding box for UNITS: + \ifpgfplots@threedim + \pgfpathmoveto{\pgfqpointxyz000}% + \pgfpathmoveto{\pgfqpointxyz001}% + \pgfpathmoveto{\pgfqpointxyz010}% + \pgfpathmoveto{\pgfqpointxyz011}% + \pgfpathmoveto{\pgfqpointxyz100}% + \pgfpathmoveto{\pgfqpointxyz101}% + \pgfpathmoveto{\pgfqpointxyz110}% + \pgfpathmoveto{\pgfqpointxyz111}% + \else + \pgfpathmoveto{\pgfqpointxy00}% + \pgfpathmoveto{\pgfqpointxy01}% + \pgfpathmoveto{\pgfqpointxy10}% + \pgfpathmoveto{\pgfqpointxy11}% + \fi + % TMPa = width + \pgf@xa=\pgf@pathmaxx + \advance\pgf@xa by-\pgf@pathminx + % TMPb = height + \pgf@xb=\pgf@pathmaxy + \advance\pgf@xb by-\pgf@pathminy + \pgf@ya=#1\relax + \pgf@yb=#2\relax +\message{PGFPLOTS: the current unit vectors result in a UNIT BB of (\the\pgf@xa,\the\pgf@xb). Scaling it to (\the\pgf@ya,\the\pgf@yb)...}% + % STEP 2: compute the scales for x and y such + % that the UNIT-BB will have size #1,#2: + \pgfplotsutil@edef@invoke\pgfmathdivide@{% + {\pgf@sys@tonumber\pgf@ya}% + {\pgf@sys@tonumber\pgf@xa}% + }% + % TMPa = scalex + \global\let\pgfplots@glob@TMPa=\pgfmathresult + \pgfplotsutil@edef@invoke\pgfmathdivide@{% + {\pgf@sys@tonumber\pgf@yb}% + {\pgf@sys@tonumber\pgf@xb}% + }% + % TMPb = scaley + \global\let\pgfplots@glob@TMPb=\pgfmathresult + \pgfusepath{discard}% + \endpgfinterruptboundingbox + \endgroup +\message{got scalex = \pgfplots@glob@TMPa\space and scaley = \pgfplots@glob@TMPb.}% + \pgfmathsubtract@{\pgfplots@xmax}{\pgfplots@xmin}% + \expandafter\pgfmathreciprocal@\expandafter{\pgfmathresult}% +\message{and 1/(xmax-xmin) = 1/(\pgfplots@xmax-\pgfplots@xmin) = \pgfmathresult.}% + \pgf@xx=\pgfplots@glob@TMPa\pgf@xx + \pgf@xy=\pgfplots@glob@TMPb\pgf@xy + \pgf@xx=\pgfmathresult\pgf@xx + \pgf@xy=\pgfmathresult\pgf@xy + % + \pgfmathsubtract@{\pgfplots@ymax}{\pgfplots@ymin}% + \expandafter\pgfmathreciprocal@\expandafter{\pgfmathresult}% +\message{and 1/(ymay-ymin) = 1/(\pgfplots@ymax-\pgfplots@ymin) = \pgfmathresult.}% + \pgf@yx=\pgfplots@glob@TMPa\pgf@yx + \pgf@yy=\pgfplots@glob@TMPb\pgf@yy + \pgf@yx=\pgfmathresult\pgf@yx + \pgf@yy=\pgfmathresult\pgf@yy + % + \ifpgfplots@threedim + \pgfmathsubtract@{\pgfplots@zmax}{\pgfplots@zmin}% + \expandafter\pgfmathreciprocal@\expandafter{\pgfmathresult}% +\message{and 1/(zmaz-zmin) = 1/(\pgfplots@zmax-\pgfplots@zmin) = \pgfmathresult.}% + \pgf@zx=\pgfplots@glob@TMPa\pgf@zx + \pgf@zy=\pgfplots@glob@TMPb\pgf@zy + \pgf@zx=\pgfmathresult\pgf@zx + \pgf@zy=\pgfmathresult\pgf@zy + \fi + \pgfplots@computeunitvectorlengths +}% + +\def\pgfplots@computeunitvectorlengths{% + \pgfplotsutil@edef@invoke\pgfmathveclen@{% + {\pgf@sys@tonumber\pgf@xx}% + {\pgf@sys@tonumber\pgf@xy}% + }% + \let\pgfplots@x@veclength=\pgfmathresult + \expandafter\pgfmathreciprocal@\expandafter{\pgfmathresult}% + \let\pgfplots@x@inverseveclength=\pgfmathresult + % + \pgfplotsutil@edef@invoke\pgfmathveclen@{% + {\pgf@sys@tonumber\pgf@yx}% + {\pgf@sys@tonumber\pgf@yy}% + }% + \let\pgfplots@y@veclength=\pgfmathresult + \expandafter\pgfmathreciprocal@\expandafter{\pgfmathresult}% + \let\pgfplots@y@inverseveclength=\pgfmathresult + % + \ifpgfplots@threedim + \pgfplotsutil@edef@invoke\pgfmathveclen@{% + {\pgf@sys@tonumber\pgf@zx}% + {\pgf@sys@tonumber\pgf@zy}% + }% + \let\pgfplots@z@veclength=\pgfmathresult + \expandafter\pgfmathreciprocal@\expandafter{\pgfmathresult}% + \let\pgfplots@z@inverseveclength=\pgfmathresult + \fi +}% % Internal stream methods. @@ -666,7 +810,10 @@ % point meta/explicit : parse the information found % somewhere: \def\pgfplots@set@perpointmeta{% - \pgfmathfloatparsenumber{\pgfplots@current@point@meta}% + \ifx\pgfplots@current@point@meta\pgfutil@empty + \else + \pgfmathfloatparsenumber{\pgfplots@current@point@meta}% + \fi \let\pgfplots@current@point@meta=\pgfmathresult }% \or @@ -694,10 +841,13 @@ \global\let\pgfplots@metamax=\pgfplots@invalidrange@metamax \expandafter\def\expandafter\pgfplots@set@perpointmeta\expandafter{% \pgfplots@set@perpointmeta - \pgfplotsmathfloatmin{\pgfplots@metamin}{\pgfplots@current@point@meta}% - \global\let\pgfplots@metamin=\pgfmathresult - \pgfplotsmathfloatmax{\pgfplots@metamax}{\pgfplots@current@point@meta}% - \global\let\pgfplots@metamax=\pgfmathresult + \ifx\pgfplots@current@point@meta\pgfutil@empty + \else + \pgfplotsmathfloatmin{\pgfplots@metamin}{\pgfplots@current@point@meta}% + \global\let\pgfplots@metamin=\pgfmathresult + \pgfplotsmathfloatmax{\pgfplots@metamax}{\pgfplots@current@point@meta}% + \global\let\pgfplots@metamax=\pgfmathresult + \fi }% \else \def\pgfplots@invalidrange@metamin{16300}% @@ -706,10 +856,13 @@ \global\let\pgfplots@metamax=\pgfplots@invalidrange@metamax \expandafter\def\expandafter\pgfplots@set@perpointmeta\expandafter{% \pgfplots@set@perpointmeta - \pgfplotsmathmin{\pgfplots@metamin}{\pgfplots@current@point@meta}% - \global\let\pgfplots@metamin=\pgfmathresult - \pgfplotsmathmax{\pgfplots@metamax}{\pgfplots@current@point@meta}% - \global\let\pgfplots@metamax=\pgfmathresult + \ifx\pgfplots@current@point@meta\pgfutil@empty + \else + \pgfplotsmathmin{\pgfplots@metamin}{\pgfplots@current@point@meta}% + \global\let\pgfplots@metamin=\pgfmathresult + \pgfplotsmathmax{\pgfplots@metamax}{\pgfplots@current@point@meta}% + \global\let\pgfplots@metamax=\pgfmathresult + \fi }% \fi \fi @@ -1226,7 +1379,9 @@ \t@pgfplots@toka=\expandafter{\pgfplots@glob@TMPa}% \xdef\pgfplots@glob@TMPa{% \the\t@pgfplots@toka - {% coordinates which need to be processed in \endaxis: + {% coordinates which need to be processed in \endaxis. + % See + % \pgfplots@coord@stream@finalize@storedcoords@START normalized coordinates {\the\t@pgfplots@tokc}\the\t@pgfplots@tokb }% }% @@ -1633,7 +1788,7 @@ \pgfplots@addplotimpl@expression@e{#1}{#2}% }{% \pgfutil@ifnextchar g{% - \pgfplots@addplotimpl@gnuplot{#1}{#2}% + \pgfplots@addplotimpl@g{#1}{#2}% }{% \pgfplots@error{Sorry, the supplied plot command is unknown or unsupported by pgfplots! Ignoring it.}% \pgfplots@gobble@until@semicolon @@ -1723,9 +1878,9 @@ % \ifpgfplots@curplot@threedim \pgfkeysgetvalue{/pgfplots/y domain}{\pgfplots@plot@ydomain}% - \def\pgfplots@addplotimpl@expression@split@yz##1,##3\pgfplots@EOI{% + \def\pgfplots@addplotimpl@expression@split@yz##1,##2\pgfplots@EOI{% \def\pgfplots@addplotimpl@expression@yEXPR{##1}% - \def\pgfplots@addplotimpl@expression@zEXPR{##3}% + \def\pgfplots@addplotimpl@expression@zEXPR{##2}% }% \pgfplots@addplotimpl@expression@split@yz#4\pgfplots@EOI% \ifx\pgfplots@plot@ydomain\pgfutil@empty @@ -1859,9 +2014,16 @@ \catcode`\;=12 \xdef\pgfplots@gnuplot@format{set format "%.7e";} } +\def\pgfplots@addplotimpl@g#1#2g{% + \pgfutil@ifnextchar r{% + \pgfplots@addplotimpl@graphics{#1}{#2}% + }{% + \pgfplots@addplotimpl@gnuplot{#1}{#2}% + }% +}% % |\addplot gnuplot| is an alias to |\addplot function| -\def\pgfplots@addplotimpl@gnuplot#1#2gnuplot{\pgfplots@addplotimpl@function{#1}{#2}unction}% +\def\pgfplots@addplotimpl@gnuplot#1#2nuplot{\pgfplots@addplotimpl@function{#1}{#2}unction}% % \addplot[<style options>] % plot[<behavior opts>] @@ -2071,6 +2233,51 @@ \pgfplots@coord@stream@coord% }% + +\def\pgfplots@addplotimpl@graphics#1#2raphics{% + \pgfutil@ifnextchar[{% + \pgfplots@addplotimpl@graphics@{#1}{#2}% + }{% + \pgfplots@addplotimpl@graphics@{#1}{#2}[]% + }% +}% +% \addplot[#1] plot[#2] graphics[#3] {#4} #5; +\def\pgfplots@addplotimpl@graphics@#1#2[#3]#4#5;{\pgfplots@addplotimpl@graphics@@{#1}{#2}{#3}{#4}{#5}}% +\def\pgfplots@addplotimpl@graphics@@#1#2#3#4#5{% + \pgfplots@start@plot@with@behavioroptions{#2,/pgfplots/plot graphics/.cd,#3,/pgfplots/plot graphics/src={#4}}% + \pgfplots@PREPARE@COORD@STREAM{#1,/pgfplots/plot graphics,/tikz/mark=}{#5}% + \pgfplots@coord@stream@start + \pgfkeysgetvalue{/pgfplots/plot graphics/xmin}{\pgfplots@current@point@x}% + \pgfkeysgetvalue{/pgfplots/plot graphics/ymin}{\pgfplots@current@point@y}% + \ifx\pgfplots@current@point@x\pgfutil@empty\pgfplots@addplotimpl@graphics@@error{xmin}\fi + \ifx\pgfplots@current@point@y\pgfutil@empty\pgfplots@addplotimpl@graphics@@error{ymin}\fi + \ifpgfplots@curplot@threedim + \pgfkeysgetvalue{/pgfplots/plot graphics/zmin}{\pgfplots@current@point@z}% + \ifx\pgfplots@current@point@z\pgfutil@empty\pgfplots@addplotimpl@graphics@@error{zmin}\fi + \fi + \pgfplots@coord@stream@coord + % + \pgfkeysgetvalue{/pgfplots/plot graphics/xmax}{\pgfplots@current@point@x}% + \pgfkeysgetvalue{/pgfplots/plot graphics/ymax}{\pgfplots@current@point@y}% + \ifx\pgfplots@current@point@x\pgfutil@empty\pgfplots@addplotimpl@graphics@@error{xmax}\fi + \ifx\pgfplots@current@point@y\pgfutil@empty\pgfplots@addplotimpl@graphics@@error{ymax}\fi + \ifpgfplots@curplot@threedim + \pgfkeysgetvalue{/pgfplots/plot graphics/zmax}{\pgfplots@current@point@z}% + \ifx\pgfplots@current@point@z\pgfutil@empty\pgfplots@addplotimpl@graphics@@error{zmax}\fi + \fi + \pgfplots@coord@stream@coord + % + \pgfplots@coord@stream@end +}% +\def\pgfplots@addplotimpl@graphics@@error#1{% + \begingroup + \pgfplots@error{Sorry, but 'plot graphics' can't determine where to place the graphics file - (at least) the key '#1' is missing. Please verify that you provided all required limits, for example 'plot graphics[xmin=0,xmax=1,ymin=0,ymax=1] {<graphics>}'.}% + \endgroup +}% + + + + \def\pgfplots@addplotimpl@table#1table{% \pgfutil@ifnextchar[{% \pgfplots@addplotimpl@table@getopts{#1}% @@ -2517,6 +2724,7 @@ \let\pgfplots@addplotimpl@file@opt@IS=\pgfplots@addplotimpl@file@opt \let\pgfplots@addplotimpl@table@fromstructure@IS=\pgfplots@addplotimpl@table@fromstructure \let\pgfplots@addplotimpl@table@fromfile@IS=\pgfplots@addplotimpl@table@fromfile + \let\pgfplots@addplotimpl@graphics@IS=\pgfplots@addplotimpl@graphics@ \let\pgfplots@addplotimpl@coordinates@IS=\pgfplots@addplotimpl@coordinates % \def\pgfplots@gobble@until@semicolon@AS#1;{} @@ -2527,6 +2735,7 @@ \long\def\pgfplots@addplotimpl@table@fromstructure@AS#1#2from#3#4;{\pgfplots@addplotimpl@table@startprocessing{#1}{#2}{#3}{#4}}% \long\def\pgfplots@addplotimpl@table@fromfile@AS#1#2#3#4;{\pgfplots@addplotimpl@table@startprocessing{#1}{#2}{#3}{#4}}% \long\def\pgfplots@addplotimpl@coordinates@AS#1#2plot coordinates#3#4;{\pgfplots@addplotimpl@coordinates@{#1}{#2}{#3}{#4}}% + \def\pgfplots@addplotimpl@graphics@AS#1#2[#3]#4#5;{\pgfplots@addplotimpl@graphics@@{#1}{#2}{#3}{#4}{#5}}% % % Checks whether ';' is an active character and, if that is the % case, modifies all public macros for it. @@ -2539,6 +2748,7 @@ \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 + \let\pgfplots@addplotimpl@graphics@=\pgfplots@addplotimpl@graphics@AS }% } @@ -2888,8 +3098,8 @@ \def\pgfplots@install@plotmark@handler{% \pgfplots@assert@tikzinternal@exists{tikz@options}% - % note: I can't check on tikz@transform because it can be - % '\relax'. + \pgfplots@assert@tikzinternal@exists{tikz@mode}% + % note: I can't check on tikz@transform because it can be '\relax'. \pgfplots@gettikzinternal@keyval{mark indices}{tikz@mark@list}{}% \pgfplots@gettikzinternal@keyval{mark}{tikz@plot@mark}{}% % @@ -2898,7 +3108,29 @@ %\let\tikz@options=\pgfutil@empty% \let\tikz@transform=\pgfutil@empty% \tikzset{every plot/.try,every mark}% + % + % This sets colors: \tikz@options + % + % This sets the \iftikz@mode@draw etc: + %\tikz@mode + % FIXME: using 'color=blue' will NOT activate filltrue! + % So: if 'tikz@mode' *contains* 'fillfalse', I know what to do... + % but all other cases are not clear + %-------------------------------------------------- + % \iftikz@mode@draw + % \else + % % Override the marker codes: force 'draw=none' + % % even if the markers likes to be stroked: + % \let\pgfusepathqfillstroke=\pgfusepathqfill + % \fi + % \iftikz@mode@fill + % \else + % % Override the marker codes: force 'fill=none' + % % even if the markers likes to be filled: + % \let\pgfusepathqfillstroke=\pgfusepathqstroke + % \fi + %-------------------------------------------------- \pgfplots@perpointmeta@preparetrafo % this here is the MAIN marker code. % It may be modified if scatter plot is enabled, see below. @@ -3249,3 +3481,55 @@ \endpgfinterruptboundingbox% }% + + +\def\pgfplotsplothandlergraphics{% + \def\pgf@plotstreamstart{% + \global\let\pgfplots@plot@handler@graphics@bb@first=\pgfutil@empty + \global\let\pgfplots@plot@handler@graphics@bb@second=\pgfutil@empty + \global\let\pgf@plotstreampoint=\pgfplots@plot@handler@graphics@collectbb% + \global\let\pgf@plotstreamspecial=\pgfutil@gobble% + \global\let\pgf@plotstreamend=\pgfplots@plot@handler@graphics@finish% + }% +}% +\def\pgfplots@plot@handler@graphics@collectbb#1{% + \pgf@process{#1}% + \ifx\pgfplots@plot@handler@graphics@bb@first\pgfutil@empty + % ok, this is the lower left corner. + \xdef\pgfplots@plot@handler@graphics@bb@first{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}% + \else + \ifx\pgfplots@plot@handler@graphics@bb@second\pgfutil@empty + % ok, this is the upper right corner. + \xdef\pgfplots@plot@handler@graphics@bb@second{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}% + \else + \pgfplots@error{Error using 'plot graphics': I encountered more than two coordinates!? I expected only the lower left and upper right corners!}% + \fi + \fi +}% +\def\pgfplots@plot@handler@graphics@finish{% + \ifx\pgfplots@plot@handler@graphics@bb@first\pgfutil@empty + \pgfplots@error{Error using 'plot graphics': I got too few coordinates! I expected the lower left and upper right corners!}% + \xdef\pgfplots@plot@handler@graphics@bb@first{\noexpand\pgfqpoint{0pt}{0pt}}% + + \fi + \ifx\pgfplots@plot@handler@graphics@bb@second\pgfutil@empty + \pgfplots@error{Error using 'plot graphics': I got too few coordinates! I expected the lower left and upper right corners!}% + \xdef\pgfplots@plot@handler@graphics@bb@second{\noexpand\pgfqpoint{0pt}{0pt}}% + \fi + \pgfpointdiff{\pgfplots@plot@handler@graphics@bb@first}{\pgfplots@plot@handler@graphics@bb@second}% + \edef\pgfplots@loc@TMPa{\the\pgf@x}% width + \edef\pgfplots@loc@TMPb{\the\pgf@y}% height + \pgfkeysgetvalue{/pgfplots/plot graphics/includegraphics}{\pgfplots@loc@TMPc}% + \pgfkeysgetvalue{/pgfplots/plot graphics/src}{\pgfplots@loc@TMPd}% + \ifx\pgfplots@loc@TMPd\pgfutil@empty + \pgfplots@error{Error using 'plot graphics': I don't have a graphics file name! Please set the '/pgfplots/plot graphics/src' key to the image file name. Skipping this plot.}% + \else + \begingroup + \pgftransformshift{\pgfplots@plot@handler@graphics@bb@first}% + \node[/pgfplots/plot graphics/node,rectangle] {% + \expandafter\includegraphics\expandafter[\pgfplots@loc@TMPc,width=\pgfplots@loc@TMPa,height=\pgfplots@loc@TMPb]{\pgfplots@loc@TMPd}% + };% + \endgroup + \fi +}% + diff --git a/Master/texmf-dist/tex/generic/pgfplots/pgfplotsticks.code.tex b/Master/texmf-dist/tex/generic/pgfplots/pgfplotsticks.code.tex index cd0cc44dff3..d953f779f01 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/pgfplotsticks.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/pgfplotsticks.code.tex @@ -252,6 +252,70 @@ \pgfplots@show@ticklabel@{#1}{#2}% \begingroup \pgftransformshift{\pgfplotspointonorientedsurfaceab{#3}{#4}}% +% +%-------------------------------------------------- +% \iffalse +% %\iftrue +% % The following code is experimental and contains automatically +% % aligned tick labels (especially for 3D axes). It's not quite +% % finished. +% % +% %\tracingmacros=2\tracingcommands=2 +% \message{HIER}% +% \if x\pgfplotspointonorientedsurfaceB +% \if y\pgfplotspointonorientedsurfaceN +% \def\pgfplotspointonorientedsurfbN##1##2{\pgfplotsqpointxyz{##1}{##2}{0}}% +% \else% N == z: +% \def\pgfplotspointonorientedsurfbN##1##2{\pgfplotsqpointxyz{##1}{0}{##2}}% +% \fi +% \else +% \if y\pgfplotspointonorientedsurfaceB +% \if x\pgfplotspointonorientedsurfaceN +% \def\pgfplotspointonorientedsurfbN##1##2{\pgfplotsqpointxyz{##2}{##1}{0}}% +% \else% N == z: +% \def\pgfplotspointonorientedsurfbN##1##2{\pgfplotsqpointxyz{0}{##1}{##2}}% +% \fi +% \else +% % B == z +% \if y\pgfplotspointonorientedsurfaceN +% \def\pgfplotspointonorientedsurfbN##1##2{\pgfplotsqpointxyz{0}{##2}{##1}}% +% \else% N == x: +% \def\pgfplotspointonorientedsurfbN##1##2{\pgfplotsqpointxyz{##2}{0}{##1}}% +% \fi +% \fi +% \fi +% %\message{a == \pgfplotspointonorientedsurfaceA, b == \pgfplotspointonorientedsurfaceB, N == \pgfplotspointonorientedsurfaceN. zeug=\meaning\pgfplotspointonorientedsurfbN.}% +% \if0\pgfplots@ticklabelside +% % this means : the 'b' axis of the surface is on the lower axis +% % limit. Since we want tick labels OUTSIDE of the axis, we need +% % sign = -1. +% \def\pgfplots@loc@TMPa{-}% +% \else +% % in this case, we the OUTSIDE area requires a plus sign - the b +% % axis already points to the outside. +% \def\pgfplots@loc@TMPa{}% +% \fi +% \if0\pgfplotspointonorientedsurfaceabsetupfor@fixedsymbol +% % same as before: the N axis is on the lower axis limit. +% % So: sign -1 +% \def\pgfplots@loc@TMPb{-}% +% \else +% \def\pgfplots@loc@TMPb{}% +% \fi +% \pgfmathparse{\csname pgfplots@\pgfplotspointonorientedsurfaceB @inverseveclength\endcsname * \pgfplots@loc@TMPa 0.2cm}% +% \let\pgfplots@loc@TMPa=\pgfmathresult +% \pgfmathparse{\csname pgfplots@\pgfplotspointonorientedsurfaceN @inverseveclength\endcsname * \pgfplots@loc@TMPb 0.2cm}% +% \let\pgfplots@loc@TMPb=\pgfmathresult +% %-------------------------------------------------- +% % \pgfpathmoveto{\pgfqpoint{0pt}{0pt}}% +% % \pgfpathlineto{\pgfplotspointonorientedsurfbN{\pgfplots@loc@TMPa}{\pgfplots@loc@TMPb}}% +% % \pgfusepath{stroke} +% %-------------------------------------------------- +% \pgftransformshift{\pgfplotspointonorientedsurfbN{\pgfplots@loc@TMPa}{\pgfplots@loc@TMPb}}% +% \tikzset{every node/.append style={anchor=center}}% +% \fi +%-------------------------------------------------- +% \node at (0pt,0pt) {\csname pgfplots@#1ticklabel\endcsname};% \endgroup \fi @@ -408,6 +472,14 @@ \let\pgfplots@tick@beg@a=\pgfmathresult \pgfmathsubtract@{\pgfplots@tick@beg@a}{#2}% \let\pgfplots@tick@end@a=\pgfmathresult% + \else + % FALL BACK + % (\pgfplots@xcoordminTEX-\pgfplots@tick@offset, \pgfplots@tmpa) -- ++( #2, 0pt); + \edef\pgfplots@tick@beg@a{\csname pgfplots@\pgfplotspointonorientedsurfaceB min\endcsname}% + \pgfmathsubtract@{\pgfplots@tick@beg@a}{\pgfplots@tick@offset}% + \let\pgfplots@tick@beg@a=\pgfmathresult + \pgfmathadd@{\pgfplots@tick@beg@a}{#2}% + \let\pgfplots@tick@end@a=\pgfmathresult \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 077ca23c946..f92bde8428f 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/util/pgfplotscolormap.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/util/pgfplotscolormap.code.tex @@ -1,5 +1,5 @@ %-------------------------------------------- -% $Header: /cvsroot/pgfplots/pgfplots/generic/pgfplots/util/pgfplotscolormap.code.tex,v 1.8 2008/11/30 22:59:31 ludewich Exp $ +% $Header: /cvsroot/pgfplots/pgfplots/generic/pgfplots/util/pgfplotscolormap.code.tex,v 1.10 2009/02/13 21:00:47 ludewich Exp $ % % Package pgfplots % @@ -34,7 +34,7 @@ % #1 : the name of the color map as string (not as macro). % #2 : a <color specification> as is expected for a colormap. % -% Example: \pgfplots@createcolormap{my map}{rgb(0cm)=(1,0,0); rgb(1cm)=(0,1,0); rgb(2cm)=(0,0,1); gray(3cm)=(3); color(4cm)=(green); } +% Example: \pgfplots@createcolormap{my map}{rgb(0cm)=(1,0,0); rgb(1cm)=(0,1,0); rgb255(1.5cm)=(128,5,255); rgb(2cm)=(0,0,1); gray(3cm)=(3); color(4cm)=(green); } \def\pgfplotscreatecolormap#{% \pgfplots@createcolormap } @@ -91,9 +91,29 @@ \gdef\pgfplots@createcolormap@grabsemicolon@active;{\pgfplots@createcolormap@}% } -\def\pgfplots@createcolormap@grabrgb rgb(#1)=(#2,#3,#4){% +\def\pgfplots@createcolormap@grabrgb rgb{ + \pgfutil@ifnextchar2{% + \pgfplots@createcolormap@grabrgb@two@five@five + }{% + \pgfplots@createcolormap@grabrgb@ + }% +} +\def\pgfplots@createcolormap@grabrgb@(#1)=(#2,#3,#4){% \pgfplots@createcolormap@nextRGB{#1}{#2}{#3}{#4}% \pgfplots@createcolormap@} +\def\pgfplots@createcolormap@grabrgb@two@five@five@rescale#1{% + \pgfmath@basic@multiply@{0.003921568}{#1}% +}% +\def\pgfplots@createcolormap@grabrgb@two@five@five255(#1)=(#2,#3,#4){% + \pgfplots@createcolormap@grabrgb@two@five@five@rescale{#2}% + \let\pgfplots@loc@TMPa=\pgfmathresult + \pgfplots@createcolormap@grabrgb@two@five@five@rescale{#3}% + \let\pgfplots@loc@TMPb=\pgfmathresult + \pgfplots@createcolormap@grabrgb@two@five@five@rescale{#4}% + \def\pgfplots@loc@TMPc{\pgfplots@createcolormap@nextRGB{#1}}% + \edef\pgfplots@loc@TMPa{{\pgfplots@loc@TMPa}{\pgfplots@loc@TMPb}{\pgfmathresult}}% + \expandafter\pgfplots@loc@TMPc\pgfplots@loc@TMPa + \pgfplots@createcolormap@} \def\pgfplots@createcolormap@grabgray gray(#1)=(#2){% \pgfplots@createcolormap@nextRGB{#1}{#2}{#2}{#2}% \pgfplots@createcolormap@} @@ -180,6 +200,9 @@ \endgroup } +% Invokes '#2' if a color map named '#1' exists and '#3' if no such color map exists. +\def\pgfplotscolormapifdefined#1#2#3{\pgfplotsarrayifdefined{pgfpl@cm@#1}{#2}{#3}}% + % Convert a colormap into a PGF shading's color specification for use % in \pgfdeclare*shading. % 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 781f5e4937d..68d640693cf 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/util/pgfplotsutil.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/util/pgfplotsutil.code.tex @@ -182,6 +182,16 @@ \def#2{#1}% }% +% Writes the command name of '#1' without the leading backslash to +% macro #2. +\def\pgfplotsutil@getcommandname#1#2{% + \begingroup + \escapechar=-1 + \xdef\pgfplots@glob@TMPa{\string#1}% + \endgroup + \let#2=\pgfplots@glob@TMPa +} + { \catcode`\%=12 \gdef\pgfplots@PERCENT@TEXT{%} @@ -636,6 +646,31 @@ \immediate\write-1{PGFPlots: reading {#1}}% }% +% Expands #2 using \edef and invokes #1 with the resulting string. +% +% DEPRECATED +% Example: +% \pgf@xa=7.9pt +% \pgfplotsutil@edef@invoke\pgfmathexp@{{\pgf@sys@tonumber{\pgf@xa}}}% +% will invoke +% \pgfmathexp@{7.9} +\def\pgfplotsutil@edef@invoke#1#2{% + \edef\pgfutil@edef@invoke@{#2}% + \expandafter#1\pgfutil@edef@invoke@ +} + +% Advances a number stored in a macro and writes the result back into +% the macro. +% #1 is a macro containing a number. +\def\pgfplotsutil@advancestringcounter#1{% + \begingroup + \c@pgf@counta=#1\relax + \advance\c@pgf@counta by1 + \edef#1{\the\c@pgf@counta}% + \pgfmath@smuggleone#1% + \endgroup +}% + \input pgfplotsliststructure.code.tex \input pgfplotsliststructureext.code.tex \input pgfplotsarray.code.tex diff --git a/Master/texmf-dist/tex/latex/pgfplots/pgfplots.sty b/Master/texmf-dist/tex/latex/pgfplots/pgfplots.sty index 58cef47cb1b..2f0c8b3b0bf 100644 --- a/Master/texmf-dist/tex/latex/pgfplots/pgfplots.sty +++ b/Master/texmf-dist/tex/latex/pgfplots/pgfplots.sty @@ -1,4 +1,4 @@ -% $Header: /cvsroot/pgfplots/pgfplots/latex/pgfplots/pgfplots.sty,v 1.9 2009/02/01 11:34:56 ludewich Exp $ +% $Header: /cvsroot/pgfplots/pgfplots/latex/pgfplots/pgfplots.sty,v 1.12 2009/02/14 10:00:37 ludewich Exp $ %-------------------------------------------- % % Package pgfplots.sty @@ -24,8 +24,8 @@ % along with this program. If not, see <http://www.gnu.org/licenses/>. % %-------------------------------------------- -\def\pgfplotsversion{1.2} -\ProvidesPackage{pgfplots}[2009/02/01 Version \pgfplotsversion] +\def\pgfplotsversion{1.2.2} +\ProvidesPackage{pgfplots}[2009/02/14 Version \pgfplotsversion] % ATTENTION: % you MAY need one of diff --git a/Master/texmf-dist/tex/latex/pgfplots/pgfplotstable.sty b/Master/texmf-dist/tex/latex/pgfplots/pgfplotstable.sty index 218ad786962..12ec6e778eb 100644 --- a/Master/texmf-dist/tex/latex/pgfplots/pgfplotstable.sty +++ b/Master/texmf-dist/tex/latex/pgfplots/pgfplotstable.sty @@ -18,7 +18,7 @@ % along with this program. If not, see <http://www.gnu.org/licenses/>. % %-------------------------------------------- -\ProvidesPackage{pgfplotstable}[2008/08/02] +\ProvidesPackage{pgfplotstable}[2008/02/14] % everything is loaded by pgfplots. \RequirePackage{pgfplots} |