summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-04-23 22:40:09 +0000
committerKarl Berry <karl@freefriends.org>2011-04-23 22:40:09 +0000
commit0c7d6abf80d6c8ae90936dfed87abd179341bdc4 (patch)
tree2d94913dda072d51de967d75c9bb4bcbe9842540 /Master/texmf-dist
parent59c2fb860cfc7f447fded1f644421e4ee9bff956 (diff)
pst-func 0.72 (23apr11)
git-svn-id: svn://tug.org/texlive/trunk@22177 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/generic/pst-func/Changes2
-rw-r--r--Master/texmf-dist/doc/generic/pst-func/pst-func-doc.bib8
-rw-r--r--Master/texmf-dist/doc/generic/pst-func/pst-func-doc.pdfbin2964258 -> 2299574 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex54
-rw-r--r--Master/texmf-dist/source/generic/pst-func/Makefile1
-rw-r--r--Master/texmf-dist/tex/generic/pst-func/pst-func.tex84
6 files changed, 109 insertions, 40 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-func/Changes b/Master/texmf-dist/doc/generic/pst-func/Changes
index ff6ac422057..b8657e392e0 100644
--- a/Master/texmf-dist/doc/generic/pst-func/Changes
+++ b/Master/texmf-dist/doc/generic/pst-func/Changes
@@ -1,4 +1,6 @@
..... pst-func.tex
+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
0.70 2010-10-02 - moved vasicek as \psvasicek from pst-math
to pst-func
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 af618fecc8b..93973ad3893 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
@@ -148,6 +148,14 @@
address = {Cambridge}
}
+@Book{PSTricks2-UIT,
+ author = {Herbert Vo\ss},
+ title = {PSTricks -- Graphics for \LaTeX},
+ publisher = {UIT},
+ year = {2011},
+ address = {Cambridge}
+}
+
@Manual{wolfram,
author = {Eric Weisstein},
title = {Wolfram MathWorld},
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 fe22e463702..05259c1428e 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 10b31b92ba3..306f8eb536f 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 411 2010-11-03 07:58:25Z herbert $
+%% $Id: pst-func-doc.tex 488 2011-04-23 09:19:40Z herbert $
\documentclass[11pt,english,BCOR10mm,DIV12,bibliography=totoc,parskip=false,
smallheadings, headexclude,footexclude,oneside]{pst-doc}
\usepackage[utf8]{inputenc}
@@ -1748,6 +1748,58 @@ for polar plots are also possible (see next example).
\end{LTXexample}
+The data of an implicit plot can be written into an external file for further purposes.
+Use the optional argument \Lkeyword[pstricks-add]{saveData} to write the $x|y$ values
+into the file \nxLcs{jobname.data}. The file name can be changed with the keyword {\Lkeyword[pstricks-add]{filename}.
+When running a \TeX\ file from within a GUI it may be possible that you get a writeaccess error from GhostScript, because
+it prevents writing into a file when called from another program. In this case run GhostScript on the \PS-output from
+the command line.
+
+\psset{mathLabel}
+\begin{LTXexample}[preset=\centering]
+\begin{pspicture*}(-3,-3)(3,3)
+ \psaxes[linewidth=0.25pt,
+ xlabelPos=top,
+ labelFontSize=\scriptscriptstyle,
+ labelsep=2pt,
+ ticksize=0.05]{<->}(0,0)(-2,-1.75)(2,2)[x,0][y,90]
+ \psplotImp[linecolor=red,linewidth=1pt,stepFactor=0.2,saveData,
+ algebraic](-2.5,-1.75)(2.5,2.5){x^2+(5*y/4-sqrt(abs(x)))^2-2.5}
+\end{pspicture*}
+\end{LTXexample}
+
+The values are saved pairwise in an array, e.\,g.:
+\begin{verbatim}
+...
+[
+-1.53237 0.695058
+-1.53237 1.29957
+]
+[
+-1.52534 0.666941
+-1.52534 1.32065
+]
+...
+\end{verbatim}
+
+In one array all $y$ values for the same $x$ value are stored.
+
+\iffalse
+The data then can be read back to get a continous line of the plot.
+
+\begin{LTXexample}[preset=\centering]
+\readdata[nStep=20]{\data}{\jobname.data}
+\begin{pspicture*}(-3,-3)(3,3)
+ \psaxes[linewidth=0.25pt,
+ xlabelPos=top,
+ labelFontSize=\scriptscriptstyle,
+ labelsep=2pt,
+ ticksize=0.05]{<->}(0,0)(-2,-1.75)(2,2)[x,0][y,90]
+ \pslistplot[linecolor=red,linewidth=1pt,plotstyle=curve]{\data}
+\end{pspicture*}
+\end{LTXexample}
+\fi
+
\clearpage
\section{\nxLcs{psVolume} -- Rotating functions around the x-axis}
diff --git a/Master/texmf-dist/source/generic/pst-func/Makefile b/Master/texmf-dist/source/generic/pst-func/Makefile
index 9fa9daaa701..71257283a2a 100644
--- a/Master/texmf-dist/source/generic/pst-func/Makefile
+++ b/Master/texmf-dist/source/generic/pst-func/Makefile
@@ -67,5 +67,4 @@ tds:
cp -u $(MAIN).bib $(TDS)/source/$(PACKAGE)/
cp -u Makefile $(TDS)/source/$(PACKAGE)/
-
# EOF
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 9596aa42367..8f88d13e308 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 411 2010-11-03 07:58:25Z herbert $
+%% $Id: pst-func.tex 488 2011-04-23 09:19:40Z herbert $
%%
%% This is file `pst-func.tex',
%%
@@ -30,8 +30,8 @@
% interface to the `xkeyval' package
\pst@addfams{pst-func}
%
-\def\fileversion{0.71}
-\def\filedate{2010/11/03}
+\def\fileversion{0.72}
+\def\filedate{2011/04/23}
\message{`PST-func' v\fileversion, \filedate\space (hv)}
%
\pstheader{pst-func.pro}
@@ -341,14 +341,10 @@
Func
\else #1 \fi
\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 % do we have to change dot to comma
- 0 1 Output length 1 sub {
- /Index exch def
- Output Index get 46 eq { Output Index 44 put } if
- } for
- \fi
- \psk@xShift\space 0 moveto Output show grestore
+ \psk@valuewidth string cvs %/Output exch def % save output
+ \ifPst@comma dot2comma \fi % do we have to change dot to comma
+ \psk@xShift\space 0 moveto %Output
+ show grestore
}%
\end@SpecialObj%
}
@@ -378,13 +374,9 @@
\ifPst@round round \else cvi \fi exch div } if
\psk@decimals 0 eq { cvi } if /numb ED
expon \psk@valuewidth string cvs /expon exch def
- numb \psk@valuewidth string cvs /Output exch def
- \ifPst@comma % do we have to change dot to comma
- 0 1 Output length 1 sub {
- /Index exch def
- Output Index get 46 eq { Output Index 44 put } if
- } for
- \fi
+ numb \psk@valuewidth string cvs
+ \ifPst@comma dot2comma \fi % do we have to change dot to comma
+ /Output exch def
/txspc \psk@fontscale 4 div def
\psk@xShift\space 0 moveto mfont Output show
txspc 0 rmoveto s1 (\string\264) show
@@ -394,14 +386,10 @@
\psk@decimals -1 gt { 10 \psk@decimals exp dup 3 1 roll mul
\ifPst@round round \else cvi \fi exch div } if
\psk@decimals 0 eq { cvi } if %inserted to handle decimals=0
- \psk@valuewidth string cvs /Output ED
- \ifPst@comma % do we have to change dot to comma
- 0 1 Output length 1 sub {
- /Index exch def
- Output Index get 46 eq { Output Index 44 put } if
- } for
- \fi
- \psk@xShift\space 0 moveto mfont Output show
+ \psk@valuewidth string cvs
+ \ifPst@comma dot2comma \fi % do we have to change dot to comma
+ \psk@xShift\space 0 moveto mfont %Output
+ show
} ifelse
}%
\end@SpecialObj%
@@ -514,7 +502,8 @@
\ifPst@markZeros k dx add scx 0 L kOld 1 add scx 0 L \fi
\ifPst@printValue
gsave \psk@PSfont findfont \psk@fontscale scalefont setfont
- Y \psk@valuewidth string cvs
+ Y \psk@valuewidth string cvs
+ \ifPst@comma dot2comma \fi
k scx \psk@fontscale 2 div add
Y scy \pst@number\pslabelsep add moveto
90 rotate show grestore
@@ -568,7 +557,8 @@
} ifelse
\ifPst@printValue
gsave \psk@PSfont findfont \psk@fontscale scalefont setfont
- y \psk@valuewidth string cvs
+ y \psk@valuewidth string cvs %/Output exch def
+ \ifPst@comma dot2comma \fi % do we have to change dot to comma
x dx sub scx \psk@fontscale 2 div add
y scy \pst@number\pslabelsep add moveto
90 rotate show grestore
@@ -616,7 +606,8 @@
\ifPst@markZeros k dx add scx 0 L \fi
\ifPst@printValue
gsave \psk@PSfont findfont \psk@fontscale scalefont setfont
- Y \psk@valuewidth string cvs
+ Y \psk@valuewidth string cvs %/Output exch def
+ \ifPst@comma dot2comma \fi % do we have to change dot to comma
k scx \psk@fontscale 2 div add
Y scy \pst@number\pslabelsep add moveto
90 rotate show grestore
@@ -765,7 +756,7 @@
1
Euler x \psk@beta div \psk@alpha exp neg exp % e^(-(x/beta)^alpha))
sub
- }
+ }%
\end@OpenObj%
\ignorespaces%
}
@@ -795,7 +786,7 @@
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 ... ]
+ 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]
@@ -825,13 +816,9 @@
2 mul 1 sub neg
gsave \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 % do we have to change dot to comma
- 0 1 Output length 1 sub {
- /Index exch def
- Output Index get 46 eq { Output Index 44 put } if
- } for
- \fi
+ \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
\fi
@@ -862,6 +849,11 @@
%\define@boolkey[psset]{pst-func}[PstAdd@]{polarplot}[true]{}
%\psset[pst-func]{polarplot=false}
%
+%\define@boolkey[psset]{pstricks-add}[Pst@]{GetFinalState}[true]{}
+%\define@key[psset]{pstricks-add}{filename}{\def\psk@filename{#1}}%
+%\define@boolkey[psset]{pstricks-add}[Pst@]{saveData}[true]{} % \ifPst@saveData
+%\psset[pstricks-add]{GetFinalState=false,saveData=false,filename=PSTdata}
+%
\define@key[psset]{pst-func}{stepFactor}[0.67]{\pst@checknum{#1}\psk@stepFactor }
\psset[pst-func]{stepFactor=0.67}
%
@@ -869,8 +861,10 @@
\def\psplotImp@i(#1,#2)(#3,#4){%
\@ifnextchar[{\psplotImp@ii(#1,#2)(#3,#4)}{\psplotImp@ii(#1,#2)(#3,#4)[]}}
\def\psplotImp@ii(#1,#2)(#3,#4)[#5]#6{%
+ \addbefore@par{filename=\jobname.data}%
\begin@OpenObj%
\addto@pscode{
+ \ifPst@saveData /Pst@data (\psk@filename) (w) file def \fi
/xMin #1 def
/xMax #3 def
/yMin #2 def
@@ -892,20 +886,32 @@
/setpixel {
dy div exch
dx div exch
+ \ifPst@saveData
+ 2 copy
+ \pst@number\psyunit div exch \pst@number\psxunit div
+ 20 string cvs Pst@data exch writestring
+ Pst@data (\space) writestring
+ 20 string cvs Pst@data exch writestring
+% Pst@data (\string\]) writestring
+ Pst@data (\string\n) writestring
+ \fi
\pst@number\pslinewidth 2 div 0 360 arc fill } bind def
%
/VZ true def % suppose that F(x,y)>=0
/x xMin def /y yMin def Func 0.0 lt { /VZ false def } if % erster Wert
xMin dx \psk@stepFactor\space mul xMax {
/x exch def
+ \ifPst@saveData Pst@data ([\string\n) writestring \fi
yMin dy \psk@stepFactor\space mul yMax {
/y exch def
Func 0 lt
{ VZ { x y setpixel /VZ false def} if }
{ VZ {}{ x y setpixel /VZ true def } ifelse } ifelse
} for
+ \ifPst@saveData Pst@data (]\string\n) writestring \fi
} for
%
+\iffalse
/x xMin def /y yMin def Func 0.0 lt { /VZ false def } if % erster Wert
yMin dy \psk@stepFactor\space mul yMax {
/y exch def
@@ -916,6 +922,8 @@
{ VZ {}{ x y setpixel /VZ true def } ifelse } ifelse
} for
} for
+\fi
+ \ifPst@saveData Pst@data closefile \fi
}%
\end@OpenObj%
}