diff options
Diffstat (limited to 'Master/texmf-dist/tex/generic/pstricks/pst-plot.tex')
-rw-r--r-- | Master/texmf-dist/tex/generic/pstricks/pst-plot.tex | 109 |
1 files changed, 56 insertions, 53 deletions
diff --git a/Master/texmf-dist/tex/generic/pstricks/pst-plot.tex b/Master/texmf-dist/tex/generic/pstricks/pst-plot.tex index 4ce191dde77..d2fff22ed98 100644 --- a/Master/texmf-dist/tex/generic/pstricks/pst-plot.tex +++ b/Master/texmf-dist/tex/generic/pstricks/pst-plot.tex @@ -24,8 +24,8 @@ \expandafter\next \fi -\def\fileversion{1.00} -\def\filedate{2007/06/26} +\def\fileversion{1.01} +\def\filedate{2008/01/26} \message{ v\fileversion, \filedate} @@ -66,6 +66,7 @@ D\space##1% \fi*% \let(,\let),\let{,\let},\let ,\let^^M,\let_\@empty*% End def \endgroup +% \begingroup \catcode`\,=13 \catcode`\_=13 @@ -75,14 +76,15 @@ D\space##1% \let#1\pst@tempg \global\let\pst@tempg\relax \ignorespaces} +% \gdef\readdata@{% \read1 to \pst@tempa \expandafter\readdata@@\pst@tempa_\@nil \ifeof1\else\expandafter\readdata@\fi} -\gdef\pst@@readfile#1#2\@nil{\addto@pscode{,#1#2}}% -\gdef\readdata@@#1#2\@nil{\xdef\pst@tempg{\pst@tempg,#1#2}}% + \gdef\pst@@readfile#1#2\@nil{\addto@pscode{,#1#2}}% + \gdef\readdata@@#1#2\@nil{\xdef\pst@tempg{\pst@tempg,#1#2}}% \endgroup - +% \def\readdata#1#2{% \openin1=#2 \begingroup @@ -97,6 +99,7 @@ D\space##1% \fi \endgroup \let#1\pst@tempg +% \ifnum\Pst@Debug>0 \typeout{==DEBUG== pst-plot:readdata:\string\pst@tempg: \pst@tempg}\fi% hv 2008-02-28 \global\let\pst@tempg\relax \ignorespaces} @@ -298,23 +301,19 @@ n 0 eq not \@nameuse{beginqp@\psplotstyle}% /Do { \@nameuse{doqp@\psplotstyle}} def } def}% - #1% - \addto@pscode{D}% + #1% % this is \pst@readfile{#1} for fileplot + \addto@pscode{ D }% \@nameuse{endqp@\psplotstyle}} \def\fileplot{\def\pst@par{}\pst@object{fileplot}} \def\fileplot@i#1{% - \pst@killglue - \begingroup - \use@par - \@pstfalse + \pst@killglue% + \begingroup% + \use@par% + \@pstfalse% \@nameuse{testqp@\psplotstyle}% - \if@pst - \dataplot@ii{\pst@readfile{#1}}% - \else - \listplot@ii{\pst@altreadfile{#1}}% - \fi - \endgroup + \if@pst\dataplot@ii{\pst@readfile{#1}}\else\listplot@ii{\pst@altreadfile{#1}}\fi% + \endgroup% \ignorespaces} \pst@def{ScalePoints}<% @@ -539,32 +538,38 @@ n 0 eq not % Now the ticks and labels. Start by checking for "\multido". % !!Need to fix this so that does nothing when there are 0 ticks.!! \begingroup - \ifdim\pst@dimb=\z@\else\showoriginfalse\fi - \ifnum\psk@dx=\z@ - \pst@dimg=\psk@Dx\psxunit - \edef\psk@dx{\number\pst@dimg}% - \fi - \ifnum\psk@ticks<\tw@ - \ifnum\psk@tickstyle>\z@\else - \advance\pslabelsep\psk@ticksize\p@ - \fi - \fi - \pst@hlabels\pst@dimc\psk@arrowB - \pst@hlabels\pst@dima\psk@arrowA + \ifdim\pst@dimb=\z@\else\showoriginfalse\fi + \ifnum\psk@dx=\z@ + \pst@dimg=\psk@Dx\psxunit + \psDEBUG[psaxes@iv]{\textbackslash pst@dimg=\the\pst@dimg}% v.1.01 + \ifdim\pst@dimg<\p@ \pst@cnta=\psk@Dx \edef\psk@Dx{-\the\pst@cnta} % v.1.01 + \ifnum\Pst@Debug>0 \typeout{==DEBUG== pst-plot(psaxes@iv): Dx -> -Dx (was negative)}\fi % v.1.01 + \fi % v.1.01 + \edef\psk@dx{\number\pst@dimg}% + \psDEBUG[psaxes@iv]{\textbackslash psk@dx=\psk@dx}% v.1.01 + \fi + \ifnum\psk@ticks<\tw@ + \ifnum\psk@tickstyle>\z@ \else\advance\pslabelsep\psk@ticksize\p@\fi + \fi + \pst@hlabels\pst@dimc\psk@arrowB + \pst@hlabels\pst@dima\psk@arrowA \endgroup \begingroup - \ifdim\pst@dima=\z@\else\showoriginfalse\fi - \ifnum\psk@dy=\z@ - \pst@dimg=\psk@Dy\psyunit - \edef\psk@dy{\number\pst@dimg}% - \fi - \ifodd\psk@ticks\else - \ifnum\psk@tickstyle>\z@\else - \advance\pslabelsep\psk@ticksize\p@ - \fi - \fi - \pst@vlabels\pst@dimd\psk@arrowB - \pst@vlabels\pst@dimb\psk@arrowA + \ifdim\pst@dima=\z@\else\showoriginfalse\fi + \ifnum\psk@dy=\z@ + \pst@dimg=\psk@Dy\psyunit + \psDEBUG[psaxes@iv]{\textbackslash pst@dimg=\the\pst@dimg}% v.1.01 + \ifdim\pst@dimg<\p@ \pst@cnta=\psk@Dy \edef\psk@Dy{-\the\pst@cnta} % v.1.01 + \psDEBUG[psaxes@iv]{Dy -> -Dy (was negative)}% v.1.01 + \fi % v.1.01 + \edef\psk@dy{\number\pst@dimg}% + \psDEBUG[psaxes@iv]{\textbackslash psk@dy=\psk@dy}% v.1.01 + \fi + \ifodd\psk@ticks\else + \ifnum\psk@tickstyle>\z@ \else\advance\pslabelsep\psk@ticksize\p@\fi + \fi + \pst@vlabels\pst@dimd\psk@arrowB + \pst@vlabels\pst@dimb\psk@arrowA \endgroup % Now close "\pst@hbox" (which is 0-dimensional), and put it at the origin. \egroup @@ -620,9 +625,7 @@ n 0 eq not % The origin is never the only label. \def\pst@hlabels#1#2{% \ifdim#1=\z@\else - \ifx#2\empty\else - \advance#1\ifdim#1>\z@-\fi7\pslinewidth - \fi + \ifx#2\empty\else\advance#1\ifdim#1>\z@-\fi7\pslinewidth\fi \pst@cnta=#1\relax % Distance (in sp) to end. \divide\pst@cnta\psk@dx\relax % Number of ticks/labels \ifnum\pst@cnta=\z@\else @@ -632,22 +635,22 @@ n 0 eq not \fi \ifnum\psk@labels<\tw@ \pst@@hlabels\fi \showoriginfalse - \fi - \fi} + \fi +\fi} % Knows \pst@dimb and \pst@cnta \def\pst@@hlabels{% \vbox to\z@{% \ifdim\pst@dimd>\z@\vskip\pslabelsep\else\vss\fi - \ifnum\pst@cnta<\z@ - \pst@dimb=-\pst@dimb - \fi + \ifnum\pst@cnta<\z@ \pst@dimb=-\pst@dimb\fi \hbox to\z@{% \ifshoworigin\hbox to \z@{\hss\pshlabel{\psk@Ox}\hss}\fi \mmultido - {\n=\psk@Ox+\psk@Dx}% + {\nA=\psk@Ox+\psk@Dx}% {\pst@cnta}% - {\hskip\pst@dimb\hbox to \z@{\hss\pshlabel{\n}\hss}}% + {\hskip\pst@dimb\hbox to \z@{% + \hss\ifdim\nA pt=\z@ \pshlabel{0}\else\pshlabel{\nA}\fi + \hss}}% prevent "-0" \hss}% \ifdim\pst@dimd>\z@\vss\else\vskip\pslabelsep\fi}}% @@ -684,11 +687,11 @@ n 0 eq not \ifdim\pst@dimc>\z@\hskip\pslabelsep\else\hss\fi}\vss}% \fi \mmultido - {\n=\psk@Oy+\psk@Dy}% + {\nA=\psk@Oy+\psk@Dy}% {\pst@cnta}% {\vbox to\pst@dima{\vss}\vbox to \z@{\vss\hbox to\z@{% \ifdim\pst@dimc>\z@\hss\else\hskip\pslabelsep\fi - \psvlabel{\n}% + \ifdim\nA pt=\z@ \psvlabel{0}\else\psvlabel{\nA}\fi% prevent -0, doesn't work with \ifnum \ifdim\pst@dimc>\z@\hskip\pslabelsep\else\hss\fi}\vss}}% \vss}} |