diff options
author | Karl Berry <karl@freefriends.org> | 2011-01-20 21:39:17 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-01-20 21:39:17 +0000 |
commit | c8959017f6539e46109db2487682b6db54edce83 (patch) | |
tree | 3ff8208caa165216247147f82984546b83b21b14 /Master/texmf-dist | |
parent | e31bea88bc554767eb19f065d1d36c74509a1fe4 (diff) |
pst-plot (20jan11)
git-svn-id: svn://tug.org/texlive/trunk@21134 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-plot/pst-plot-doc.pdf | bin | 806762 -> 950580 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-plot/pst-plot-doc.tex | 57 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/pst-plot/pst-plot.tex | 46 |
3 files changed, 59 insertions, 44 deletions
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 abbafa04a13..b25ac1735ce 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 4fdbba4048b..69243ee6a49 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 @@ -1,10 +1,10 @@ -%% $Id: pst-plot-doc.tex 432 2010-12-14 08:01:58Z herbert $ \documentclass[11pt,english,BCOR10mm,DIV12,bibliography=totoc,parskip=false,smallheadings headexclude,footexclude,oneside,dvipsnames,svgnames]{pst-doc} \listfiles \usepackage[utf8]{inputenc} \usepackage{pst-node,pst-plot} +%\usepackage{pstricks-gvb} \SpecialCoor \let\pstFV\fileversion \let\belowcaptionskip\abovecaptionskip @@ -46,6 +46,7 @@ documentation here: \url{http://mirrors.ctan.org/graphics/pstricks/base/doc/}. \vfill \noindent Thanks to: +Guillaume van Baalen; Stefano Baroni; Martin Chicoine; Gerry Coombes; @@ -829,7 +830,8 @@ redefinition, then do it for \Lcs{pst@@@hlabel} and \Lkeyword{ylabelPos} & \Lkeyval{left}|\Lkeyval{axis}|\Lkeyval{right} & \Lkeyval{left} & \pageref{labelpos}\\ \Lkeyword{ylogBase} & integer or empty & \{\} & \pageref{ylogbase}\\ -\Lkeyword{yMaxValue} & real & -1 & \pageref{yMaxValue}\\ +\Lkeyword{yMaxValue} & real & 1.e30 & \pageref{yMaxValue}\\ +\Lkeyword{yMinValue} & real & -1.e30 & \pageref{yMaxValue}\\ \Lkeyword{yStart} & integer or empty & \{\} & \pageref{ystartend}\\ \Lkeyword{yStep} & integer & 0 & \pageref{nxstep}\\ \Lkeyword{ysubtickcolor} & <color> & darkgray & \pageref{tickcolor}\\ @@ -861,23 +863,28 @@ redefinition, then do it for \Lcs{pst@@@hlabel} and %------------------------------------------------------------------------------------ -\subsection{Option \nxLkeyword{yMaxValue}}\label{yMaxValue} +\subsection{Option \nxLkeyword{yMaxValue} and \nxLkeyword{yMinValue}}\label{yMaxValue} %------------------------------------------------------------------------------------ -With the new optional argument \Lkeyword{yMaxValue} one can control the behaviour -of discontinued functions, like the tangent function. If \Lkeyword{yMaxValue} is set -to a negative value, then the internal if clause is disabled, the function is plotted -in the usual way. +With the new optional arguments \Lkeyword{yMaxValue} and +\Lkeyword{yMinValue} one can control the behaviour of +discontinuous functions, like the tangent function. The +code does not check that \Lkeyword{yMaxValue} is bigger than +\Lkeyword{yMinValue} (if not, the function is {\em not} plotted at all). +All four possibilities can be used, i.e. one, both or none of the +two arguments \Lkeyword{yMaxValue} and \Lkeyword{yMinValue} can +be set. + \begingroup -\begin{pspicture}(-6.5,-7)(6.5,7.5) +\begin{pspicture}(-6.5,-6)(6.5,7.5) \multido{\rA=-4.71239+\psPiH}{7}{% - \psline[linecolor=black!20,linestyle=dashed](\rA,-6.5)(\rA,6.5)} -\psset{algebraic=true,plotpoints=200,plotstyle=line} + \psline[linecolor=black!20,linestyle=dashed](\rA,-5.5)(\rA,6.5)} +\psset{algebraic=true,plotpoints=10000,plotstyle=line} \psaxes[trigLabelBase=2,dx=\psPiH,xunit=\psPi,trigLabels] - {->}(0,0)(-1.7,-6.5)(1.77,6.5)[$x$,0][$y$,-90] -\psclip{\psframe[linestyle=none](-4.55,-6.5)(5.55,6.5)} - \psplot[yMaxValue=10,linewidth=2pt,linecolor=red]{-4.55}{4.55}{(x)/(sin(2*x))} + {->}(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)} + \psplot[yMaxValue=6,yMinValue=-5,linewidth=2pt,linecolor=red]{-4.55}{4.55}{(x)/(sin(2*x))} \endpsclip \psplot[linestyle=dashed,linecolor=blue!30]{-4.8}{4.8}{x} \psplot[linestyle=dashed,linecolor=blue!30]{-4.8}{4.8}{-x} @@ -886,14 +893,14 @@ in the usual way. \endgroup \begin{lstlisting} -\begin{pspicture}(-6.5,-7)(6.5,7.5) +\begin{pspicture}(-6.5,-6)(6.5,7.5) \multido{\rA=-4.71239+\psPiH}{7}{% - \psline[linecolor=black!20,linestyle=dashed](\rA,-6.5)(\rA,6.5)} -\psset{algebraic=true,plotpoints=200,plotstyle=line} + \psline[linecolor=black!20,linestyle=dashed](\rA,-5.5)(\rA,6.5)} +\psset{algebraic=true,plotpoints=10000,plotstyle=line} \psaxes[trigLabelBase=2,dx=\psPiH,xunit=\psPi,trigLabels] - {->}(0,0)(-1.7,-6.5)(1.77,6.5)[$x$,0][$y$,-90] -\psclip{\psframe[linestyle=none](-4.55,-6.5)(5.55,6.5)} - \psplot[?\ON?yMaxValue=10?\OFF?,linewidth=2pt,linecolor=red]{-4.55}{4.55}{(x)/(sin(2*x))} + {->}(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)} + \psplot[?\ON?yMaxValue=6,yMinValue=-5?\OFF?,linewidth=2pt,linecolor=red]{-4.55}{4.55}{(x)/(sin(2*x))} \endpsclip \psplot[linestyle=dashed,linecolor=blue!30]{-4.8}{4.8}{x} \psplot[linestyle=dashed,linecolor=blue!30]{-4.8}{4.8}{-x} @@ -903,21 +910,21 @@ in the usual way. \begingroup -\begin{pspicture}(-6.5,-7)(6.5,7.5) +\begin{pspicture}(-6.5,-4)(6.5,7.5) \psaxes[trigLabelBase=2,dx=\psPiH, - xunit=\psPi,trigLabels]{->}(0,0)(-1.7,-6.5)(1.77,6.5)[$x$,0][$y$,90] + xunit=\psPi,trigLabels]{->}(0,0)(-1.7,-3.5)(1.77,6.5)[$x$,0][$y$,90] \psset{algebraic=true} -\psplot[yMaxValue=6,linewidth=1.6pt,plotpoints=2000, +\psplot[yMaxValue=6,yMinValue=-3,linewidth=1.6pt,plotpoints=2000, linecolor=red]{-4.55}{4.55}{tan(x)} \end{pspicture} \endgroup \begin{lstlisting} -\begin{pspicture}(-6.5,-7)(6.5,7.5) +\begin{pspicture}(-6.5,-4)(6.5,7.5) \psaxes[trigLabelBase=2,dx=\psPiH,xunit=\psPi,trigLabels]% - {->}(0,0)(-1.7,-6.5)(1.77,6.5)[$x$,0][$y$,90] + {->}(0,0)(-1.7,-3.5)(1.77,6.5)[$x$,0][$y$,90] \psset{algebraic=true} -\psplot[?\ON?yMaxValue=6?\OFF?,linewidth=1.6pt,plotpoints=2000, +\psplot[?\ON?yMaxValue=6,yMinValue=-3?\OFF?,linewidth=1.6pt,plotpoints=2000, linecolor=red]{-4.55}{4.55}{tan(x)} \end{pspicture} \end{lstlisting} 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 e89b28864ed..0b97daebec3 100644 --- a/Master/texmf-dist/tex/generic/pst-plot/pst-plot.tex +++ b/Master/texmf-dist/tex/generic/pst-plot/pst-plot.tex @@ -1,4 +1,4 @@ -% $Id: pst-plot.tex 428 2010-11-28 16:22:11Z herbert $ +% $Id: pst-plot.tex 447 2011-01-19 15:23:33Z herbert $ %% BEGIN pst-plot.tex %% %% plotting functions and data with PSTricks. @@ -20,8 +20,8 @@ \ifx\PSTFPloaded\endinput\else \input pst-fp.tex \fi \ifx\MultidoLoaded\endinput\else \input multido.tex \fi % -\def\fileversion{1.25} -\def\filedate{2010/11/27} +\def\fileversion{1.26} +\def\filedate{2011/01/19} \message{ v\fileversion, \filedate\space (tvz,hv)} % \edef\TheAtCode{\the\catcode`\@} @@ -415,8 +415,10 @@ D\space##1% \psset[pst-plot]{plotpoints=50} % %the following works only for plotstyle line, polygon and bezier -\define@key[psset]{pst-plot}{yMaxValue}[-1.0]{\def\psk@yMaxValue{#1 }} -\psset[pst-plot]{yMaxValue=-1.0} +\define@key[psset]{pst-plot}{yMaxValue}[1.e30]{\def\psk@yMaxValue{#1 }} +\psset{yMaxValue=1.e30} +\define@key[psset]{pst-plot}{yMinValue}[-1.e30]{\def\psk@yMinValue{#1 }} +\psset{yMinValue=-1.e30} % can be in PS syntax (eg 1e1.2) and must be positiv! negative values % will beignored % @@ -428,10 +430,13 @@ D\space##1% % \def\beginqp@line{\pst@oplineto} \def\doqp@line{ - \psk@yMaxValue 0 gt - { dup abs \psk@yMaxValue \pst@number\psyunit mul gt - { moveto }{ L } ifelse } - { L } ifelse + dup + \psk@yMaxValue \pst@number\psyunit mul gt + { moveto }{ + dup + \psk@yMinValue \pst@number\psyunit mul lt + { moveto }{ L } ifelse + } ifelse } \def\endqp@line{% \ifPst@variableLW \addto@pscode{ \pst@flattenpath }\fi% @@ -449,10 +454,13 @@ D\space##1% % \def\beginqp@polygon{moveto } \def\doqp@polygon{ - \psk@yMaxValue 0 gt - { dup abs \psk@yMaxValue \pst@number\psyunit mul gt - { moveto }{ L } ifelse } - { L } ifelse + dup + \psk@yMaxValue \pst@number\psyunit mul gt + { moveto }{ + dup + \psk@yMinValue \pst@number\psyunit mul lt + { moveto }{ L } ifelse + } ifelse } \def\endqp@polygon{% \addto@pscode{closepath}% @@ -478,12 +486,12 @@ D\space##1% \def\testqp@dots{\@psttrue} % \def\beginqp@bezier{/n 0 def \pst@oplineto} -\def\doqp@bezier{/n n 1 add def n 3 mod 0 eq { % we need 3 points - \psk@yMaxValue 0 gt - { dup % last y value - abs \psk@yMaxValue\space \pst@number\psyunit mul gt - { moveto pop pop pop pop }{ curveto } ifelse } - { curveto } ifelse +\def\doqp@bezier{/n n 1 add def n 3 mod 0 eq { % we need 3 points + dup \psk@yMaxValue\space \pst@number\psyunit mul gt + { moveto pop pop pop pop} + { dup \psk@yMinValue\space \pst@number\psyunit mul lt + { moveto pop pop pop pop}{ curveto } ifelse + } ifelse } if } \def\endqp@bezier{% |