diff options
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryplothandlers.code.tex')
-rw-r--r-- | Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryplothandlers.code.tex | 270 |
1 files changed, 135 insertions, 135 deletions
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryplothandlers.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryplothandlers.code.tex index 38ccd94d0b9..3f0fc8d268d 100644 --- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryplothandlers.code.tex +++ b/Master/texmf-dist/tex/generic/pgf/libraries/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.20 2013/08/31 13:02:59 ludewich Exp $ +\ProvidesFileRCS{pgflibraryplothandlers.code.tex} % This handler converts each plot stream command into a curveto @@ -25,13 +25,13 @@ point macro=\pgf@plot@curveto@handler@initial, jump macro=\pgf@plot@smooth@next@moveto, end macro=\pgf@plot@curveto@handler@finish -} +}% \def\pgf@plot@smooth@next@moveto{% \pgf@plot@curveto@handler@finish% \global\pgf@plot@startedfalse% \global\let\pgf@plotstreampoint\pgf@plot@curveto@handler@initial% -} +}% \def\pgf@plot@curveto@handler@initial#1{% \pgf@process{#1}% @@ -41,14 +41,14 @@ \xdef\pgf@plot@curveto@first{\noexpand\pgfqpoint{\the\pgf@xa}{\the\pgf@ya}}% \global\let\pgf@plot@curveto@first@support=\pgf@plot@curveto@first% \global\let\pgf@plotstreampoint=\pgf@plot@curveto@handler@second% -} +}% \def\pgf@plot@curveto@handler@second#1{% \pgf@process{#1}% \xdef\pgf@plot@curveto@second{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}% \global\let\pgf@plotstreampoint=\pgf@plot@curveto@handler@third% \global\pgf@plot@startedtrue% -} +}% \def\pgf@plot@curveto@handler@third#1{% \pgf@process{#1}% @@ -79,20 +79,20 @@ \global\let\pgf@plot@curveto@first=\pgf@plot@curveto@second% \global\let\pgf@plot@curveto@second=\pgf@plot@curveto@current% \xdef\pgf@plot@curveto@first@support{\noexpand\pgfqpoint{\the\pgf@xc}{\the\pgf@yc}}% -} +}% \def\pgf@plot@curveto@handler@finish{% \ifpgf@plot@started% \pgfpathcurveto{\pgf@plot@curveto@first@support}{\pgf@plot@curveto@second}{\pgf@plot@curveto@second}% \fi% -} +}% % This commands sets the tension for smoothing of plots. % % #1 = tension of curves. A value of 1 will yield a circle when the % control points are at quarters of a circle. A smaller value -% will result in a tighter curve. Default is 0.5. +% will result in a tighter curve. Default is 0.5. % % Example: % @@ -101,8 +101,8 @@ \def\pgfsetplottension#1{% \pgf@x=#1pt\relax% \pgf@x=0.2775\pgf@x\relax% - \edef\pgf@plottension{\pgf@sys@tonumber\pgf@x}} -\pgfsetplottension{0.5} + \edef\pgf@plottension{\pgf@sys@tonumber\pgf@x}}% +\pgfsetplottension{0.5}% % This handler converts the plot stream command into a curveto @@ -118,13 +118,13 @@ point macro=\pgf@plot@closedcurve@handler@initial, end macro=\pgf@plot@closedcurve@handler@finish, jump macro=\pgf@plot@closedsmooth@next@moveto -} +}% \def\pgf@plot@closedsmooth@next@moveto{% \pgf@plot@closedcurve@handler@finish% \global\pgf@plot@startedfalse% \global\let\pgf@plotstreampoint\pgf@plot@closedcurve@handler@initial% -} +}% \def\pgf@plot@closedcurve@handler@initial#1{% \pgf@process{#1}% @@ -133,14 +133,14 @@ \xdef\pgf@plot@closedcurve@initial{\noexpand\pgfqpoint{\the\pgf@xa}{\the\pgf@ya}}% \global\let\pgf@plotstreampoint=\pgf@plot@closedcurve@handler@second% \global\pgf@plot@startedfalse% -} +}% \def\pgf@plot@closedcurve@handler@second#1{% \pgf@process{#1}% \xdef\pgf@plot@closedcurve@after@initial{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}% {\pgfpathmoveto{}}% \global\let\pgf@plotstreampoint=\pgf@plot@closedcurve@handler@third% -} +}% \def\pgf@plot@closedcurve@handler@third#1{% \global\pgf@plot@startedtrue% @@ -170,7 +170,7 @@ \xdef\pgf@plot@closedcurve@after@initial@presupport{\noexpand\pgfqpoint{\the\pgf@xb}{\the\pgf@yb}}% \xdef\pgf@plot@closedcurve@first@support{\noexpand\pgfqpoint{\the\pgf@xc}{\the\pgf@yc}}% \global\let\pgf@plotstreampoint=\pgf@plot@closedcurve@handler@fourth% -} +}% \def\pgf@plot@closedcurve@handler@fourth#1{% \pgf@process{#1}% @@ -201,7 +201,7 @@ \global\let\pgf@plot@closedcurve@first=\pgf@plot@closedcurve@second% \global\let\pgf@plot@closedcurve@second=\pgf@plot@closedcurve@current% \xdef\pgf@plot@closedcurve@first@support{\noexpand\pgfqpoint{\the\pgf@xc}{\the\pgf@yc}}% -} +}% \def\pgf@plot@closedcurve@handler@finish{% \ifpgf@plot@started @@ -266,7 +266,7 @@ {\pgf@marshal}% \pgfpathclose% \fi% -} +}% @@ -274,7 +274,7 @@ % This handler converts each point in a stream into a line from the % $y$-axis to the given points coordinate, resulting in a -% ``comb.'' +% ``comb.'' % % Example: % @@ -285,7 +285,7 @@ start macro=\pgfplotxzerolevelstreamstart, point macro=\pgf@plot@xcomb@handler, end macro=\pgfplotxzerolevelstreamend, -} +}% \def\pgf@plot@xcomb@handler#1{% \pgf@process{#1}% @@ -297,12 +297,12 @@ \pgf@yb=\pgf@x \pgfpathmoveto{\pgfqpoint{\pgf@yb}{\pgf@ya}}% \pgfpathlineto{\pgfqpoint{\pgf@xa}{\pgf@ya}}% -} +}% % This handler converts each point in a stream into a line from the % $x$-axis straight up to the given points coordinate, resulting in a -% ``comb.'' +% ``comb.'' % % Example: % @@ -313,7 +313,7 @@ start macro=\pgfplotyzerolevelstreamstart, point macro=\pgf@plot@ycomb@handler, end macro=\pgfplotyzerolevelstreamend -} +}% \def\pgf@plot@ycomb@handler#1{% \pgf@process{#1}% @@ -325,23 +325,23 @@ \pgf@yb=\pgf@x \pgfpathmoveto{\pgfqpoint{\pgf@xa}{\pgf@yb}}% \pgfpathlineto{\pgfqpoint{\pgf@xa}{\pgf@ya}}% -} +}% % PGF Bar or comb plots usually draw something from zero to the current plot's coordinate. -% +% % The 'zero' offset can be changed using an input stream. % % There are two such streams which can be configured independently. % The first one returns "zeros" for coordinate x, the second one % returns "zeros" for coordinate y. -% +% % \pgfplotxzerolevelstreamstart % \pgfplotxzerolevelstreamnext % assigns \pgf@x globally % \pgfplotxzerolevelstreamnext % \pgfplotxzerolevelstreamnext % \pgfplotxzerolevelstreamend % -% and +% and % \pgfplotyzerolevelstreamstart % \pgfplotyzerolevelstreamnext % assigns \pgf@x globally % \pgfplotyzerolevelstreamend @@ -351,43 +351,43 @@ \def\pgfplotxzerolevelstreamnext{\pgf@plotxzerolevelstreamnext} \def\pgfplotyzerolevelstreamstart{\pgf@plotyzerolevelstreamstart}% \def\pgfplotyzerolevelstreamend{\pgf@plotyzerolevelstreamend}% -\def\pgfplotyzerolevelstreamnext{\pgf@plotyzerolevelstreamnext} +\def\pgfplotyzerolevelstreamnext{\pgf@plotyzerolevelstreamnext}% % This zero level stream always returns '#1' (a dimension). \def\pgfplotxzerolevelstreamconstant#1{% - \edef\pgfplotxzerolevelstreamconstant@val{#1}% - \def\pgf@plotxzerolevelstreamstart{% - \global\let\pgf@plotxzerolevelstreamend=\relax - \gdef\pgf@plotxzerolevelstreamnext{\global\pgf@x=\pgfplotxzerolevelstreamconstant@val\relax}% - }% + \edef\pgfplotxzerolevelstreamconstant@val{#1}% + \def\pgf@plotxzerolevelstreamstart{% + \global\let\pgf@plotxzerolevelstreamend=\relax + \gdef\pgf@plotxzerolevelstreamnext{\global\pgf@x=\pgfplotxzerolevelstreamconstant@val\relax}% + }% }% \pgfplotxzerolevelstreamconstant{0pt}% % This zero level stream always returns '#1'. \def\pgfplotyzerolevelstreamconstant#1{% - \edef\pgfplotyzerolevelstreamconstant@val{#1}% - \def\pgf@plotyzerolevelstreamstart{% - \global\let\pgf@plotyzerolevelstreamend=\relax - \gdef\pgf@plotyzerolevelstreamnext{\global\pgf@x=\pgfplotyzerolevelstreamconstant@val\relax}% - }% + \edef\pgfplotyzerolevelstreamconstant@val{#1}% + \def\pgf@plotyzerolevelstreamstart{% + \global\let\pgf@plotyzerolevelstreamend=\relax + \gdef\pgf@plotyzerolevelstreamnext{\global\pgf@x=\pgfplotyzerolevelstreamconstant@val\relax}% + }% }% \pgfplotyzerolevelstreamconstant{0pt}% -\def\pgfplotbarwidth{\pgfkeysvalueof{/pgf/bar width}} -\def\pgfplotbarshift{\pgfkeysvalueof{/pgf/bar shift}} +\def\pgfplotbarwidth{\pgfkeysvalueof{/pgf/bar width}}% +\def\pgfplotbarshift{\pgfkeysvalueof{/pgf/bar shift}}% \pgfqkeys{/pgf}{% - bar width/.initial=10pt, - bar shift/.initial=0pt, - bar interval width/.initial=1, - bar interval shift/.initial=0.5, - % - % hook which is executed right before a new bar is begun. - at begin bar/.initial=, - % hook which is executed right after a bar path has been finished. - % In this context, the bar's path has not been used. - at end bar/.initial=, -} + bar width/.initial=10pt, + bar shift/.initial=0pt, + bar interval width/.initial=1, + bar interval shift/.initial=0.5, + % + % hook which is executed right before a new bar is begun. + at begin bar/.initial=, + % hook which is executed right after a bar path has been finished. + % In this context, the bar's path has not been used. + at end bar/.initial=, +}% % This handler places a rectangle at each point in the plot stream, a % rectangle which touches the x-axis at one end and the current point @@ -412,7 +412,7 @@ }, end macro=\pgfplotyzerolevelstreamend, point macro=\pgf@plot@ybar@handler -} +}% \def\pgf@plot@ybar@handler#1{% \pgfkeysvalueof{/pgf/at begin bar}% @@ -428,10 +428,10 @@ \pgf@yb=\pgf@x \advance\pgf@ya by-\pgf@yb \pgfpathrectangle - {\pgfqpoint{\pgf@xc}{\pgf@yb}}% - {\pgfqpoint{\pgf@xb}{\pgf@ya}}% + {\pgfqpoint{\pgf@xc}{\pgf@yb}}% + {\pgfqpoint{\pgf@xb}{\pgf@ya}}% \pgfkeysvalueof{/pgf/at end bar}% -} +}% % This handler places a rectangle at each point in the plot stream, a % rectangle which touches the y-axis at one end and the current point @@ -455,7 +455,7 @@ }, end macro=\pgfplotxzerolevelstreamend, point macro=\pgf@plot@xbar@handler -} +}% \def\pgf@plot@xbar@handler#1{% \pgfkeysvalueof{/pgf/at begin bar}% @@ -471,23 +471,23 @@ \pgf@yb=\pgf@x \advance\pgf@ya by-\pgf@yb \pgfpathrectangle - {\pgfqpoint{\pgf@yb}{\pgf@xc}}% - {\pgfqpoint{\pgf@ya}{\pgf@xb}}% + {\pgfqpoint{\pgf@yb}{\pgf@xc}}% + {\pgfqpoint{\pgf@ya}{\pgf@xb}}% \pgfkeysvalueof{/pgf/at end bar}% -} +}% % This handler is a variant of \pgfplothandlerybar which works with % intervals instead of points. -% +% % Bars are drawn between successive input coordinates and the width is % determined relatively to the interval length. % % It looks like this: % -% |---| |-----| -% | | | | -% | | | | -% | | | | +% |---| |-----| +% | | | | +% | | | | +% | | | | % (X)------(X)-----------(X) % % where (X) denotes the x-axis offsets of input coordinates. @@ -519,14 +519,14 @@ }, end macro=\pgfplotyzerolevelstreamend, point macro=\pgf@plot@ybarinterval@handler@first -} +}% \def\pgf@plot@ybarinterval@handler@first#1{% \pgf@process{#1}% \xdef\pgf@plot@barinterval@intervalstart{\the\pgf@x}% \xdef\pgf@plot@barinterval@bar{\the\pgf@y}% \global\let\pgf@plotstreampoint=\pgf@plot@ybarinterval@handler% -} +}% \def\pgf@plot@ybarinterval@handler#1{% \pgfkeysvalueof{/pgf/at begin bar}% \pgf@process{#1}% @@ -545,10 +545,10 @@ \pgf@yb=\pgf@x \advance\pgf@ya by-\pgf@yb \pgfpathrectangle - {\pgfqpoint{\pgf@xc}{\pgf@yb}}% - {\pgfqpoint{\pgf@xb}{\pgf@ya}}% + {\pgfqpoint{\pgf@xc}{\pgf@yb}}% + {\pgfqpoint{\pgf@xb}{\pgf@ya}}% \pgfkeysvalueof{/pgf/at end bar}% -} +}% % Like \pgfplothandlerybarinterval but for xbar. \pgfdeclareplothandler{\pgfplothandlerxbarinterval}{}{% @@ -561,14 +561,14 @@ }, end macro=\pgfplotxzerolevelstreamend, point macro=\pgf@plot@xbarinterval@handler@first -} +}% \def\pgf@plot@xbarinterval@handler@first#1{% \pgf@process{#1}% \xdef\pgf@plot@barinterval@intervalstart{\the\pgf@y}% \xdef\pgf@plot@barinterval@bar{\the\pgf@x}% \global\let\pgf@plotstreampoint=\pgf@plot@xbarinterval@handler% -} +}% \def\pgf@plot@xbarinterval@handler#1{% \pgfkeysvalueof{/pgf/at begin bar}% \pgf@process{#1}% @@ -587,10 +587,10 @@ \pgf@yb=\pgf@x \advance\pgf@ya by-\pgf@yb \pgfpathrectangle - {\pgfqpoint{\pgf@yb}{\pgf@xc}}% - {\pgfqpoint{\pgf@ya}{\pgf@xb}}% + {\pgfqpoint{\pgf@yb}{\pgf@xc}}% + {\pgfqpoint{\pgf@ya}{\pgf@xb}}% \pgfkeysvalueof{/pgf/at end bar}% -} +}% % This handler is very similar to \pgfplothandlerlineto, but it @@ -609,14 +609,14 @@ \pgfdeclareplothandler{\pgfplothandlerconstantlineto}{}{% point macro=\pgf@plot@const@line@handler -} +}% \def\pgf@plot@const@line@handler#1{% \pgf@process{#1}% \xdef\pgf@plot@const@line@handler@last{\the\pgf@y}% \pgf@plot@first@action{}% \global\let\pgf@plotstreampoint=\pgf@plot@const@line@handler@@% -} +}% \def\pgf@plot@const@line@handler@@#1{% \pgf@process{#1}% \pgf@xa=\pgf@x @@ -625,11 +625,11 @@ \pgfpathlineto{\pgfqpoint{\pgf@xa}{\pgf@yb}}% \pgfpathlineto{\pgfqpoint{\pgf@xa}{\pgf@ya}}% \xdef\pgf@plot@const@line@handler@last{\the\pgf@ya}% -} +}% % A variant of \pgfplothandlerconstantlineto which places its mark on % the right line ends. -% +% % |---x % ---x | % |--x @@ -642,14 +642,14 @@ \pgfdeclareplothandler{\pgfplothandlerconstantlinetomarkright}{}{% point macro=\pgf@plot@const@line@mark@right@handler -} +}% \def\pgf@plot@const@line@mark@right@handler#1{% \pgf@process{#1}% \xdef\pgf@plot@const@line@handler@last{\the\pgf@x}% \pgf@plot@first@action{}% \global\let\pgf@plotstreampoint=\pgf@plot@const@line@mark@right@handler@@% -} +}% \def\pgf@plot@const@line@mark@right@handler@@#1{% \pgf@process{#1}% \pgf@xa=\pgf@x @@ -658,7 +658,7 @@ \pgfpathlineto{\pgfqpoint{\pgf@yb}{\pgf@ya}}% \pgfpathlineto{\pgfqpoint{\pgf@xa}{\pgf@ya}}% \xdef\pgf@plot@const@line@handler@last{\the\pgf@xa}% -} +}% % A variant of \pgfplothandlerconstantlineto which places its mark on % the middle of the line segment. @@ -676,14 +676,14 @@ \pgfdeclareplothandler{\pgfplothandlerconstantlinetomarkmid}{}{% point macro=\pgf@plot@const@line@mark@mid@handler -} +}% \def\pgf@plot@const@line@mark@mid@handler#1{% \pgf@process{#1}% \xdef\pgf@plot@const@line@handler@last{\global\pgf@x=\the\pgf@x\space\global\pgf@y=\the\pgf@y\space}% \pgf@plot@first@action{}% \global\let\pgf@plotstreampoint=\pgf@plot@const@line@mark@mid@handler@@% -} +}% \def\pgf@plot@const@line@mark@mid@handler@@#1{% \pgf@process{#1}% \pgf@xa=\pgf@x @@ -695,7 +695,7 @@ \pgfpathlineto{\pgfqpoint{\pgf@xc}{\pgf@ya}}% \pgfpathlineto{\pgfqpoint{\pgf@xa}{\pgf@ya}}% \xdef\pgf@plot@const@line@handler@last{\global\pgf@x=\the\pgf@x\space\global\pgf@y=\the\pgf@y\space}% -} +}% % This handler is in fact a variant of \pgfplothandlerconstantlineto, % but it does not draw vertical lines. It produces a sequence of @@ -703,7 +703,7 @@ % each right end: % % ---x -% ---x +% ---x % ---x % --x % @@ -714,14 +714,14 @@ \pgfdeclareplothandler{\pgfplothandlerjumpmarkright}{}{% point macro=\pgf@plot@jumpmarkright@handler -} +}% \def\pgf@plot@jumpmarkright@handler#1{% \pgf@process{#1}% \xdef\pgf@plot@const@line@handler@last{\the\pgf@x}% \pgf@plot@first@action{}% \global\let\pgf@plotstreampoint=\pgf@plot@jumpmarkright@handler@@% -} +}% \def\pgf@plot@jumpmarkright@handler@@#1{% \pgf@process{#1}% \pgf@xa=\pgf@x @@ -730,7 +730,7 @@ \pgfpathmoveto{\pgfqpoint{\pgf@yb}{\pgf@ya}}% \pgfpathlineto{\pgfqpoint{\pgf@xa}{\pgf@ya}}% \xdef\pgf@plot@const@line@handler@last{\the\pgf@xa}% -} +}% % This handler is in fact a variant of \pgfplothandlerconstantlineto, % but it does not draw vertical lines. It produces a sequence of @@ -738,7 +738,7 @@ % each left end: % % x--- -% x--- +% x--- % x--- % x-- % @@ -749,13 +749,13 @@ \pgfdeclareplothandler{\pgfplothandlerjumpmarkleft}{}{% point macro=\pgf@plot@jumpmarkleft@handler -} +}% \def\pgf@plot@jumpmarkleft@handler#1{% \pgf@process{#1}% \xdef\pgf@plot@const@line@handler@last{\the\pgf@y}% \pgf@plot@first@action{}% \global\let\pgf@plotstreampoint=\pgf@plot@jumpmarkleft@handler@@% -} +}% \def\pgf@plot@jumpmarkleft@handler@@#1{% \pgf@process{#1}% \pgf@xa=\pgf@x @@ -764,7 +764,7 @@ \pgfpathlineto{\pgfqpoint{\pgf@xa}{\pgf@yb}}% \pgfpathmoveto{\pgfqpoint{\pgf@xa}{\pgf@ya}}% \xdef\pgf@plot@const@line@handler@last{\the\pgf@ya}% -} +}% % This handler is in fact a variant of % \pgfplothandlerconstantlinetomarkmid, @@ -772,8 +772,8 @@ % line-to and move-to operations such that plot marks are placed like % % ----x -% -% --x-- +% +% --x-- % --x---- % x-- % @@ -784,14 +784,14 @@ \pgfdeclareplothandler{\pgfplothandlerjumpmarkmid}{}{% point macro=\pgf@plot@jump@mark@mid@handler -} +}% \def\pgf@plot@jump@mark@mid@handler#1{% \pgf@process{#1}% \xdef\pgf@plot@const@line@handler@last{\global\pgf@x=\the\pgf@x\space\global\pgf@y=\the\pgf@y\space}% \pgf@plot@first@action{}% \global\let\pgf@plotstreampoint=\pgf@plot@jump@mark@mid@handler@@% -} +}% \def\pgf@plot@jump@mark@mid@handler@@#1{% \pgf@process{#1}% \pgf@xa=\pgf@x @@ -803,7 +803,7 @@ \pgfpathmoveto{\pgfqpoint{\pgf@xc}{\pgf@ya}}% \pgfpathlineto{\pgfqpoint{\pgf@xa}{\pgf@ya}}% \xdef\pgf@plot@const@line@handler@last{\global\pgf@x=\the\pgf@x\space\global\pgf@y=\the\pgf@y\space}% -} +}% % This handler converts each point in a stream into a line from the @@ -816,7 +816,7 @@ \pgfdeclareplothandler{\pgfplothandlerpolarcomb}{}{% point macro=\pgf@plot@polarcomb@handler -} +}% \def\pgf@plot@polarcomb@handler#1{% \pgf@process{#1}% @@ -824,12 +824,12 @@ \pgf@ya=\pgf@y% \pgfpathmoveto{\pgfpointorigin}% \pgfpathlineto{\pgfqpoint{\pgf@xa}{\pgf@ya}}% -} +}% -% This handler draws a given mark at each point. +% This handler draws a given mark at each point. % % #1 = some code to be executed at each point (with the coordinate % system translated to that point). @@ -853,15 +853,15 @@ \global\advance\pgf@plot@mark@count by-\pgf@plot@mark@phase\relax% }, point macro=\pgf@plot@mark@handler -} +}% \newcount\pgf@plot@mark@count -\def\pgf@plot@mark@phase{0} +\def\pgf@plot@mark@phase{0}% \def\pgf@plot@mark@handler#1{% \global\advance\pgf@plot@mark@count by1\relax% {\pgftransformshift{#1}\pgf@plot@mark}% -} +}% % Set the repeat count for marks. For example, if 3 is given as a @@ -873,12 +873,12 @@ % % \pgfsetplotmarkrepeat{2} -\def\pgfsetplotmarkrepeat#1{\def\pgf@plot@mark@repeat{#1}} -\pgfsetplotmarkrepeat{1} +\def\pgfsetplotmarkrepeat#1{\def\pgf@plot@mark@repeat{#1}}% +\pgfsetplotmarkrepeat{1}% -% Set the phase for marks. For example, if 3 is the repeat and 3 is -% the phase, already the first point will be marked. +% Set the phase for marks. For example, if 3 is the repeat and 3 is +% the phase, already the first point will be marked. % % #1 = the index of the first point that should be marked. % @@ -886,8 +886,8 @@ % % \pgfsetplotmarkphase{3} -\def\pgfsetplotmarkphase#1{\def\pgf@plot@mark@phase{#1}} -\pgfsetplotmarkphase{1} +\def\pgfsetplotmarkphase#1{\def\pgf@plot@mark@phase{#1}}% +\pgfsetplotmarkphase{1}% @@ -918,7 +918,7 @@ \global\advance\pgf@plot@mark@count by-\pgf@plot@mark@phase\relax% }, point macro=\pgf@plot@mark@handler -} +}% % \def\pgfplothandlermarklisted#1#2{% % \let\pgf@plot@mark@list=\pgfutil@empty% @@ -928,7 +928,7 @@ % \edef\pgf@marshal{\noexpand\pgfutil@in@{(\the\pgf@plot@mark@count)}{\pgf@plot@mark@list}}% % \pgf@marshal% % \ifpgfutil@in@#1\fi}% -% } +% }% % Define a new plot mark for use with \pgfplotmark. @@ -940,7 +940,7 @@ % % \pgfdeclareplotmark{*}{\pgfpathcircle{\pgfpointorigin}{2pt}\pgfusepathqfill} -\def\pgfdeclareplotmark#1#2{\expandafter\def\csname pgf@plot@mark@#1\endcsname{#2}} +\def\pgfdeclareplotmark#1#2{\expandafter\def\csname pgf@plot@mark@#1\endcsname{#2}}% % Set the size of plot marks. For circles, this will be the radius, @@ -950,7 +950,7 @@ % % \pgfsetplotmarksize{1pt} -\def\pgfsetplotmarksize#1{\pgfmathsetlength\pgfplotmarksize{#1}} +\def\pgfsetplotmarksize#1{\pgfmathsetlength\pgfplotmarksize{#1}}% \newdimen\pgfplotmarksize \pgfplotmarksize=2pt @@ -964,7 +964,7 @@ % % \pgfuseplotmark{*} -\def\pgfuseplotmark#1{\csname pgf@plot@mark@#1\endcsname} +\def\pgfuseplotmark#1{\csname pgf@plot@mark@#1\endcsname}% % A stroke-filled circle mark @@ -973,38 +973,38 @@ {% \pgfpathellipse{\pgfpointorigin}{\pgfqpoint{\pgfplotmarksize}{0sp}}{\pgfqpoint{0sp}{\pgfplotmarksize}}% \pgfusepathqfillstroke -} +}% % A plus-sign like mark \pgfdeclareplotmark{+} {% - \pgfpathmoveto{\pgfqpoint{-\pgfplotmarksize}{0pt}} - \pgfpathlineto{\pgfqpoint{\pgfplotmarksize}{0pt}} - \pgfpathmoveto{\pgfqpoint{0pt}{\pgfplotmarksize}} - \pgfpathlineto{\pgfqpoint{0pt}{-\pgfplotmarksize}} + \pgfpathmoveto{\pgfqpoint{-\pgfplotmarksize}{0pt}}% + \pgfpathlineto{\pgfqpoint{\pgfplotmarksize}{0pt}}% + \pgfpathmoveto{\pgfqpoint{0pt}{\pgfplotmarksize}}% + \pgfpathlineto{\pgfqpoint{0pt}{-\pgfplotmarksize}}% \pgfusepathqstroke -} +}% % An x-shaped mark \pgfdeclareplotmark{x} {% - \pgfpathmoveto{\pgfqpoint{-.70710678\pgfplotmarksize}{-.70710678\pgfplotmarksize}} - \pgfpathlineto{\pgfqpoint{.70710678\pgfplotmarksize}{.70710678\pgfplotmarksize}} - \pgfpathmoveto{\pgfqpoint{-.70710678\pgfplotmarksize}{.70710678\pgfplotmarksize}} - \pgfpathlineto{\pgfqpoint{.70710678\pgfplotmarksize}{-.70710678\pgfplotmarksize}} + \pgfpathmoveto{\pgfqpoint{-.70710678\pgfplotmarksize}{-.70710678\pgfplotmarksize}}% + \pgfpathlineto{\pgfqpoint{.70710678\pgfplotmarksize}{.70710678\pgfplotmarksize}}% + \pgfpathmoveto{\pgfqpoint{-.70710678\pgfplotmarksize}{.70710678\pgfplotmarksize}}% + \pgfpathlineto{\pgfqpoint{.70710678\pgfplotmarksize}{-.70710678\pgfplotmarksize}}% \pgfusepathqstroke -} +}% % See pgflibraryplotmarks for more plot marks -% This handler turns creates a series of straight line segements +% This handler turns creates a series of straight line segments % between consecutive points, but leaving /pgf/gap around stream point % space. % @@ -1013,16 +1013,16 @@ % \pgfplothandlergaplineto % \pgfplotxyfile{mytable} -\pgfkeys{/pgf/gap around stream point/.initial=1.5pt} +\pgfkeys{/pgf/gap around stream point/.initial=1.5pt}% \pgfdeclareplothandler{\pgfplothandlergaplineto}{}{% point macro=\pgf@plot@gap@lineto@handler@initial, jump macro=\pgf@plot@gap@next@moveto -} +}% \def\pgf@plot@gap@next@moveto{% \global\let\pgf@plotstreampoint=\pgf@plot@gap@lineto@handler@initial% -} +}% \def\pgf@plot@gap@lineto@handler@initial#1{% \pgf@process{#1}% @@ -1030,7 +1030,7 @@ \pgf@ya=\pgf@y% \xdef\pgf@plot@gap@lineto@last{\noexpand\pgfqpoint{\the\pgf@xa}{\the\pgf@ya}}% \global\let\pgf@plotstreampoint=\pgf@plot@gap@lineto@handler% -} +}% \def\pgf@plot@gap@lineto@handler#1{% % Ok, compute normalized line vector @@ -1046,7 +1046,7 @@ \pgfpathlineto{\pgfpointadd{\pgfpointscale{\pgfkeysvalueof{/pgf/gap around stream point}}{\pgfqpoint{-\pgf@xc}{-\pgf@yc}}}{\pgf@plot@gap@lineto@next}}% \global\let\pgf@plot@gap@lineto@last=\pgf@plot@gap@lineto@next% -} +}% @@ -1065,13 +1065,13 @@ jump macro=\pgf@plot@gapcycle@next@moveto, end macro=\pgf@plot@gap@cycle@handler@finish, start={\global\let\pgf@plot@gap@cycle@first\relax} -} +}% \def\pgf@plot@gapcycle@next@moveto{% \pgf@plot@gap@cycle@handler@finish% \global\let\pgf@plot@gap@cycle@first=\relax% \global\let\pgf@plotstreampoint=\pgf@plot@gap@cycle@handler@initial% -} +}% \def\pgf@plot@gap@cycle@handler@initial#1{% \pgf@process{#1}% @@ -1080,7 +1080,7 @@ \xdef\pgf@plot@gap@cycle@last{\noexpand\pgfqpoint{\the\pgf@xa}{\the\pgf@ya}}% \global\let\pgf@plot@gap@cycle@first=\pgf@plot@gap@cycle@last% \global\let\pgf@plotstreampoint=\pgf@plot@gap@cycle@handler% -} +}% \def\pgf@plot@gap@cycle@handler#1{% % Ok, compute normalized line vector @@ -1096,14 +1096,14 @@ \pgfpathlineto{\pgfpointadd{\pgfpointscale{\pgfkeysvalueof{/pgf/gap around stream point}}{\pgfqpoint{-\pgf@xc}{-\pgf@yc}}}{\pgf@plot@gap@cycle@next}}% \global\let\pgf@plot@gap@cycle@last=\pgf@plot@gap@cycle@next% -} +}% \def\pgf@plot@gap@cycle@handler@finish{% \ifx\pgf@plot@gap@cycle@first\relax% \else \pgf@plot@gap@cycle@handler{\pgf@plot@gap@cycle@first}% \fi -} +}% |