summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pst-plot
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-03-23 22:58:53 +0000
committerKarl Berry <karl@freefriends.org>2011-03-23 22:58:53 +0000
commit5b837f1b12aa8f8ef27aa5c080af28e446f97263 (patch)
treeb9fe274f3dfcf3a7c97e662eef392f088af090f5 /Master/texmf-dist/tex/generic/pst-plot
parentaf239484eb8ca0c0bec8804f054f7e482b9d6fe6 (diff)
pst-plot 1.28 (23mar11)
git-svn-id: svn://tug.org/texlive/trunk@21812 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/pst-plot')
-rw-r--r--Master/texmf-dist/tex/generic/pst-plot/pst-plot.tex63
1 files changed, 43 insertions, 20 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 6910192a1bc..55c751c7c1f 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 449 2011-01-25 17:43:06Z herbert $
+% $Id: pst-plot.tex 478 2011-03-22 13:55:18Z herbert $
%% BEGIN pst-plot.tex
%%
%% plotting functions and data with PSTricks.
@@ -20,8 +20,8 @@
\ifx\PSTFPloaded\endinput\else \input pst-fp.tex \fi
\ifx\MultidoLoaded\endinput\else \input multido.tex \fi
%
-\def\fileversion{1.26}
-\def\filedate{2011/01/24}
+\def\fileversion{1.28}
+\def\filedate{2011/03/22}
\message{ v\fileversion, \filedate\space (tvz,hv)}
%
\edef\TheAtCode{\the\catcode`\@}
@@ -415,7 +415,7 @@ D\space##1%
\psset[pst-plot]{plotpoints=50}
%
%the following works only for plotstyle line, polygon and bezier
-\define@key[psset]{pst-plot}{yMaxValue}[1.e30]{\def\psk@yMaxValue{#1 }}
+\define@key[psset]{pst-plot}{yMaxValue}[1.e30]{\def\psk@yMaxValue{#1 }\def\psk@yMinValue{#1 neg }}
\psset{yMaxValue=1.e30}
\define@key[psset]{pst-plot}{yMinValue}[-1.e30]{\def\psk@yMinValue{#1 }}
\psset{yMinValue=-1.e30}
@@ -1309,30 +1309,34 @@ D\space##1%
\psset[pst-plot]{xlabelFactor=\relax,ylabelFactor=\relax,showOriginTick}%
%% #1 : optional arguments passed to psline
-%% #2 : x value
-%% #3 : label
+%% #2 : rotating angle
+%% #3 : x value
+%% #4 : label
\def\psxTick{\pst@object{psxTick}}% idea by Martin Chicoine
-\def\psxTick@i(#1)#2{{
+\def\psxTick@i{\@ifnextchar({\psxTick@ii{0}}\psxTick@ii}
+\def\psxTick@ii#1(#2)#3{{
\pst@killglue
\addbefore@par{arrows=-,linewidth=\psk@xtickwidth\pslinewidth}
\use@par
- \psline(#1,\pst@xticksizeB)(#1,\pst@xticksizeA)
- \rput[t](! \psk@origin
- #1 \pst@number\pslabelsep \pst@number\pst@xticksizeB add
- \pst@number\psyunit div neg ){\pshlabel{#2\vphantom{1}}}}\ignorespaces}
+ \psline(#2,\pst@xticksizeB)(#2,\pst@xticksizeA)
+ \rput[t]{#1}(! \psk@origin
+ #2 \pst@number\pslabelsep \pst@number\pst@xticksizeB add
+ \pst@number\psyunit div neg ){\pshlabel{#3\vphantom{1}}}}\ignorespaces}
%
%% #1 : optional arguments passed to psline
-%% #2 : y value
-%% #3 : label
+%% #2 : rotating angle
+%% #3 : y value
+%% #4 : label
\def\psyTick{\pst@object{psyTick}}% idea by Martin Chicoine
-\def\psyTick@i(#1)#2{{
+\def\psyTick@i{\@ifnextchar({\psyTick@ii{0}}\psyTick@ii}
+\def\psyTick@ii#1(#2)#3{{
\pst@killglue
\addbefore@par{arrows=-,linewidth=\psk@ytickwidth\pslinewidth}
\use@par
- \psline(\pst@yticksizeB,#1)(\pst@yticksizeA,#1)
- \rput[r]{0}(! \psk@origin
+ \psline(\pst@yticksizeB,#2)(\pst@yticksizeA,#2)
+ \rput[r]{#1}(! \psk@origin
\pst@number\pst@yticksizeB \pst@number\pslabelsep add
- \pst@number\psxunit div neg #1){\psvlabel{#2}}}\ignorespaces}
+ \pst@number\psxunit div neg #2){\psvlabel{#3}}}\ignorespaces}
%
\def\psCoordinates{\pst@object{psCoordinates}}
\def\psCoordinates@i(#1){%
@@ -2076,6 +2080,11 @@ D\space##1%
\define@key[psset]{pst-plot}{ury}[\z@]{\pssetylength\psk@ury{#1}}
\psset[pst-plot]{llx=\z@, lly=\z@, urx=\z@, ury=\z@}% prevents rounding errors
%
+\define@boolkey[psset]{pst-plot}[Pst@]{psgrid}[true]{}
+\define@key[psset]{pst-plot}{gridpara}[{}]{\def\psk@gridpara{#1}}
+\define@key[psset]{pst-plot}{gridcoor}[\relax]{\def\psk@gridcoor{#1}}
+\psset[pst-plot]{psgrid=false,gridpara={},gridcoor=\relax}
+%
\newdimen\pst@xunit
\newdimen\pst@yunit
%
@@ -2104,13 +2113,20 @@ D\space##1%
% minX | minY | maxX | maxY | Length x-axis | length y-axis%
\pst@killglue%
\begingroup%
+ \bgroup%
+ \use@keep@par%
+ \ifPst@psgrid%
+ \expandafter\psset\expandafter{\psk@gridpara}%
+ \rput(0,0){\expandafter\psgrid\psk@gridcoor}
+ \fi%
+ \egroup%
\pstFPsub\pst@tempA{#3}{#1}%
\pst@dimm=#5%
\pst@dimo=\pst@tempA pt%
\pstFPdiv\pst@@dx{\strip@pt\pst@dimm}{\pst@tempA}%
\pst@xunit=\pst@@dx\p@%
%
- \ifx!#6\let\pst@yunit=\pst@xunit\else
+ \ifx!#6\let\pst@yunit=\pst@xunit\else%
\pst@dimm=#6%
% \pst@dimm=\pst@@dx\pst@dimo\else\pst@dimm=#6\fi%
\pstFPsub\pst@tempA{#4}{#2}%
@@ -2136,6 +2152,13 @@ D\space##1%
% Xorig | yorig | minX | minY | maxX | maxY | Length x-axis | length y-axis%
\pst@killglue%
\begingroup%
+ \bgroup%
+ \use@keep@par%
+ \ifPst@psgrid%
+ \expandafter\psset\expandafter{\psk@gridpara}%
+ \rput(0,0){\expandafter\psgrid\psk@gridcoor}
+ \fi%
+ \egroup%
\pstFPsub\pst@tempA{#5}{#3}%
\pst@dimm=#7%
\pst@dimo=\pst@tempA pt%
@@ -2161,7 +2184,7 @@ D\space##1%
\use@par%
\psaxes(#1,#2)(#3,#4)(#5,#6)%
\egroup%
- \psgraph@vi(#1,#2)(#3,#4)(#5,#6)
+ \psgraph@vi(#1,#2)(#3,#4)(#5,#6)%
}
%
\def\setxLabelC@@r#1,#2(#3,#4)(#5){%
@@ -2208,7 +2231,7 @@ D\space##1%
\fi%
\fi%
\xdef\psgraphLLx{#3}\xdef\psgraphLLy{#4}\xdef\psgraphURx{#5}\xdef\psgraphURy{#6}%
- %\ignorespaces
+ \ignorespaces
}
%
\def\endpsgraph{%