summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-05-11 21:27:23 +0000
committerKarl Berry <karl@freefriends.org>2016-05-11 21:27:23 +0000
commit6970bb09faec83a926be27692ebb9b29061a6c2b (patch)
tree2b7b3e26cf2a9dbcf45a56c593c9a4c888e369e2 /Master/texmf-dist/tex
parentb09e7454f87f22dff8dd6f5fa2a085f1295532d4 (diff)
pst-plot (11may16)
git-svn-id: svn://tug.org/texlive/trunk@41040 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/generic/pst-plot/pst-plot.tex70
1 files changed, 45 insertions, 25 deletions
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 a39ae857556..20d95e6047b 100644
--- a/Master/texmf-dist/tex/generic/pst-plot/pst-plot.tex
+++ b/Master/texmf-dist/tex/generic/pst-plot/pst-plot.tex
@@ -1,4 +1,4 @@
-% $Id: pst-plot.tex 251 2016-01-16 17:50:04Z herbert $
+% $Id: pst-plot.tex 302 2016-05-10 06:43:46Z herbert $
%%
%% BEGIN 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-2016 by Herbert Voss, hvoss@tug.org.
+%% COPYRIGHT 2009-2015 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.72}
-\def\filedate{2016/05/09}
+\def\fileversion{1.74}
+\def\filedate{2016/05/11}
\message{ v\fileversion, \filedate\space (tvz,hv)}
%
\edef\TheAtCode{\the\catcode`\@}
@@ -785,6 +785,8 @@ D\space##1%
/maxYValues \psk@plotNoMax\space def
/YValuePos \psk@plotNo\space def
/XValuePos \psk@plotNoX\space def
+ /maxYvalue \ifx\empty\psk@plotYMax false \else true \fi def
+ maxYvalue { /YMaxValue \psk@plotYMax\space def } if
\ifPsk@xyValues\else % we have only y values
/mm m def
/M m 1 add def
@@ -873,6 +875,13 @@ D\space##1%
/ncount ncount 1 add def
} repeat
} ifelse
+ maxYvalue { % delete values gt YMaxValue
+ /m0 m def
+ n {
+ dup YMaxValue gt { pop pop /m m 2 sub def } if
+ m -2 roll
+ } repeat
+ } if
}>
%
% \psplot
@@ -1885,9 +1894,11 @@ D\space##1%
\define@key[psset]{pst-plot}{plotNo}[1]{\def\psk@plotNo{#1}}
\define@key[psset]{pst-plot}{plotNoMax}[1]{\def\psk@plotNoMax{#1}}
%
+\define@key[psset]{pst-plot}{plotYMax}[1]{\def\psk@plotYMax{#1}}
+%
\psset[pst-plot]{nStep=1, nStart=0, nEnd={},%
xStep=0, yStep=0, xStart={}, xEnd={}, yStart={}, yEnd={},
- plotNo=1,plotNoMax=1,plotNoX=1}%
+ plotNo=1,plotNoMax=1,plotNoX=1,plotYMax={}}%
%
\def\pstScalePoints(#1,#2)#3#4{%
% xScale | yScale | xOperator | yOperator
@@ -1924,7 +1935,9 @@ D\space##1%
\def\psaxes@iv(#1)(#2)(#3){\@ifnextchar[{\psaxes@v(#1)(#2)(#3)}{\psaxes@vii(#1)(#2)(#3)}}%
\def\psaxes@v(#1)(#2)(#3)[#4]{\@ifnextchar[{\psaxes@vi(#1)(#2)(#3)[#4]}{\psaxes@vi(#1)(#2)(#3)[#4][]}}%
\def\psaxes@vi(#1)(#2)(#3)[#4,#5][#6,#7]{%
+ \let\pst@par@save\pst@par
\psaxes@vii(#1)(#2)(#3)%
+ \let\pst@par\pst@par@save
\begingroup
\SpecialCoor
\use@par
@@ -1941,7 +1954,7 @@ D\space##1%
\ifdim\pst@dimc<\z@ \ifdim\pst@dimd<\z@ % axes show to left and down
\addbefore@par{xlabelPos=top,ylabelPos=right}\fi\fi
\setbox\pst@hbox=\hbox\bgroup
- \use@keep@par% now the same with an optional unit=... in par
+ \use@par% now the same with an optional unit=... in par
\ifshowgrid\psgrid[style=gridstyleA]\fi
\pssetxlength\pst@dimg{#1}% o-x
\pssetylength\pst@dimh{#2}% o-y
@@ -1995,8 +2008,8 @@ D\space##1%
\fi
% Now close "\pst@hbox" (which is 0-dimensional), and put it at the origin.
\egroup
- \pssetxlength\pst@dimg{#1}
- \pssetylength\pst@dimh{#2}
+ \pssetxlength\pst@dimg{#1}%
+ \pssetylength\pst@dimh{#2}%
\leavevmode\psput@cartesian\pst@hbox
\endgroup
\ignorespaces
@@ -2343,7 +2356,7 @@ D\space##1%
\kern\psk@xlabelOffset pt% % set the x offset?
\ifx\empty\psk@xLabels
\ifdim#1=\z@\else% % start from 0 ?
- \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%
@@ -2355,15 +2368,16 @@ 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}
+ \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}%
+ \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}[-90]{\pst@xLabelsRot}(\rB,0)%\psxlabelsep)
+ {\uput{\psxlabelsep}[\pst@tempC]{\pst@xLabelsRot}(\rB,0)%\psxlabelsep)
{\strut\pshlabel{\psPutXLabel{\iB}}}}%
\fi%
}
@@ -2394,7 +2408,13 @@ D\space##1%
\def\pst@vlabels#1#2#3#4{%
\ifx\empty\psk@yLabels
\ifdim#1=\z@\else
- \ifx#2\empty\else\advance#1\ifdim#1>\z@-\fi7\pslinewidth\fi
+ \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
@@ -2404,8 +2424,8 @@ D\space##1%
\fi
\fi
\else
- \edef\pst@tempA{\strip@pt#1}
- \pstFPmul\pst@tempA{\pst@tempA}{65536}
+ \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}}%
@@ -2420,30 +2440,30 @@ D\space##1%
% \pst@cnta: the lowest label
% \pst@ticksizeC the lowest or highest value
\def\pst@@vlabels{%
- \psDEBUG[pst@@vlabels]{yticksizeC=\the\pst@yticksizeC}% for left labels we use \def\llap#1{\hb@xt@\z@{\hss#1}}
+% \psDEBUG[pst@@vlabels]{yticksizeC=\the\pst@yticksizeC}% for left labels we use \def\llap#1{\hb@xt@\z@{\hss#1}}
\vbox to\z@{%
- \vbox to -\psk@ylabelOffset pt{}% the y label offset
+ \vbox to -\psk@ylabelOffset pt{}% the y label offset
\ifnum\pst@cnta>\z@ \pst@dima=-\pst@dima\fi% up or down label positions
- \offinterlineskip%
- \ifshoworigin%
+ \offinterlineskip
+ \ifshoworigin
\vbox to \z@{\vss\hbox to\z@{%
\ifcase\psk@ylabelPos%
\hss\pst@@@vlabel{\psk@Oy}\hskip\psylabelsep\hskip-\pst@yticksizeA\or%
\hskip\pslabelsep\hss\pst@@@vlabel{\psk@Oy}\hss\or % right labels
\hskip\pst@yticksizeB\hskip\psylabelsep\pst@@@vlabel{\psk@Oy}%
\fi}\vss}%
- \fi%
+ \fi
\mmultido{\nA=\psk@Oy+\psk@Dy}{\pst@cnta}{%
\vbox to\pst@dima{\vss}%
\vbox to \z@{%
\vss\hbox to\z@{%
- \ifcase\psk@ylabelPos% and also check for -0
+ \ifcase\psk@ylabelPos % and also check for -0
\hss\ifdim\nA pt=\z@ \pst@@@vlabel{0}\else\pst@@@vlabel{\nA}\fi%
- \hskip\psylabelsep\hskip-\pst@yticksizeA\or% top
+ \hskip\psylabelsep\hskip-\pst@yticksizeA\or% top = 1
\hss\ifdim\nA pt=\z@\pst@@@vlabel{0}\else\pst@@@vlabel{\nA}\fi%
- \ifdim\psylabelsep=\z@\hss\else\kern-\psylabelsep\fi\or% axis
- \hskip\pst@yticksizeB\hskip\psylabelsep%
- \ifdim\nA pt=\z@\pst@@@vlabel{0}\else\pst@@@vlabel{\nA}\fi% bottom
+ \ifdim\psylabelsep=\z@\hss\else\kern-\psylabelsep\fi\or% right=2
+ \hskip\pst@yticksizeB\hskip\psylabelsep
+ \ifdim\nA pt=\z@ \pst@@@vlabel{0}\else\pst@@@vlabel{\nA}\fi% bottom
\fi}\vss}%
}\vss}%
}