summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-11-15 23:48:38 +0000
committerKarl Berry <karl@freefriends.org>2010-11-15 23:48:38 +0000
commit64334d6ae2213ccd2a115c5d22884f9465acb16c (patch)
tree2b08b3a9dba86972b8434385eee28ca2ee7121d9 /Master/texmf-dist/tex/generic
parent4a1168ec20c1ee90dc794d040a9d343bc533ab00 (diff)
pst-plot (15nov10)
git-svn-id: svn://tug.org/texlive/trunk@20453 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic')
-rw-r--r--Master/texmf-dist/tex/generic/pst-plot/pst-plot.tex57
1 files changed, 42 insertions, 15 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 1c14df1bd36..7352e28515b 100644
--- a/Master/texmf-dist/tex/generic/pst-plot/pst-plot.tex
+++ b/Master/texmf-dist/tex/generic/pst-plot/pst-plot.tex
@@ -1,11 +1,11 @@
-% $Id: pst-plot.tex 388 2010-09-28 16:31:24Z herbert $
+% $Id: pst-plot.tex 419 2010-11-14 18:37:29Z herbert $
%% BEGIN pst-plot.tex
%%
%% plotting functions and data with PSTricks.
%% See the betadoc documentation for usage.
%%
%% COPYRIGHT 1993, 1994, 1999 by Timothy Van Zandt, tvz@nwu.edu.
-%% COPYRIGHT 2009/10 by Herbert Voss, hvoss@tug.org.
+%% COPYRIGHT 2009/11 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
@@ -20,8 +20,8 @@
\ifx\PSTFPloaded\endinput\else \input pst-fp.tex \fi
\ifx\MultidoLoaded\endinput\else \input multido.tex \fi
%
-\def\fileversion{1.21}
-\def\filedate{2010/09/28}
+\def\fileversion{1.24}
+\def\filedate{2010/11/14}
\message{ v\fileversion, \filedate\space (tvz,hv)}
%
\edef\TheAtCode{\the\catcode`\@}
@@ -639,6 +639,9 @@ D\space##1%
%
\pst@def{PreparePoints}<{%
counttomark /m exch def
+ /maxYValues \psk@plotNoMax\space def
+ /YValuePos \psk@plotNo\space def
+ /XValuePos \psk@plotNoX\space def
\ifPsk@xyValues\else % we have only y values
/mm m def
/M m 1 add def
@@ -647,16 +650,30 @@ D\space##1%
\fi
\ifPst@ChangeOrder
/m0 m def
- m \psk@plotNoMax\space 1 add div 1 sub cvi {
- m0 \psk@plotNoMax\space 1 add roll /m0 m0 \psk@plotNoMax\space 1 add sub def
+ m maxYValues 1 add div 1 sub cvi {
+ m0 maxYValues 1 add roll /m0 m0 maxYValues 1 add sub def
} repeat
\fi
- /n m \psk@plotNoMax\space 1 add div cvi def
- \psk@plotNoMax\space 1 gt {% multiple data files?
+ /n m maxYValues 1 add div cvi def
+%
+% when having multiple x values, we first delete the first X value
+% and then put the plotNoX onto the first position
+%
+ XValuePos 1 gt {% multiple x values? x y y xNo y
+ n {
+ maxYValues 1 add XValuePos neg roll % y x y y xNo
+ dup /XValue ED
+ maxYValues 1 add XValuePos 1 sub roll % y y xNo y x
+ pop XValue % y y xNo y xNo
+ maxYValues 1 add 1 roll % xNo y y xNo y
+ m maxYValues 1 add roll % next values
+ } repeat
+ } if % no multiple data files
+ maxYValues 1 gt {% multiple data files? x y y yNo y
n {
- \psk@plotNoMax\space \psk@plotNo\space 1 sub neg roll % x yNo y y y ...
- \psk@plotNoMax\space 1 sub { pop } repeat % x yNo
- /m m \psk@plotNoMax\space 1 sub sub def
+ maxYValues YValuePos 1 sub neg roll % x yNo y y y ...
+ maxYValues 1 sub { pop } repeat % x yNo
+ /m m maxYValues 1 sub sub def
m 2 roll
} repeat
} if % no multiple data files
@@ -1151,7 +1168,8 @@ D\space##1%
\else%
\def\pst@@@hlabel##1{%
\edef\@xyDecimals{\psk@xDecimals}%
- \ifnum\psk@ticks<\tw@% ticks=all|x
+% \ifnum\psk@ticks<\tw@ % ticks=all|x
+ \ifnum\psk@labels<\tw@ % labels=all|x
\ifx\psk@xlogBase\@empty%
\pshlabel{\psk@labelFontSize\expandafter\@LabelComma##1..\@nil\psk@xlabelFactor}%
\else%
@@ -1231,7 +1249,8 @@ D\space##1%
\else
\def\pst@@@vlabel##1{%
\edef\@xyDecimals{\psk@yDecimals}%
- \ifodd\psk@ticks% ticks=all||y (0,2)
+% \ifodd\psk@ticks % ticks=all||y (0,2)
+ \ifodd\psk@labels % labelss=all||y (0,2)
\else%
\ifx\psk@ylogBase\@empty%
\psvlabel{\expandafter\@LabelComma##1..\@nil\psk@ylabelFactor}%
@@ -1508,12 +1527,13 @@ D\space##1%
\define@key[psset]{pst-plot}{yStart}[{}]{\def\psk@yStart{#1}}
\define@key[psset]{pst-plot}{yEnd}[{}]{\def\psk@yEnd{#1}}
%
+\define@key[psset]{pst-plot}{plotNoX}[1]{\def\psk@plotNoX{#1}}
\define@key[psset]{pst-plot}{plotNo}[1]{\def\psk@plotNo{#1}}
\define@key[psset]{pst-plot}{plotNoMax}[1]{\def\psk@plotNoMax{#1}}
%
\psset[pst-plot]{nStep=1, nStart=0, nEnd={},%
xStep=0, yStep=0, xStart={}, xEnd={}, yStart={}, yEnd={}, comma=false,%
- plotNo=1,plotNoMax=1}%
+ plotNo=1,plotNoMax=1,plotNoX=1}%
%
\def\pstScalePoints(#1,#2)#3#4{%
% xScale | yScale | xOperator | yOperator
@@ -1539,7 +1559,8 @@ D\space##1%
%
\def\psxs@axes{{%
\ifPst@xAxis\psxs@@axes\pst@dima\pst@dimb\pst@dimc\pst@dimd{}{x}\fi%
- \ifPst@yAxis\psxs@@axes\pst@dima\pst@dimb\pst@dimc\pst@dimd{exch}{y}\fi}}
+ \ifPst@yAxis\psxs@@axes\pst@dima\pst@dimb\pst@dimc\pst@dimd{exch}{y}\fi%
+}}
%
\def\psaxes{\pst@object{psaxes}}
\def\psaxes@i{\pst@getarrows\psaxes@ii}
@@ -1839,6 +1860,12 @@ D\space##1%
} if%
}% end of \pscode
\end@SpecialObj%
+ % now draw the axes again with the correct linecolor
+% \ifis@yAxis%
+ \ifPst@yAxis\psline[linecolor=\pslinecolor](0,#2)(0,#4)\fi%
+% \else%
+ \ifPst@xAxis\psline[linecolor=\pslinecolor](#1,0)(#3,0)\fi%
+% \fi%
\ignorespaces%
}%
%