summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pst-plot
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-11-20 01:03:45 +0000
committerKarl Berry <karl@freefriends.org>2012-11-20 01:03:45 +0000
commit5c33a7e8f795f33fb75fe756b5210abe7347992a (patch)
tree02b46da3074c310ae0ef5b93c696b9afc2ac8aef /Master/texmf-dist/tex/generic/pst-plot
parentcbc7da6f080f7e2ac5e9e23829b4113d3a889a4f (diff)
pst-plot 1.43 (19nov12)
git-svn-id: svn://tug.org/texlive/trunk@28298 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.tex73
1 files changed, 63 insertions, 10 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 0f75e67e95c..10eff2cf764 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 687 2012-05-03 12:06:21Z herbert $
+% $Id: pst-plot.tex 727 2012-11-17 21:28:37Z 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.42}
-\def\filedate{2012/05/03}
+\def\fileversion{1.43}
+\def\filedate{2012/11/17}
\message{ v\fileversion, \filedate\space (tvz,hv)}
%
\edef\TheAtCode{\the\catcode`\@}
@@ -214,18 +214,71 @@ D\space##1%
\let\endqp@LineToXAxis\endqp@line
\let\testqp@LineToXAxis\testqp@line
%
+\newif\ifPst@interrupt \Pst@interruptfalse
\define@key[psset]{pst-plot}{barwidth}[0.25cm]{\pst@getlength{#1}\Add@barwidth}
\psset[pst-plot]{barwidth=0.25cm}
+\define@key[psset]{pst-plot}{interrupt}[]{\expandafter\pst@interrupt#1,,,\@nil}
+\def\pst@interrupt#1,#2,#3,#4\@nil{%
+ \ifx\relax#1\relax \Pst@interruptfalse
+ \else
+ \Pst@interrupttrue
+ \def\pst@interrupt@YMax{#1 }%
+ \def\pst@interrupt@YMaxSep{#2 }%
+ \def\pst@interrupt@YMaxDiff{#3 }%
+ \fi
+}
%
\def\psbar@ii{\addto@pscode{false \tx@NArray \psbar@iii}}
+
\def\psbar@iii{%
- newpath
- n {
- /Yval exch def /Xval exch def
- Xval \number\Add@barwidth 0.5 mul sub 0 moveto
- 0 Yval rlineto \number\Add@barwidth 0 rlineto
- 0 Yval neg rlineto \number\Add@barwidth neg 0 rlineto
- } repeat
+ \ifPst@interrupt
+ /YMax \pst@interrupt@YMax \strip@pt\psyunit\space mul def
+ /YMaxSep \pst@interrupt@YMaxSep \strip@pt\psyunit\space mul def
+ /YMaxDiff \pst@interrupt@YMaxDiff \strip@pt\psyunit\space mul def
+ /Tilde { % on stack DX
+ /Op ED % add or sub
+ /DX ED
+ currentpoint 2 copy
+ /Y ED /X ED % x y
+ X DX add Y YMaxSep 2 div Op
+ X DX dup add add Y
+ curveto
+ currentpoint 2 copy pop /X ED
+ X DX add Y YMaxSep 2 div neg Op
+ X DX dup add add Y
+ curveto
+ } def
+ newpath
+ n {
+ /Yval exch def /Xval exch def
+ Xval \number\Add@barwidth 0.5 mul sub 0 moveto
+ Yval YMax le {
+ 0 Yval rlineto \number\Add@barwidth 0 rlineto
+ 0 Yval neg rlineto \number\Add@barwidth neg 0 rlineto
+ }{
+ 0 YMax rlineto
+ \number\Add@barwidth 4 div
+ { add } Tilde
+ 0 YMax neg rlineto
+ \number\Add@barwidth neg 0 rlineto
+ closepath
+ Xval \number\Add@barwidth 0.5 mul sub YMax YMaxSep add moveto
+ 0 Yval YMax sub YMaxSep sub YMaxDiff sub rlineto
+ \number\Add@barwidth 0 rlineto
+ 0 Yval YMax YMaxSep add sub YMaxDiff sub neg rlineto
+ \number\Add@barwidth 4 div neg
+ { sub } Tilde
+ } ifelse
+ } repeat
+ \else
+ newpath
+ n {
+ /Yval exch def /Xval exch def
+ Xval \number\Add@barwidth 0.5 mul sub 0 moveto
+ 0 Yval rlineto \number\Add@barwidth 0 rlineto
+ 0 Yval neg rlineto \number\Add@barwidth neg 0 rlineto
+ } repeat
+ \fi
}%
\def\beginplot@bar{\begin@SpecialObj}
\def\endplot@bar{%