From b448d3abc4ab3e3dc86002fa988ae4bfd8196c39 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 19 Jan 2017 01:23:55 +0000 Subject: pst-plot (18jan17) git-svn-id: svn://tug.org/texlive/trunk@42990 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/tex/generic/pst-plot/pst-plot.tex | 81 +++++++++++----------- 1 file changed, 40 insertions(+), 41 deletions(-) (limited to 'Master/texmf-dist/tex/generic/pst-plot') diff --git a/Master/texmf-dist/tex/generic/pst-plot/pst-plot.tex b/Master/texmf-dist/tex/generic/pst-plot/pst-plot.tex index 86310023310..70eb527b170 100644 --- a/Master/texmf-dist/tex/generic/pst-plot/pst-plot.tex +++ b/Master/texmf-dist/tex/generic/pst-plot/pst-plot.tex @@ -6,7 +6,7 @@ %% See the betadoc documentation for usage. %% %% COPYRIGHT 1993, 1994, 1999 by Timothy Van Zandt, tvz@nwu.edu. -%% COPYRIGHT 2009-2015 by Herbert Voss, hvoss@tug.org. +%% COPYRIGHT 2009- by Herbert Voss, hvoss@tug.org. %% %% This program can be redistributed and/or modified under the terms %% of the LaTeX Project Public License Distributed from CTAN @@ -23,8 +23,8 @@ \ifx\PSTFPloaded\endinput\else \input pst-fp.tex \fi \ifx\MultidoLoaded\endinput\else \input multido.tex \fi % -\def\fileversion{1.75} -\def\filedate{2016/05/18} +\def\fileversion{1.76} +\def\filedate{2017/01/18} \message{ v\fileversion, \filedate\space (tvz,hv)} % \edef\TheAtCode{\the\catcode`\@} @@ -1347,7 +1347,7 @@ D\space##1% % \def\setDefaulthLabels{% \ifPst@xmathLabel\def\pshlabel##1{$\psk@xlabelFontSize##1$}\else\def\pshlabel##1{\psk@xlabelFontSize##1}\fi - \def\pst@@@hlabel##1{% + \def\pst@@@hlabel##1{% \edef\@xyDecimals{\psk@xDecimals}% % \ifnum\psk@ticks<\tw@ % ticks=all|x \ifnum\psk@labels<\tw@ % labels=all|x @@ -1928,6 +1928,7 @@ D\space##1% \ifPst@yAxis\psxs@@axes\pst@dima\pst@dimb\pst@dimc\pst@dimd{exch}{y}\fi% }} % +\newif\ifSpecialLabelsDone \def\psaxes{\pst@object{psaxes}} \def\psaxes@i{\pst@getarrows\psaxes@ii} \def\psaxes@ii(#1){\@ifnextchar({\psaxes@iii(#1)}{\psaxes@iv(0,0)(0,0)(#1)}} @@ -1978,6 +1979,7 @@ D\space##1% % Make lines/arrows or frame: \@nameuse{psxs@\psk@axesstyle}% \psxs@axes or \psxs@frame or \psxs@polar \ifPst@yAxis + \SpecialLabelsDonefalse \begingroup \ifdim\pst@dima=\z@ \else\showoriginfalse\fi \ifnum\psk@dy=\z@ @@ -1986,12 +1988,13 @@ D\space##1% \edef\psk@dy{\number\pst@dimg}% \fi % \ifPst@xAxis\else\showorigintrue\fi% 2009-10-21 - \pst@vlabels{\pst@dimd}{\psk@arrowB}{#4}{#6}% - \ifPst@xAxis\ifdim\pst@dima<\z@ \showoriginfalse\fi\fi% no 0 when x- axis is crossing \pst@vlabels{\pst@dimb}{\psk@arrowA}{#4}{#6}% + \ifPst@xAxis\ifdim\pst@dima<\z@ \showoriginfalse\fi\fi% no 0 when x- axis is crossing + \pst@vlabels{\pst@dimd}{\psk@arrowB}{#4}{#6}% \endgroup \fi \ifPst@xAxis + \SpecialLabelsDonefalse \begingroup \ifdim\pst@dimb=\z@\else\showoriginfalse\fi \ifnum\psk@dx=\z@ @@ -2353,6 +2356,7 @@ D\space##1% % % #1:Max/Min in pt from origin; #2:arrow; #3:min; #4:max \def\pst@hlabels#1#2#3#4{% + \ifSpecialLabelsDone\else \kern\psk@xlabelOffset pt% % set the x offset? \ifx\empty\psk@xLabels \ifdim#1=\z@\else% % start from 0 ? @@ -2368,18 +2372,22 @@ D\space##1% \fi% \else % \pst@cnta=#1\relax% % Distance (in sp) to end. - \edef\pst@tempA{\strip@pt#1}% - \pstFPmul\pst@tempA{\pst@tempA}{65536}% - \pstFPdiv\pst@tempA{\pst@tempA}{\psk@dx}% - \pstFPadd\pst@tempA{1.55}{\pst@tempA}% % to prevent rounding errors - \edef\pst@tempB{\pst@int{\pst@tempA}}% +% \edef\pst@tempA{\strip@pt#1}% +% \pstFPmul\pst@tempA{\pst@tempA}{65536}% +% \pstFPdiv\pst@tempA{\pst@tempA}{\psk@dx}% +% \pstFPadd\pst@tempA{1.55}{\pst@tempA}% % to prevent rounding errors +% \edef\pst@tempB{\pst@int{\pst@tempA}}% % \divide\pst@cnta\psk@dx\relax% % Number of ticks/labels - \edef\pst@tempA{\psk@Dx}% +% \edef\pst@tempA{\psk@Dx}% \ifnum\psk@xlabelPos=\tw@ \def\pst@tempC{90}\else\def\pst@tempC{-90}\fi - \multido{\iB=#3+1,\rB=#3+\pst@tempA}{\pst@tempB}% - {\uput{\psxlabelsep}[\pst@tempC]{\pst@xLabelsRot}(\rB,0)%\psxlabelsep) - {\strut\pshlabel{\psPutXLabel{\iB}}}}% - \fi% +% \multido{\iB=#3+1,\rB=#3+\pst@tempA}{\pst@tempB}% +% {\uput{\psxlabelsep}[\pst@tempC]{\pst@xLabelsRot}(\rB,0)%\psxlabelsep) +% {\strut\pshlabel{\psPutXLabel{\iB}}}}% + \multido{\nA=0+1,\rA=#3+\psk@Dx}{\numexpr#4-#3+1}{\uput{\psxlabelsep}[\pst@tempC]{\pst@xLabelsRot}(\rA,0){% + \strut\expandafter\pshlabel\expandafter{\psPutXLabel{\nA}}}}% + \SpecialLabelsDonetrue + \fi +\fi } % Knows \pst@dimb and \pst@cnta \def\pst@@hlabels{% @@ -2406,34 +2414,25 @@ D\space##1% % #1:Max/Min in pt from origin; #2:arrow; #3:min; #4:max % \psk@labels 0:all; 1:x; 2:y; 3:none \def\pst@vlabels#1#2#3#4{% - \ifx\empty\psk@yLabels - \ifdim#1=\z@\else - \ifx#2\empty\else - \ifdim#1>\z@ - \advance#1 by -7\pslinewidth - \else - \advance#1 by 7\pslinewidth + \ifSpecialLabelsDone\else + \ifx\empty\psk@yLabels + \ifdim#1=\z@\else + \ifx#2\empty\else\ifdim#1>\z@ \advance#1 by -7\pslinewidth\else\advance#1 by 7\pslinewidth\fi\fi + \pst@cnta=#1\relax % % Distance (in sp) to end. + \divide\pst@cnta\psk@dy\relax% % Number of ticks/labels + \ifnum\pst@cnta=\z@\else + \pst@dima=\psk@dy sp % Space between ticks. + \ifodd\number\psk@labels\else\ifPst@yAxis\pst@@vlabels\fi + \fi + \showoriginfalse + \fi \fi - \fi - \pst@cnta=#1\relax% % % Distance (in sp) to end. - \divide\pst@cnta\psk@dy\relax% % Number of ticks/labels - \ifnum\pst@cnta=\z@\else - \pst@dima=\psk@dy sp % Space between ticks. - \ifodd\number\psk@labels\else\ifPst@yAxis\pst@@vlabels\fi\fi - \showoriginfalse + \else + \multido{\nA=0+1,\rA=#3+\psk@Dy}{\numexpr#4-#3+1}{\uput{\psylabelsep}[180]{\pst@yLabelsRot}(0,\rA){% + \strut\expandafter\psvlabel\expandafter{\psPutYLabel{\nA}}}}% + \SpecialLabelsDonetrue \fi \fi - \else - \edef\pst@tempA{\strip@pt#1}% - \pstFPmul\pst@tempA{\pst@tempA}{65536}% - \pstFPdiv\pst@tempA{\pst@tempA}{\psk@dy}% - \pstFPadd\pst@tempA{1.55}{\pst@tempA}% % to prevent rounding errors - \edef\pst@tempB{\pst@int{\pst@tempA}}% -% \divide\pst@cnta\psk@dy\relax% % Number of ticks/labels - \edef\pst@tempA{\psk@Dy}% - \multido{\nA=#3+1,\rA=#3+\pst@tempA}{\pst@tempB}{\uput{\psylabelsep}[180]{\pst@yLabelsRot}(0,\rA){% - \strut\expandafter\psvlabel\expandafter{\psPutYLabel{\nA}}}}% - \fi% } % \pst@dima: the width between two labels in pt % \pst@dimc: the coordinate of the origin in pt -- cgit v1.2.3