summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/generic/pst-func/Changes1
-rw-r--r--Master/texmf-dist/doc/generic/pst-func/pst-func-doc.pdfbin3775226 -> 3783927 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex14
-rw-r--r--Master/texmf-dist/tex/generic/pst-func/pst-func.tex27
4 files changed, 38 insertions, 4 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-func/Changes b/Master/texmf-dist/doc/generic/pst-func/Changes
index a430f165a07..0f8ff6bfb23 100644
--- a/Master/texmf-dist/doc/generic/pst-func/Changes
+++ b/Master/texmf-dist/doc/generic/pst-func/Changes
@@ -1,4 +1,5 @@
..... pst-func.tex
+0.86 2017-06-21 - allow alternating colors for bars
0.85 2017-04-18 - allow framing of function values (ts)
0.84 2017-03-11 - some more modifications to the binomial distributions (ts)
0.83 2017-03-07 - added some more macros for binomial distributions (ts)
diff --git a/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.pdf b/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.pdf
index c366b9a9dc5..8e06fc2fc7d 100644
--- a/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.pdf
+++ b/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex b/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex
index e5c5fc0aa5d..66f4b4a9888 100644
--- a/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex
+++ b/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex
@@ -20,7 +20,7 @@
\psGauss[sigma=1, linecolor=blue, linewidth=2pt]{-1.75}{1.75}
\end{pspicture}}
-\usepackage[style=dtk]{biblatex}
+%\usepackage[style=dtk]{biblatex}
\addbibresource{pst-func-doc.bib}
@@ -1505,6 +1505,18 @@ valid for \Lcs{psBinomialN}. The option \Lkeyword{showpoints} is valid if \Lkeyv
+\begin{LTXexample}[pos=t,preset=\centering]
+\definecolor{A1}{RGB}{28, 134, 238}
+\definecolor{A2}{RGB}{124, 205, 124}
+\psset{xunit=4mm,yunit=70cm,arrowscale=1.5}%
+\begin{pspicture*}(-2,-0.01)(30,0.25)
+\psBinomial[fillstyle=alternateColors,
+ fillcolorA=A1,fillcolorB=A2,
+ markZeros]{60}{0.25}
+\psaxes[Dx=5,dx=5\psxunit,Dy=0.1,dy=0.1\psyunit,
+ arrows=D>]{->}(28,0.13)[\Large$k$,-90][\Large$P(X=k)$,0]
+\end{pspicture*}%
+\end{LTXexample}
diff --git a/Master/texmf-dist/tex/generic/pst-func/pst-func.tex b/Master/texmf-dist/tex/generic/pst-func/pst-func.tex
index 87f2da085d7..b40b4dca356 100644
--- a/Master/texmf-dist/tex/generic/pst-func/pst-func.tex
+++ b/Master/texmf-dist/tex/generic/pst-func/pst-func.tex
@@ -31,8 +31,8 @@
% interface to the `xkeyval' package
\pst@addfams{pst-func}
%
-\def\fileversion{0.85}
-\def\filedate{2017/04/18}
+\def\fileversion{0.86}
+\def\filedate{2017/06/21}
\message{`PST-func' v\fileversion, \filedate\space (hv)}
%
\pstheader{pst-func.pro}
@@ -535,9 +535,16 @@
\define@key[psset]{pst-func}{LabelColor}[black]{\pst@getcolor{#1}\psk@LabelColor}
\define@key[psset]{pst-func}{LineEndColorL}[green]{\pst@getcolor{#1}\psk@LineEndColorL}
\define@key[psset]{pst-func}{LineEndColorR}[red]{\pst@getcolor{#1}\psk@LineEndColorR}
+\define@key[psset]{pst-func}{fillcolorA}[blue!40]{\pst@getcolor{#1}\psk@fillcolorA}
+\define@key[psset]{pst-func}{fillcolorB}[red!40]{\pst@getcolor{#1}\psk@fillcolorB}
+
+\def\psfs@alternateColors{}
+\def\pst@alternateColors{alternateColors}
+
\define@key[psset]{pst-func}{vlinestyle}[solid]{\def\psvlinestyle{#1}}
\psset[pst-func]{printValue=false,barwidth=1,labelangle=90,xlabelsep=0,LabelColor=black,LineEndColorL=green,LineEndColorR=red,
-radiusout=2,radiusinL=0,radiusinR=1.5,LineEnding=true,leftEnd=1,rightEnd=2,VLines=false}
+ radiusout=2,radiusinL=0,radiusinR=1.5,LineEnding=true,leftEnd=1,rightEnd=2,VLines=false,
+ fillcolorA=blue!40,fillcolorB=red!40}
%
\def\psBinomial{\pst@object{psBinomial}}
\def\psBinomial@i#1#2{\psBinomial@ii#1,,,\@nil{#2}}%
@@ -554,6 +561,11 @@ radiusout=2,radiusinL=0,radiusinR=1.5,LineEnding=true,leftEnd=1,rightEnd=2,VLine
\def\psBinomial@iii#1#2#3#4{%
\begin@OpenObj
\addto@pscode{
+ /toggle false def
+ \ifx\psk@fillstylename\pst@alternateColors
+ /ColA { \pst@usecolor\psk@fillcolorA } def
+ /ColB { \pst@usecolor\psk@fillcolorB } def
+ \fi
/scx { \pst@number\psxunit mul } def
/scy { \pst@number\psyunit mul } def
/m #1 def
@@ -577,8 +589,17 @@ radiusout=2,radiusinL=0,radiusinR=1.5,LineEnding=true,leftEnd=1,rightEnd=2,VLine
{ /Y q N exp def }
{ /Y Y N k sub 1 add mul k div p mul q div def }
ifelse % recursive definition
+ \ifx\psk@fillstylename\pst@alternateColors
+ newpath
+ kOld scx 0 moveto
+ \fi
kOld scx Y scy L k dx add scx Y scy L
\ifPst@markZeros k dx add scx 0 L kOld 1 add scx 0 L \fi
+ \ifx\psk@fillstylename\pst@alternateColors
+ closepath
+ gsave toggle {ColA}{ColB} ifelse fill grestore
+ /toggle toggle not def
+ \fi
\ifPst@printValue
gsave \psk@PSfont findfont \psk@fontscale scalefont setfont \pst@usecolor\psk@LabelColor %
Y \psk@valuewidth string cvs