summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/pst-func
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-10-08 22:32:27 +0000
committerKarl Berry <karl@freefriends.org>2009-10-08 22:32:27 +0000
commite41ca94a9a98557cd2d5f67315b50811a6672e3e (patch)
treea6b9d3fb6382245cd9bdceafb735b2976bc47a2c /Master/texmf-dist/doc/generic/pst-func
parent9bc61b9b115e4172c7a751e24511e4a5ce0247a0 (diff)
pst-func 0.60 (8oct09)
git-svn-id: svn://tug.org/texlive/trunk@15699 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/generic/pst-func')
-rw-r--r--Master/texmf-dist/doc/generic/pst-func/Changes3
-rw-r--r--Master/texmf-dist/doc/generic/pst-func/README3
-rw-r--r--Master/texmf-dist/doc/generic/pst-func/pst-func-doc.pdfbin2854625 -> 2865093 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex66
4 files changed, 62 insertions, 10 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-func/Changes b/Master/texmf-dist/doc/generic/pst-func/Changes
index 1b0f4d4691c..51c913f08f7 100644
--- a/Master/texmf-dist/doc/generic/pst-func/Changes
+++ b/Master/texmf-dist/doc/generic/pst-func/Changes
@@ -1,4 +1,7 @@
..... pst-func.tex
+0.60 2009-10-08 - modified \psPrintValue to allow algebraic function mode
+ - fix bug with algebraic=true for all macros with \psplot
+ which need postfix code
0.59 2009-01-23 - add option \psk@xShift for \psPrintValue
0.58 2008-12-08 - add the ChebyshevT and ChebyshevU (first and second kind)
the macros are only wrappers for the PS routines
diff --git a/Master/texmf-dist/doc/generic/pst-func/README b/Master/texmf-dist/doc/generic/pst-func/README
index bc9e337e31e..3538fe8df75 100644
--- a/Master/texmf-dist/doc/generic/pst-func/README
+++ b/Master/texmf-dist/doc/generic/pst-func/README
@@ -1,5 +1,6 @@
pst-func: plotting special mathematical functions:
-- psBezier
+-- Chebyshev polynomials
-- psPolynomial (with derivations)
-- psBernstein (with envelope option)
-- psFourier
@@ -41,4 +42,4 @@ CTAN server, f.ex. ftp://ftp.ctan.org
PSTricks is PostScript Tricks, the documentation cannot be run
with pdftex, use the sequence latex->dvips->ps2pdf.
-%% $Id: README 56 2008-11-14 15:55:45Z herbert $
+%% $Id: README 82 2009-01-23 17:38:22Z herbert $
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 e15923af2fe..ccedb089716 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 d5770da871b..d121a0b1399 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,11 +1,25 @@
-%% $Id: pst-func-doc.tex 72 2009-01-08 22:00:47Z herbert $
-\documentclass[11pt,english,BCOR10mm,DIV12,bibliography=totoc,parskip=false,smallheadings
- headexclude,footexclude,oneside]{pst-doc}
+%% $Id: pst-func-doc.tex 137 2009-10-08 18:15:14Z herbert $
+\documentclass[11pt,english,BCOR10mm,DIV12,bibliography=totoc,parskip=false,
+ smallheadings, headexclude,footexclude,oneside]{pst-doc}
\usepackage[utf8]{inputenc}
\usepackage{pst-func}
\let\pstFuncFV\fileversion
\usepackage{pstricks-add}
\usepackage{pst-math}
+\renewcommand\bgImage{%
+\psset{yunit=4cm,xunit=3}
+\begin{pspicture}(-2,-0.2)(2,1.4)
+ \psaxes[Dy=0.25]{->}(0,0)(-2,0)(2,1.25)
+ \uput[-90](6,0){x}\uput[0](0,1){y}
+ \rput[lb](1,0.75){\textcolor{red}{$\sigma =0.5$}}
+ \rput[lb](1,0.5){\textcolor{blue}{$\sigma =1$}}
+ \rput[lb](-2,0.5){$f(x)=\dfrac{1}{\sigma\sqrt{2\pi}}\,e^{-\dfrac{(x-\mu)^2}{2\sigma{}^2}}$}
+ \psGauss[linecolor=red, linewidth=2pt]{-1.75}{1.75}%
+ \psGaussI[linewidth=1pt,yunit=0.75]{-2}{2}%
+ \psGauss[linecolor=cyan, mue=0.5, linewidth=2pt]{-1.75}{1.75}%
+ \psGauss[sigma=1, linecolor=blue, linewidth=2pt]{-1.75}{1.75}
+\end{pspicture}}
+
\lstset{pos=t,wide=true,language=PSTricks,
morekeywords={psGammaDist,psChiIIDist,psTDist,psFDist,psBetaDist,psPlotImpl},basicstyle=\footnotesize\ttfamily}
%
@@ -22,6 +36,7 @@
\maketitle
\tableofcontents
+\psset{unit=1cm}
\clearpage
@@ -47,6 +62,7 @@ Rafal Bartczuk,
Horst Gierhardt,
Christophe Jorssen,
Lars Kotthoff,
+ Buddy Ledger,
Manuel Luque,
Jose-Emilio Vila-Forcen,
Timothy Van Zandt,
@@ -72,7 +88,7 @@ Where $B_{i,n}(t)$ is a Bernstein polynomial $B_{i,n}(t)=\binom{n}{i}t^i(1-t)^{n
The Bézier curve starts through the first and last given point and
lies within the convex hull of all control points. The curve is tangent
to $P_1-P_0$ and $P_n-P_{n-1}$ at the endpoint.
-Undesirable properties of Bézier curves are their numerical instability for
+Undesirable properties of \Index{Bézier curve}s are their numerical instability for
large numbers of control points, and the fact that moving a single control
point changes the global shape of the curve. The former is sometimes avoided
by smoothly patching together low-order Bézier curves.
@@ -177,7 +193,7 @@ changed in the usual way.
\subsection{Chebyshev polynomials}
-The polynomials of the first (ChebyshevT) kind are defined through the identity
+The polynomials of the first (\Lps{ChebyshevT}) kind are defined through the identity
\[ T_n(\cos\theta)=\cos(n\theta)\]
@@ -194,7 +210,7 @@ and
&= \sum_{n=0}^\infty T_n(x)t^n
\end{align}
-The polynomials of second kind (ChebyshevU) can be generated by
+The polynomials of second kind (\Lps{ChebyshevU}) can be generated by
\begin{align}
g(t,x) &= \frac{1}{1-2xt+t^2}\\
@@ -202,7 +218,7 @@ The polynomials of second kind (ChebyshevU) can be generated by
\end{align}
\LPack{pst-func} defines the \TeX-macros \Lcs{ChebyshevT} for the
-first kind and \Lcs{ChebyshevU} for the second kind of Chebyshev polynomials.
+first kind and \Lcs{ChebyshevU} for the second kind of \Index{Chebyshev polynomials}.
These \TeX-macros cannot be used outside of PostScript, they are only wrappers
for \verb+tx@FuncDict begin ChebyshevT end+ and the same for \Lcs{ChebyshevU}.
@@ -344,7 +360,7 @@ polynomial to calculate the function. The syntax is
With the option \Lkeyword{xShift} one can do a horizontal shift to the graph of the function. With another
than the predefined value the macro replaces $x$ by $x-x\mathrm{Shift}$; \Lkeyword{xShift}=1
-moves the graph of the polynomial function one unit to the right.
+moves the graph of the \Index{polynomial function} one unit to the right.
\begin{center}
@@ -1684,7 +1700,8 @@ $f(x)$ has to be described as usual for the macro \Lcs{psplot}.
This new macro allows to \Index{print} single values of a math function. It has the syntax
\begin{BDef}
-\Lcs{psPrintValue}\OptArgs\Largb{PostScript code}
+\Lcs{psPrintValue}\OptArgs\Largb{PostScript code}\\
+\Lcs{psPrintValue}\OptArg{algebraic,\ldots}\Largb{x value, algebraic code}
\end{BDef}
Important is the fact, that \Lcs{psPrintValue} works on \PS\ side. For \TeX\ it is only a box of
@@ -1704,6 +1721,7 @@ There are the following valid options for \Lcs{psPrintValue}:
\Lkeyword{decimals} & <number> & -1 & the number of printed decimals, a negative value
prints all possible digits.\\
\Lkeyword{xShift} & <number> & 0 & the x shift in pt for the output, relative to the current point.\\
+\Lkeyword{algebraic} & <boolean> & false & function in algebraic notation.\\
\end{tabularx}
\begin{center}
@@ -1734,6 +1752,36 @@ There are the following valid options for \Lcs{psPrintValue}:
\makebox[6em]{\psPrintValue[PSfont=Palatino-Roman]{\iA\space dup sin dup mul exch cos dup mul add}}\\}
\end{lstlisting}
+With enabled \Lkeyword{algebraic} option there must be two arguments, separated by a comma.
+The first one is the x value as a number, which can also be PostScript code, which leaves a
+number on the stack. The second part is the function described in algebraic notation.
+Pay attention, in algebraic notation angles must be in radian and not degrees.
+
+\begin{center}
+\psset{algebraic, fontscale=12}% All functions now in algebraic notation
+\makebox[2em]{x(deg)} \makebox[5em]{$\sin x$} \makebox[4em]{$\cos x$}\hspace{1em}
+\makebox[5em]{$\sqrt x$}\makebox[7em]{$\sin x+\cos x$}\makebox[6em]{$\sin^2 x+\cos^2 x$}\\[3pt]
+\multido{\rA=0+0.1}{18}{\makebox[1em]{\rA}
+ \makebox[5em]{\psPrintValue[PSfont=Helvetica,xShift=-10]{\rA, sin(x)}}
+ \makebox[4em][r]{\psPrintValue[PSfont=Courier,fontscale=10,decimals=3,xShift=-20]{\rA,cos(x)}}\hspace{1em}
+ \makebox[5em]{\psPrintValue[comma,valuewidth=15,linecolor=blue,PSfont=AvantGarde]{\rA,sqrt(x)}}
+ \makebox[7em]{\psPrintValue[PSfont=Times-Italic]{\rA,sin(x)+cos(x)}}
+ \makebox[6em]{\psPrintValue[PSfont=Palatino-Roman]{\rA,sin(x)^2+cos(x)^2}}\\}
+\end{center}
+
+\bigskip
+
+\begin{lstlisting}
+\psset{algebraic, fontscale=12}% All functions now in algebraic notation
+\makebox[2em]{x(deg)} \makebox[5em]{$\sin x$} \makebox[4em]{$\cos x$}\hspace{1em}
+\makebox[5em]{$\sqrt x$}\makebox[7em]{$\sin x+\cos x$}\makebox[6em]{$\sin^2 x+\cos^2 x$}\\[3pt]
+\multido{\rA=0+0.1}{18}{\makebox[1em]{\rA}
+ \makebox[5em]{\psPrintValue[PSfont=Helvetica,xShift=-10]{\rA, sin(x)}}
+ \makebox[4em][r]{\psPrintValue[PSfont=Courier,fontscale=10,decimals=3,xShift=-20]{\rA,cos(x)}}\hspace{1em}
+ \makebox[5em]{\psPrintValue[comma,valuewidth=15,linecolor=blue,PSfont=AvantGarde]{\rA,sqrt(x)}}
+ \makebox[7em]{\psPrintValue[PSfont=Times-Italic]{\rA,sin(x)+cos(x)}}
+ \makebox[6em]{\psPrintValue[PSfont=Palatino-Roman]{\rA,sin(x)^2+cos(x)^2}}\\}
+\end{lstlisting}
\section{Examples}