diff options
author | Karl Berry <karl@freefriends.org> | 2011-11-04 23:09:30 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-11-04 23:09:30 +0000 |
commit | b19d9736b1233678daaf4e8d5538b129be4de268 (patch) | |
tree | 10bc3c48370295b32045c095b18b0bc4f741fc1d | |
parent | ffce06db898f19860fcf9d4106cf822b1f2f8cd0 (diff) |
pst-func 0.74 (3nov11)
git-svn-id: svn://tug.org/texlive/trunk@24491 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-func/Changes | 3 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-func/pst-func-doc.bib | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-func/pst-func-doc.pdf | bin | 2308053 -> 2307418 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex | 17 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/pst-func/pst-func.tex | 141 |
5 files changed, 119 insertions, 44 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-func/Changes b/Master/texmf-dist/doc/generic/pst-func/Changes index 171c278a870..9ee7327794e 100644 --- a/Master/texmf-dist/doc/generic/pst-func/Changes +++ b/Master/texmf-dist/doc/generic/pst-func/Changes @@ -1,5 +1,6 @@ ..... pst-func.tex -0.73 2011-10-21 - add \psMod Bessel function +0.74 2011-11-02 - make \psLorenz work in a correct way +0.73 2011-10-21 - add \psModBessel function 0.72 2011-04-23 - allow option comma for all functions - use helper function dot2comma 0.71 2010-11-03 - allow option dotstyle for \psGaussI diff --git a/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.bib b/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.bib index 93973ad3893..96838e3a2db 100644 --- a/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.bib +++ b/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.bib @@ -150,7 +150,7 @@ @Book{PSTricks2-UIT, author = {Herbert Vo\ss}, - title = {PSTricks -- Graphics for \LaTeX}, + title = {PSTricks -- Graphics for \TeX\ and \LaTeX}, publisher = {UIT}, year = {2011}, address = {Cambridge} 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 Binary files differindex 1d6d70cd557..398502608b7 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 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 a5b0cb884dc..bf5ff55929d 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 @@ -1,4 +1,4 @@ -%% $Id: pst-func-doc.tex 584 2011-10-21 20:34:22Z herbert $ +%% $Id: pst-func-doc.tex 599 2011-11-03 19:38:28Z herbert $ \documentclass[11pt,english,BCOR10mm,DIV12,bibliography=totoc,parskip=false, smallheadings, headexclude,footexclude,oneside]{pst-doc} \usepackage[utf8]{inputenc} @@ -1551,17 +1551,12 @@ $L_h=sum_(i=1)^(h)x_i^{\prime}$. \begin{LTXexample}[pos=t,preset=\centering] -\begin{filecontents*}{Lorenz.dat} -0.50 0.025 -0.10 0.275 -0.3 0.2 -0.09 0.270 -0.01 0.230 -\end{filecontents*} \psset{lly=-6mm,llx=-5mm} \psgraph[Dx=0.2,Dy=0.2,axesstyle=frame](0,0)(1,1){6cm}{6cm} \psline[linestyle=dashed](1,1) -\psLorenz*[linecolor=blue!30,linewidth=1.5pt]{Lorenz.dat} +\psLorenz*[linecolor=blue!30,linewidth=1.5pt]{0.50 0.10 0.3 0.09 0.01 } +\psLorenz[linecolor=blue!30,plotstyle=bezier]{0.50 0.10 0.3 0.09 0.01 } +\psLorenz[linecolor=red,linewidth=1.5pt]{0.50 0.10 0.3 0.09 0.01 } \endpsgraph \end{LTXexample} @@ -1573,8 +1568,8 @@ origin of the coordinate system. \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[linewidth=1.5pt,Gini]{Lorenz.dat} -\psLorenz[plotstyle=dots,dotstyle=square,dotscale=1.5]{Lorenz.dat} +\psLorenz[linewidth=1.5pt,Gini]{0.025 0.275 0.2 0.270 0.230} +\psLorenz[plotstyle=dots,dotstyle=square,dotscale=1.5]{0.025 0.275 0.2 0.270 0.230} \endpsgraph \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 1439e97b815..6f9032cff70 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 584 2011-10-21 20:34:22Z herbert $ +%% $Id: pst-func.tex 599 2011-11-03 19:38:28Z herbert $ %% %% This is file `pst-func.tex', %% @@ -30,8 +30,8 @@ % interface to the `xkeyval' package \pst@addfams{pst-func} % -\def\fileversion{0.73} -\def\filedate{2011/10/21} +\def\fileversion{0.74} +\def\filedate{2011/11/02} \message{`PST-func' v\fileversion, \filedate\space (hv)} % \pstheader{pst-func.pro} @@ -798,52 +798,131 @@ % \def\psLorenz{\pst@object{psLorenz}} \def\psLorenz@i#1{{% - \readdata{\L@Data}{#1}% +% \readdata{\L@Data}{#1}% \if@star\addto@par{fillstyle=solid,fillcolor=\pslinecolor}\fi \use@par% +\iffalse \def\Lorenz@code{ + /D {} def [ \L@Data\space counttomark dup - 1 sub /m ED 2 div cvi /n ED - ] dup /xyValues ED - mark exch % [ [x y x y ...] - aload pop % [ x y x y x y ... ] - n { exch div m 1 roll /m m 2 sub def } repeat - n array astore /yxdiv ED -% xyValues == % [0.5 0.025 0.4 0.475 0.09 0.27 0.01 0.23] -% yxdiv == % [23.0 3.0 1.1875 0.05] -% yxdiv bubblesort == % [0.05 1.1875 3.0 23.0] + 1 sub /m ED 2 div cvi /n ED % m=0..n-1 n=number of pairs + ] /xyValues ED + /Xval [] def /Yval [] def /Xmax 0 def + /Xsum 0 def /Ysum 0 def /XYsum 0 def + xyValues aload pop % [ x y x y x y ... ] + n { 2 copy mul XYsum add /XYsum ED + dup + Yval aload length 1 add array astore /Yval ED + Ysum add /Ysum ED + dup + Xval aload length 1 add array astore /Xval ED + dup Xsum add /Xsum ED + dup Xmax gt { /Xmax ED }{ pop } ifelse + } repeat + Xval bubblesort /Xval ED + Yval bubblesort /Yval ED + Xval { Xmax div } forall n array astore /XvalRelMax ED + Xval { Xsum div } forall n array astore /XvalRel ED + Yval { Ysum div } forall n array astore /YvalRel ED + 0 1 n 1 sub { + cvi /Index ED + Xval Index get + Yval Index get + mul } for + n array astore /XmulY ED + XmulY aload length 1 sub { add } repeat + /XmulYsum ED + XmulY { XmulYsum div } forall + n array astore /XmulYdivXmulYsum ED /X [0] def /Y [0] def + /Xsum 0 def /Ysum 0 def 0 1 n 1 sub { /Index ED - X aload pop xyValues Index 2 mul get X Index get add - Index 2 add array astore /X ED - Y aload pop xyValues Index 2 mul 1 add get Y Index get add - Index 2 add array astore /Y ED +% XvalRel Index get Xsum add /Xsum ED +% X aload length 1 add Xsum exch array astore /X ED + X aload length 1 add XvalRelMax Index get exch array astore /X ED %% + XmulYdivXmulYsum Index get Ysum add /Ysum ED + Y aload length 1 add Ysum exch array astore /Y ED } for -% X == % [0 0.5 0.9 0.99 1.0] -% Y == % [0 0.025 0.5 0.77 1.0] - 0 1 n { /Index ED X Index get Y Index get } for - \if@star 1 0 0 0 \fi \ifPst@Gini - 0 - 0 1 n 1 sub { /Index ED - Y Index 1 add get - xyValues Index 2 mul 1 add get 0.5 mul sub - xyValues Index 2 mul get mul + 0 % start value for Gini + 0 1 X length 2 sub { + /Index ED + Y Index get Y Index 1 add get add 2 div % yHeight=(y0+y1)/2 + X Index 1 add get X Index get sub abs % xWidth=x1-x0 + mul % x*y add } for - 2 mul 1 sub neg - gsave \psk@PSfont findfont \psk@fontscale scalefont setfont + 2 mul 1 sub neg % triangle area divided by the area under the polygon + \psk@PSfont findfont \psk@fontscale scalefont setfont \psk@decimals -1 gt { 10 \psk@decimals exp dup 3 1 roll mul cvi exch div } if \psk@valuewidth string cvs %/Output exch def % save output \ifPst@comma dot2comma \fi % do we have to change dot to comma /Output ED \psk@xShift\space -30 moveto (Gini: ) show - Output show grestore + Output show \fi - }% filling the area under the curve. - \if@star\listplot*{\Lorenz@code}\else\listplot{\Lorenz@code}\fi% + 0 1 n { dup X exch get exch Y exch get } for + \if@star 1 0 0 0 \fi % add values for the closed curve + }% filling the area under the curve. +\fi +%%%%%%%%%%%%%%%%%%%%%%5 + \def\Lorenz@code{ + [ #1 ] dup length /n ED + bubblesort /Yval ED + [ 1 1 n { } for ] /Xval ED + /Xsum n dup 1 add mul 2 div cvi def + /Ysum 0 def /XYsum 0 def + 0 Yval { add } forall /Ysum ED + Xval { n div } forall n array astore /XvalRelMax ED + Xval { Xsum div } forall n array astore /XvalRel ED + Yval { Ysum div } forall n array astore /YvalRel ED + 0 1 n 1 sub { + /Index ED + Xval Index get + Yval Index get + mul } for + n array astore /XmulY ED + XmulY aload length 1 sub { add } repeat + /XmulYsum ED + XmulY { XmulYsum div } forall + n array astore /XmulYdivXmulYsum ED + /X [0] def + /Y [0] def + /Xsum 0 def /Ysum 0 def + 0 1 n 1 sub { + /Index ED +% XvalRel Index get Xsum add /Xsum ED +% X aload length 1 add Xsum exch array astore /X ED + X aload length 1 add XvalRelMax Index get exch array astore /X ED %% + XmulYdivXmulYsum Index get Ysum add /Ysum ED + Y aload length 1 add Ysum exch array astore /Y ED + } for + \ifPst@Gini + 0 % start value for Gini + 0 1 X length 2 sub { + /Index ED + Y Index get Y Index 1 add get add 2 div % yHeight=(y0+y1)/2 + X Index 1 add get X Index get sub abs % xWidth=x1-x0 + mul % x*y + add + } for + 2 mul 1 sub neg % triangle area divided by the area under the polygon + \psk@PSfont findfont \psk@fontscale scalefont setfont + \psk@decimals -1 gt { 10 \psk@decimals exp dup 3 1 roll mul cvi exch div } if + \psk@valuewidth string cvs %/Output exch def % save output + \ifPst@comma dot2comma \fi % do we have to change dot to comma + /Output ED + \psk@xShift\space -30 moveto (Gini: ) show + Output show + \fi + 0 1 n { dup X exch get exch Y exch get } for + \if@star 1 0 0 0 \fi % add values for the closed curve + }% filling the area under the curve. + \if@star\listplot*{\Lorenz@code}\else\listplot{\Lorenz@code}% +% \listplot[plotstyle=bezier,linecolor=red]{\Lorenz@code} + \fi% }\ignorespaces} % % Superellipese / Lamefunction |