diff options
author | Karl Berry <karl@freefriends.org> | 2013-11-10 22:42:33 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-11-10 22:42:33 +0000 |
commit | 79d5656c511fc0b01e58967a0bc9c4273864e91e (patch) | |
tree | 025117385320370d7d4c937e15613b0aab15f4da /Master/texmf-dist | |
parent | 69751c0c4f0321719a3b68ad28f3ef86e73ef088 (diff) |
pst-plot (10nov13)
git-svn-id: svn://tug.org/texlive/trunk@32119 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-plot/Changes | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-plot/README-doc | 3 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-plot/pst-plot-doc.pdf | bin | 1222862 -> 1222674 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-plot/pst-plot-doc.tex | 48 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/pst-plot/pst-plot.tex | 39 |
5 files changed, 59 insertions, 33 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-plot/Changes b/Master/texmf-dist/doc/generic/pst-plot/Changes index eb4adc6f72d..32a4ab3ccac 100644 --- a/Master/texmf-dist/doc/generic/pst-plot/Changes +++ b/Master/texmf-dist/doc/generic/pst-plot/Changes @@ -1,4 +1,6 @@ ----- pst-plot.tex +1.54 2013-11-08 - support polarplot option for \pslistplot et al +1.53 2013-11-05 - added \SpecialCoor for \psVectorfield 1.52 2013-10-18 - added \psVectorfield 1.51 2013-09-23 - fix bug with linestyle for axes/ticks 1.50 2013-09-20 - allow x|yAxis=flase|true for axesstyle=frame diff --git a/Master/texmf-dist/doc/generic/pst-plot/README-doc b/Master/texmf-dist/doc/generic/pst-plot/README-doc new file mode 100644 index 00000000000..efdfe42fcfd --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-plot/README-doc @@ -0,0 +1,3 @@ +dtk02-1.pdf : Die mathematischen Funktionen von PostScript +dtk02-2.pdf : Die Plotfunktionen von pst-plot +tugboat01-4.pdf : The plot functions of pst-plot diff --git a/Master/texmf-dist/doc/generic/pst-plot/pst-plot-doc.pdf b/Master/texmf-dist/doc/generic/pst-plot/pst-plot-doc.pdf Binary files differindex 85ec4ebb17a..76f196a7fbe 100644 --- a/Master/texmf-dist/doc/generic/pst-plot/pst-plot-doc.pdf +++ b/Master/texmf-dist/doc/generic/pst-plot/pst-plot-doc.pdf diff --git a/Master/texmf-dist/doc/generic/pst-plot/pst-plot-doc.tex b/Master/texmf-dist/doc/generic/pst-plot/pst-plot-doc.tex index 6a944db9eee..cc8b7115d50 100644 --- a/Master/texmf-dist/doc/generic/pst-plot/pst-plot-doc.tex +++ b/Master/texmf-dist/doc/generic/pst-plot/pst-plot-doc.tex @@ -15,7 +15,7 @@ \begin{pspicture}(-3.5,-3.5)(3.5,3.5) \psaxes[axesstyle=polar,subticklinestyle=dashed,subticks=2, labelFontSize=\scriptstyle](3,3) -\psplot[polarplot,algebraic=true,linecolor=red,linewidth=2pt, +\psplot[polarplot,algebraic,linecolor=red,linewidth=2pt, plotpoints=2000]{0}{TwoPi}{6*sin(x)*cos(x)} \end{pspicture} } @@ -82,6 +82,9 @@ first you have to generate the data and enter it as coordinate pairs \CAny. The plotting macros in this section give you other ways to get and use the data. %(Section \ref{S-axes} tells you how to generate axes.) + + + To parameter \Lkeyset{plotstyle=style} determines what kind of plot you get. Valid styles are \Lkeyval{dots}, \Lkeyval{line}, @@ -174,6 +177,9 @@ and then copied to this document. \endpspicture \end{LTXexample} + + + \Lcs{listplot} is yet another way of plotting lists of data. This time, <list> should be a list of data (coordinate pairs), delimited only by white space. \Larg{list} is first expanded by \TeX{} and then by PostScript. This means that @@ -1108,6 +1114,8 @@ redefinition, then do it for \Lcs{pst@@@hlabel} and } + + %------------------------------------------------------------------------------------------- \subsection{Option \nxLkeyword{xLabels}, \nxLkeyword{yLabels}, \nxLkeyword{xLabelsrot}, and \nxLkeyword{yLabelsrot}}\label{xLabels} @@ -1169,7 +1177,7 @@ be set. \begin{pspicture}(-6.5,-6)(6.5,7.5) \multido{\rA=-4.71239+\psPiH}{7}{% \psline[linecolor=black!20,linestyle=dashed](\rA,-5.5)(\rA,6.5)} -\psset{algebraic=true,plotpoints=10000,plotstyle=line} +\psset{algebraic,plotpoints=10000,plotstyle=line} \psaxes[trigLabelBase=2,dx=\psPiH,xunit=\psPi,trigLabels] {->}(0,0)(-1.7,-5.5)(1.77,6.5)[$x$,0][$y$,-90] \psclip{\psframe[linestyle=none](-4.55,-5.5)(5.55,6.5)} @@ -1186,7 +1194,7 @@ be set. \begin{pspicture}(-6.5,-6)(6.5,7.5) \multido{\rA=-4.71239+\psPiH}{7}{% \psline[linecolor=black!20,linestyle=dashed](\rA,-5.5)(\rA,6.5)} -\psset{algebraic=true,plotpoints=10000,plotstyle=line} +\psset{algebraic,plotpoints=10000,plotstyle=line} \psaxes[trigLabelBase=2,dx=\psPiH,xunit=\psPi,trigLabels] {->}(0,0)(-1.7,-5.5)(1.77,6.5)[$x$,0][$y$,-90] \psclip{\psframe[linestyle=none](-4.55,-5.5)(5.55,6.5)} @@ -1199,23 +1207,24 @@ be set. \endgroup + + \begingroup \begin{pspicture}(-6.5,-4)(6.5,7.5) \psaxes[trigLabelBase=2,dx=\psPiH, xunit=\psPi,trigLabels]{->}(0,0)(-1.7,-3.5)(1.77,6.5)[$x$,0][$y$,90] -\psset{algebraic=true} \psplot[yMaxValue=6,yMinValue=-3,linewidth=1.6pt,plotpoints=2000, - linecolor=red]{-4.55}{4.55}{tan(x)} + linecolor=red,algebraic]{-4.55}{4.55}{tan(x)} \end{pspicture} \endgroup + \begin{lstlisting} \begin{pspicture}(-6.5,-4)(6.5,7.5) \psaxes[trigLabelBase=2,dx=\psPiH,xunit=\psPi,trigLabels]% {->}(0,0)(-1.7,-3.5)(1.77,6.5)[$x$,0][$y$,90] -\psset{algebraic=true} -\psplot[?\ON?yMaxValue=6,yMinValue=-3?\OFF?,linewidth=1.6pt,plotpoints=2000, - linecolor=red]{-4.55}{4.55}{tan(x)} +\psplot[yMaxValue=6,yMinValue=-3,linewidth=1.6pt,plotpoints=2000, + linecolor=red,algebraic]{-4.55}{4.55}{tan(x)} \end{pspicture} \end{lstlisting} @@ -1232,6 +1241,8 @@ Syntax: \psplot[axesstyle=polar](...)(...)(Rx,Ry) \end{lstlisting} + + Important is the fact, that only one pair of coordinates is taken into account for the radius. It is \emph{always} the last pair in a sequence of allowed coordinates for the \Lcs{psaxes} macro. The other ones are ignored; they are not valid for the @@ -1240,14 +1251,14 @@ polar coordinate system. \begin{LTXexample}[pos=b] \begin{pspicture}(-3.5,-3.5)(3.5,3.5) \psaxes[axesstyle=polar](3,3) -\psplot[polarplot,algebraic=true,linecolor=blue,linewidth=2pt, +\psplot[polarplot,algebraic,linecolor=blue,linewidth=2pt, plotpoints=2000]{0}{TwoPi 4 mul}{2*(sin(x)-x)/(cos(x)+x)} \end{pspicture} % \begin{pspicture}(-3.5,-3.5)(3.5,3.5) \psaxes[axesstyle=polar,subticklinestyle=dashed,subticks=2, labelFontSize=\scriptstyle](3,3) -\psplot[polarplot,algebraic=true,linecolor=red,linewidth=2pt, +\psplot[polarplot,algebraic,linecolor=red,linewidth=2pt, plotpoints=2000]{0}{TwoPi}{6*sin(x)*cos(x)} \end{pspicture} \end{LTXexample} @@ -1296,6 +1307,7 @@ changed with the option \Lkeyword{ylabelPos} or with \Lkeyword{xlabelPos} for th $x$-axis. + %-------------------------------------------------------------------------------------- \subsection{Option \nxLkeyword{labels}}\label{labels} %-------------------------------------------------------------------------------------- @@ -1425,6 +1437,7 @@ must be set by one of the mathematical styles \Lcs{textstyle}, \end{LTXexample} + %-------------------------------------------------------------------------------------- \subsection{Options \nxLkeyword{xlabelFactor} and \nxLkeyword{ylabelFactor}}\label{labelfactor} %-------------------------------------------------------------------------------------- @@ -1443,7 +1456,6 @@ it must be set in math mode when using math operators or macros like \Lcs{cdot}! \pstScalePoints(1,1){}{}% reset \end{LTXexample} - %-------------------------------------------------------------------------------------- \subsection{Options \nxLkeyword{decimalSeparator} and \nxLkeyword{comma}}\label{comma} %-------------------------------------------------------------------------------------- @@ -1468,6 +1480,8 @@ active one, e.\,g. \Lkeyword{decimalSeparator}=\Largb{,}. \end{pspicture} \end{LTXexample} + + %-------------------------------------------------------------------------------------- \subsection{Options \nxLkeyword{xyDecimals}, \nxLkeyword{xDecimals} and \nxLkeyword{yDecimals}}\label{xydecimals} %-------------------------------------------------------------------------------------- @@ -3191,10 +3205,10 @@ instead of the $y$-values. This maybe useful when also using the plotstyle \Lkey \section{Polar plots}\label{polarplots} %-------------------------------------------------------------------------------------- -With the option \Lkeyword{polarplot}=\false|\true\ it is possible to use \Lcs{psplot} +With the option \Lkeyword{polarplot}=\false|\true\ it is possible to use any plot command %\Lcs{psplot} in polar mode: \begin{BDef} -\Lcs{psplot}\OptArg{polarplot=true,...}\Largb{<start angle>}\Largb{<end angle>}\%\\ +\Lcs{ps????plot}\OptArg{polarplot,...}\Largb{<start angle>}\Largb{<end angle>}\%\\ \OptArg{PS command}\Largb{<r(alpha)>} \end{BDef} @@ -3216,7 +3230,7 @@ x sin dup mul x cos dup mul add sqrt \rput[Br](-.15,-.35){$0$} \psset{linewidth=.35mm,polarplot} \psplot[linecolor=red]{140}{310}{3 neg x sin mul x cos mul x sin 3 exp x cos 3 exp add div} \psplot[linecolor=cyan]{140}{310}{6 x sin mul x cos mul x sin 3 exp x cos 3 exp add div} - \psplot[linecolor=blue,algebraic=true]{2.44}{5.41}{-8*sin(x)*cos(x)/(sin(x)^3+cos(x)^3)} + \psplot[linecolor=blue,algebraic]{2.44}{5.41}{-8*sin(x)*cos(x)/(sin(x)^3+cos(x)^3)} \end{pspicture*} \end{LTXexample} @@ -3231,7 +3245,7 @@ x sin dup mul x cos dup mul add sqrt \psclip{\pscircle[linestyle=none]{6}} \psplot[linecolor=red]{140}{310}{3 neg x sin mul x cos mul x sin 3 exp x cos 3 exp add div} \psplot[linecolor=cyan]{140}{310}{6 x sin mul x cos mul x sin 3 exp x cos 3 exp add div} - \psplot[linecolor=blue,algebraic=true]{2.44}{5.41}{-8*sin(x)*cos(x)/(sin(x)^3+cos(x)^3)} + \psplot[linecolor=blue,algebraic]{2.44}{5.41}{-8*sin(x)*cos(x)/(sin(x)^3+cos(x)^3)} \endpsclip \end{pspicture} \end{LTXexample} @@ -3245,7 +3259,7 @@ x sin dup mul x cos dup mul add sqrt ticksize=2pt,linewidth=0.17mm]{->}% (0,0)(-2.5,-2.5)(2.5,2.5)[$x$,-90][$y$,180] \rput[Br](-.15,-.35){$0$} - \psset{linewidth=.35mm,plotstyle=curve,polarplot=true} + \psset{linewidth=.35mm,plotstyle=curve,polarplot} \psplot[linecolor=red]{0}{360}{x cos 2 mul x sin mul} \psplot[linecolor=green]{0}{360}{x cos 3 mul x sin mul} \psplot[linecolor=blue]{0}{360}{x cos 4 mul x sin mul} @@ -3264,7 +3278,7 @@ x sin dup mul x cos dup mul add sqrt \rput[tr](-.3,9){$y$} \rput[Br](-.3,-.7){$0$} % -\psset{linewidth=.35mm,plotstyle=curve,polarplot=true} +\psset{linewidth=.35mm,plotstyle=curve,polarplot} \psplot[linecolor=blue]{0}{720}{8 2.5 x mul sin mul} \end{pspicture} \end{LTXexample} 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 fc5f6a28ab4..0b5fb325621 100644 --- a/Master/texmf-dist/tex/generic/pst-plot/pst-plot.tex +++ b/Master/texmf-dist/tex/generic/pst-plot/pst-plot.tex @@ -4,7 +4,7 @@ %% See the betadoc documentation for usage. %% %% COPYRIGHT 1993, 1994, 1999 by Timothy Van Zandt, tvz@nwu.edu. -%% COPYRIGHT 2009-2013 by Herbert Voss, hvoss@tug.org. +%% COPYRIGHT 2009-2014 by Herbert Voss, hvoss@tug.org. %% %% This program can be redistributed and/or modified under the terms %% of the LaTeX Project Public License Distributed from CTAN @@ -19,8 +19,8 @@ \ifx\PSTFPloaded\endinput\else \input pst-fp.tex \fi \ifx\MultidoLoaded\endinput\else \input multido.tex \fi % -\def\fileversion{1.52} -\def\filedate{2013/10/18} +\def\fileversion{1.54} +\def\filedate{2013/11/08} \message{ v\fileversion, \filedate\space (tvz,hv)} % \edef\TheAtCode{\the\catcode`\@} @@ -1680,13 +1680,14 @@ D\space##1% \def\pstXPSScale{#3 }% \def\pstYPSScale{#4 }% \pst@def{ScalePoints}<% - /y ED /x ED - /yPSOp { #4 y mul #2 mul } def - /xPSOp { #3 x mul #1 mul } def + /yVal ED /xVal ED + /yPSOp { #4 yVal mul #2 mul } def + /xPSOp { #3 xVal mul #1 mul } def counttomark dup dup cvi eq not { exch pop } if /m exch def /n m 2 div cvi def n { - yPSOp m 1 roll xPSOp m 1 roll + \ifPst@polarplot exch cvi 360 mod PtoC \fi % x cvi 360 mod PtoC + yPSOp m 1 roll xPSOp m 1 roll /m m 2 sub def } repeat>% } @@ -1708,7 +1709,8 @@ D\space##1% \def\psaxes@vi(#1)(#2)(#3)[#4,#5][#6,#7]{% \psaxes@vii(#1)(#2)(#3)% \begingroup% - \use@par% + \SpecialCoor + \use@par \uput{\psxlabelsep}[#5](#3|#1){#4}\uput{\psylabelsep}[#7](#1|#3){#6}% \endgroup% \ignorespaces} @@ -2009,7 +2011,7 @@ D\space##1% } for % end ticks ---------------------------------------------------------- %\fi - } if% + } if }% end of \pscode \end@SpecialObj% % now draw the axes again with the correct linecolor @@ -2402,21 +2404,26 @@ D\space##1% \def\psVectorfield@i(#1,#2)(#3,#4)#5{{% \addbefore@par{Dx=0.1,Dy=0.1,Ox=3,arrows=->,linewidth=0.2pt}% \begin@SpecialObj + \SpecialCoor \pstFPsub\pst@tempA{#3}{#1}% \pstFPsub\pst@tempB{#4}{#2}% \pstFPDiv{\pst@tempC}{\pst@tempA}{\psk@Dx}% \pstFPDiv{\pst@tempD}{\pst@tempB}{\psk@Dy}% - \pstVerb{ /y' \ifPst@algebraic (#5) tx@AlgToPs begin AlgToPs end cvx + \pstVerb{ /yStrich \ifPst@algebraic (#5) tx@AlgToPs begin AlgToPs end cvx \else { #5 } \fi def }% \multido{\rX=#1+\psk@Dx}{\numexpr\pst@tempC+1}{% \multido{\rY=#2+\psk@Dy}{\numexpr\pst@tempD+1}{% - \pstVerb{ /x \rX\space def -% /ocount 0 def %%%%%%%%%%%%%%%%%%%% WARUM???? %%%%%%%% - /y \rY\space def - /yTemp y' \psk@Dx\space \psk@Ox\space div mul def }% \psline% - (! \rX\space \psk@Dx\space \psk@Ox\space div sub \rY\space yTemp sub)% - (! \rX\space \psk@Dx\space \psk@Ox\space div add \rY\space yTemp add)% + (! /x \rX\space def +% /ocount 0 def %%%%%%%%%%%%%%%%%%%% WARUM???? %%%%%%%% + /y \rY\space def + /yTemp yStrich \psk@Dx\space \psk@Ox\space div mul def + \rX\space \psk@Dx\space \psk@Ox\space div sub \rY\space yTemp sub)% + (! /x \rX\space def +% /ocount 0 def %%%%%%%%%%%%%%%%%%%% WARUM???? %%%%%%%% + /y \rY\space def + /yTemp yStrich \psk@Dx\space \psk@Ox\space div mul def + \rX\space \psk@Dx\space \psk@Ox\space div add \rY\space yTemp add)% }}% \end@SpecialObj }\ignorespaces} |