summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pst-plot
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-08-30 23:00:42 +0000
committerKarl Berry <karl@freefriends.org>2017-08-30 23:00:42 +0000
commitf3fd3b4467cd76a039a199abe6944cfb00fea1e0 (patch)
tree551dcc5f426a01c7c1fe0c65842214e86473bf73 /Master/texmf-dist/tex/generic/pst-plot
parent257f495b243adc903270c70786bb930c60cacd8b (diff)
pst-plot (30aug17)
git-svn-id: svn://tug.org/texlive/trunk@45176 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.tex68
1 files changed, 47 insertions, 21 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 e46dd900cf4..ad5abf57c55 100644
--- a/Master/texmf-dist/tex/generic/pst-plot/pst-plot.tex
+++ b/Master/texmf-dist/tex/generic/pst-plot/pst-plot.tex
@@ -23,8 +23,8 @@
\ifx\PSTFPloaded\endinput\else \input pst-fp.tex \fi
\ifx\MultidoLoaded\endinput\else \input multido.tex \fi
%
-\def\fileversion{1.80}
-\def\filedate{2017/05/23}
+\def\fileversion{1.83}
+\def\filedate{2017/08/29}
\message{ v\fileversion, \filedate\space (tvz,hv)}
%
\edef\TheAtCode{\the\catcode`\@}
@@ -162,7 +162,6 @@ D\space##1%
\loop
\read\RCD@file to \@tempa
\ifeof\RCD@file\else
- %%%\typeout{*** \@tempa ***}%
\edef\@tempa{\@tempa#2}%
\def\reserved@b{}%
\@tempswafalse
@@ -370,7 +369,7 @@ D\space##1%
/u xiSquare fi mul xi xifi mul sub n xiSquare mul xi dup mul sub div def
/v n xifi mul xi fi mul sub n xiSquare mul xi dup mul sub div def
\Pst@Debug\space 0 gt { % print the equation
- /Helvetica findfont 12 scalefont setfont
+ /NimbusSanL-Regu findfont 12 scalefont setfont
0 -50 moveto (y=) show % print y=
v \pst@number\psyunit \pst@number\psxunit div div 20 string cvs show ( x+) show % m*x+
u \pst@number\psyunit div 20 string cvs show } if
@@ -398,6 +397,11 @@ D\space##1%
\define@key[psset]{pst-plot}{postAction}[]{\def\psk@postAction{%
\ifx\relax#1\relax\else\pst@number\psyunit div #1 \pst@number\psyunit mul \fi }}
\psset[pst-plot]{postAction=}
+\define@key[psset]{pst-plot}{mediancolor}[black]{\pst@getcolor{#1}\median@linecolor}
+\psset[pst-plot]{mediancolor=black}
+\define@boolkey[psset]{pst-plot}[Pst@]{markMedian}[true]{}
+\psset[pst-plot]{markMedian=false}
+
%
\def\psBoxplot@ii{%
\addto@pscode{
@@ -489,15 +493,29 @@ D\space##1%
Barwidth dup add 0 rlineto
Barwidth LowerQuartil \psk@postAction lineto
closepath
+ \pst@usecolor\psfillcolor
gsave \pst@usecolor\psfillcolor \tx@setTransparency fill grestore
- Barwidth neg Median \psk@postAction moveto % median
- Barwidth dup add 0 rlineto
+ \@nameuse{psls@solid}
+ \ifPst@markMedian
+ \pst@number\pslabelsep neg Median moveto currentpoint
+ /YMedian ED /XMedian ED
+ Barwidth neg Median \psk@postAction lineto % median
+ \else
+ Barwidth neg Median \psk@postAction moveto % median
+ \fi
+ Barwidth dup add 0 rlineto
\pst@number\pslinewidth SLW
- \pst@usecolor\pslinecolor
+ \pst@usecolor\median@linecolor
\tx@setStrokeTransparency
% \tx@setStrokeTransparency
- \@nameuse{psls@solid}
-}}%
+% \@nameuse{psls@solid}
+ stroke
+% \ifPst@markMedian XMedian XMedian moveto \fi
+ }
+% \ifPst@markMedian
+% \rput{90}(! currentpoint \tx@ScreenCoor){2.5}
+% \fi
+}%
%
\def\beginplot@Boxplot{\init@pscode}
\def\endplot@Boxplot{%
@@ -652,11 +670,12 @@ D\space##1%
\addto@pscode{\pst@cp \psline@iii \psk@Oy\space \pst@number\psyunit mul \tx@LineToXAxis}%
\end@OpenObj}
%
-\define@key[psset]{pst-plot}{PSfont}[Times-Roman]{\def\psk@PSfont{/#1 }}
+\define@key[psset]{pst-plot}{PSfont}[NimbusRomNo9L-Regu]{\def\psk@PSfont{/#1 }}
+%\define@key[psset]{pst-plot}{PSfont}[Times-Roman]{\def\psk@PSfont{/#1 }}
\define@key[psset]{pst-plot}{valuewidth}[10]{\pst@getint{#1}\psk@valuewidth }
\define@key[psset]{pst-plot}{fontscale}[10]{\pst@checknum{#1}\psk@fontscale }
\define@key[psset]{pst-plot}{decimals}[-1]{\pst@getint{#1}\psk@decimals }
-\psset[pst-plot]{PSfont=Times-Roman,fontscale=10,valuewidth=10,decimals=-1}
+\psset[pst-plot]{PSfont=NimbusRomNo9L-Regu,fontscale=10,valuewidth=10,decimals=-1}
%
\newdimen\psxlabelsep
\newdimen\psylabelsep
@@ -1969,8 +1988,8 @@ D\space##1%
\pssetylength\pst@dimh{#2}% o-y
\pssetxlength\pst@dima{#3}% ll-x
\pssetylength\pst@dimb{#4}% ll-y
- \pssetxlength\pst@dimc{#5}% ur-x
- \pssetylength\pst@dimd{#6}% ur-y
+% \pssetxlength\pst@dimc{#5}% ur-x
+% \pssetylength\pst@dimd{#6}% ur-y
% If minimum values are negative in log mode, we modify Ox
% (respectively Oy) if this was not done by the user
% X axis labels (\psk@log = 0 or 1)
@@ -2371,9 +2390,9 @@ D\space##1%
\pst@cnta=#1\relax% % Distance (in sp) to end.
\divide\pst@cnta\psk@dx\relax% % Number of ticks/labels
\ifnum\pst@cnta=\z@\else%
- \pst@dimb=\psk@dx sp % Space between ticks.
-% \ifPst@yAxis\else\showorigintrue\fi %%%% 20170417
- \ifnum\psk@labels<\tw@ \ifPst@xAxis\pst@@hlabels\fi\fi
+ \pst@dimb=\psk@dx sp% % Space between ticks.
+ \ifPst@yAxis\else\showorigintrue\fi
+ \ifnum\psk@labels<\tw@\ifPst@xAxis\pst@@hlabels\fi\fi
\showoriginfalse
\fi
\fi
@@ -2390,8 +2409,11 @@ D\space##1%
% \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}}}}%
+ \edef\pst@Xstart{\pst@int{#3}}%
+ \edef\pst@Xend{\pst@int{#4}}%
+ \multido{\nA=0+1,\rA=\pst@Xstart+\psk@Dx}{%
+ \numexpr\pst@Xend-\pst@Xstart+1}{\uput{\psxlabelsep}[\pst@tempC]{\pst@xLabelsRot}(\rA,0){%
+ \strut\expandafter\pshlabel\expandafter{\psPutXLabel{\nA}}}}%
\SpecialLabelsDonetrue
\fi
\fi
@@ -2406,7 +2428,8 @@ D\space##1%
\vskip-\pst@xticksizeB\vskip-\psxlabelsep\vskip-1ex % 3
\fi
\ifnum\pst@cnta<\z@ \pst@dimb=-\pst@dimb\fi
- \hbox to\z@{%
+% \hbox to \z@{%
+ \hbox to \hsize{% to prevent overfull hbox 20170626
\ifshoworigin\hbox to \z@{\hss\pst@@@hlabel{\psk@Ox}\hss}\fi
\mmultido{\nA=\psk@Ox+\psk@Dx}{\pst@cnta}{%
\hskip\pst@dimb \hbox to \z@{\hss
@@ -2435,8 +2458,11 @@ D\space##1%
\fi
\fi
\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}}}}%
+ \edef\pst@Ystart{\pst@int{#3}}%
+ \edef\pst@Yend{\pst@int{#4}}%
+ \multido{\nA=0+1,\rA=\pst@Ystart+\psk@Dy}{\numexpr\pst@Yend-\pst@Ystart+1}{%
+ \uput{\psylabelsep}[180]{\pst@yLabelsRot}(0,\rA){%
+ \strut\expandafter\psvlabel\expandafter{\psPutYLabel{\nA}}}}%
\SpecialLabelsDonetrue
\fi
\fi