summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-10-31 21:08:14 +0000
committerKarl Berry <karl@freefriends.org>2021-10-31 21:08:14 +0000
commit6b7cfe01ddbefad101cf86072619c7dc00f045c7 (patch)
treeec442f4c2c001117ff853321b890ea3f34ffc26f
parent3510255768e52c447c3d8235956be041a40456f3 (diff)
pst-func (31oct21)
git-svn-id: svn://tug.org/texlive/trunk@60911 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/generic/pst-func/Changes2
-rw-r--r--Master/texmf-dist/doc/generic/pst-func/pst-func-doc.pdfbin4059910 -> 4063463 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex15
-rw-r--r--Master/texmf-dist/dvips/pst-func/pst-func.pro2
-rw-r--r--Master/texmf-dist/tex/generic/pst-func/pst-func.tex125
-rw-r--r--Master/texmf-dist/tex/latex/pst-func/pst-func.sty6
6 files changed, 85 insertions, 65 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-func/Changes b/Master/texmf-dist/doc/generic/pst-func/Changes
index 47203c52d69..82e56e9c02b 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.98 2021-10-30 - fix for Gini coefficiant
0.97 2021-10-29 - fix and extension for \psLorenz curve
0.96 2021-04-06 - added start/endAngle for \psLame
0.95 2020-06-07 - another two more polynomial functions
@@ -117,6 +118,7 @@
..... pst-func.pro
+0.18 2021-10-30 - added arraysum and arrayprod
0.17 2018-12-13 - allow algebraic mode for Simpson
0.16 2018-11-15 - new algorithm for Si/si/Ci/ci
0.15 2013-06-10 - fix bug with wrong arrow in psBezier#
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 368a838f5bf..bb11138494c 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 f47e587290a..119d23f317c 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
@@ -2169,6 +2169,21 @@ origin of the coordinate system.
\endpsgraph
\end{LTXexample}
+
+\begin{LTXexample}[pos=t,preset=\centering]
+\psset{lly=-13mm,llx=-5mm}
+\psgraph[Dx=0.2,Dy=0.2,axesstyle=frame](0,0)(1,1){6cm}{6cm}
+\psline[linestyle=dashed](1,1)
+\psLorenz[Gini,linecolor=red,linewidth=1.5pt]<.2 .2 .2 .2 .2>{.1 .1 .1 .35 .35 }
+\psLorenz[Gini,linecolor=blue,linestyle=dashed,linewidth=1.5pt]{.1 .1 .1 .35 .35 }
+\endpsgraph
+\end{LTXexample}
+
+
+
+
+
+
\clearpage
\section{\nxLcs{psLame} -- Lam\'e Curve, a superellipse}
A superellipse is a curve with Cartesian equation
diff --git a/Master/texmf-dist/dvips/pst-func/pst-func.pro b/Master/texmf-dist/dvips/pst-func/pst-func.pro
index f752442e87c..25c4a831d18 100644
--- a/Master/texmf-dist/dvips/pst-func/pst-func.pro
+++ b/Master/texmf-dist/dvips/pst-func/pst-func.pro
@@ -16,7 +16,7 @@
%% `pst-func' is a PSTricks package to plot special math functions
%%
%%
-%% version 0.17 / 2018-12-13 Herbert Voss
+%% version 0.18 / 2021-10-30 Herbert Voss
%
/tx@FuncDict 100 dict def
tx@FuncDict begin
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 3e67c926f97..1f51fba97cd 100644
--- a/Master/texmf-dist/tex/generic/pst-func/pst-func.tex
+++ b/Master/texmf-dist/tex/generic/pst-func/pst-func.tex
@@ -1,4 +1,4 @@
-%% $Id: pst-func.tex 306 2021-10-29 14:48:08Z herbert $
+%% $Id: pst-func.tex 308 2021-10-30 14:11:45Z herbert $
%%
%% This is file `pst-func.tex',
%%
@@ -31,8 +31,8 @@
% interface to the `xkeyval' package
\pst@addfams{pst-func}
%
-\def\fileversion{0.97}
-\def\filedate{2021/10/29}
+\def\fileversion{0.98}
+\def\filedate{2021/10/30}
\message{`PST-func' v\fileversion, \filedate\space (hv)}
%
\pstheader{pst-func.pro}
@@ -1326,70 +1326,71 @@ grestore
/Coors [xOld dx sub scx 0] def % speichern der Koordinaten f\"{u}r den Spline
%%----------------------------------------------------------------------------------------------------------------------------------------------------------------
%%-------------------- Code, der \"{u}ber den Logarithmus arbeitet von Manuel Luque ---------------------------------------------
- /SumLog {% log(1) + log(2) + ... + log(n) = log(n!)
- 1 dict begin % Erwartet die Eingabe eines Wertes, n\"{a}mlich bis zu welchem Wert addiert werden soll ---> n
- /nV exch def % der \"{u}bergebene Wert wird in nV abgespeichert
- /iV 1 def % Startwert ist iV=1
- 0 nV { iV log add /iV iV 1 add def } repeat % 0 + log(1) + log(2) + ... + log(n) Die Null ist dazu n\"{o}tig um die erste Addition machen zu k\"{o}nnen
- end
- } def
- /binomial_comb{ % log(N!) - log(k!) - log((n-k)!) = log[N!/(k!*(n-k)!)]
- 2 dict begin
- /nV exch def
- /NV exch def
- NV SumLog nV SumLog sub
- NV nV sub SumLog sub
- end
- } def
- /PnN {
- 3 dict begin
- /pV exch def
- /nV exch def
- /NV exch def
- 10
- NV nV binomial_comb
- nV pV log mul
- NV nV sub 1 pV sub log mul add add
- exp
- end
- } def
+ /SumLog {% log(1) + log(2) + ... + log(n) = log(n!)
+ 2 dict begin % Erwartet die Eingabe eines Wertes, n\"{a}mlich bis zu welchem Wert addiert werden soll ---> n
+ /nV exch def % der \"{u}bergebene Wert wird in nV abgespeichert
+ /iV 1 def % Startwert ist iV=1
+ 0 nV { iV log add /iV iV 1 add def } repeat % 0 + log(1) + log(2) + ... + log(n)
+ %Die Null ist dazu n\"{o}tig um die erste Addition machen zu k\"{o}nnen
+ end
+ } def
+ /binomial_comb{ % log(N!) - log(k!) - log((n-k)!) = log[N!/(k!*(n-k)!)]
+ 2 dict begin
+ /nV exch def
+ /NV exch def
+ NV SumLog nV SumLog sub
+ NV nV sub SumLog sub
+ end
+ } def
+ /PnN {
+ 3 dict begin
+ /pV exch def
+ /nV exch def
+ /NV exch def
+ 10
+ NV nV binomial_comb
+ nV pV log mul
+ NV nV sub 1 pV sub log mul add add
+ exp
+ end
+ } def
%%------------------------------------------------------------------------------------------------
%%------------------------------------------------------------------------------------------------
%------------------------------- 3 Punkte um die Kurve links auf Null zu bringen mit dem weiter oben gew\"{a}hlten Startwert sind es also 4 ------------
- /x -2 dx add def
- /y 0 def
- x dx sub scx y scy Coors aload length 2 add array astore /Coors exch def
- /x -0.65 dx add def
- /y N 0 p PnN 10 -1.3 exp mul def
- x dx sub scx y scy Coors aload length 2 add array astore /Coors exch def
- /x -0.375 dx add def
- /y N 0 p PnN 3 div def
- x dx sub scx y scy Coors aload length 2 add array astore /Coors exch def
+ /x -2 dx add def
+ /y 0 def
+ x dx sub scx y scy Coors aload length 2 add array astore /Coors exch def
+ /x -0.65 dx add def
+ /y N 0 p PnN 10 -1.3 exp mul def
+ x dx sub scx y scy Coors aload length 2 add array astore /Coors exch def
+ /x -0.375 dx add def
+ /y N 0 p PnN 3 div def
+ x dx sub scx y scy Coors aload length 2 add array astore /Coors exch def
%---------------------------- Ende der 3 Punkte und Beginn eigentlicher Code ----------------
- 0 1 N {% % Schleife geht von 0 bis N in 1-er Schritten
- /k exch def % save loop variable
- N k p PnN /Y exch def
- /x k dx add def
- /y Y def
- x dx sub scx y scy Coors aload length 2 add array astore /Coors exch def
- /xOld x def
- } for
+ 0 1 N {% % Schleife geht von 0 bis N in 1-er Schritten
+ /k exch def % save loop variable
+ N k p PnN /Y exch def
+ /x k dx add def
+ /y Y def
+ x dx sub scx y scy Coors aload length 2 add array astore /Coors exch def
+ /xOld x def
+ } for
%--------------------------- Ende des eigentlichen Codes und Beginn von ---
%------------------------------- 4 Punkte um die Kurve rechts auf Null zu bringen -----------
- /x N 0.375 add dx add def
- /y Y 3 div def
- x dx sub scx y scy Coors aload length 2 add array astore /Coors exch def
- /x N 0.65 add dx add def
- /y Y 10 -1.3 exp mul def
- x dx sub scx y scy Coors aload length 2 add array astore /Coors exch def
- /x N 2 add dx add def
- /y 0 def
- x dx sub scx y scy Coors aload length 2 add array astore /Coors exch def
- /x N 3 add dx add def
- /y 0 def
- x dx sub scx y scy Coors aload length 2 add array astore /Coors exch def
+ /x N 0.375 add dx add def
+ /y Y 3 div def
+ x dx sub scx y scy Coors aload length 2 add array astore /Coors exch def
+ /x N 0.65 add dx add def
+ /y Y 10 -1.3 exp mul def
+ x dx sub scx y scy Coors aload length 2 add array astore /Coors exch def
+ /x N 2 add dx add def
+ /y 0 def
+ x dx sub scx y scy Coors aload length 2 add array astore /Coors exch def
+ /x N 3 add dx add def
+ /y 0 def
+ x dx sub scx y scy Coors aload length 2 add array astore /Coors exch def
%---------------------------- Ende der 4 Punkte und Laden der Koordinaten des arrays ; L\"{o}schen (pop) von showpoints??----------------------
- [ xEnd 1 add 0 Coors aload pop % showpoints on top of the stack
+ [ xEnd 1 add 0 Coors aload pop % showpoints on top of the stack
}%
\endplot@cspline
\use@pscode
@@ -1610,7 +1611,9 @@ grestore
Yval arraySum /Ysum ED
Yval { Ysum div } forall nVal array astore /YvalRel ED % Pred dist
\if$#1$
- [ 1 1 nVal { nVal div } for ] dup /XvalRel ED /XvalRelCum ED
+ /temp {1 nVal div} bind def
+ [ nVal { temp } repeat ] /XvalRel ED
+ [ 1 1 nVal { nVal div } for ] /XvalRelCum ED
YvalRel bubblesort /YvalRel ED
\else
[ #1 ] /Xval ED
diff --git a/Master/texmf-dist/tex/latex/pst-func/pst-func.sty b/Master/texmf-dist/tex/latex/pst-func/pst-func.sty
index ff1038570dd..e70a9ebe558 100644
--- a/Master/texmf-dist/tex/latex/pst-func/pst-func.sty
+++ b/Master/texmf-dist/tex/latex/pst-func/pst-func.sty
@@ -1,5 +1,5 @@
\RequirePackage{pstricks}
-\ProvidesPackage{pst-func}[2018/12/13 package wrapper for pst-func.tex (hv)]
+\ProvidesPackage{pst-func}[2021/10/30 package wrapper for pst-func.tex (hv)]
\RequirePackage{pst-plot}
\RequirePackage{pst-math}
\RequirePackage{pst-tools}
@@ -10,7 +10,7 @@
\ProvidesFile{pst-func.tex}
[\filedate\space v\fileversion\space `PST-func' (hv)]
\IfFileExists{pst-func.pro}{%
- \ProvidesFile{pst-func.pro}[2018/12/13 v. 0.17, PostScript prologue file (hv)]
+ \ProvidesFile{pst-func.pro}[2021/10/30 v. 0.18, PostScript prologue file (hv)]
\@addtofilelist{pst-func.pro}}{}%
\endinput
-%% $Id: pst-func.sty 306 2021-10-29 14:48:08Z herbert $
+%% $Id: pst-func.sty 308 2021-10-30 14:11:45Z herbert $