summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pst-plot
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-05-10 21:26:22 +0000
committerKarl Berry <karl@freefriends.org>2016-05-10 21:26:22 +0000
commitd2cbd5d0742f30305d0debc84b932d2064d890c7 (patch)
tree3a0bb3e2ac6a86a2bd7faa6077f897d8261ead7f /Master/texmf-dist/tex/generic/pst-plot
parentb656cfa10e3f0e35eb31d350548a1c2c325314b6 (diff)
pst-plot (10may16)
git-svn-id: svn://tug.org/texlive/trunk@41006 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.tex421
1 files changed, 300 insertions, 121 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 d248c402a95..a39ae857556 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 83 2014-08-23 15:04:57Z herbert $
+% $Id: pst-plot.tex 251 2016-01-16 17:50:04Z 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-2015 by Herbert Voss, hvoss@tug.org.
+%% COPYRIGHT 2009-2016 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
@@ -19,11 +19,12 @@
\ifx\PSTricksLoaded\endinput\else\input pstricks.tex\fi
\ifx\PSTXKeyLoaded\endinput\else \input pst-xkey.tex\fi
\ifx\PSTtoolsloaded\endinput\else\input pst-tools.tex\fi
+\ifx\PSTtoolsloaded\endinput\else\input pstricks-add.tex\fi
\ifx\PSTFPloaded\endinput\else \input pst-fp.tex \fi
\ifx\MultidoLoaded\endinput\else \input multido.tex \fi
%
-\def\fileversion{1.70}
-\def\filedate{2014/08/23}
+\def\fileversion{1.72}
+\def\filedate{2016/05/09}
\message{ v\fileversion, \filedate\space (tvz,hv)}
%
\edef\TheAtCode{\the\catcode`\@}
@@ -1192,6 +1193,70 @@ D\space##1%
\define@boolkey[psset]{pst-plot}[]{showorigin}[true]{}
\psset[pst-plot]{showorigin}
%
+\long\def\psrotatebox#1#2{%
+ \leavevmode
+ \Grot@setangle{#1}%
+ \setbox\z@\hbox{{#2}}%
+ \Grot@x\z@
+ \Grot@y\z@
+ \Grot@box}
+\def\Grot@setangle#1{\edef\Grot@angle{#1}}
+\def\Grot@Px#1#2#3{%
+ #1\Grot@cos#2%
+ \advance#1-\Grot@sin#3}
+\def\Grot@Py#1#2#3{%
+ #1\Grot@sin#2%
+ \advance#1\Grot@cos#3}
+\def\Grot@box{%
+ \begingroup
+ \CalculateSin\Grot@angle
+ \CalculateCos\Grot@angle
+ \edef\Grot@sin{\UseSin\Grot@angle}%
+ \edef\Grot@cos{\UseCos\Grot@angle}%
+ \Grot@r\wd\z@ \advance\Grot@r-\Grot@x
+ \Grot@l\z@ \advance\Grot@l-\Grot@x
+ \Grot@h\ht\z@ \advance\Grot@h-\Grot@y
+ \Grot@d-\dp\z@ \advance\Grot@d-\Grot@y
+ \ifdim\Grot@sin\p@>\z@
+ \ifdim\Grot@cos\p@>\z@
+ \Grot@Py\Grot@height \Grot@r\Grot@h%B
+ \Grot@Px\Grot@right \Grot@r\Grot@d%E
+ \Grot@Px\Grot@left \Grot@l\Grot@h%C
+ \Grot@Py\Grot@depth \Grot@l\Grot@d%D
+ \else
+ \Grot@Py\Grot@height \Grot@r\Grot@d%E
+ \Grot@Px\Grot@right \Grot@l\Grot@d%D
+ \Grot@Px\Grot@left \Grot@r\Grot@h%B
+ \Grot@Py\Grot@depth \Grot@l\Grot@h%C
+ \fi
+ \else
+ \ifdim\Grot@cos\p@<\z@
+ \Grot@Py\Grot@height \Grot@l\Grot@d%D
+ \Grot@Px\Grot@right \Grot@l\Grot@h%C
+ \Grot@Px\Grot@left \Grot@r\Grot@d%E
+ \Grot@Py\Grot@depth \Grot@r\Grot@h%B
+ \else
+ \Grot@Py\Grot@height \Grot@l\Grot@h%C
+ \Grot@Px\Grot@right \Grot@r\Grot@h%B
+ \Grot@Px\Grot@left \Grot@l\Grot@d%D
+ \Grot@Py\Grot@depth \Grot@r\Grot@d%E
+ \fi
+ \fi
+ \advance\Grot@height\Grot@y
+ \advance\Grot@depth\Grot@y
+ \Grot@Px\dimen@ \Grot@x\Grot@y
+ \Grot@Py\dimen@ii \Grot@x\Grot@y
+ \dimen@-\dimen@ \advance\dimen@-\Grot@left
+ \dimen@ii-\dimen@ii \advance\dimen@ii\Grot@y
+ \setbox\z@\hbox{%
+ \kern\dimen@
+ \raise\dimen@ii\hbox{\Grot@start\box\z@\Grot@end}}%
+ \ht\z@\Grot@height
+ \dp\z@-\Grot@depth
+ \advance\Grot@right-\Grot@left\wd\z@\Grot@right
+ \leavevmode\box\z@
+ \endgroup}
+%
\define@key[psset]{pst-plot}{labelFontSize}[{}]{\def\psk@xlabelFontSize{#1}\def\psk@ylabelFontSize{#1}}%
\define@key[psset]{pst-plot}{xlabelFontSize}[{}]{\def\psk@xlabelFontSize{#1}}%
\define@key[psset]{pst-plot}{ylabelFontSize}[{}]{\def\psk@ylabelFontSize{#1}}%
@@ -1264,8 +1329,33 @@ D\space##1%
\pst@getint{#1}{\psk@ytrigLabelBase}\psset{ytrigLabels}}
\psset[pst-plot]{trigLabelBase=0}
%
-\define@boolkey[psset]{pst-plot}[Pst@]{xtrigLabels}[true]{%
- \ifPst@xtrigLabels
+\define@key[psset]{pst-plot}{fractionLabelBase}[0]{\pst@getint{#1}{\psk@xfractionLabelBase}\let\psk@yfractionLabelBase\psk@xfractionLabelBase}
+\define@key[psset]{pst-plot}{xfractionLabelBase}[0]{%
+ \pst@getint{#1}{\psk@xfractionLabelBase}\psset{xfractionLabels}}
+\define@key[psset]{pst-plot}{yfractionLabelBase}[0]{%
+ \pst@getint{#1}{\psk@yfractionLabelBase}\psset{yfractionLabels}}
+\psset[pst-plot]{fractionLabelBase=0}
+%
+\def\setDefaulthLabels{%
+ \ifPst@xmathLabel\def\pshlabel##1{$\psk@xlabelFontSize##1$}\else\def\pshlabel##1{\psk@xlabelFontSize##1}\fi
+ \def\pst@@@hlabel##1{%
+ \edef\@xyDecimals{\psk@xDecimals}%
+% \ifnum\psk@ticks<\tw@ % ticks=all|x
+ \ifnum\psk@labels<\tw@ % labels=all|x
+ \ifx\psk@xlogBase\@empty%
+ \pshlabel{\psk@xlabelFontSize\expandafter\@LabelComma##1..\@nil\psk@xlabelFactor}%
+ \else%
+ \ifPst@xmathLabel%
+ \pshlabel{\psk@xlabelFontSize\psk@xlogBase^{\expandafter\@stripDecimals##1..\@nil}}%
+ \else%
+ \pshlabel{\psk@xlabelFontSize\psk@xlogBase\textsuperscript{\expandafter\@stripDecimals##1..\@nil}}%
+ \fi
+ \fi%
+ \fi%
+ }%
+ \ifPst@xmathLabel \def\pshlabel##1{$\psk@xlabelFontSize##1$}\else\def\pshlabel##1{\psk@xlabelFontSize##1}\fi
+}
+\def\setTrighLabels{%
\def\pst@@@hlabel##1{\pshlabel{##1}}
\def\pshlabel##1{%
\ifnum\psk@xtrigLabelBase<2
@@ -1324,33 +1414,31 @@ D\space##1%
\fi%
\fi%
}%
- \else%
- \def\pst@@@hlabel##1{%
- \edef\@xyDecimals{\psk@xDecimals}%
-% \ifnum\psk@ticks<\tw@ % ticks=all|x
- \ifnum\psk@labels<\tw@ % labels=all|x
- \ifx\psk@xlogBase\@empty%
- \pshlabel{\psk@xlabelFontSize\expandafter\@LabelComma##1..\@nil\psk@xlabelFactor}%
+}
+%
+\def\setDefaultvLabels{%
+ \ifPst@ymathLabel\def\psvlabel##1{$\psk@ylabelFontSize##1$}\else\def\psvlabel##1{\psk@ylabelFontSize##1}\fi
+ \def\pst@@@vlabel##1{%
+ \edef\@xyDecimals{\psk@yDecimals}%
+% \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}%
\else%
- \ifPst@xmathLabel%
- \pshlabel{\psk@xlabelFontSize\psk@xlogBase^{\expandafter\@stripDecimals##1..\@nil}}%
- \else%
- \pshlabel{\psk@xlabelFontSize\psk@xlogBase\textsuperscript{\expandafter\@stripDecimals##1..\@nil}}%
- \fi
+ \ifPst@ymathLabel%
+ \psvlabel{\psk@ylogBase^{\expandafter\@stripDecimals##1..\@nil }}%
+ \else
+ \psvlabel{\psk@ylogBase\textsuperscript{\expandafter\@stripDecimals##1..\@nil }}%
+ \fi%
\fi%
\fi%
}%
- \ifPst@xmathLabel%
- \def\pshlabel##1{$\psk@xlabelFontSize##1$}\else\def\pshlabel##1{\psk@xlabelFontSize##1}\fi%
- \fi%
}%
-%
-\define@boolkey[psset]{pst-plot}[Pst@]{ytrigLabels}[true]{%
- \ifPst@ytrigLabels
- \def\pst@@@vlabel##1{\psvlabel{##1}}
+\def\setTrigvLabels{%
+ \def\pst@@@vlabel##1{\psvlabel{##1}}
\def\psvlabel##1{%
- \ifnum\psk@ytrigLabelBase<2
- \def\de@nominator{\@ne}\else\def\de@nominator{\psk@ytrigLabelBase}\fi
+ \ifnum\psk@ytrigLabelBase<2 \def\de@nominator{\@ne}\else\def\de@nominator{\psk@ytrigLabelBase}\fi
\def\pst@tempA{##1}
\pst@abs{\pst@tempA}\pst@cntm
\pst@mod{\pst@cntm}{\de@nominator}\pst@cntp % cntb=##1 modulo trigLabelBase
@@ -1375,8 +1463,8 @@ D\space##1%
\fi%
\else%
\ifPst@ymathLabel%
- $\psk@ylabelFontSize%
- \ifnum\pst@cntp=\@ne% % < 1 pi?
+ $\psk@ylabelFontSize
+ \ifnum\pst@cntp=\@ne% % < 1 pi? $
\if\pst@cntm=\@ne%
\frac{\pi}{\de@nominator}% % pi/x
\else\ifnum\pst@tempA=-1 \frac{-\pi}{\de@nominator}%
@@ -1388,10 +1476,10 @@ D\space##1%
\else\ifnum\pst@tempA=\de@nominator \pi%
\else\frac{\pst@tempA\pi}{\de@nominator}%
\fi\fi\fi$%
- \else%
- \psk@ylabelFontSize%
+ \else
+ \psk@ylabelFontSize
\ifnum\pst@cntp=\@ne% % < 1 pi?
- \if\pst@cntm=\@ne%
+ \if\pst@cntm=\@ne
$\frac{\pi}{\de@nominator}$% % pi/x
\else\ifnum\pst@tempA=-1 $\frac{-\pi}{\de@nominator}$%
\else \ifnum\pst@tempA=1 $\frac{\pi}{\de@nominator}$%
@@ -1405,30 +1493,115 @@ D\space##1%
\fi%
\fi%
}%
- \else
- \def\pst@@@vlabel##1{%
- \edef\@xyDecimals{\psk@yDecimals}%
-% \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}%
- \else%
- \ifPst@ymathLabel%
- \psvlabel{\psk@ylogBase^{\expandafter\@stripDecimals##1..\@nil }}%
- \else
- \psvlabel{\psk@ylogBase\textsuperscript{\expandafter\@stripDecimals##1..\@nil }}%
- \fi%
- \fi%
- \fi%
+}%$
+%
+\def\setFractionvLabels{%
+ \def\pst@@@vlabel##1{\psvlabel{##1}}
+ \def\psvlabel##1{%
+ \ifnum\psk@yfractionLabelBase<2 \def\de@nominator{\@ne}\else\def\de@nominator{\psk@yfractionLabelBase}\fi
+ \def\pst@tempA{##1}%
+ \pst@abs{\pst@tempA}\pst@cntm
+ \pst@mod{\pst@cntm}{\de@nominator}\pst@cntp % cntb=##1 modulo trigLabelBase
+ \ifnum\@ne>\pst@cntp % 1 > modulo -> then we have pi/x
+ \pst@cnto=\pst@cntm \divide\pst@cnto by \de@nominator
+ \ifPst@ymathLabel$\psk@ylabelFontSize\ifnum\pst@tempA<0 -\fi\the\pst@cnto\psk@ylabelFactor$%
+ \else \psk@ylabelFontSize\ifnum\pst@tempA<0 -\fi\the\pst@cnto\psk@ylabelFactor
+ \fi
+ \else
+ \ifPst@ymathLabel
+ $\psk@ylabelFontSize
+ \ifnum\pst@cntp=\@ne % < 1? $
+ \if\pst@cntm=\@ne
+ \frac{1}{\de@nominator}\psk@ylabelFactor% % 1/x
+ \else\ifnum\pst@tempA=-1 \frac{-1}{\de@nominator}\psk@ylabelFactor%
+ \else \ifnum\pst@tempA=1 \frac{1}{\de@nominator}\psk@ylabelFactor%
+ \else\frac{\pst@tempA}{\de@nominator}\psk@ylabelFactor% x/y
+ \fi\fi\fi
+ \else
+ \ifnum\pst@tempA=1 \frac{1}{\de@nominator}\psk@ylabelFactor%
+ \else\ifnum\pst@tempA=\de@nominator 1\psk@xlabelFactor \else\frac{\pst@tempA}{\de@nominator}\psk@ylabelFactor%
+ \fi\fi\fi$
+ \else
+ \psk@ylabelFontSize
+ \ifnum\pst@cntp=\@ne% % < 1?
+ \if\pst@cntm=\@ne
+ $\frac{1}{\de@nominator}\psk@ylabelFactor$% % 1/x
+ \else\ifnum\pst@tempA=-1 $\frac{-1}{\de@nominator}\psk@ylabelFactor$%
+ \else \ifnum\pst@tempA=1 $\frac{1}{\de@nominator}\psk@ylabelFactor$%
+ \else$\frac{\pst@tempA}{\de@nominator}\psk@ylabelFactor$% x/y
+ \fi\fi\fi%
+ \else%
+ \ifnum\pst@tempA=1 $\frac{1}{\de@nominator}\psk@ylabelFactor$%
+ \else\ifnum\pst@tempA=\de@nominator 1\psk@ylabelFactor
+ \else$\frac{\pst@tempA}{\de@nominator}\psk@ylabelFactor$% %$
+ \fi\fi\fi
+ \fi
+ \fi
+ }%
+}%$
+\def\setFractionhLabels{%
+ \def\pst@@@hlabel##1{\pshlabel{##1}}%
+ \def\pshlabel##1{%
+ \ifnum\psk@xfractionLabelBase<2 \def\de@nominator{\@ne}\else\def\de@nominator{\psk@xfractionLabelBase}\fi
+ \def\pst@tempA{##1}%
+ \pst@abs{\pst@tempA}\pst@cntm
+ \pst@mod{\pst@cntm}{\de@nominator}\pst@cntp% cntb=##1 modulo trigLabelBase
+ \ifnum\@ne>\pst@cntp % 1 > modulo -> then we have 1/x
+ \pst@cnto=\pst@cntm \divide\pst@cnto by \de@nominator
+ \ifPst@xmathLabel$\psk@xlabelFontSize\ifnum\pst@tempA<0 -\fi\the\pst@cnto\psk@xlabelFactor$%
+ \else \psk@xlabelFontSize\ifnum\pst@tempA<0 -\fi\the\pst@cnto\psk@xlabelFactor
+ \fi
+ \else
+ \ifPst@xmathLabel
+ $\psk@xlabelFontSize% $
+ \ifnum\pst@cntp=\@ne
+ \if\pst@cntm=\@ne \frac{1}{\de@nominator}\psk@xlabelFactor% % 1/x
+ \else\ifnum\pst@tempA=-1 \frac{-1}{\de@nominator}\psk@xlabelFactor%
+ \else\ifnum\pst@tempA=1 \frac{1}{\de@nominator}\psk@xlabelFactor%
+ \else\frac{\pst@tempA}{\de@nominator}\psk@xlabelFactor% x/y
+ \fi\fi\fi%
+ \else%
+ \ifnum\pst@tempA=1 \frac{1}{\de@nominator}\psk@xlabelFactor%
+ \else\ifnum\pst@tempA=\de@nominator 1\psk@xlabelFactor\else\frac{\pst@tempA}{\de@nominator}\psk@xlabelFactor%
+ \fi\fi\fi$
+ \else
+ \psk@xlabelFontSize
+ \ifnum\pst@cntp=\@ne
+ \if\pst@cntm=\@ne $\frac{1}{\de@nominator}\psk@xlabelFactor$% % 1/x
+ \else\ifnum\pst@tempA=-1 $\frac{-1}{\de@nominator}\psk@xlabelFactor$%
+ \else \ifnum\pst@tempA=1 $\frac{1}{\de@nominator}\psk@xlabelFactor$%
+ \else$\frac{\pst@tempA}{\de@nominator}\psk@xlabelFactor$% x/y
+ \fi\fi\fi
+ \else
+ \ifnum\pst@tempA=1 $\frac{1}{\de@nominator}\psk@xlabelFactor$%
+ \else\ifnum\pst@tempA=\de@nominator 1\psk@xlabelFactor%
+ \else$\frac{\pst@tempA}{\de@nominator}\psk@xlabelFactor$% %$
+ \fi\fi\fi
+ \fi
+ \fi
}%
- \fi}%
+}%$
+%
+\define@boolkey[psset]{pst-plot}[Pst@]{xtrigLabels}[true]{%
+ \ifPst@xtrigLabels \setTrighLabels \else \setDefaulthLabels\fi}
+%
+\define@boolkey[psset]{pst-plot}[Pst@]{ytrigLabels}[true]{%
+ \ifPst@ytrigLabels \setTrigvLabels \else \setDefaultvLabels \fi}
+%
\define@boolkey[psset]{pst-plot}[Pst@]{trigLabels}[true]{%
\ifPst@trigLabels\psset[pst-plot]{xtrigLabels,ytrigLabels=false}
\else \psset[pst-plot]{xtrigLabels=false,ytrigLabels=false}%
\fi}
\psset[pst-plot]{trigLabels=false}
%
+\define@boolkey[psset]{pst-plot}[Pst@]{xfractionLabels}[true]{%
+ \ifPst@xfractionLabels \setFractionhLabels \else \setDefaulthLabels \fi}
+\define@boolkey[psset]{pst-plot}[Pst@]{yfractionLabels}[true]{%
+ \ifPst@yfractionLabels \setFractionvLabels \else \setDefaultvLabels \fi}
+\define@boolkey[psset]{pst-plot}[Pst@]{fractionLabels}[true]{%
+ \ifPst@fractionLabels \setFractionhLabels\setFractionvLabels\Pst@xfractionLabelstrue\Pst@yfractionLabelstrue\fi}
+\psset[pst-plot]{fractionLabels=false}
+%
%logLines=all|x|y|none (0,1,2,3)
\def\psk@logLines{3}
\define@key[psset]{pst-plot}{logLines}[none]{\pst@expandafter\psset@@logLines#1\@nil\psk@logLines}
@@ -1486,7 +1659,7 @@ D\space##1%
\def\psyTick@ii#1(#2)#3{{%
\pst@killglue
\addbefore@par{arrows=-,linewidth=\psk@ytickwidth\pslinewidth}
- \ifPst@ytrigLabels\addto@par{ytrigLabels=false}\fi
+ \ifPst@ytrigLabels \setDefaultvLabels \fi
\use@par
\edef\temp@coor{(!\pst@number\pst@yticksizeB \pst@number\psxunit div #2)(!\pst@number\pst@yticksizeA \pst@number\psxunit div #2)}%
\expandafter\psline\temp@coor
@@ -1752,23 +1925,23 @@ D\space##1%
\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]{%
\psaxes@vii(#1)(#2)(#3)%
- \begingroup%
+ \begingroup
\SpecialCoor
\use@par
\ifshowgrid\psgrid[style=gridstyleA]\fi
\uput{\psxlabelsep}[#5](#3|#1){#4}\uput{\psylabelsep}[#7](#1|#3){#6}%
- \endgroup%
+ \endgroup
\ignorespaces}
%
\def\psaxes@vii(#1,#2)(#3,#4)(#5,#6){%
- \pst@killglue%
- \begingroup%
+ \pst@killglue
+ \begingroup
\pssetxlength\pst@dimc{#5}% ur-x
\pssetylength\pst@dimd{#6}% ur-y
- \ifdim\pst@dimc<\z@\ifdim\pst@dimd<\z@\relax% axes show to left and down
- \addbefore@par{xlabelPos=top,ylabelPos=right}\fi\fi%
- \setbox\pst@hbox=\hbox\bgroup%
- \use@par% now the same with an optional unit=... in par
+ \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
\ifshowgrid\psgrid[style=gridstyleA]\fi
\pssetxlength\pst@dimg{#1}% o-x
\pssetylength\pst@dimh{#2}% o-y
@@ -1781,24 +1954,28 @@ D\space##1%
% X axis labels (\psk@log = 0 or 1)
%
% Whole thing will be translated to origin:
- \advance\pst@dima by -\pst@dimg% Dist. from ll-x to o-x
- \advance\pst@dimb by -\pst@dimh% Dist. from ll-y to o-y
- \advance\pst@dimc by -\pst@dimg% Dist. from ur-x to o-x
- \advance\pst@dimd by -\pst@dimh% Dist. from ur-y to o-y
+ \pst@dima=\dimexpr\pst@dima-\pst@dimg\relax
+ \pst@dimb=\dimexpr\pst@dimb-\pst@dimh\relax
+ \pst@dimc=\dimexpr\pst@dimc-\pst@dimg\relax
+ \pst@dimd=\dimexpr\pst@dimd-\pst@dimh\relax
+% \advance\pst@dima by -\pst@dimg% Dist. from ll-x to o-x
+% \advance\pst@dimb by -\pst@dimh% Dist. from ll-y to o-y
+% \advance\pst@dimc by -\pst@dimg% Dist. from ur-x to o-x
+% \advance\pst@dimd by -\pst@dimh% Dist. from ur-y to o-y
% Make lines/arrows or frame:
\@nameuse{psxs@\psk@axesstyle}% \psxs@axes or \psxs@frame or \psxs@polar
- \ifPst@yAxis%
- \begingroup%
- \ifdim\pst@dima=\z@\else\showoriginfalse\fi%
- \ifnum\psk@dy=\z@%
- \pst@dimg=\psk@Dy\psyunit%
- \ifdim\pst@dimg<\p@\pst@cnta=\psk@Dy\edef\psk@Dy{-\the\pst@cnta}\fi% v.1.21
+ \ifPst@yAxis
+ \begingroup
+ \ifdim\pst@dima=\z@ \else\showoriginfalse\fi
+ \ifnum\psk@dy=\z@
+ \pst@dimg=\psk@Dy\psyunit
+ \ifdim\pst@dimg<\p@ \pst@cnta=\psk@Dy\edef\psk@Dy{\the\numexpr-1*\pst@cnta}\fi% v.1.21
\edef\psk@dy{\number\pst@dimg}%
- \fi%
+ \fi
% \ifPst@xAxis\else\showorigintrue\fi% 2009-10-21
- \pst@vlabels{\pst@dimd}{\psk@arrowB}{#3}{#5}%
- \ifPst@xAxis\ifdim\pst@dima<\z@\showoriginfalse\fi\fi% no 0 when x- axis is crossing
- \pst@vlabels{\pst@dimb}{\psk@arrowA}{#3}{#5}%
+ \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}%
\endgroup
\fi
\ifPst@xAxis
@@ -1806,46 +1983,46 @@ D\space##1%
\ifdim\pst@dimb=\z@\else\showoriginfalse\fi
\ifnum\psk@dx=\z@
\pst@dimg=\psk@Dx\psxunit
- \ifdim\pst@dimg<\p@\pst@cnta=\psk@Dx\edef\psk@Dx{-\the\pst@cnta}% v.1.21
+ \ifdim\pst@dimg<\p@\pst@cnta=\psk@Dx\edef\psk@Dx{\the\numexpr-1*\pst@cnta}% v.1.21
\fi% v.1.21
\edef\psk@dx{\number\pst@dimg}%
- \fi%
+ \fi
% \ifPst@yAxis\else\showorigintrue\fi% 2009-10-21
- \pst@hlabels{\pst@dimc}{\psk@arrowB}{#4}{#6}%
- \ifPst@yAxis\showoriginfalse\fi%
- \pst@hlabels{\pst@dima}{\psk@arrowA}{#4}{#6}%
- \endgroup%
- \fi%
+ \pst@hlabels{\pst@dimc}{\psk@arrowB}{#3}{#5}%
+ \ifPst@yAxis\showoriginfalse\fi
+ \pst@hlabels{\pst@dima}{\psk@arrowA}{#3}{#5}%
+ \endgroup
+ \fi
% Now close "\pst@hbox" (which is 0-dimensional), and put it at the origin.
- \egroup%
- \pssetxlength\pst@dimg{#1}%
- \pssetylength\pst@dimh{#2}%
- \leavevmode\psput@cartesian\pst@hbox%
- \endgroup%
- \ignorespaces%
+ \egroup
+ \pssetxlength\pst@dimg{#1}
+ \pssetylength\pst@dimh{#2}
+ \leavevmode\psput@cartesian\pst@hbox
+ \endgroup
+ \ignorespaces
}
%
\newif\ifis@yAxis%
%
\def\psxs@@axes#1#2#3#4#5#6{% llx,lly,urx,ury,exch,x|y,arrowA,arrowB
- \pst@killglue%
- \begin@SpecialObj%
+ \pst@killglue
+ \begin@SpecialObj
\ifx#6x\relax% % x-axis?
- \is@yAxisfalse%
- \ifnum\psk@dx=\z@%
- \pst@dimg=\psk@Dx\psxunit%
+ \is@yAxisfalse
+ \ifnum\psk@dx=\z@
+ \pst@dimg=\psk@Dx\psxunit
\def\psk@dx{\number\pst@dimg}%
- \fi%
- \else%
- \is@yAxistrue%
- \ifnum\psk@dy=\z@%
- \pst@dimg=\psk@Dy\psyunit%
+ \fi
+ \else
+ \is@yAxistrue
+ \ifnum\psk@dy=\z@
+ \pst@dimg=\psk@Dy\psyunit
\def\psk@dy{\number\pst@dimg}%
- \fi%
- \fi%
- \let\pst@linetype\pst@arrowtype%
+ \fi
+ \fi
+ \let\pst@linetype\pst@arrowtype
\def\pst@axes{axes}%
- \pst@addarrowdef%
+ \pst@addarrowdef
\addto@pscode{
/showOrigin \ifPst@showOriginTick true \else false \fi def % ticks for 0/0 ?
\ifis@yAxis 0 \pst@number#4 \else \pst@number#3 0 \fi
@@ -2062,10 +2239,10 @@ D\space##1%
\end@SpecialObj%
% now draw the axes again with the correct linecolor
\ifx\psk@axesstyle\@none\else
- \ifPst@yAxis\psline[linecolor=\pslinecolor](0,#2)(0,#4)\fi%
- \ifPst@xAxis\psline[linecolor=\pslinecolor](#1,0)(#3,0)\fi%
- \fi%
- \ignorespaces%
+ \ifPst@yAxis\psline[linecolor=\pslinecolor](0,#2)(0,#4)\fi
+ \ifPst@xAxis\psline[linecolor=\pslinecolor](#1,0)(#3,0)\fi
+ \fi
+ \ignorespaces
}%
%
\def\psxs@frame{%
@@ -2177,8 +2354,10 @@ D\space##1%
\fi%
\fi%
\else
- \pst@cnta=#1\relax% % Distance (in sp) to end.
- \pstFPdiv\pst@tempA{\the\pst@cnta}{\psk@dx}%
+% \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}}%
% \divide\pst@cnta\psk@dx\relax% % Number of ticks/labels
@@ -2214,23 +2393,24 @@ D\space##1%
% \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\advance#1\ifdim#1>\z@-\fi7\pslinewidth\fi%
+ \ifdim#1=\z@\else
+ \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@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%
- \else%
- \pst@cnta=#1\relax% % % Distance (in sp) to end.
- \pstFPdiv\pst@tempA{\the\pst@cnta}{\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}
+ \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
+ \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%
@@ -2468,7 +2648,6 @@ D\space##1%
\ifx\relax\pslegend@text\relax \else\pslegend@iii[\pslegend@ref](!\pslegend@coor)\fi
\expandafter\psset\expandafter{\psgraph@para}%
\ifnum\psk@axespos>0
- \typeout{\psgraph@para}%
\expandafter\psaxes\psgraph@coor
\fi
\endpspicture