summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-06-18 23:45:22 +0000
committerKarl Berry <karl@freefriends.org>2006-06-18 23:45:22 +0000
commit2ef3bb4ab770c443b91f054a4673d09e037f02e1 (patch)
tree0f812adb085812f117304b04e8542c5e563317ca /Master/texmf-dist/doc
parent3582a525889b15447695e2542f4a5e5b6e7669d9 (diff)
pstricks-add update, pro0.08 tex2.75
git-svn-id: svn://tug.org/texlive/trunk@1698 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc')
-rw-r--r--Master/texmf-dist/doc/generic/pstricks-add/Changes166
-rw-r--r--Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.bib (renamed from Master/texmf-dist/doc/generic/pstricks-add/pstricks.bib)34
-rw-r--r--Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.ltx51
-rw-r--r--Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.pdfbin1463232 -> 1489281 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex2322
5 files changed, 2008 insertions, 565 deletions
diff --git a/Master/texmf-dist/doc/generic/pstricks-add/Changes b/Master/texmf-dist/doc/generic/pstricks-add/Changes
index 73ef5a8beeb..70efedc3cbf 100644
--- a/Master/texmf-dist/doc/generic/pstricks-add/Changes
+++ b/Master/texmf-dist/doc/generic/pstricks-add/Changes
@@ -1,4 +1,8 @@
pstricks-add.pro ----------- (Dominik Rodriguez/hv)
+ v 0.08 2006-06-17 more improvements to the code (hv)
+ v 0.07 2006-04-03 remove whitespace (dr)
+ v 0.06 2006-01-16 EXP -> Exp, to prevent missmatch with pst-math (hv)
+ v 0.05 2005-11-12 fix bug in GTriangle (hv)
v 0.04 2005-10-06 added subroutines for calculating wavelength to rgb color(hv)
changing name of pst-eqdf.pro to pstricks-add.pro
v 2005.03 2005/05/16 (hv) small changes to the code
@@ -6,74 +10,98 @@ pstricks-add.pro ----------- (Dominik Rodriguez/hv)
v 2004.02 2004/11/14 (dr) correction of a priority problem ^ before unary - (new rule FS)
v 2004.01 2004/09/14 (dr) initial version
+
pstricks-add -----------
- v 2.70 2005-10-20 - use \def instead of \edef for X|YAxisLabel
- - make psgraph correct use of the origin values
- - added a new macro \psLNode and \nlput for a
- node label with absolute position
- v 2.69 2005-10-12 moving the basic arrows into pstricks )-(,]-[
- bugfix for hook arrow
- v 2.68 2005-10-09 fix a bug with trigLabels and showorigin
- v 2.67 2005-10-08 rewrote \psrotate macro
- added three predefined hatchstyles for simulating transparent colors
- TRed, TGreen,TBlue
+ v 2.75 2006-06-17 - plot a derivative of a function by the equation or numerical
+ (\psplot and \paramericplot)
+ - delete macro \psLineIII and the two special options
+ - add macro \psMatrixPlot
+ - option trigLabelBase for advanced setting of trogonometrical
+ x-axis labels
+ - option labelFontSize
+ - fix introduced bug with Hook arrow and (-)
+ - fix bug for Hook arrow with ArrowInside option
+ - fix bug with readdata
+ - revert all changes
+ - fix a bug with lines and psgraph
+ v 2.74 2006-01-02 - add \psdice
+ v 2.73 2005-12-21 - renaming the \setLNode and \setLCNode to
+ \psLNode and \psLCNode.
+ new macro \psLDNode
+ - add missing fillstyle for \psStep
+ - add StepType Riemann
+ v 2.72 2005-11-27 - fix introduced bug in psgraph
+ - add new macro \psStep with new option StepType
+ v 2.71 2005-10-24 - use \def instead of \edef for subtickcolor
+ and also using \pst@getcolor
+ - fix bug with Ox and log axes
+ v 2.70 2005-10-20 - use \def instead of \edef for X|YAxisLabel
+ - make psgraph correct use of the origin values
+ - added a new macro \psLNode and \nlput for a
+ node label with absolute position
+ v 2.69 2005-10-12 moving the basic arrows into pstricks )-(,]-[
+ bugfix for hook arrow
+ v 2.68 2005-10-09 fix a bug with trigLabels and showorigin
+ v 2.67 2005-10-08 rewrote \psrotate macro
+ added three predefined hatchstyles for simulating transparent colors
+ TRed, TGreen,TBlue
v 2.66 2005-10-06 add more support for Gouraud-shading, emulate the PS subroutines
- if not present in the PS level
- v 2.65 2005-10-03 add support for Gouraud-shading
- v 2.64 2005-09-25 fix a bug in reading ticksize values (\pst@getdimdim}
- v 2.63 2005-09-18 fix another bug with option names
- v 2.62 2005-09-08 fix new introduced bug in \psbrace
- v 2.61 2005-09-08 fix bug in \psbrace
- v 2.60 2005-08-28 added some more line fill styles
- v 2.59 2005-08-06 bugfix for option intSeparator
- add macro \psrotate
- v 2.58 2005-07-25 ArrowInside=- for \psbrace
- v 2.57 2005-07-07 some improvements to psgraph
- v 2.56 2005-06-25 fix bug with \pscustom and poynom
- fix introduced trailing space in \readdata
- v 2.55 2005-05-26 some tweeks to the code, updating the documentation
- v 2.54 2005-05-25 added option ChangeOrder
- v 2.53 2005-05-23 dito
- v 2.52 2005-05-22 fix bug in psplotTangent
- v 2.51 2005-05-21 drop support of option varStep
- v 2.50 2005-05-20 first try with psplotDiffEqn, plotting differential equation,
- needs _newest_ pst-eqdf.pro and pstricks.pro
- v 2.49 2005-05-19 fix bug in psplotTangent and make option showpointa available
- v 2.48 2005-05-18 fix some new introduced bugs and make psplotTangent for all
- plot macros working
- v 2.47 2005-05-17 make psplotTangens also available for the parametric plot
- together with the algebraic option
- v 2.46 2005-05-16 make psplotTangens also available for the polarplot and
- algebraic option
- v 2.45 2005-05-16 small changes to the code
- v 2.44 2005-05-15 added macro psplotTangent
- v 2.43 2005-04-20 some more tweeks to triglabels
- v 2.42 2005-04-17 small bugfix with the options
- v 2.41 2005-04-17 new option ignoreLines for \readdata
- v 2.40 2005-04-13 new option trigLabels
- v 2.39 2005-03-17 modify the Rhook subroutine (abs)
- v 2.38 2005-03-03 move the loading of a config file into pstricks-add.sty
- v 2.37 2005-02-20 drop support of tickstyle (pst-plot),
- fix several bugs in connection with the ticksize option
- minor code changes
- v 2.36 2005-02-20 added missing LabelFactor
- v 2.35 2005-02-19 small improvements
- v 2.34 2005-02-10 fix bug with comma
- v 2.33 2005-01-18 add a config file
- v 2.32 2005-01-16 added hook arrow (for bond lines)
- v 2.31 2004-12-11 activate \pslinestyle for the axes
- v 2.30 2004-12-07 make xyAxes run
- v 2.29 2004-12-04 spurious blank in ArrowInside
- v 2.28 2004-11-23 small changes to the code
- v 2.27 2004-11-19 tickstyle now a pstricks-add key
- v 2.26 2004-11-17 spurious blank in \psbrace
- v 2.25 2004-11-13 fixed a new introduced bug
- v 2.24 2004-11-12 added the psRandom macro for random dots
- v 2.23 2004-11-11 added the star option for psgraph
- v 2.22 2004-11-04 fixed bug with \psset
- v 2.21 2004-10-24 added \psParallelLine for lines parallel to another one
- added \psIntersectionPoint(#1)(#2)(#3)(#4){nodeName}
- v 2.20 2004-10-24 added \psRelLine for lines relative to another one
- v 2.19 2004-10-20 small changes
- v 2.18 2004-10-20 add \ncbarr
- v 2.17 2004-10-14 new multiple arrows
+ if not present in the PS level
+ v 2.65 2005-10-03 add support for Gouraud-shading
+ v 2.64 2005-09-25 fix a bug in reading ticksize values (\pst@getdimdim}
+ v 2.63 2005-09-18 fix another bug with option names
+ v 2.62 2005-09-08 fix new introduced bug in \psbrace
+ v 2.61 2005-09-08 fix bug in \psbrace
+ v 2.60 2005-08-28 added some more line fill styles
+ v 2.59 2005-08-06 bugfix for option intSeparator
+ add macro \psrotate
+ v 2.58 2005-07-25 ArrowInside=- for \psbrace
+ v 2.57 2005-07-07 some improvements to psgraph
+ v 2.56 2005-06-25 fix bug with \pscustom and poynom
+ fix introduced trailing space in \readdata
+ v 2.55 2005-05-26 some tweeks to the code, updating the documentation
+ v 2.54 2005-05-25 added option ChangeOrder
+ v 2.53 2005-05-23 dito
+ v 2.52 2005-05-22 fix bug in psplotTangent
+ v 2.51 2005-05-21 drop support of option varStep
+ v 2.50 2005-05-20 first try with psplotDiffEqn, plotting differential equation,
+ needs _newest_ pst-eqdf.pro and pstricks.pro
+ v 2.49 2005-05-19 fix bug in psplotTangent and make option showpointa available
+ v 2.48 2005-05-18 fix some new introduced bugs and make psplotTangent for all
+ plot macros working
+ v 2.47 2005-05-17 make psplotTangens also available for the parametric plot
+ together with the algebraic option
+ v 2.46 2005-05-16 make psplotTangens also available for the polarplot and
+ algebraic option
+ v 2.45 2005-05-16 small changes to the code
+ v 2.44 2005-05-15 added macro psplotTangent
+ v 2.43 2005-04-20 some more tweeks to triglabels
+ v 2.42 2005-04-17 small bugfix with the options
+ v 2.41 2005-04-17 new option ignoreLines for \readdata
+ v 2.40 2005-04-13 new option trigLabels
+ v 2.39 2005-03-17 modify the Rhook subroutine (abs)
+ v 2.38 2005-03-03 move the loading of a config file into pstricks-add.sty
+ v 2.37 2005-02-20 drop support of tickstyle (pst-plot),
+ fix several bugs in connection with the ticksize option
+ minor code changes
+ v 2.36 2005-02-20 added missing LabelFactor
+ v 2.35 2005-02-19 small improvements
+ v 2.34 2005-02-10 fix bug with comma
+ v 2.33 2005-01-18 add a config file
+ v 2.32 2005-01-16 added hook arrow (for bond lines)
+ v 2.31 2004-12-11 activate \pslinestyle for the axes
+ v 2.30 2004-12-07 make xyAxes run
+ v 2.29 2004-12-04 spurious blank in ArrowInside
+ v 2.28 2004-11-23 small changes to the code
+ v 2.27 2004-11-19 tickstyle now a pstricks-add key
+ v 2.26 2004-11-17 spurious blank in \psbrace
+ v 2.25 2004-11-13 fixed a new introduced bug
+ v 2.24 2004-11-12 added the psRandom macro for random dots
+ v 2.23 2004-11-11 added the star option for psgraph
+ v 2.22 2004-11-04 fixed bug with \psset
+ v 2.21 2004-10-24 added \psParallelLine for lines parallel to another one
+ added \psIntersectionPoint(#1)(#2)(#3)(#4){nodeName}
+ v 2.20 2004-10-24 added \psRelLine for lines relative to another one
+ v 2.19 2004-10-20 small changes
+ v 2.18 2004-10-20 add \ncbarr
+ v 2.17 2004-10-14 new multiple arrows
diff --git a/Master/texmf-dist/doc/generic/pstricks-add/pstricks.bib b/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.bib
index f99ba002003..36183a7a366 100644
--- a/Master/texmf-dist/doc/generic/pstricks-add/pstricks.bib
+++ b/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.bib
@@ -14,6 +14,40 @@
@STRING{theaterkasse = {Von der Theaterkasse} }
@STRING{theatertage = {{\TeX}-Theatertage} }
+@Book{PSTricks2,
+ author = {Herbert Vo\ss},
+ title = {{\PST} {G}rafik f\"ur \TeX{} und \LaTeX},
+ edition = {third},
+ publisher = {DANTE -- Lehmanns},
+ year = {2006},
+ address = {Heidelberg/Hamburg}
+}
+
+@Book{companion04,
+ author = {Frank Mittelbach and Michel Goosens et al},
+ title = {The {\LaTeX} {G}raphics {C}ompanion},
+ edition = {second},
+ publisher = {Addison-Wesley Publishing Company},
+ year = {2004},
+ address = {Boston}
+}
+
+@Book{begleiter05,
+ author = {Frank Mittelbach and Michel Goosens et al},
+ title = {Der {\LaTeX} {B}egleiter},
+ edition = {zweite},
+ publisher = {Pearson Education},
+ year = {2005},
+ address = {München}
+}
+
+@Book{unbound,
+ author = {Alan Hoenig},
+ title = {\TeX{} {U}nbound: \LaTeX{} \& \TeX{} {S}trategies, {F}onts, {G}raphics, and {M}ore},
+ publisher = {Oxford University Press},
+ year = {1998},
+ address = {London}
+}
@Article{ dtk02.2:jackson.voss:plot-funktionen,
author = {Laura E. Jackson and Herbert Vo{\ss}},
title = {Die Plot-Funktionen von {\texttt{pst-plot}}},
diff --git a/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.ltx b/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.ltx
index 4e41c58017e..d0870fd3bf5 100644
--- a/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.ltx
+++ b/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.ltx
@@ -85,25 +85,23 @@
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
-\usepackage{lmodern}
-%\usepackage[scaled]{luximono}
-\usepackage[lmargin=2.5cm]{geometry}
+\usepackage{pamathx}
+\usepackage[scaled]{luximono}
+%\usepackage{mathptmx}
+\usepackage[lmargin=2.5cm,bmargin=3cm]{geometry}
\usepackage{tabularx}
-\usepackage{url}
\usepackage{graphicx}
-\usepackage[dvipsnames]{pstricks}
-\usepackage{framed}
+\usepackage[svgnames,dvipsnames]{pstricks}
+\usepackage{framed,xspace,multirow,caption}
\usepackage{pst-eucl}
\usepackage{pstricks-add}
\let\pstricksaddFV\fileversion
\def\PST{\texttt{PSTricks}}
+\newcommand*\PostScript{\textsf{PostScript}\xspace}
%
-\usepackage{showexpl}
-\lstset{preset=\raggedright}
%
\usepackage{longtable}
\usepackage{pifont}
-\usepackage{amsmath}
\def\textat{\protect\makeatletter\texttt{@}\protect\makeatother}
\makeatletter
\renewcommand*\l@section{\@dottedtocline{1}{1.5em}{2.5em}}
@@ -115,11 +113,6 @@
\let\psEllipticArc\psellipticarc
\let\psEllipticArcN\psellipticarcn
\let\psWedgeEllipse\psellipticwedge
-\usepackage[colorlinks,linktocpage]{hyperref}
-%\def\UrlFont{\small\ttfamily}
-\makeatletter
-\def\verbatim@font{\small\normalfont\ttfamily}
-\makeatother
%\parindent=0pt
\newcommand\verbI[1]{{\small\texttt{#1}}}
\newcommand\CMD[1]{{\texttt{\textbackslash#1}}}
@@ -149,7 +142,37 @@
\parindent=0pt
\parskip=1ex plus 5pt
+
+\usepackage[colorlinks,linktocpage]{hyperref}
+\makeatletter
+\def\verbatim@font{\small\normalfont\ttfamily}
+\makeatother
+\usepackage{showexpl}
+\lstset{preset=\raggedright}
+\usepackage{amsmath}
+
+\newdimen\fullWidth
+\makeatletter
+\renewcommand\ON{%
+ \gdef\lst@alloverstyle##1{%
+ \fboxrule=0pt
+ \fboxsep=0pt
+ \fcolorbox{DarkBlue}{DarkBlue}{\textcolor{white}{\bfseries\strut##1}}%
+}}
+\renewcommand\OFF{%
+ \xdef\lst@alloverstyle##1{##1}%
+}
+
+\makeatother
+\lstset{escapechar=§}
+
\begin{document}
+\fullWidth=\linewidth
+\advance\fullWidth by \marginparsep
+\advance\fullWidth by \marginparwidth
+
+
\input{pstricks-add-doc}
+
\end{document}
diff --git a/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.pdf b/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.pdf
index 549cb053d4f..9bd2937fb23 100644
--- a/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.pdf
+++ b/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex b/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex
index ccd7eacda14..e86490290f3 100644
--- a/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex
+++ b/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex
@@ -5,7 +5,7 @@
% was build with VTeX/Free (\url{http://www.micropress-inc.com/linux})}
\\
\small v.\pstricksaddFV}
-\author{Herbert Vo\ss}
+\author{Dominique Rodriguez and Herbert Vo\ss}
\date{\today}
\maketitle
@@ -24,9 +24,8 @@ a lot of the macros won't work in the expected way.
\item \verb+pstricks-add+ uses the extended version of the keyval package. So be sure, that
you have installed \verb+pst-xkey+ which is part of the \verb+xkeyval+-package and that all
packages, that uses the old keyval interface are loaded \textbf{before} the \verb+xkeyval+.\cite{xkeyval}
-\item the option \verb+tickstyle+ from \verb+pst-plot+is no more supported, use \verb+ticksize+ instead.
-\item the option \verb+xyLabel+ is no more supported, use the macros \verb+\def\pshlabel#1{...}+ and
- \verb+\def\psvlabel#1{...}+ instead.
+\item the option \verb+tickstyle+ from \verb+pst-plot+ is no more supported, use \verb+ticksize+ instead.
+\item the option \verb+xyLabel+ is no more supported, use the option \verb+labelFontSize+ instead.
\end{itemize}
\end{abstract}
@@ -39,9 +38,6 @@ packages, that uses the old keyval interface are loaded \textbf{before} the \ver
\part{\texttt{pstricks}}
%--------------------------------------------------------------------------------------
-
-
-
%--------------------------------------------------------------------------------------
\section{Numeric functions}
%--------------------------------------------------------------------------------------
@@ -165,7 +161,7 @@ It makes some sense to define a new macroname in the preamble to use it througho
%--------------------------------------------------------------------------------------
\section{Dashed Lines}
%--------------------------------------------------------------------------------------
-Tobias N�ring implemented an enhanced feature for dashed lines. The number
+Tobias Nähring implemented an enhanced feature for dashed lines. The number
of arguments is no more limited.
\begin{verbatim}
@@ -227,13 +223,15 @@ macro.
\psdots[linecolor=red,dotscale=1.5](2,1)
\psarc[linecolor=red,linewidth=0.4pt,showpoints=true]
{->}(2,1){3}{0}{60}
- \pspolygon[linecolor=green](2,1)(5,1.1)(6,-1)(2,-2)
- \psrotate[linecolor=blue](2,1){60}{
+ \pspolygon[linecolor=green,linewidth=1pt](2,1)(5,1.1)(6,-1)(2,-2)
+ \psrotate[linecolor=blue,linewidth=1pt](2,1){60}{
\pspolygon(2,1)(5,1.1)(6,-1)(2,-2)}
\end{pspicture}
\end{LTXexample}
+\clearpage
+\iffalse
%--------------------------------------------------------------------------------------
\section{\CMD{pslineII}: Colored lines}
%--------------------------------------------------------------------------------------
@@ -266,8 +264,6 @@ name & meaning\\\hline
\verb|dashNo| can have values greater than $1$. In this case the value will be taken as an absolute width in the pt unit. Only this unit is possible!
-\subsection{Examples}
-
\begin{LTXexample}[width=3.5cm]
\psset{linewidth=2pt}
\begin{pspicture}(3,3)
@@ -297,17 +293,6 @@ name & meaning\\\hline
\end{pspicture}
\end{LTXexample}
-\begin{LTXexample}
-\psset{linecolor=red,arrowscale=3}
-\psset{dashColorI=red,dashColorII=blue,dashNo=20,linewidth=2pt}
-\begin{pspicture}(0,0)(7,-5)
-\pslineII{<->}(0,0)(7,0)(7,-5)(0,-5)
-\pslineII[linewidth=5pt,%
- dashNo=0.1,arrowscale=2]{o-o}(0,-2.5)(7,-2.5)
-\end{pspicture}
-\end{LTXexample}
-
-
\begin{LTXexample}[pos=t]
\psset{linewidth=15pt,dashNo=10}
\begin{pspicture}(0,1)(10,-6)
@@ -319,72 +304,10 @@ name & meaning\\\hline
\end{pspicture}
\end{LTXexample}
-
-%--------------------------------------------------------------------------------------
-\section{\CMD{pslineIII} Variable linewidth}
-%--------------------------------------------------------------------------------------
-By default all lines have a fixed width. \verb|\pslineIII| allows to
-define the start and the end width of a line. It has the same syntax as \verb|\psline|.
-
-\begin{center}
-\begin{pspicture}(0,-0.5)(12,0.5)
-\pslineIII[wBegin=1cm,wEnd=0.3cm,linecolor=cyan](0,0)(12,0)
-\end{pspicture}
-\end{center}
-
-\begin{lstlisting}[basicstyle=\ttfamily\footnotesize]
-\pslineIII[wBegin=1cm,wEnd=0.3cm,linecolor=cyan](0,0)(12,0)
-\end{lstlisting}
-
-
-
-%--------------------------------------------------------------------------------------
-\subsection{The options}
-%--------------------------------------------------------------------------------------
-
-\begin{center}
-\begin{tabular}{l|p{8cm}}
-name & meaning\\\hline
-\verb|wBegin| & first width, default is \verb|\pslinewidth|\tabularnewline
-\verb|wEnd| & last width, default is \verb|\pslinewidth|\tabularnewline
-\end{tabular}
-\end{center}
-
-It is also possible to use \verb|pslineIII| with more than two coordinates, like
-
-\begin{center}
-\begin{pspicture}(0,-0.5)(12,2)
-\pslineIII[wBegin=1cm,wEnd=0.1cm,linecolor=red](0,0)(3,1.5)(9,1.5)(12,0)
-\end{pspicture}
-
-\end{center}
-\begin{lstlisting}[basicstyle=\ttfamily\footnotesize]
-\pslineIII[wBegin=1cm,wEnd=0.1cm,linecolor=cyan](0,0)(0,1.5)(12,1.5)(12,0)
-\end{lstlisting}
-
-\iffalse
-%--------------------------------------------------------------------------------------
-\subsection{Examples}
-%--------------------------------------------------------------------------------------
-
-\begin{LTXexample}
-\begin{pspicture}(-5,-5)(5,5)
- \psgrid[griddots=10, gridlabels=7pt, subgriddiv=0]
-%
- \pslineIII[wBegin=1cm,wEnd=0.2cm,linecolor=cyan]%
- (-4,4)(3,4)(5,2)(2,-5)(-5,-2)(-5,0)
- \pslineIII[wBegin=0.5cm](-5,-3)(5,3)
- \pslineIII[wBegin=0.5cm,wEnd=0.1cm,linecolor=red](0,-5)(0,0)(0,5)
- \pslineIII[wBegin=1cm,wEnd=0.3cm,linecolor=blue](-4,4)(5,-4)
-%
-\end{pspicture}
-\end{LTXexample}
-
\clearpage
\fi
-
%--------------------------------------------------------------------------------------
\section{\CMD{psbrace}}
%--------------------------------------------------------------------------------------
@@ -432,7 +355,7 @@ or \verb|r| (right) and \verb|b| (bottom) or \verb|B| (Baseline) or \verb|C| (ce
or \verb|t| (top), where the default is \verb|c|, the center of the object.
%--------------------------------------------------------------------------------------
-\subsection{Examples}
+%\subsection{Examples}
%--------------------------------------------------------------------------------------
\begin{LTXexample}
@@ -469,9 +392,9 @@ or \verb|t| (top), where the default is \verb|c|, the center of the object.
\end{LTXexample}
-\begin{LTXexample}
-\def\someMath{$\int\limits_1^{\infty}\frac{1}{x^2}\,dx=1$}
-\begin{pspicture}(12,11)
+\begin{LTXexample}[width=8cm,wide]
+\psset{unit=0.8}
+\begin{pspicture}(10,11)
\psgrid[subgriddiv=0,griddots=10]
\pnode(0,0){A}
\pnode(4,6){B}
@@ -480,7 +403,7 @@ or \verb|t| (top), where the default is \verb|c|, the center of the object.
\psbrace[linecolor=blue,bracePos=0.25,braceWidth=1,ref=lB](8,1)(1,7){Three}
\psbrace[braceWidth=-1,rot=180,ref=rB](8,1)(1,7){Four}
\psbrace[linearc=0.5,linecolor=red,linewidth=3pt,braceWidth=1.5,%
- bracePos=0.25,ref=lC](8,1)(8,9){\someMath}
+ bracePos=0.25,ref=lC](8,1)(8,9){A}
\psbrace(4,9)(6,9){}
\psbrace(6,9)(6,7){}
\psbrace(6,7)(4,7){}
@@ -495,7 +418,7 @@ or \verb|t| (top), where the default is \verb|c|, the center of the object.
%$
-\begin{LTXexample}[width=5cm]
+\begin{LTXexample}[wide,width=5cm]
\[
\begin{pmatrix}
\Rnode[vref=2ex]{A}{~1} \\
@@ -599,6 +522,7 @@ Some nonsense text, which is nothing more than nonsense.
\end{framed}
\end{lstlisting}
+\clearpage
%--------------------------------------------------------------------------------------
\section{Random dots}
@@ -660,6 +584,60 @@ name & default\\\hline
\psset{unit=1cm}
\clearpage
+%% %--------------------------------------------------------------------------------------
+%% \section{Dice}
+%% %--------------------------------------------------------------------------------------
+%% \CMD{psdice} creates the view of a dice. The number on the dice is the only parameter.
+%% The optional parameters, like the color can be used as usual. The macro is a box of
+%% dimension zero and is placed
+%% at the current point. Use the \CMD{rput} macro to place it anywhere. The only
+%% special option name is \verb+dicescale+, with a default setting of \verb+1+. In this
+%% case the dice has a size of $1\mathrm{cm}\times1\mathrm{cm}$.
+%%
+%% \begin{center}
+%% \begin{pspicture}(-1,-1)(8,8)
+%% \multido{\iA=1+1}{6}{%
+%% \rput(\iA,7.5){\Huge\psdice[dicescale=0.75,linecolor=red]{\iA}}
+%% \rput(! -0.5 7 \iA\space sub){\Huge\psdice[dicescale=0.75,linecolor=green]{\iA}}%
+%% \multido{\iB=1+1}{6}{%
+%% \fpAdd{\iA}{\iB}{\iSum}
+%% \pnode(! \iA\space 7 \iB\space sub ){p\iA\iB}
+%% \rput(! \iA\space 7 \iB\space sub){\iSum}
+%% }}
+%% %
+%% \ncbox[linearc=0.35,nodesep=0.4,linestyle=dashed]{p15}{p51}
+%% \ncbox[linearc=0.35,nodesep=0.4,linestyle=dotted]{p11}{p66}
+%% \rput{90}(-1.5,3.5){1. dice}
+%% \rput{0}(3.5,8.5){2. dice}
+%% \psline[linewidth=1.5pt](0.25,0.5)(0.25,8)
+%% \psline[linewidth=1.5pt](-1,6.75)(6.5,6.75)
+%% %
+%% \end{pspicture}
+%% \end{center}
+%%
+%% \begin{lstlisting}
+%% \begin{pspicture}(-1,-1)(8,8)
+%% \multido{\iA=1+1}{6}{%
+%% \rput(\iA,7.5){\Huge\psdice[dicescale=0.75,linecolor=red]{\iA}}
+%% \rput(! -0.5 7 \iA\space sub){\Huge\psdice[dicescale=0.75,linecolor=green]{\iA}}%
+%% \multido{\iB=1+1}{6}{%
+%% \fpAdd{\iA}{\iB}{\iSum}
+%% \pnode(! \iA\space 7 \iB\space sub ){p\iA\iB}
+%% \rput(! \iA\space 7 \iB\space sub){\iSum}
+%% }}
+%% %
+%% \ncbox[linearc=0.35,nodesep=0.4,linestyle=dashed]{p15}{p51}
+%% \ncbox[linearc=0.35,nodesep=0.4,linestyle=dotted]{p11}{p66}
+%% \rput{90}(-1.5,3.5){1. dice}
+%% \rput{0}(3.5,8.5){2. dice}
+%% \psline[linewidth=1.5pt](0.25,0.5)(0.25,8)
+%% \psline[linewidth=1.5pt](-1,6.75)(6.5,6.75)
+%% %
+%% \end{pspicture}
+%% \end{lstlisting}
+%%
+%%
+%% \clearpage
%--------------------------------------------------------------------------------------
\section{Arrows}
%--------------------------------------------------------------------------------------
@@ -696,6 +674,8 @@ name & default\\\hline
\egroup
\end{center}
+
+
You can also mix and match, e.g., \verb/->/, \verb/*-)/ and \verb/[->/ are all valid values
of the \verb|arrows| parameter. The parameter can be set with
\begin{verbatim}
@@ -726,6 +706,9 @@ is like the one described in the old PSTricks manual.
\end{tabular}
\end{center}
+
+
+
\begin{center}
\bgroup
\psset{linecolor=red,linewidth=1pt,arrowscale=2}%
@@ -750,8 +733,9 @@ is like the one described in the old PSTricks manual.
\egroup
\end{center}
-\subsection{\texttt{hookarrow}}
+\clearpage
+\subsection{\texttt{hookarrow}}
\begin{LTXexample}
\psset{arrowsize=8pt,arrowlength=1,linewidth=1pt,nodesep=2pt,shortput=tablr}
\large
@@ -774,6 +758,7 @@ $e_b:S$ & 1 & & 1 & 0 \\
\end{LTXexample}
+
\subsection{\texttt{hookrightarrow} and \texttt{hookleftarrow}}
This is another type of an arrow and abbreviated with \verb+H+. The length and width of the hook
is set by the new options \verb+hooklength+ and \verb+hookwidth+, which are by default set to
@@ -880,6 +865,12 @@ macro. If you want arrows with an abolute position difference, then choose a
value greater than \verb|1|, e.g. \verb|10| which places an arrow every 10 pt. The
default unit \verb|pt| cannot be changed.
+\noindent
+\begin{tabularx}{\linewidth}{@{\color{red}\vrule width 2pt}lX@{}}
+& The \verb+ArrowInside+ takes only arrow definitions like \verb+->+ into account.
+Arrows from right to left (\verb+<-+) are not possible and ignored. If you need
+such arrows, change the order of the pairs of coordinates for the line or curve macro.
+\end{tabularx}
%--------------------------------------------------------------------------------------
\subsection{\texttt{ArrowFill} Option}
@@ -1259,6 +1250,7 @@ These examples also need the package \verb|pst-node|.
\end{pspicture}
\end{LTXexample}
+\clearpage
%--------------------------------------------------------------------------------------
\section{\CMD{psFormatInt}}
%--------------------------------------------------------------------------------------
@@ -1284,7 +1276,7 @@ With the option \verb|intSeparator| the symbol can be changed to any any non-num
%--------------------------------------------------------------------------------------
%--------------------------------------------------------------------------------------
-\subsection{,,Tranparent colors''}
+\subsection{,,Transparent colors''}
%--------------------------------------------------------------------------------------
\verb+pstricks-add+ simulates transparency with hatch lines:
@@ -1480,7 +1472,7 @@ of calculating lighting for each pixel. The technique was first presented by Hen
\end{quotation}
PostScript level 3 supports this kind of shading and it could only be seen with Acroread 7
-or younger. Die Syntax ist relativ einfach
+or younger. Die Syntax is easy:
\begin{verbatim}
\psGTriangle(x1,y1)(x2,y2)(x3,y3){color1}{color2}{color3}
@@ -1521,6 +1513,8 @@ or younger. Die Syntax ist relativ einfach
%--------------------------------------------------------------------------------------
\part{\texttt{pst-node}}
%--------------------------------------------------------------------------------------
+
+\iffalse
\section{\CMD{nclineII}}
%--------------------------------------------------------------------------------------
The dashed lines are black and white by default. The new macro \verb|\nclineII|
@@ -1594,7 +1588,7 @@ like this connection from here\pnode{D}\pclineII{->}(D)(C){}
to the above word \verb|pstricks|.
\end{LTXexample}
-
+\fi
%--------------------------------------------------------------------------------------
\section{\CMD{ncdiag} and \CMD{pcdiag}}
@@ -1817,7 +1811,7 @@ two valid options:
\begin{tabularx}{\linewidth}{l|l|X}
name & default & meaning\\\hline
\verb|angle| & $0$ & angle between the given line $\overline{P_0P_1}$ and the new one
-$\overline{P_0P_endNode}$\tabularnewline
+$\overline{P_0P_{endNode}}$\tabularnewline
\verb+trueAngle+ & false & defines whether the angle depends to the seen line or to the
mathematical one, which respect the scaling factors \verb+xunit+ and \verb+yunit+.
\end{tabularx}
@@ -2052,14 +2046,15 @@ There is no special parameter here.
\end{pspicture}
\end{LTXexample}
+\clearpage
%--------------------------------------------------------------------------------------
-\section{\CMD{setLNode} and \CMD{setLCNode}}
+\section{\CMD{psLNode} and \CMD{psLCNode}}
%--------------------------------------------------------------------------------------
\CMD{psLNode} interpolates the Line $\overline{AB}$ by the given value and sets a node at this
point. The syntax is
%
\begin{verbatim}
-\setLNode(P1)(P2){value}{Node name}
+\psLNode(P1)(P2){value}{Node name}
\end{verbatim}
\begin{LTXexample}[width=5cm]
@@ -2067,11 +2062,11 @@ point. The syntax is
\psgrid[subgriddiv=0,griddots=10]
\psset{linecolor=red}
\psline{o-o}(1,1)(5,5)
-\setLNode(1,1)(5,5){0.75}{PI}
+\psLNode(1,1)(5,5){0.75}{PI}
\qdisk(PI){4pt}
\psset{linecolor=blue}
\psline{o-o}(4,3)(2,5)
-\setLNode(4,3)(2,5){-0.5}{PII}
+\psLNode(4,3)(2,5){-0.5}{PII}
\qdisk(PII){4pt}
\end{pspicture}
\end{LTXexample}
@@ -2083,7 +2078,7 @@ the new vector as a node. All vectors start at $(0,0)$, so a \verb+\rput+ maybe
The syntax is
%
\begin{verbatim}
-\setLCNode(P1){value 1}(P2){value 2}{Node name}
+\psLCNode(P1){value 1}(P2){value 2}{Node name}
\end{verbatim}
\begin{LTXexample}[width=5cm]
@@ -2094,7 +2089,7 @@ the new vector as a node. All vectors start at $(0,0)$, so a \verb+\rput+ maybe
\psline[linestyle=dashed]{->}(0.375,1.5)
\psset{linecolor=red}
\psline{->}(2,1)\psline{->}(0.5,2)
-\setLCNode(2,1){1.5}(0.5,2){0.75}{PI}
+\psLCNode(2,1){1.5}(0.5,2){0.75}{PI}
\psline[linewidth=2pt]{->}(PI)
\psset{linecolor=black}
\psline[linestyle=dashed](3,1.5)(PI)
@@ -2102,16 +2097,20 @@ the new vector as a node. All vectors start at $(0,0)$, so a \verb+\rput+ maybe
\end{pspicture}
\end{LTXexample}
+\clearpage
%--------------------------------------------------------------------------------------
-\section{\CMD{nlput}}
+\section{\CMD{nlput} and \CMD{psLDNode}}
%--------------------------------------------------------------------------------------
\CMD{ncput} allows to set a label relative to the first node of the last
node connection. With \CMD{nlput} this can be done absolute to a given
-node. The syntax is different to the other node connection makros.
+node. The syntax is different to the other node connection makros. It uses
+internally the macro \CMD{psLDNode} which places a node absolute to
+two given points, starting from the first one.
\begin{verbatim}
\nlput[options](A)(B){distance}{text}
+\psLDNode[options](A)(B){distance}{node name}
\end{verbatim}
@@ -2120,6 +2119,7 @@ node. The syntax is different to the other node connection makros.
\pnode(0,0){A}
\pnode(5,2){B}
\ncline{A}{B}
+\psLDNode(A)(B){1.5cm}{KN}\qdisk(KN){2pt}
\nlput[nrot=:U](A)(B){1cm}{Test}
\nlput[nrot=:D](A)(B){2cm}{Test}
\nlput[nrot=:U](A)(B){3cm}{Test}
@@ -2137,7 +2137,9 @@ node. The syntax is different to the other node connection makros.
\section{ New options}
%--------------------------------------------------------------------------------------
The option \verb+tickstyle=full|top|bottom+ is no more working in the \verb+pstricks-add+
-package, because everything can be set by the \verb+ticksize+ option.
+package, because everything can be set by the \verb+ticksize+ option. When using the
+\verb+comma+ or \verb+trigLabels+ option, the macros \verb+\pshlabel+ and \verb+\psvlabel+
+shouldn't be redefined, because the package does it itself in these cases.
{
\ttfamily
\begin{longtable}{lll}
@@ -2146,6 +2148,7 @@ package, because everything can be set by the \verb+ticksize+ option.
\endfirsthead
\textrm{Name} & \textrm{Type} & \textrm{Default}\\\hline
\endhead
+labelFontSize & <fontsize macro> & \{\} \\
algebraic & false|true & false\\ %ok
comma & false|true & false\\ %ok
xAxis & false|true & true\\%ok
@@ -2203,6 +2206,7 @@ urx & <length> & 0pt\\
ury & <length> & 0pt\\
polarplot & false|true & false\\
trigLabels & false|true & false\\
+trigLabelBase & <number> & 0\\
ChangeOrder & false|true & false\\
\end{longtable}
}
@@ -2210,6 +2214,35 @@ ChangeOrder & false|true & false\\
\clearpage
%--------------------------------------------------------------------------------------
+\subsection{Changing the label font size with \texttt{labelFontSize}}
+%--------------------------------------------------------------------------------------
+
+This option sets the horizontal \textbf{and} vertical font size for the labels.
+It will be overwritten when another package or a user defines
+\begin{lstlisting}
+\def\pshlabel#1{...}
+\def\psvlabel#1{...}
+\end{lstlisting}
+
+\begin{LTXexample}[width=6cm]
+\begin{pspicture}(-0.25,-0.25)(5,2.25)
+\psaxes{->}(5,2.25)
+\end{pspicture}\\[20pt]
+\begin{pspicture}(-0.25,-0.25)(5,2.25)
+\psaxes[labelFontSize=\small]{->}(5,2.25)
+\end{pspicture}\\[20pt]
+\begin{pspicture}(-0.25,-0.25)(5,2.25)
+\psaxes[labelFontSize=\footnotesize]{->}(5,2.25)
+\end{pspicture}\\[20pt]
+\begin{pspicture}(-0.25,-0.25)(5,2.25)
+\psaxes[labelFontSize=\tiny]{->}(5,2.25)
+\end{pspicture}%
+\end{LTXexample}
+
+
+\clearpage
+
+%--------------------------------------------------------------------------------------
\subsection[\texttt{algebraic}]{\texttt{algebraic}\footnote{This part is adapted from the package \texttt{pst-eqdf}, written by Dominique Rodriguez.}}
%--------------------------------------------------------------------------------------
By default the function of \verb+\psplot+ has to be described in Reversed Polish Notation.
@@ -2237,8 +2270,8 @@ the computation is done from left to right. The following functions are defined
\verb$sqrt$ & square root\\
\verb$abs$ & absolute value\\
\verb$fact$ & for the factorial\\
-\verb$SUM$ & for building sums\\
-\verb$IFTE$ & for an easy case structure
+\verb$Sum$ & for building sums\\
+\verb$IfTE$ & for an easy case structure
\end{tabular}
\medskip
@@ -2256,18 +2289,31 @@ For the \verb+\parametricplot+ the two parts must be divided by the \verb+|+ cha
\end{LTXexample}
+\clearpage
\bigskip
-\begin{LTXexample}[pos=t]
+%\begin{LTXexample}[pos=t]
\psset{lly=-0.5cm}
\psgraph(-10,-3)(10,2){\linewidth}{6cm}
\psset{algebraic=true, plotpoints=101}
\psplot[linecolor=yellow, linewidth=4\pslinewidth]{-10}{10}{2*sin(x)}%
\psplot[linecolor=red, showpoints=true]{-10}{10}{2*sin(x)}
\endpsgraph
-\end{LTXexample}
+%\end{LTXexample}
+
+\bigskip
+\begin{lstlisting}
+\psset{lly=-0.5cm}
+\psgraph(-10,-3)(10,2){\linewidth}{6cm}
+ \psset{algebraic=true, plotpoints=101}
+ \psplot[linecolor=yellow, linewidth=4\pslinewidth]{-10}{10}{2*sin(x)}%
+ \psplot[linecolor=red, showpoints=true]{-10}{10}{2*sin(x)}
+\endpsgraph
+\end{lstlisting}
-\begin{LTXexample}[pos=t]
+\bigskip
+%\begin{LTXexample}[pos=t]
+\bgroup
\psset{lly=-0.5cm}
\psgraph(0,-5)(18,3){15cm}{5cm}
\psset{algebraic,plotpoints=501}
@@ -2276,25 +2322,31 @@ For the \verb+\parametricplot+ the two parts must be divided by the \verb+|+ cha
\psplot[linecolor=yellow,linewidth=4\pslinewidth]{0}{18}{3*cos(x)*2.71^(-x/10)}
\psplot[linecolor=blue,showpoints=true,plotpoints=51]{0}{18}{3*cos(x)*2.71^(-x/10)}
\endpsgraph
-\end{LTXexample}
+\egroup
+%\end{LTXexample}
+
+
+\bigskip
+\begin{lstlisting}
+\psset{lly=-0.5cm}
+\psgraph(0,-5)(18,3){15cm}{5cm}
+ \psset{algebraic,plotpoints=501}
+ \psplot[linecolor=yellow, linewidth=4\pslinewidth]{0.01}{18}{ln(x)}%
+ \psplot[linecolor=red]{0.01}{18}{ln(x)}
+ \psplot[linecolor=yellow,linewidth=4\pslinewidth]{0}{18}{3*cos(x)*2.71^(-x/10)}
+ \psplot[linecolor=blue,showpoints=true,plotpoints=51]{0}{18}{3*cos(x)*2.71^(-x/10)}
+\endpsgraph
+\end{lstlisting}
-\iffalse
-\begin{LTXexample}
-\begin{psgraph}(0,-4)(0.2,4){{15cm}}{5cm}
- \psset{algebraic=true, plotpoints=501}
- \psplot[linecolor=yellow, linewidth=4\pslinewidth]{0.02}{.2}{4*cos(1/x)}%
- \psplot[linecolor=red]{.02}{.2}{4*cos(1/x)}%
-\end{psgraph}
-\end{LTXexample}
-\fi
+\iffalse
%--------------------------------------------------------------------------------------
-\subsubsection{Using the \texttt{SUM} function}
+\subsubsection{Using the \texttt{Sum} function}
%--------------------------------------------------------------------------------------
-Syntax: \verb+SUM(<index name>,<start>,<step>,<end>,<function>)+
+Syntax: \verb+Sum(<index name>,<start>,<step>,<end>,<function>)+
Let's plot the first development of cosine with polynomials:
$\displaystyle\sum_{n=0}^{+\infty}\frac{(-1)^nx^{2n}}{n!}$.
@@ -2309,7 +2361,7 @@ $\displaystyle\sum_{n=0}^{+\infty}\frac{(-1)^nx^{2n}}{n!}$.
\psplot{-7}{7}{cos(x)}
\multido{\n=1+1}{10}{%
\psplot[linecolor=\getColor{\n}]{-7}{7}{%
- SUM(ijk,0,1,\n,(-1)^ijk*x^(2*ijk)/fact(2*ijk))}}
+ Sum(ijk,0,1,\n,(-1)^ijk*x^(2*ijk)/fact(2*ijk))}}
\endpsclip
\psaxes(0,0)(-7,-1.5)(7,1.5)
\end{pspicture}
@@ -2324,37 +2376,49 @@ $\displaystyle\sum_{n=0}^{+\infty}\frac{(-1)^nx^{2n}}{n!}$.
\psplot{-7}{7}{cos(x)}
\multido{\n=1+1}{10}{%
\psplot[linecolor=\getColor{\n}]{-7}{7}{%
- SUM(ijk,0,1,\n,(-1)^ijk*x^(2*ijk)/fact(2*ijk))}}
+ Sum(ijk,0,1,\n,(-1)^ijk*x^(2*ijk)/fact(2*ijk))}}
\endpsclip
\psaxes(0,0)(-7,-1.5)(7,1.5)
\end{pspicture}
\end{lstlisting}
-
+\clearpage
%--------------------------------------------------------------------------------------
-\subsubsection{Using the \texttt{IFTE} function}
+\subsubsection{Using the \texttt{IfTE} function}
%--------------------------------------------------------------------------------------
-Syntax: \verb+IFTE(<condition>,<true part>,<false part>)+
+Syntax: \verb+IfTE(<condition>,<true part>,<false part>)+
-Nesting of several \verb+IFTE+ are possible and seen in the following examples.
+Nesting of several \verb+IfTE+ are possible and seen in the following examples.
A classical example is a piece wise linear function.
-\begin{LTXexample}[pos=t]
+\begin{center}
\begin{pspicture}(-7.5,-2.5)(7.5,6)\psgrid[subgriddiv=1,gridcolor=lightgray]
\psset{algebraic=true, plotpoints=21,linewidth=2pt}
- \psplot[linecolor=blue]{-7.5}{7.5}{IFTE(x<-6,8+x,IFTE(x<0,-x/3,IFTE(x<3,2*x,9-x)))}
+ \psplot[linecolor=blue]{-7.5}{7.5}{IfTE(x<-6,8+x,IfTE(x<0,-x/3,IfTE(x<3,2*x,9-x)))}
\psplot[linecolor=red, plotpoints=101]{-7.5}{7.5}{%
- IFTE(2*x<-2^2*sqrt(9),7+x,IFTE(x<0,x^2/18-1,IFTE(x<3,2*x^2/3-1,8-x)))}%
+ IfTE(2*x<-2^2*sqrt(9),7+x,IfTE(x<0,x^2/18-1,IfTE(x<3,2*x^2/3-1,8-x)))}%
\end{pspicture}
-\end{LTXexample}
+\end{center}
+\begin{lstlisting}
+\begin{pspicture}(-7.5,-2.5)(7.5,6)\psgrid[subgriddiv=1,gridcolor=lightgray]
+ \psset{algebraic=true, plotpoints=21,linewidth=2pt}
+ \psplot[linecolor=blue]{-7.5}{7.5}{IfTE(x<-6,8+x,IfTE(x<0,-x/3,IfTE(x<3,2*x,9-x)))}
+ \psplot[linecolor=red, plotpoints=101]{-7.5}{7.5}{%
+ IfTE(2*x<-2^2*sqrt(9),7+x,IfTE(x<0,x^2/18-1,IfTE(x<3,2*x^2/3-1,8-x)))}%
+\end{pspicture}
+\end{lstlisting}
+
When you program a piece-wise defined function you must take care that a
plotting point must be put on each point where the description changes. Use \verb+showpoints=true+ to
see what's going on, when there is a problem. You are on the save side, when you choose a
big number for \verb+plotpoints+.
-\newpage
+\clearpage
+
+\fi
+
%--------------------------------------------------------------------------------------
\subsection{\texttt{comma}}
@@ -2432,16 +2496,14 @@ The default setting \verb|{}| means, that you'll get the standard behaviour.
\begin{LTXexample}[width=6cm]
-\begin{pspicture}(-1.5,-0.5)(5,4.75)
- \psaxes[xyDecimals=2]{->}(0,0)(4.5,4.5)
+\begin{pspicture}(-1.5,-0.5)(5,3.75)
+ \psaxes[xyDecimals=2]{->}(0,0)(4.5,3.5)
\end{pspicture}
\end{LTXexample}
\begin{LTXexample}
-\def\pshlabel#1{\footnotesize$#1$}
-\def\psvlabel#1{\footnotesize$#1$}
-\psset{xunit=10cm, yunit=0.01cm}
+\psset{xunit=10cm,yunit=0.01cm,labelFontSize=\footnotesize}
\begin{pspicture}(-0.3,-150)(1.5,550.0)
\psaxes[Dx=0.25,Dy=100,ticksize=-4pt 0,comma=true,%
xDecimals=3,yDecimals=1]{->}(0,0)(0,-100)(1.4,520)
@@ -2450,32 +2512,6 @@ The default setting \verb|{}| means, that you'll get the standard behaviour.
\resetOptions
-%--------------------------------------------------------------------------------------
-\subsection{Changing the label style}
-%--------------------------------------------------------------------------------------
-There are no special keywords to change the \index{labelstyle}labelstyle for the \verb|\psaxes|
-macro. With a redefinition of the two macros \verb+\pshlabel+ and \verb+\psvlabel+
-it is possible to set both axes in any shape.
-Like the default \verb|pst-plot| package the coordinates are printed in mathmode, changing
-the fontsize to italic needs textmode.
-
-\begin{verbatim}
-\def\pshlabel#1{\scriptsize\itshape #1}
-\def\psvlabel#1{\sffamily\footnotesize #1}
-\end{verbatim}
-
-\resetOptions
-\begin{LTXexample}
-\def\pshlabel#1{\scriptsize\itshape #1}
-\def\psvlabel#1{\sffamily\footnotesize #1}
-\psset{yunit=1cm,xunit=3cm}
-\begin{pspicture}(-0.3,-0.5)(5,4.75)
-\psaxes[Dy=0.5, Dx=0.25]{->}(0,0)(4.5,4.5)
-\end{pspicture}
-\end{LTXexample}
-
-\resetOptions
-
\iffalse
%--------------------------------------------------------------------------------------
@@ -2636,6 +2672,7 @@ A grid is also possible by setting the values to the max/min coordinates.
\end{pspicture}
\end{LTXexample}
+
%--------------------------------------------------------------------------------------
\subsection{\texttt{subticks}}
%--------------------------------------------------------------------------------------
@@ -2695,6 +2732,8 @@ can have any number. 1 sets it to the same length as the main ticks.
\end{pspicture}
\end{LTXexample}
+\clearpage
+
%--------------------------------------------------------------------------------------
\subsection{\texttt{tickcolor}, \texttt{subtickcolor}}
%--------------------------------------------------------------------------------------
@@ -2711,9 +2750,8 @@ ysubtickcolor=<color>
\verb+tickcolor+ and \verb+subtickcolor+ set both for the x- and the y-Axis.
\begin{LTXexample}[preset=\centering,pos=t]
-\def\pshlabel#1{\footnotesize$#1$}
\begin{pspicture}(0,-0.75)(10,1)
-\psaxes[labelsep=2pt,yAxis=false,%
+\psaxes[labelsep=2pt,yAxis=false,labelFontSize=\footnotesize,%
labelsep=-10pt,ticksize=0 10mm,subticks=10,subticksize=0.75,%
tickcolor=red,subtickcolor=blue,tickwidth=1pt,%
subtickwidth=0.5pt](10.01,0)
@@ -2721,15 +2759,15 @@ ysubtickcolor=<color>
\end{LTXexample}
\begin{LTXexample}[width=5cm]
-\def\pshlabel#1{\footnotesize$#1$}
\begin{pspicture}(5,-0.75)(10,1)
-\psaxes[labelsep=2pt,yAxis=false,%
+\psaxes[labelsep=2pt,yAxis=false,labelFontSize=\footnotesize,%
labelsep=5pt,ticksize=0 -10mm,subticks=10,subticksize=0.75,%
tickcolor=red,subtickcolor=blue,tickwidth=1pt,%
subtickwidth=0.5pt,Ox=5](5,0)(5,0)(10.01,0)
\end{pspicture}
\end{LTXexample}
+
%--------------------------------------------------------------------------------------
\subsection{\texttt{ticklinestyle} and \texttt{subticklinestyle}}
%--------------------------------------------------------------------------------------
@@ -2758,6 +2796,7 @@ value \verb+none+ doesn't really makes sense, because it is the same to
\end{LTXexample}
+
%--------------------------------------------------------------------------------------
\subsection{\texttt{loglines}}
%--------------------------------------------------------------------------------------
@@ -2896,6 +2935,7 @@ with an drawing intervall of $1.001\ldots 6$.
+
%--------------------------------------------------------------------------------------
\subsubsection{\texttt{xlogBase}}
%--------------------------------------------------------------------------------------
@@ -2906,7 +2946,7 @@ Now we have to use the easy math function $y=x$ because the x axis is still $\lo
\begin{pspicture}(-3.5,-3.5)(3.5,3.5)
\psplot[linewidth=2pt,linecolor=red]{-3}{3}{x} % log(x)
\psplot[linewidth=2pt,linecolor=blue]{-1.3}{1.5}{x 0.4343 div} % ln(x)
- \psaxes[xlogBase=10,Oy=-3]{->}(-3,-3)(3.5,3.5)
+ \psaxes[ylogBase=10,Oy=-3,Ox=-3]{->}(-3,-3)(3.5,3.5)
\uput[-90](3.5,-3){x}
\uput[180](-3,3.5){y}
\rput(2.5,1){$y=\log x$}
@@ -2914,8 +2954,18 @@ Now we have to use the easy math function $y=x$ because the x axis is still $\lo
\end{pspicture}
\end{LTXexample}
+\begin{center}
+\psset{yunit=3cm,xunit=2cm}
+\begin{pspicture}(-1.25,-1.25)(4.25,1.5)
+ \uput[-90](4.25,-1){x}
+ \uput[0](-1,1){y}
+ \rput(0,1){$y=\sin x$}
+ \psplot[linewidth=2pt,plotpoints=5000,linecolor=red]{-1}{3.5}{10 x exp sin }
+ \psaxes[xlogBase=10,Oy=-1]{->}(-1,-1)(4.25,1.25)
+\end{pspicture}
+\end{center}
-\begin{LTXexample}[preset=\centering,pos=t]
+\begin{lstlisting}
\psset{yunit=3cm,xunit=2cm}
\begin{pspicture}(-1.25,-1.25)(4.25,1.5)
\uput[-90](4.25,-1){x}
@@ -2924,7 +2974,7 @@ Now we have to use the easy math function $y=x$ because the x axis is still $\lo
\psplot[linewidth=2pt,plotpoints=5000,linecolor=red]{-1}{3.5}{10 x exp sin }
\psaxes[xlogBase=10,Oy=-1]{->}(-1,-1)(4.25,1.25)
\end{pspicture}
-\end{LTXexample}
+\end{lstlisting}
\begin{LTXexample}[width=7cm]
@@ -3125,6 +3175,7 @@ of the value.
\pstScalePoints(1,1){}{}% reset
\end{LTXexample}
+\clearpage
%--------------------------------------------------------------------------------------
\subsection{Plot style \texttt{bar} and option \texttt{barwidth}}
%--------------------------------------------------------------------------------------
@@ -3166,7 +3217,7 @@ value of \verb+0.25cm+, which is the total width.
\begin{LTXexample}[preset=\centering,pos=t]
\psset{xunit=.44cm,yunit=.3cm}
-\begin{pspicture}(-2,-1.5)(29,13)
+\begin{pspicture}(-2,-3)(29,13)
\psaxes[axesstyle=axes,Ox=1466,Oy=0,Dx=4,Dy=2,%
ylabelFactor={\,\%}]{-}(29,12)
\listplot[shadow=true,linecolor=blue,plotstyle=bar,barwidth=0.3cm,
@@ -3177,7 +3228,7 @@ value of \verb+0.25cm+, which is the total width.
\begin{LTXexample}[preset=\centering,pos=t]
\psset{xunit=.44cm,yunit=.3cm}
-\begin{pspicture}(-2,-1.5)(29,13)
+\begin{pspicture}(-2,-3)(29,13)
\psaxes[axesstyle=axes,Ox=1466,Oy=0,Dx=4,Dy=2,%
ylabelFactor={\,\%}]{-}(29,12)
\listplot[linecolor=blue,plotstyle=bar,barwidth=0.3cm,
@@ -3188,7 +3239,7 @@ value of \verb+0.25cm+, which is the total width.
\begin{LTXexample}[preset=\centering,pos=t]
\psset{xunit=.44cm,yunit=.3cm}
-\begin{pspicture}(-2,-1.5)(29,13)
+\begin{pspicture}(-2,-3)(29,13)
\psaxes[axesstyle=axes,Ox=1466,Oy=0,Dx=4,Dy=2,%
ylabelFactor={\,\%}]{-}(29,12)
\listplot[linecolor=blue,plotstyle=bar,barwidth=0.3cm,
@@ -3199,38 +3250,310 @@ value of \verb+0.25cm+, which is the total width.
\end{LTXexample}
%--------------------------------------------------------------------------------------
-\subsection{Axis with trigonmetrical units}
+\subsection{\texttt{trigLabels} and \texttt{trigLabelBase} -- axis with trigonmetrical units}
%--------------------------------------------------------------------------------------
-With the option \verb+trigLabels=true+ the labels on the x axis are trigonometrical ones:
+With the option \verb+trigLabels=true+ the labels on the x axis are trigonometrical ones.
+The option \verb+trigLabelBase+ set the demoninator of fraction. The default value of
+0 is the same as no fraction.
+The following constants are are defined in the package:
+\begin{lstlisting}
+\def§\ON§\PiFour§\OFF§{12.566371}
+\def§\ON§\PiTwo§\OFF§{6.283185}
+\def§\ON§\Pi§\OFF§{3.14159265}
+\def§\ON§\PiH§\OFF§{1.570796327}
+\newdimen\RadUnit
+\newdimen\RadUnitInv
+§\ON§\RadUnit§\OFF§=1.047198cm % this is pi/3
+§\ON§\RadUnitInv§\OFF§=0.95493cm % this is 3/pi
+\end{lstlisting}
-\medskip
-\begin{LTXexample}[preset=\centering,pos=t]
-\begin{pspicture}(-0.5,-1.25)(10,1.25)
- \psplot[linecolor=red,linewidth=1.5pt]%
- {0}{9.424777961}{x 180 mul 3.141592654 div sin}
- \psaxes[xunit=1.570796327,showorigin=false,trigLabels]{->}(0,0)(-0.5,-1.25)(6.4,1.25)
+
+
+Because it is a bit complicating to set the right values, we show some more examples
+here.
+
+For \textbf{all} following examples in this section we did a global\\ \lstinline[frame=single]|\psset{trigLabels=true,labelFontSize=\small}|.
+
+
+
+\psset{trigLabels,labelFontSize=\small}
+Translating the decimal ticks to geometrical makes no real sense,
+because every 1 xunit (1cm) is a tick and the last one at 6cm.
+
+\begin{minipage}{0.4\fullWidth}
+\begin{pspicture}[trigLabels=true](-0.5,-1.25)(6.5,1.25)%
+ \pnode(5,0){A}%
+ \psaxes{->}(0,0)(-0.5,-1.25)(\PiTwo,1.25)%
\end{pspicture}
-\end{LTXexample}
+\end{minipage}%
+\begin{minipage}{0.6\fullWidth}
+\begin{lstlisting}
+\begin{pspicture}(-0.5,-1.25)(6.5,1.25)%
+ \pnode(5,0){A}%
+ \psaxes{->}(0,0)(-.5,-1.25)(\PiTwo,1.25)
+\end{pspicture}
+\end{lstlisting}
+\end{minipage}
-With the value of \verb+xunit+ one can change the labels.
+\begin{minipage}{0.4\fullWidth}
+\begin{pspicture}(-0.5,-1.25)(6.5,1.25)%
+ \psaxes[trigLabelBase=3]{->}(0,0)(-0.5,-1.25)(\PiTwo,1.25)
+\end{pspicture}
+\end{minipage}%
+\begin{minipage}{0.6\fullWidth}
+\begin{lstlisting}
+\begin{pspicture}(-0.5,-1.25)(10,1.25)%
+ \psaxes[§\ON§trigLabelBase=3§\OFF§]{->}(0,0)(-0.5,-1.25)(\PiTwo,1.25)
+\end{pspicture}
+\end{lstlisting}
+\end{minipage}
-\medskip
-\begin{LTXexample}[preset=\centering,pos=t]
+
+
+Modifing the ticks to have the last one exactly at the end is possible
+with a different dx value ($\frac{\pi}{3}\approx 1.047$):
+
+
+\begin{minipage}{0.4\fullWidth}
+\begin{pspicture}(-0.5,-1.25)(6.5,1.25)\pnode(\PiTwo,0){C}%
+ \psaxes[dx=\RadUnit]{->}(0,0)(-0.5,-1.25)(\PiTwo,1.25)
+\end{pspicture}%
+\end{minipage}%
+\begin{minipage}{0.6\fullWidth}
+\begin{lstlisting}
+\begin{pspicture}(-0.5,-1.25)(6.5,1.25)\pnode(\PiTwo,0){C}%
+ \psaxes[§\ON§dx=\RadUnit§\OFF§]{->}(0,0)(-0.5,-1.25)(\PiTwo,1.25)
+\end{pspicture}%
+\end{lstlisting}
+\end{minipage}
+
+
+\begin{minipage}{0.4\fullWidth}
+\begin{pspicture}(-0.5,-1.25)(6.5,1.25)\pnode(5,0){B}%
+ \psaxes[dx=\RadUnit,trigLabelBase=3]{->}(0,0)(-0.5,-1.25)(\PiTwo,1.25)
+\end{pspicture}%
+\end{minipage}%
+\begin{minipage}{0.6\fullWidth}
+\begin{lstlisting}
+\begin{pspicture}(-0.5,-1.25)(6.5,1.25)\pnode(5,0){B}%
+ \psaxes[dx=\RadUnit,§\ON§trigLabelBase=3§\OFF§] {->}(0,0)(-0.5,-1.25)(\PiTwo,1.25)
+\end{pspicture}%
+\end{lstlisting}
+\end{minipage}
+
+\ncline[linestyle=dashed,linewidth=0.4pt]{A}{B}
+
+Set globaly everything in radiant unit. Now 6 units on the $x$-axis
+are $6\pi$. Using \verb+trigLabelBase=3+ reduces this value to $2\pi$, a.s.o.
+
+\bigskip
+\begin{minipage}{0.4\fullWidth}
+\psset{xunit=\RadUnit}%
+\begin{pspicture}(-0.5,-1.25)(6.5,1.25)\pnode(6,0){D}%
+ \psaxes{->}(0,0)(-0.5,-1.25)(6.5,1.25)%
+\end{pspicture}%
+\end{minipage}%
+\begin{minipage}{0.6\fullWidth}
+\begin{lstlisting}
+\psset{§\ON§xunit=\RadUnit§\OFF§}%
+\begin{pspicture}(-0.5,-1.25)(6.5,1.25)\pnode(6,0){D}%
+ \psaxes{->}(0,0)(-0.5,-1.25)(6.5,1.25)%
+\end{pspicture}%
+\end{lstlisting}
+\end{minipage}
+\ncline[linestyle=dashed,linewidth=0.4pt]{C}{D}
+
+
+\begin{minipage}{0.4\fullWidth}
+\psset{xunit=\RadUnit}%
+\begin{pspicture}(-0.5,-1.25)(6.5,1.25)
+ \psaxes[trigLabelBase=3]{->}(0,0)(-0.5,-1.25)(6.5,1.25)
+\end{pspicture}%
+\end{minipage}%
+\begin{minipage}{0.6\fullWidth}
+\begin{lstlisting}
+\psset{§\ON§xunit=\RadUnit§\OFF§}%
+\begin{pspicture}(-0.5,-1.25)(6.5,1.25)
+ \psaxes[§\ON§trigLabelBase=3§\OFF§]{->}(0,0)(-0.5,-1.25)(6.5,1.25)
+\end{pspicture}%
+\end{lstlisting}
+\end{minipage}
+
+
+
+\begin{minipage}{0.4\fullWidth}
+\psset{xunit=\RadUnit}%
+\begin{pspicture}(-0.5,-1.25)(6.5,1.25)
+ \psaxes[trigLabelBase=4]{->}(0,0)(-0.5,-1.25)(6.5,1.25)
+\end{pspicture}%
+\end{minipage}%
+\begin{minipage}{0.6\fullWidth}
+\begin{lstlisting}
+\psset{§\ON§xunit=\RadUnit§\OFF§}%
+\begin{pspicture}(-0.5,-1.25)(6.5,1.25)
+ \psaxes[§\ON§trigLabelBase=4§\OFF§]{->}(0,0)(-0.5,-1.25)(6.5,1.25)
+\end{pspicture}%
+\end{lstlisting}
+\end{minipage}
+
+\begin{minipage}{0.4\fullWidth}
+\psset{xunit=\RadUnit}%
+\begin{pspicture}(-0.5,-1.25)(6.5,1.25)
+ \psaxes[trigLabelBase=6]{->}(0,0)(-0.5,-1.25)(6.5,1.25)
+\end{pspicture}%
+\end{minipage}%
+\begin{minipage}{0.6\fullWidth}
+\begin{lstlisting}
+\psset{§\ON§xunit=\RadUnit§\OFF§}%
+\begin{pspicture}(-0.5,-1.25)(6.5,1.25)
+ \psaxes[§\ON§trigLabelBase=6§\OFF§]{->}(0,0)(-0.5,-1.25)(6.5,1.25)
+\end{pspicture}%
+\end{lstlisting}
+\end{minipage}
+
+
+
+The best way seems to be setting the $x$-unit to \verb+\RadUnit+. Plotting a
+function doesn't consider the value for \verb+trigLabelBase+, it has to be done by
+the user. The first example sets the unit locally for the \verb+\psplot+
+back to 1cm, which is needed, because we use this unit on PostScript side.
+
+\begin{minipage}{0.4\fullWidth}
+\psset{xunit=\RadUnit}%
+\begin{pspicture}(-0.5,-1.25)(6.5,1.25)
+ \psaxes[trigLabelBase=3]{->}(0,0)(-0.5,-1.25)(6.5,1.25)
+ \psplot[xunit=1cm,linecolor=red,linewidth=1.5pt]{0}{\PiTwo}{x RadtoDeg sin}
+\end{pspicture}
+\end{minipage}%
+\begin{minipage}{0.6\fullWidth}
+\begin{lstlisting}
+\psset{xunit=\RadUnit}%
+\begin{pspicture}(-0.5,-1.25)(6.5,1.25)
+ \psaxes[trigLabelBase=3]{->}(0,0)(-0.5,-1.25)(6.5,1.25)
+ \psplot[§\ON§xunit=1cm§\OFF§,linecolor=red,linewidth=1.5pt]{0}{§\ON§\PiTwo§\OFF§}{x RadtoDeg sin}
+\end{pspicture}
+\end{lstlisting}
+\end{minipage}
+
+
+\begin{minipage}{0.4\fullWidth}
+\psset{xunit=\RadUnit}%
+\begin{pspicture}(-0.5,-1.25)(6.5,1.25)
+ \psaxes[trigLabelBase=3]{->}(0,0)(-0.5,-1.25)(6.5,1.25)
+ \psplot[linecolor=red,linewidth=1.5pt]{0}{6}{x Pi 3 div mul RadtoDeg sin}
+\end{pspicture}
+\end{minipage}%
+\begin{minipage}{0.6\fullWidth}
+\begin{lstlisting}
+\psset{xunit=\RadUnit}%
+\begin{pspicture}(-0.5,-1.25)(6.5,1.25)
+ \psaxes[trigLabelBase=3]{->}(0,0)(-0.5,-1.25)(6.5,1.25)
+ \psplot[linecolor=red,linewidth=1.5pt]{0}{6}{x §\ON§Pi 3 div mul §\OFF§RadtoDeg sin}
+\end{pspicture}
+\end{lstlisting}
+\end{minipage}
+
+
+\begin{minipage}{0.4\fullWidth}
+\psset{xunit=\RadUnit}%
+\begin{pspicture}(-0.5,-1.25)(6.5,1.25)
+ \psaxes[dx=1.5]{->}(0,0)(-0.5,-1.25)(6.5,1.25)
+ \psplot[xunit=.5cm,linecolor=red,linewidth=1.5pt]{0}{\PiFour}{x RadtoDeg sin}
+\end{pspicture}
+\end{minipage}%
+\begin{minipage}{0.6\fullWidth}
+\begin{lstlisting}
+\psset{xunit=\RadUnit}%
+\begin{pspicture}(-0.5,-1.25)(6.5,1.25)
+ \psaxes[§\ON§dx=1.5§\OFF§]{->}(0,0)(-0.5,-1.25)(6.5,1.25)
+ \psplot[§\ON§xunit=0.5cm§\OFF§,linecolor=red,linewidth=1.5pt]{0}{§\ON§\PiFour§\OFF§}{x RadtoDeg sin}
+\end{pspicture}
+\end{lstlisting}
+\end{minipage}
+
+
+\begin{minipage}{0.4\fullWidth}
+\psset{xunit=\RadUnit}%
+\begin{pspicture}(-0.5,-1.25)(6.5,1.25)
+ \psaxes[dx=0.75,trigLabelBase=2]{->}(0,0)(-0.5,-1.25)(6.5,1.25)
+ \psplot[xunit=.5cm,linecolor=red,linewidth=1.5pt]{0}{\PiFour}{x RadtoDeg sin}
+\end{pspicture}
+\end{minipage}%
+\begin{minipage}{0.6\fullWidth}
+\begin{lstlisting}
+\psset{xunit=\RadUnit}%
+\begin{pspicture}(-0.5,-1.25)(6.5,1.25)
+ \psaxes[§\ON§dx=0.75§\OFF§,§\ON§trigLabelBase=2§\OFF§]{->}(0,0)(-0.5,-1.25)(6.5,1.25)
+ \psplot[§\ON§xunit=0.5cm§\OFF§,linecolor=red,linewidth=1.5pt]{0}{\PiFour}{x RadtoDeg sin}
+\end{pspicture}
+\end{lstlisting}
+\end{minipage}
+
+
+It is also possible to set the $x$ unit and $dx$ value to get the labels
+right. But this needs some more understanding how it really works.
+A \verb+xunit=1.570796327+ sets the unit to $\pi/2$ and a \verb+dx=0.666667+
+then puts every $2/3$ of the unit a tick mark and a label. The length of
+the $x$-axis is 6.4 units which is $6.4\cdot 1.570796327cm\approx 10cm$.
+The function then is plotted from $0$ to $3\pi=9.424777961$.
+
+
+
+
+\begin{center}
+\psset{unit=1cm}
\begin{pspicture}(-0.5,-1.25)(10,1.25)
- \psplot[linecolor=red,linewidth=1.5pt]%
- {0}{9.424777961}{x 180 mul 3.141592654 div sin}
- \psaxes[xunit=0.7853981635,showorigin=false,trigLabels]{->}(0,0)(-1,-1.25)(12.8,1.25)
+ \psaxes[xunit=1.570796327,showorigin=false,trigLabelBase=3,dx=0.666667]{->}(0,0)(-0.5,-1.25)(6.4,1.25)
+ \psplot[linecolor=red,linewidth=1.5pt]{0}{9.424777961}{%
+ x RadtoDeg dup sin exch 1.1 mul cos add}
\end{pspicture}
-\end{LTXexample}
+\end{center}
+\begin{lstlisting}
+\begin{pspicture}(-0.5,-1.25)(10,1.25)
+ \psaxes[§\ON§xunit=1.570796327§\OFF§,§\ON§trigLabelBase=3§\OFF§,§\ON§dx=0.666667§\OFF§]{->}(0,0)(-0.5,-1.25)(6.4,1.25)
+ \psplot[linecolor=red,linewidth=1.5pt]{0}{§\ON§9.424777961§\OFF§}{%
+ x RadtoDeg dup sin exch 1.1 mul cos add}
+\end{pspicture}
+\end{lstlisting}
-\medskip
-\begin{LTXexample}[preset=\centering,pos=t]
+\begin{center}
+\psset{unit=1cm}
\begin{pspicture}(-0.5,-1.25)(10,1.25)
- \psplot[linecolor=red,linewidth=1.5pt]%
- {0}{9.424777961}{x 180 mul 3.141592654 div sin}
- \psaxes[xunit=0.7853981635,showorigin=false,trigLabels,Dx=2]{->}(0,0)(-1,-1.25)(12.8,1.25)
+ \psaxes[xunit=\Pi,dx=0.25]{->}(0,0)(-0.25,-1.25)(3.2,1.25)
+ \psplot[xunit=0.25,plotpoints=500,linecolor=red,linewidth=1.5pt]{0}{37.70}{%
+ x RadtoDeg dup sin exch 1.1 mul cos add}
\end{pspicture}
-\end{LTXexample}
+\end{center}
+\begin{lstlisting}
+\psset{§\ON§unit=1cm§\OFF§}
+ \psplot[§\ON§xunit=0.25§\OFF§,§\ON§plotpoints=500§\OFF§,linecolor=red,linewidth=1.5pt]{0}{37.70}{%
+ x RadtoDeg dup sin exch 1.1 mul cos add}
+\end{pspicture}
+\end{lstlisting}
+
+
+\begin{center}
+\psset{unit=1cm}
+\begin{pspicture}(-0.5,-2)(10,2)
+ \psplot[xunit=0.0625,linecolor=red,linewidth=1.5pt,plotpoints=5000]{0}{150.80}{%
+ x RadtoDeg dup sin exch 1.1 mul cos add}
+ \psaxes[xunit=\Pi,dx=0.5,Dx=8,subticks=2]{->}(0,0)(-0.1,-2)(3.2,2)
+\end{pspicture}
+\end{center}
+\begin{lstlisting}
+\psset{§\ON§unit=1cm§\OFF§}
+\begin{pspicture}(-0.5,-1.25)(10,1.25)
+ \psplot[§\ON§xunit=0.0625§\OFF§,linecolor=red,linewidth=1.5pt,%
+ §\ON§plotpoints=5000§\OFF§]{0}{150.80}%
+ {x RadtoDeg dup sin exch 1.1 mul cos add}
+ \psaxes[§\ON§xunit=\Pi§\OFF§,§\ON§dx=0.5§\OFF§,§\ON§Dx=8§\OFF§]{->}(0,0)(-0.25,-1.25)(3.2,1.25)
+\end{pspicture}
+\end{lstlisting}
+
+
+\psset{trigLabels=false}
+
+
%------------------------------------------------------------------------------------
\subsection{New options for \CMD{readdata}}
@@ -3268,6 +3591,7 @@ some nonsense in this line ���time forcex forcey
\endpspicture
\end{LTXexample}
+
%--------------------------------------------------------------------------------------
\subsection{New options for \texttt{\textbackslash listplot}}
%--------------------------------------------------------------------------------------
@@ -3310,6 +3634,7 @@ is read and plotted.
When both, \verb|x/yStart/End| are defined then the values are also compared with
both values.
+
%--------------------------------------------------------------------------------------
\subsubsection{Example for \texttt{nStep/xStep}}
%--------------------------------------------------------------------------------------
@@ -3329,6 +3654,7 @@ of all records with the plotstyle option \verb|curve|.
+
%--------------------------------------------------------------------------------------
\subsubsection{Example for \texttt{nStart/xStart}}
%--------------------------------------------------------------------------------------
@@ -3342,6 +3668,7 @@ of all records with the plotstyle option \verb|curve|.
\end{pspicture}
\end{LTXexample}
+
%--------------------------------------------------------------------------------------
\subsubsection{Example for \texttt{nEnd/xEnd}}
%--------------------------------------------------------------------------------------
@@ -3356,6 +3683,7 @@ of all records with the plotstyle option \verb|curve|.
\end{LTXexample}
+
%--------------------------------------------------------------------------------------
\subsubsection{Example for all new options}
%--------------------------------------------------------------------------------------
@@ -3371,6 +3699,7 @@ of all records with the plotstyle option \verb|curve|.
\end{LTXexample}
+
%--------------------------------------------------------------------------------------
\subsubsection{Example for \texttt{xStart}}
%--------------------------------------------------------------------------------------
@@ -3381,15 +3710,14 @@ To show the important part of the curve there is another one plotted with a
greater \verb|yunit| and a start value of \verb|xStart=0.35|. This makes it
possible to have a kind of a zoom to the original graphic.
-\begin{LTXexample}[preset=\centering,pos=t]
-\def\pshlabel#1{\scriptsize\sffamily$#1$}
-\def\psvlabel#1{\sffamily\scriptsize$#1$}
+\begin{center}
\psset{xunit=10cm, yunit=0.01cm}
\readdata{\data}{examples/data3.dat}
\begin{pspicture}(-0.1,-100)(1.5,700.0)
- \psaxes[Dx=0.25,Dy=100,dy=100\psyunit,ticksize=-4pt 0]{->}(0,0)(0,-100)(1.4,520)
+ \psaxes[Dx=0.25,Dy=100,dy=100\psyunit,ticksize=-4pt 0,%
+ labelFontSize={\footnotesize}]{->}(0,0)(0,-100)(1.4,520)
\uput[0](1.4,0){\textsf{t [s]}}
- \rput(-0.125,200){\psrotateleft{\small\sffamily flow [ml/s]}}
+ \rput(-0.125,200){\psrotateleft{\small flow [ml/s]}}
\listplot[linewidth=2pt, linecolor=blue]{\data}
\rput(0.4,300){
\pscustom[yunit=0.04cm, linewidth=1pt]{%
@@ -3401,11 +3729,38 @@ possible to have a kind of a zoom to the original graphic.
}
\psline[linewidth=.01]{->}(0.75,300)(0.4,20)
\psline[linewidth=.01]{->}(1,290)(1.1,440)
- \rput(1.1,470){\footnotesize\sffamily leak volume}
+ \rput(1.1,470){\footnotesize leak volume}
\psline[linewidth=.01]{->}(0.78,200)(1,100)
- \rput[l](1.02,100){\footnotesize\sffamily closing volume}
+ \rput[l](1.02,100){\footnotesize closing volume}
\end{pspicture}
-\end{LTXexample}
+\end{center}
+
+
+\begin{lstlisting}
+\psset{xunit=10cm, yunit=0.01cm}
+\readdata{\data}{examples/data3.dat}
+\begin{pspicture}(-0.1,-100)(1.5,700.0)
+ \psaxes[Dx=0.25,Dy=100,dy=100\psyunit,ticksize=-4pt 0,%
+ labelFontSize={\footnotesize}]{->}(0,0)(0,-100)(1.4,520)
+ \uput[0](1.4,0){\textsf{t [s]}}
+ \rput(-0.125,200){\psrotateleft{\small flow [ml/s]}}
+ \listplot[linewidth=2pt, linecolor=blue]{\data}
+ \rput(0.4,300){
+ \pscustom[yunit=0.04cm, linewidth=1pt]{%
+ \listplot[xStart=0.355]{\data}
+ \psline(1,-2.57)(1,0)(0.355,0)
+ \fill[fillstyle=hlines,fillcolor=gray,hatchwidth=0.4pt,hatchsep=1.5pt,hatchcolor=red]%
+ \psline[linewidth=0.5pt]{->}(0.7,0)(1.05,0)
+ }%
+ }
+ \psline[linewidth=.01]{->}(0.75,300)(0.4,20)
+ \psline[linewidth=.01]{->}(1,290)(1.1,440)
+ \rput(1.1,470){\footnotesize leak volume}
+ \psline[linewidth=.01]{->}(0.78,200)(1,100)
+ \rput[l](1.02,100){\footnotesize closing volume}
+\end{pspicture}
+\end{lstlisting}
+
\resetOptions
@@ -3477,6 +3832,7 @@ without any modification to the data file:
\end{LTXexample}
+
%--------------------------------------------------------------------------------------
\subsubsection{Example for \texttt{changeOrder}}
%--------------------------------------------------------------------------------------
@@ -3504,6 +3860,7 @@ the values are used in a reverse order:
+
%--------------------------------------------------------------------------------------
\section{Polar plots}
%--------------------------------------------------------------------------------------
@@ -3525,11 +3882,10 @@ x sin dup mul x cos dup mul add sqrt
\medskip
\begin{LTXexample}[width=6cm]
\resetOptions
-\def\pshlabel#1{\footnotesize$#1$}
-\def\psvlabel#1{\footnotesize$#1$}
\psset{plotpoints=200,unit=0.75}
\begin{pspicture}*(-5,-5)(3,3)
\psaxes[labelsep=.75mm,arrowlength=1.75,ticksize=2pt,%
+ labelFontSize=\footnotesize,%
linewidth=0.17mm]{->}(0,0)(-4.99,-4.99)(3,3)
\rput[Br](3,-.35){$x$}
\rput[tr](-.15,3){$y$}
@@ -3580,14 +3936,8 @@ x sin dup mul x cos dup mul add sqrt
\resetOptions
-
-
-
-%--------------------------------------------------------------------------------------
-\section{New commands and environments}
-%--------------------------------------------------------------------------------------
%--------------------------------------------------------------------------------------
-\subsection{\CMD{pstScalePoints}}
+\section{\CMD{pstScalePoints}}
%--------------------------------------------------------------------------------------
The syntax is
\begin{verbatim}
@@ -3626,8 +3976,13 @@ macros. This is the reason why it is a good idea to reset the values at the end
\pstScalePoints(1,1){}{}
\end{verbatim}
+
+%--------------------------------------------------------------------------------------
+\part{New commands and environments}
+%--------------------------------------------------------------------------------------
+
%--------------------------------------------------------------------------------------
-\subsection{\texttt{psgraph} environment}
+\section{\texttt{psgraph} environment}
%--------------------------------------------------------------------------------------
This new environment does the scaling, it expects as parameter the values (without units!) for the
coordinate system and the values of the physical width and height (with units!). The syntax is:
@@ -3647,20 +4002,20 @@ coordinate system and the values of the physical width and height (with units!).
where the options are valid \textbf{only} for the the \verb+\psaxes+ macro. The first
two arguments have the usual \verb+PSTricks+ behaviour.
\begin{itemize}
- \item if \verb+(xOrig,yOrig)+ is missing, it is substituted to $(0,0)$;
- \item if \verb+(xOrig,yOrig)+ \textbf{and} (xMin,yMin) are missing, they are both
- substituted to $(0,0)$.
+ \item if \verb+(xOrig,yOrig)+ is missing, it is substituted to \verb+(xMin,xMax)+;
+ \item if \verb+(xOrig,yOrig)+ \textbf{and} \verb+(xMin,yMin)+ are missing, they are both
+ substituted to \verb+(0,0)+.
\end{itemize}
-\begin{LTXexample}[pos=t,preset=\centering]
+\begin{LTXexample}[pos=t]
\readdata{\data}{demo1.dat}
\pstScalePoints(1,0.000001){}{}% (x,y){additional x operator}{y op}
\psset{llx=-1cm,lly=-1cm}
\psgraph[axesstyle=frame,xticksize=0 759,yticksize=0 25,%
subticks=0,ylabelFactor={\cdot 10^6},%
Dx=5,dy=100\psyunit,Dy=100](0,0)(25,750){10cm}{6cm} % parameters
- \listplot[linecolor=red, linewidth=2pt, showpoints=true]{\data}
+ \listplot[linecolor=red,linewidth=2pt,showpoints=true]{\data}
\endpsgraph
\end{LTXexample}
@@ -3676,7 +4031,6 @@ two arguments have the usual \verb+PSTricks+ behaviour.
\end{psgraph}
\end{LTXexample}
-
\begin{LTXexample}[width=6.5cm]
\readdata{\data}{demo1.dat}
\psset{llx=-0.5cm,lly=-1cm}
@@ -3690,6 +4044,7 @@ two arguments have the usual \verb+PSTricks+ behaviour.
\begin{LTXexample}[pos=t,preset=\centering]
+\readdata{\data}{demo1.dat}
\pstScalePoints(1,0.2){}{log}
\psset{lly=-0.75cm}
\psgraph[ylogBase=10,Dx=5,Dy=1,subticks=5](0,0)(25,2){12cm}{4cm}
@@ -3731,7 +4086,10 @@ two arguments have the usual \verb+PSTricks+ behaviour.
\endpsgraph
\end{LTXexample}
+
\begin{LTXexample}[pos=t,preset=\centering]
+\readdata{\data}{demo2.dat}%
+\readdata{\dataII}{demo3.dat}%
\psset{llx=-0.5cm,lly=-0.75cm}
\pstScalePoints(1,1){1989 sub}{2 sub}
\begin{psgraph}[axesstyle=frame,Dx=2,Ox=1989,Oy=2,subticks=2](0,0)(12,4){6in}{3in}%
@@ -3744,18 +4102,27 @@ two arguments have the usual \verb+PSTricks+ behaviour.
%\newpage
An example with ticks on every side of the frame:
-\begin{LTXexample}[pos=t,preset=\centering]
+\begin{center}
\def\data{0 0 1 1 2 4 3 9}
\psset{lly=-0.5cm}
\begin{psgraph}[axesstyle=frame,ticksize=0 4pt](0,0)(3.0,9.0){12cm}{5cm}
\psaxes[axesstyle=frame,labels=none,ticksize=-4pt 0](3,9)(0,0)(3,9)
\listplot[linecolor=red,linewidth=2pt]{\data}
\end{psgraph}
-\end{LTXexample}
+\end{center}
+
+\begin{lstlisting}
+\def\data{0 0 1 1 2 4 3 9}
+\psset{lly=-0.5cm}
+\begin{psgraph}[axesstyle=frame,ticksize=0 4pt](0,0)(3.0,9.0){12cm}{5cm}
+ \psaxes[axesstyle=frame,labels=none,ticksize=-4pt 0](3,9)(0,0)(3,9)
+ \listplot[linecolor=red,linewidth=2pt]{\data}
+\end{psgraph}
+\end{lstlisting}
%-------------------------------------------------------------------------------------------
-\subsubsection{The new options}
+\subsection{The new options}
%-------------------------------------------------------------------------------------------
\begin{center}
@@ -3779,24 +4146,45 @@ as parameters of \verb+psgraph+ itself.
\medskip
\resetOptions
-\begin{LTXexample}[pos=t]
+\begin{center}
+\readdata{\data}{demo2.dat}%
+\readdata{\dataII}{demo3.dat}%
\psset{llx=-1cm,lly=-1.25cm,urx=0.5cm,ury=0.1in,xAxisLabel=Year,%
yAxisLabel=Whatever,xAxisLabelPos={.4\linewidth,-0.4in},%
yAxisLabelPos={-0.4in,2in}}
\pstScalePoints(1,1){1989 sub}{}
\psframebox[linestyle=dashed,boxsep=0pt]{%
-\begin{psgraph}[axesstyle=frame,Ox=1989,subticks=2](0,0)(12,6){0.8\linewidth}{4in}%
+\begin{psgraph}[axesstyle=frame,Ox=1989,subticks=2](0,0)(12,6){0.8\linewidth}{2.5in}%
\listplot[linecolor=red,linewidth=2pt]{\data}%
\listplot[linecolor=blue,linewidth=2pt]{\dataII}%
\listplot[linecolor=cyan,linewidth=2pt,yunit=0.5]{\dataII}%
\end{psgraph}%
}
-\end{LTXexample}
+\end{center}
+
+
+\begin{lstlisting}
+\readdata{\data}{demo2.dat}%
+\readdata{\dataII}{demo3.dat}%
+\psset{llx=-1cm,lly=-1.25cm,urx=0.5cm,ury=0.1in,xAxisLabel=Year,%
+ yAxisLabel=Whatever,xAxisLabelPos={.4\linewidth,-0.4in},%
+ yAxisLabelPos={-0.4in,2in}}
+\pstScalePoints(1,1){1989 sub}{}
+\psframebox[linestyle=dashed,boxsep=0pt]{%
+\begin{psgraph}[axesstyle=frame,Ox=1989,subticks=2](0,0)(12,6){0.8\linewidth}{2.5in}%
+ \listplot[linecolor=red,linewidth=2pt]{\data}%
+ \listplot[linecolor=blue,linewidth=2pt]{\dataII}%
+ \listplot[linecolor=cyan,linewidth=2pt,yunit=0.5]{\dataII}%
+\end{psgraph}%
+}
+\end{lstlisting}
+
+
\pstScalePoints(1,1){}{}% reset
%--------------------------------------------------------------------------------------
-\subsubsection{Problems}
+\subsection{Problems}
%--------------------------------------------------------------------------------------
Floating point operations in \TeX\ are a real mess, which causes a lot of problems
when there are very small oder very big units. With the options of \verb+\pst-plot+
@@ -3833,7 +4221,96 @@ the linewidth od the document.
\resetOptions
%--------------------------------------------------------------------------------------
-\subsection[\CMD{psplotTangent}]{\CMD{psplotTangent}\footnote{This part is adapted from the package \texttt{pst-eqdf}, written by Dominique Rodriguez.}}
+\section{\CMD{psStep}}
+%--------------------------------------------------------------------------------------
+\verb+\psStep+ caclulates a step function for the upper or lower sum or the max/min
+of the Riemann integral definition of a given function. The available option is
+
+\verb+StepType=lower|upper|Riemann+
+
+with \verb+lower+ as the default setting. The syntax of the function is
+
+\verb+\psStep[options](x1,x2){n}{function}+
+
+
+(x1,x2) is the given Intervall for the step wise caculated function,
+n is the number of the rectangles and \verb+function+ is the mathematical function
+in postfix or algebraic notation (with \verb+algebraic=true+).
+
+\begin{center}
+\bgroup
+\begin{pspicture}(-0.5,-0.5)(10,3) \psaxes{->}(10,3)
+ \psplot[plotpoints=100,linewidth=1.5pt,algebraic,%
+ labelFontSize=\footnotesize]{0}{10}{sqrt(x)}
+ \psStep[linecolor=magenta,StepType=upper,fillstyle=hlines](0,9){9}{x sqrt}
+ \psStep[linecolor=blue,fillstyle=vlines](0,9){9}{x sqrt }
+\end{pspicture}
+
+\psset{plotpoints=200}
+\begin{pspicture}(-0.5,-2.25)(10,3) \psaxes{->}(0,0)(0,-2.25)(10,3)
+ \psplot[linewidth=1.5pt,algebraic,labelFontSize=\footnotesize]{0}{10}{sqrt(x)*sin(x)}
+ \psStep[algebraic,linecolor=magenta,StepType=upper](0,9){20}{sqrt(x)*sin(x)}
+ \psStep[linecolor=blue,linestyle=dashed](0,9){20}{x sqrt x RadtoDeg sin mul}
+\end{pspicture}
+
+\psset{yunit=1.25cm}
+\begin{pspicture}(-0.5,-1.5)(10,1.5) \psaxes{->}(0,0)(0,-1.5)(10,1.5)
+ \psStep[algebraic,StepType=Riemann,fillstyle=solid,fillcolor=black!10](0,10){50}%
+ {sqrt(x)*cos(x)*sin(x)}
+ \psplot[linewidth=1.5pt,algebraic,labelFontSize=\footnotesize]%
+ {0}{10}{sqrt(x)*cos(x)*sin(x)}
+\end{pspicture}
+
+\psset{unit=1.5cm}
+\begin{pspicture}[plotpoints=200](-0.5,-3)(10,2.5)
+ \psStep[algebraic,fillstyle=solid,fillcolor=yellow](0.001,9.5){40}{2*sqrt(x)*cos(ln(x))*sin(x)}
+ \psStep[algebraic,StepType=Riemann,fillstyle=solid,fillcolor=blue](0.001,9.5){40}{2*sqrt(x)*cos(ln(x))*sin(x)}
+ \psaxes{->}(0,0)(0,-2.75)(10,2.5)
+ \psplot[algebraic,linecolor=white,labelFontSize=\footnotesize]%
+ {0.001}{9.75}{2*sqrt(x)*cos(ln(x))*sin(x)}
+ \uput[90](6,1.2){$f(x)=2\cdot\sqrt{x}\cdot\cos{(\ln{x})}\cdot\sin{x}$}
+\end{pspicture}
+\egroup
+\end{center}
+
+
+\begin{lstlisting}
+\begin{pspicture}(-0.5,-0.5)(10,3) \psaxes{->}(10,3)
+ \psplot[plotpoints=100,linewidth=1.5pt,algebraic,%
+ labelFontSize=\footnotesize]{0}{10}{sqrt(x)}
+ \psStep[linecolor=magenta,StepType=upper,fillstyle=hlines](0,9){9}{x sqrt}
+ \psStep[linecolor=blue,fillstyle=vlines](0,9){9}{x sqrt }
+\end{pspicture}
+
+\psset{plotpoints=200}
+\begin{pspicture}(-0.5,-2.25)(10,3) \psaxes{->}(0,0)(0,-2.25)(10,3)
+ \psplot[linewidth=1.5pt,algebraic,labelFontSize=\footnotesize]{0}{10}{sqrt(x)*sin(x)}
+ \psStep[algebraic,linecolor=magenta,StepType=upper](0,9){20}{sqrt(x)*sin(x)}
+ \psStep[linecolor=blue,linestyle=dashed](0,9){20}{x sqrt x RadtoDeg sin mul}
+\end{pspicture}
+
+\psset{yunit=1.25cm}
+\begin{pspicture}(-0.5,-1.5)(10,1.5) \psaxes{->}(0,0)(0,-1.5)(10,1.5)
+ \psStep[algebraic,StepType=Riemann,fillstyle=solid,fillcolor=black!10](0,10){50}%
+ {sqrt(x)*cos(x)*sin(x)}
+ \psplot[linewidth=1.5pt,algebraic,labelFontSize=\footnotesize]%
+ {0}{10}{sqrt(x)*cos(x)*sin(x)}
+\end{pspicture}
+
+\psset{unit=1.5cm}
+\begin{pspicture}[plotpoints=200](-0.5,-3)(10,2.5)
+ \psStep[algebraic,fillstyle=solid,fillcolor=yellow](0.001,9.5){40}{2*sqrt(x)*cos(ln(x))*sin(x)}
+ \psStep[algebraic,StepType=Riemann,fillstyle=solid,fillcolor=blue](0.001,9.5){40}{2*sqrt(x)*cos(ln(x))*sin(x)}
+ \psaxes{->}(0,0)(0,-2.75)(10,2.5)
+ \psplot[algebraic,linecolor=white,labelFontSize=\footnotesize]%
+ {0.001}{9.75}{2*sqrt(x)*cos(ln(x))*sin(x)}
+ \uput[90](6,1.2){$f(x)=2\cdot\sqrt{x}\cdot\cos{(\ln{x})}\cdot\sin{x}$}
+\end{pspicture}
+\end{lstlisting}
+
+
+%--------------------------------------------------------------------------------------
+\section[\CMD{psplotTangent}]{\CMD{psplotTangent}}
%--------------------------------------------------------------------------------------
There is an additional option, named \verb+Derive+ vor an alternative function (see
following example) to calculate the slope of the tangent. This will be in general the
@@ -3928,7 +4405,7 @@ tangent.
%--------------------------------------------------------------------------------------
-\subsubsection{A \texttt{polarplot} example}
+\subsection{A \texttt{polarplot} example}
%--------------------------------------------------------------------------------------
Let's work with the classical cardioid : $\rho=2(1+\cos(\theta))$
@@ -3971,7 +4448,7 @@ where $x=r\cdot\cos\theta$ and $y=r\cdot\sin\theta$
%--------------------------------------------------------------------------------------
-\subsubsection{A \CMD{parametricplot} example}
+\subsection{A \CMD{parametricplot} example}
%--------------------------------------------------------------------------------------
Let's work with a Lissajou curve :
@@ -4005,22 +4482,702 @@ divide the two equations by a | (see example).
+\resetOptions
+
+\section{Successive derivatives of a function}
+
+The new PostScript function \verb$Derive$ has been added for plotting
+the succesive derivatives of a
+function. It must be used wiht the \verb|algebaic| option. This function has two
+arguments:
+
+\begin{enumerate}
+\item a positive integer with define the order of the derivative, obviously $0$ means the
+ function itself!
+\item a function of variable $x$ which can be any function using the common operators,
+\end{enumerate}
+
+Do not think that the derivative is approximated, the internal PostScript engine will
+compute the real derivative using a formal derivative engine.
+
+The following diagram contains the plot of the polynomial:
+
+\[ f(x)=\sum_{i=0}^{14}\frac{(-1)^{i}x^{2i}}{i!}=1-\frac{x^2}{2}+\frac{x^4}{4!}-\frac{x^6}{6!}+\frac{x^8}{8!}-
+ \frac{x^{10}}{10!}+\frac{x^{12}}{12!}-\frac{x^{14}}{14!}\]
+
+and of its 15 first derivatives. It is the sequence definition of the cosine.
+
+
+\begin{LTXexample}[pos=t,wide,preset=\centering]
+\psset{unit=2}
+\def\getColor#1{\ifcase#1 Tan\or RedOrange\or magenta\or yellow\or green\or Orange\or blue\or
+ DarkOrchid\or BrickRed\or Rhodamine\or OliveGreen\or Goldenrod\or Mahogany\or
+ OrangeRed\or CarnationPink\or RoyalPurple\or Lavender\fi}
+\begin{pspicture}[showgrid=true](0,-1.2)(7,1.5)
+ \psclip{\psframe[linestyle=none](0,-1.1)(7,1.1)}
+ \multido{\in=0+1}{16}{%
+ \psplot[algebraic=true,linecolor=\getColor{\in},linewidth=1pt]{0}{7}
+ {Derive(\in,1-x^2/2+x^4/24-x^6/720+x^8/40320-x^10/3628800+x^12/479001600-x^14/87178291200)}}
+ \endpsclip
+\end{pspicture}
+\end{LTXexample}
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \subsection{Other examples}
+
+
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}[shift=-2.5,showgrid=true,linewidth=1pt](0,-2)(3,3)
+ \psplot[algebraic=true]{.001}{3}{x*ln(x)} % f(x)
+ \psplot[algebraic=true,linecolor=red]{.05}{3}{Derive(1,x*ln(x))} % f'(x)=1+ln(x)
+\end{pspicture}
+\end{LTXexample}
+
+
+\section{Variable step for plotting a curve}
+\subsection{Theory}
+
+As you know with the \verb$\psplot$ macro, the curve is plotted using a piece wise
+linear curve. The step is given by the parameter \texttt{plotpoints}. For
+each step between $x_i$ and $x_{i+1}$, the area defined between the curve and its
+approximation (a segment) is majored by this formula :
+
+\begin{minipage}[m]{.5\linewidth}
+\[|\varepsilon|\le\frac{M_2(f)(x_{i+1}-x_i)^3}{12}\]
+
+$M_2(f)$ is a majorant of the second derivative of $f$ in the interval $[x_i;x_{i+1}]$.
+\end{minipage}
+{\psset{unit=1cm, showpoints=false}
+\begin{pspicture}[shift=-2,showgrid=true](0,-1)(6,3)
+ \pscurve(0,0)(1,1)(3,2.2)(5,2)(6,1)\psline(1,1)(5,2)
+ \psline(.5,0)(5.5,0)\psline(1,0)(1,1)\psline(5,0)(5,2)
+ \rput[t](1,-.1){$x_n$}\rput[t](5,-.1){$x_{n+1}$}
+ \psclip{\pscustom{\psecurve(0,0)(1,1)(3,2.2)(5,2)(6,1)\psline(5,2)}}
+ \psframe[fillstyle=solid, fillcolor=gray](0,0)(5,5)
+ \endpsclip
+ \rput*(3,1.8){$\varepsilon$}
+\end{pspicture}}
+
+The parameter \verb$VarStep$ (\verb$false$ by default) activates the variable step
+algorithm. It is set to a tolerance defines by the parameter \verb$VarStepEpsilon$
+(\verb+default+ by default, accept real value). If this parameter is not set by the
+user, then it is automatically computed using the default first step given by the
+parameter \verb+plotpoints+. Then, for each step, $f''(x_n)$ and $f''(x_{n+1})$ are
+computed and the smaller is used as $M_2(f)$, and then the step is approximated. This
+means that the step is constant for a second order polynomials.
+
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \subsection{The cosine}
+
+ Different value for the tolerance from $0.01$ to $0.000\,1$, a factor $10$ between
+ each of them. In black, there is the classical \verb+psplot+ behavior, and in
+ magenta the default variable step behavior.
+
+\begin{center}
+\bgroup
+\psset{algebraic=true, VarStep=true, unit=2, showpoints=true, linecolor=red}
+\begin{pspicture}(-0,-1)(3.14,2)\psgrid
+ \psplot[VarStepEpsilon=.01]{0}{3.14}{cos(x)}
+ \psplot[VarStepEpsilon=.001]{0}{3.14}{cos(x)+.15}
+ \psplot[VarStepEpsilon=.0001]{0}{3.14}{cos(x)+.3}
+ \psplot[linecolor=magenta]{0}{3.14}{cos(x)+.45}
+ \psplot[VarStep=false, linewidth=2\pslinewidth, linecolor=black]{-0}{3.14}{cos(x)+.6}
+\end{pspicture}
+\egroup
+\end{center}
+
+\begin{lstlisting}
+\psset{algebraic=true, VarStep=true, unit=2, showpoints=true, linecolor=red}
+\begin{pspicture}[showgrid=true](-0,-1)(3.14,2)
+ \psplot[VarStepEpsilon=.01]{0}{3.14}{cos(x)}
+ \psplot[VarStepEpsilon=.001]{0}{3.14}{cos(x)+.15}
+ \psplot[VarStepEpsilon=.0001]{0}{3.14}{cos(x)+.3}
+ \psplot[linecolor=magenta]{0}{3.14}{cos(x)+.45}
+ \psplot[VarStep=false,linewidth=1pt,linecolor=black]{-0}{3.14}{cos(x)+.6}
+\end{pspicture}
+\end{lstlisting}
+
+
+\subsection{The neperian Logarithm}
+
+A really classical example wich gives a bad beginning, the tolerance is set to $0.001$.
+
+\begin{center}
+\bgroup
+\psset{algebraic=true, VarStep=true, linecolor=red, showpoints=true}
+\begin{pspicture}[showgrid=true](0,-5)(16,4)
+ \psplot[VarStep=false, linecolor=black]{.01}{16}{ln(x)+1}
+ \psplot[linecolor=magenta]{.51}{16}{ln(x-1/2)+1/2}
+ \psplot[VarStepEpsilon=.001]{1.01}{16}{ln(x-1)}
+ \psplot[VarStepEpsilon=.01]{1.51}{16}{ln(x-1.5)-100/200}
+\end{pspicture}
+\egroup
+\end{center}
+
+\begin{lstlisting}
+\psset{algebraic=true, VarStep=true, linecolor=red, showpoints=true}
+\begin{pspicture}[showgrid=true](0,-5)(16,4)
+ \psplot[VarStep=false, linecolor=black]{.01}{16}{ln(x)+1}
+ \psplot[linecolor=magenta]{.51}{16}{ln(x-1/2)+1/2}
+ \psplot[VarStepEpsilon=.001]{1.01}{16}{ln(x-1)}
+ \psplot[VarStepEpsilon=.01]{1.51}{16}{ln(x-1.5)-100/200}
+\end{pspicture}
+\end{lstlisting}
+
+
+\clearpage
+\subsection{Sinus of the inverse of $x$}
+Impossible to draw, but let's try!
+
+\begin{center}
+\bgroup
+\psset{xunit=64,algebraic,VarStep,linecolor=red,showpoints=true,linewidth=1pt}
+\begin{pspicture}[showgrid=true](0,-1)(.5,1)
+ \psplot[VarStepEpsilon=.0001]{.01}{.25}{sin(1/x)}
+\end{pspicture}\\
+\begin{pspicture}[showgrid=true](0,-1)(.5,1)
+ \psplot[VarStepEpsilon=.00001]{.01}{.25}{sin(1/x)}
+\end{pspicture}\\
+\begin{pspicture}[showgrid=true](0,-1)(.5,1)
+ \psplot[VarStepEpsilon=.000001]{.01}{.25}{sin(1/x)}
+\end{pspicture}\\
+\begin{pspicture}[showgrid=true](0,-1)(.5,1)
+ \psplot[VarStep=false, linecolor=black]{.01}{.25}{sin(1/x)}
+\end{pspicture}
+\egroup
+\end{center}
+
+\begin{lstlisting}
+\psset{xunit=64,algebraic,VarStep,linecolor=red,showpoints=true,linewidth=1pt}
+\begin{pspicture}[showgrid=true](0,-1)(.5,1)
+ \psplot[VarStepEpsilon=.0001]{.01}{.25}{sin(1/x)}
+\end{pspicture}\\
+\begin{pspicture}[showgrid=true](0,-1)(.5,1)
+ \psplot[VarStepEpsilon=.00001]{.01}{.25}{sin(1/x)}
+\end{pspicture}\\
+\begin{pspicture}[showgrid=true](0,-1)(.5,1)
+ \psplot[VarStepEpsilon=.000001]{.01}{.25}{sin(1/x)}
+\end{pspicture}\\
+\begin{pspicture}[showgrid=true](0,-1)(.5,1)
+ \psplot[VarStep=false, linecolor=black]{.01}{.25}{sin(1/x)}
+\end{pspicture}
+\end{lstlisting}
+
+
+
+
+
+\subsection{A really complex function}
+
+Just appreciate the difference between the normal behavior and the plotting with the
+\texttt{varStep} option. The function is :
+
+\[f(x)=x-\frac{x^2}{10}+\ln(x)+\cos(2x)+\sin(x^2)-1\]
+
+\begin{center}
+\bgroup
+\psset{xunit=3, algebraic, VarStep, showpoints=true}
+\begin{pspicture}[showgrid=true](0,-2)(5,6)
+ \psplot[VarStepEpsilon=.0005, linecolor=red]{.1}{5}{x-x^2/10+ln(x)+cos(2*x)+sin(x^2)}
+ \psplot[linecolor=magenta]{.1}{5}{x-x^2/10+ln(x)+cos(2*x)+sin(x^2)+.5}
+ \psplot[VarStep=false]{.1}{5}{x-x^2/10+ln(x)+cos(2*x)+sin(x^2)-1}
+\end{pspicture}
+\egroup
+\end{center}
+
+\begin{lstlisting}
+\psset{xunit=3, algebraic, VarStep, showpoints=true}
+\begin{pspicture}[showgrid=true](0,-2)(5,6)
+ \psplot[VarStepEpsilon=.0005, linecolor=red]{.1}{5}{x-x^2/10+ln(x)+cos(2*x)+sin(x^2)}
+ \psplot[linecolor=magenta]{.1}{5}{x-x^2/10+ln(x)+cos(2*x)+sin(x^2)+.5}
+ \psplot[VarStep=false]{.1}{5}{x-x^2/10+ln(x)+cos(2*x)+sin(x^2)-1}
+\end{pspicture}
+\end{lstlisting}
+
+
+\subsection{A hyperbola}
+
+\begin{center}
+\bgroup
+\psset{algebraic=true, showpoints=true, unit=0.75}
+\begin{pspicture}(-5,-4)(9,6)
+ \psplot[linecolor=black]{-5}{1.8}{(x-1)/(x-2)}
+ \psplot[VarStep=true, VarStepEpsilon=.001, linecolor=red]{2.2}{9}{(x-1)/(x-2)}
+ \psaxes{->}(0,0)(-5,-4)(9,6)
+\end{pspicture}
+\egroup
+\end{center}
+
+\begin{lstlisting}
+\psset{algebraic=true, showpoints=true, unit=0.75}
+\begin{pspicture}(-5,-4)(9,6)
+ \psplot[linecolor=black]{-5}{1.8}{(x-1)/(x-2)}
+ \psplot[VarStep=true, VarStepEpsilon=.001, linecolor=red]{2.2}{9}{(x-1)/(x-2)}
+ \psaxes{->}(0,0)(-5,-4)(9,6)
+\end{pspicture}
+\end{lstlisting}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Successive derivatives of a polynom}
+
+\begin{center}
+\bgroup
+\psset{unit=2, algebraic=true, VarStep=true, showpoints=true, VarStepEpsilon=.001}
+\def\getColor#1{\ifcase#1 Tan\or RedOrange\or magenta\or yellow\or green\or Orange\or blue\or
+ DarkOrchid\or BrickRed\or Rhodamine\or OliveGreen\or Goldenrod\or Mahogany\or
+ OrangeRed\or CarnationPink\or RoyalPurple\or Lavender\fi}
+\begin{pspicture}[showgrid=true](0,-1.2)(7,1.5)
+ \psclip{\psframe[linestyle=none](0,-1.1)(7,1.1)}
+ \multido{\in=0+1}{16}{%
+ \psplot[algebraic=true, linecolor=\getColor{\in}]{0.1}{7}
+ {Derive(\in,Sum(i,0,1,7,(-1)^i*x^(2*i)/Fact(2*i)))}}
+ \endpsclip
+\end{pspicture}
+\egroup
+\end{center}
+
+\begin{lstlisting}
+\psset{unit=2, algebraic=true, VarStep=true, showpoints=true, VarStepEpsilon=.001}
+\def\getColor#1{\ifcase#1 Tan\or RedOrange\or magenta\or yellow\or green\or Orange\or blue\or
+ DarkOrchid\or BrickRed\or Rhodamine\or OliveGreen\or Goldenrod\or Mahogany\or
+ OrangeRed\or CarnationPink\or RoyalPurple\or Lavender\fi}
+\begin{pspicture}[showgrid=true](0,-1.2)(7,1.5)
+ \psclip{\psframe[linestyle=none](0,-1.1)(7,1.1)}
+ \multido{\in=0+1}{16}{%
+ \psplot[algebraic=true, linecolor=\getColor{\in}]{0.1}{7}
+ {Derive(\in,Sum(i,0,1,7,(-1)^i*x^(2*i)/Fact(2*i)))}}
+ \endpsclip
+\end{pspicture}
+\end{lstlisting}
+
+
+\subsection{The variable step algorithm together with the \texttt{IfTE} primitive}
+
+\begin{center}
+\bgroup
+\psset{unit=1.5, algebraic, VarStep, showpoints=true, VarStepEpsilon=.001}
+\begin{pspicture}[showgrid=true](-7,-2)(2,4)
+ \psplot{-7}{2}{IfTE(x<-5,-(x+5)^3/2,IfTE(x<0,0,x^2))}
+ \psplot{-7}{2}{5*x/9+26/9}
+ \psplot[linecolor=blue]{-7}{2}{(x+7)^30/9^30*4.5-1/2}
+ \psplot[linecolor=red]{-6.9}{2}
+ {IfTE(x<-6,ln(x+7),IfTE(x<-3,x+6,IfTE(x<0.1415926,sin(x+3)+3,3.1415926-x)))}
+\end{pspicture}
+\egroup
+\end{center}
+
+\begin{lstlisting}
+\psset{unit=1.5, algebraic, VarStep, showpoints=true, VarStepEpsilon=.001}
+\begin{pspicture}[showgrid=true](-7,-2)(2,4)
+ \psplot{-7}{2}{IfTE(x<-5,-(x+5)^3/2,IfTE(x<0,0,x^2))}
+ \psplot{-7}{2}{5*x/9+26/9}
+ \psplot[linecolor=blue]{-7}{2}{(x+7)^30/9^30*4.5-1/2}
+ \psplot[linecolor=red]{-6.9}{2}
+ {IfTE(x<-6,ln(x+7),IfTE(x<-3,x+6,IfTE(x<0.1415926,sin(x+3)+3,3.1415926-x)))}
+\end{pspicture}
+\end{lstlisting}
+
+
+
+\subsection{Using \CMD{parametricplot}}
+
+\begin{center}
+\bgroup
+\psset{unit=2.5}
+\begin{pspicture}[showgrid=true](-1,-1)(1,1)
+\parametricplot[algebraic=true,linecolor=red,VarStep=true, showpoints=true,
+ VarStepEpsilon=.0001]
+ {-3.14}{3.14}{cos(3*t)|sin(2*t)}
+\end{pspicture}
+\begin{pspicture}[showgrid=true](-1,-1)(1,1)
+\parametricplot[algebraic=true,linecolor=blue,VarStep=true, showpoints=false,
+ VarStepEpsilon=.0001]
+ {-3.14}{3.14}{cos(3*t)|sin(2*t)}
+\end{pspicture}
+\egroup
+\end{center}
+
+\begin{lstlisting}
+\psset{unit=3}
+\begin{pspicture}[showgrid=true](-1,-1)(1,1)
+\parametricplot[algebraic=true,linecolor=red,VarStep=true, showpoints=true,
+ VarStepEpsilon=.0001]
+ {-3.14}{3.14}{cos(3*t)|sin(2*t)}
+\end{pspicture}
+\begin{pspicture}[showgrid=true](-1,-1)(1,1)
+\parametricplot[algebraic=true,linecolor=blue,VarStep=true, showpoints=false,
+ VarStepEpsilon=.0001]
+ {-3.14}{3.14}{cos(3*t)|sin(2*t)}
+\end{pspicture}
+\end{lstlisting}
+
+
+\begin{center}
+\bgroup
+\psset{unit=2.5}
+\begin{pspicture}[showgrid=true](-1,-1)(1,1)
+\parametricplot[algebraic=true,linecolor=red,VarStep=true, showpoints=true,
+ VarStepEpsilon=.0001]
+ {0}{47.115}{cos(5*t)|sin(3*t)}
+\end{pspicture}
+\begin{pspicture}[showgrid=true](-1,-1)(1,1)
+\parametricplot[algebraic=true,linecolor=blue,VarStep=true, showpoints=false,
+ VarStepEpsilon=.0001]
+ {0}{47.115}{cos(5*t)|sin(3*t)}
+\end{pspicture}
+\egroup
+\end{center}
+
+\begin{lstlisting}
+\psset{unit=2.5}
+\begin{pspicture}[showgrid=true](-1,-1)(1,1)
+\parametricplot[algebraic=true,linecolor=red,VarStep=true, showpoints=true,
+ VarStepEpsilon=.0001]
+ {0}{47.115}{cos(5*t)|sin(3*t)}
+\end{pspicture}
+\begin{pspicture}[showgrid=true](-1,-1)(1,1)
+\parametricplot[algebraic=true,linecolor=blue,VarStep=true, showpoints=false,
+ VarStepEpsilon=.0001]
+ {0}{47.115}{cos(5*t)|sin(3*t)}
+\end{pspicture}
+\end{lstlisting}
+
+
+\begin{center}
+\bgroup
+\psset{xunit=.5}
+\begin{pspicture}[showgrid=true](0,0)(12.566,2)
+\parametricplot[algebraic,linecolor=red,VarStep, showpoints=true,
+ VarStepEpsilon=.01]{0}{12.566}{t+cos(-t-PI/2)|1+sin(-t-PI/2)}
+\end{pspicture}
+%
+\begin{pspicture}[showgrid=true](0,0)(12.566,2)
+\parametricplot[algebraic,linecolor=blue,VarStep, showpoints=false,
+ VarStepEpsilon=.001]{0}{12.566}{t+cos(-t-PI/2)|1+sin(-t-PI/2)}
+\end{pspicture}
+\egroup
+\end{center}
+
+\begin{lstlisting}
+\psset{xunit=.5}
+\begin{pspicture}[showgrid=true](0,0)(12.566,2)
+\parametricplot[algebraic,linecolor=red,VarStep, showpoints=true,
+ VarStepEpsilon=.01]{0}{12.566}{t+cos(-t-PI/2)|1+sin(-t-PI/2)}
+\end{pspicture}
+%
+\begin{pspicture}[showgrid=true](0,0)(12.566,2)
+\parametricplot[algebraic,linecolor=blue,VarStep, showpoints=false,
+ VarStepEpsilon=.001]{0}{12.566}{t+cos(-t-PI/2)|1+sin(-t-PI/2)}
+\end{pspicture}
+\end{lstlisting}
+
+
+\resetOptions
+
+
+\section{New math functions and their derivative}
+
+\subsection{The inverse sin and its derivative}
+
+\begin{center}
+\bgroup
+\psset{unit=1.5}
+\begin{pspicture}[showgrid=true](-1,-2)(1,2)
+ \psplot[linecolor=blue,algebraic]{-1}{1}{asin(x)}
+\end{pspicture}
+\hspace{1em}
+\psset{algebraic, VarStep, VarStepEpsilon=.001, showpoints=true}
+\begin{pspicture}[showgrid=true](-1,-2)(1,2)
+ \psplot[linecolor=blue]{-.999}{.999}{asin(x)}
+\end{pspicture}
+\hspace{1em}
+\begin{pspicture}[showgrid=true](-1,0)(1,4)
+ \psplot[linecolor=blue]{-.97}{.97}{Derive(1,asin(x))}
+\end{pspicture}
+\hspace{1em}
+\psset{algebraic, VarStep, VarStepEpsilon=.0001, showpoints=true}
+\begin{pspicture}[showgrid=true](-1,0)(1,4)
+ \psplot[linecolor=blue]{-.97}{.97}{Derive(1,asin(x))}
+\end{pspicture}
+\egroup
+\end{center}
+
+\begin{lstlisting}
+\psset{unit=1.5}
+\begin{pspicture}[showgrid=true](-1,-2)(1,2)
+ \psplot[linecolor=blue,algebraic]{-1}{1}{asin(x)}
+\end{pspicture}
+\hspace{1em}
+\psset{algebraic, VarStep, VarStepEpsilon=.001, showpoints=true}
+\begin{pspicture}[showgrid=true](-1,-2)(1,2)
+ \psplot[linecolor=blue]{-.999}{.999}{asin(x)}
+\end{pspicture}
+\hspace{1em}
+\begin{pspicture}[showgrid=true](-1,0)(1,4)
+ \psplot[linecolor=red]{-.97}{.97}{Derive(1,asin(x))}
+\end{pspicture}
+\hspace{1em}
+\psset{algebraic, VarStep, VarStepEpsilon=.0001, showpoints=true}
+\begin{pspicture}[showgrid=true](-1,0)(1,4)
+ \psplot[linecolor=red]{-.97}{.97}{Derive(1,asin(x))}
+\end{pspicture}
+\end{lstlisting}
+
+
+\subsection{The inverse cosine and its derivative}
+
+\begin{center}
+\bgroup
+\psset{unit=1.5}
+\begin{pspicture}[showgrid=true](-1,0)(1,3)
+ \psplot[linecolor=blue,algebraic]{-1}{1}{acos(x)}
+\end{pspicture}
+\hspace{1em}
+\psset{algebraic, VarStep, VarStepEpsilon=.001, showpoints=true}
+\begin{pspicture}[showgrid=true](-1,0)(1,3)
+ \psplot[linecolor=blue]{-.999}{.999}{acos(x)}
+\end{pspicture}
+\hspace{1em}
+\begin{pspicture}[showgrid=true](-1,-4)(1,-1)
+ \psplot[linecolor=blue]{-.97}{.97}{Derive(1,acos(x))}
+\end{pspicture}
+\hspace{1em}
+\psset{algebraic, VarStep, VarStepEpsilon=.0001, showpoints=true}
+\begin{pspicture}[showgrid=true](-1,-4)(1,-1)
+ \psplot[linecolor=blue]{-.97}{.97}{Derive(1,acos(x))}
+\end{pspicture}
+\egroup
+\end{center}
+
+\begin{lstlisting}
+\psset{unit=1.5}
+\begin{pspicture}[showgrid=true](-1,0)(1,3)
+ \psplot[linecolor=blue,algebraic]{-1}{1}{acos(x)}
+\end{pspicture}
+\hspace{1em}
+\psset{algebraic, VarStep, VarStepEpsilon=.001, showpoints=true}
+\begin{pspicture}[showgrid=true](-1,0)(1,3)
+ \psplot[linecolor=blue]{-.999}{.999}{acos(x)}
+\end{pspicture}
+\hspace{1em}
+\begin{pspicture}[showgrid=true](-1,-4)(1,-1)
+ \psplot[linecolor=red]{-.97}{.97}{Derive(1,acos(x))}
+\end{pspicture}
+\hspace{1em}
+\psset{algebraic, VarStep, VarStepEpsilon=.0001, showpoints=true}
+\begin{pspicture}[showgrid=true](-1,-4)(1,-1)
+ \psplot[linecolor=red]{-.97}{.97}{Derive(1,acos(x))}
+\end{pspicture}
+\end{lstlisting}
+
+
+
+\subsection{The inverse tangente and its derivative}
+
+\begin{center}
+\bgroup
+\begin{pspicture}[showgrid=true](-4,-2)(4,2)
+\psset{algebraic=true}
+ \psplot[linecolor=blue,linewidth=1pt]{-4}{4}{atg(x)}
+ \psplot[linecolor=red,VarStep, VarStepEpsilon=.0001, showpoints=true]{-4}{4}{Derive(1,atg(x))}
+\end{pspicture}
+\hspace{1em}
+\begin{pspicture}[showgrid=true](-4,-2)(4,2)
+\psset{algebraic, VarStep, VarStepEpsilon=.001, showpoints=true}
+ \psplot[linecolor=blue]{-4}{4}{atg(x)}
+ \psplot[linecolor=red]{-4}{4}{Derive(1,atg(x))}
+\end{pspicture}
+\egroup
+\end{center}
+
+\begin{lstlisting}
+\begin{pspicture}[showgrid=true](-4,-2)(4,2)
+\psset{algebraic=true}
+ \psplot[linecolor=blue,linewidth=1pt]{-4}{4}{atg(x)}
+ \psplot[linecolor=red,VarStep, VarStepEpsilon=.0001, showpoints=true]{-4}{4}{Derive(1,atg(x))}
+\end{pspicture}
+\hspace{1em}
+\begin{pspicture}[showgrid=true](-4,-2)(4,2)
+\psset{algebraic, VarStep, VarStepEpsilon=.001, showpoints=true}
+ \psplot[linecolor=blue]{-4}{4}{atg(x)}
+ \psplot[linecolor=red]{-4}{4}{Derive(1,atg(x))}
+\end{pspicture}
+\end{lstlisting}
+
+\subsection{Hyperbolique functions}
+
+\begin{center}
+\bgroup
+\begin{pspicture}(-3,-4)(3,4)
+\psset{algebraic=true}
+ \psplot[linecolor=red,linewidth=1pt]{-2}{2}{sh(x)}
+ \psplot[linecolor=blue,linewidth=1pt]{-2}{2}{ch(x)}
+ \psplot[linecolor=green,linewidth=1pt]{-3}{3}{th(x)}
+ \psaxes{->}(0,0)(-3,-4)(3,4)
+\end{pspicture}
+\hspace{1em}
+\begin{pspicture}(-3,-4)(3,4)
+\psset{algebraic=true, VarStep=true, VarStepEpsilon=.001, showpoints=true}
+ \psplot[linecolor=red,linewidth=1pt]{-2}{2}{sh(x)}
+ \psplot[linecolor=blue,linewidth=1pt]{-2}{2}{ch(x)}
+ \psplot[linecolor=green,linewidth=1pt]{-3}{3}{th(x)}
+ \psaxes{->}(0,0)(-3,-4)(3,4)
+\end{pspicture}
+\egroup
+\end{center}
+
+\begin{lstlisting}
+\begin{pspicture}(-3,-4)(3,4)
+\psset{algebraic=true}
+ \psplot[linecolor=red,linewidth=1pt]{-2}{2}{sh(x)}
+ \psplot[linecolor=blue,linewidth=1pt]{-2}{2}{ch(x)}
+ \psplot[linecolor=green,linewidth=1pt]{-3}{3}{th(x)}
+ \psaxes{->}(0,0)(-3,-4)(3,4)
+\end{pspicture}
+\hspace{1em}
+\begin{pspicture}(-3,-4)(3,4)
+\psset{algebraic=true, VarStep=true, VarStepEpsilon=.001, showpoints=true}
+ \psplot[linecolor=red,linewidth=1pt]{-2}{2}{sh(x)}
+ \psplot[linecolor=blue,linewidth=1pt]{-2}{2}{ch(x)}
+ \psplot[linecolor=green,linewidth=1pt]{-3}{3}{th(x)}
+ \psaxes{->}(0,0)(-3,-4)(3,4)
+\end{pspicture}
+\end{lstlisting}
+
+
+
+\begin{center}
+\bgroup
+\begin{pspicture}(-3,-4)(3,4)
+\psset{algebraic=true}
+ \psplot[linecolor=red,linewidth=1pt]{-2}{2}{Derive(1,sh(x))}
+ \psplot[linecolor=blue,linewidth=1pt]{-2}{2}{Derive(1,ch(x))}
+ \psplot[linecolor=green,linewidth=1pt]{-3}{3}{Derive(1,th(x))}
+ \psaxes{->}(0,0)(-3,-4)(3,4)
+\end{pspicture}
+\hspace{1em}
+\begin{pspicture}(-3,-4)(3,4)
+\psset{algebraic=true, VarStep=true, VarStepEpsilon=.001, showpoints=true}
+ \psplot[linecolor=red,linewidth=1pt]{-2}{2}{Derive(1,sh(x))}
+ \psplot[linecolor=blue,linewidth=1pt]{-2}{2}{Derive(1,ch(x))}
+ \psplot[linecolor=green,linewidth=1pt]{-3}{3}{Derive(1,th(x))}
+ \psaxes{->}(0,0)(-3,-4)(3,4)
+\end{pspicture}
+\egroup
+\end{center}
+
+\begin{lstlisting}
+\begin{pspicture}(-3,-4)(3,4)
+\psset{algebraic=true,linewidth=1pt}
+ \psplot[linecolor=red,linewidth=1pt]{-2}{2}{Derive(1,sh(x))}
+ \psplot[linecolor=blue,linewidth=1pt]{-2}{2}{Derive(1,ch(x))}
+ \psplot[linecolor=green,linewidth=1pt]{-3}{3}{Derive(1,th(x))}
+ \psaxes{->}(0,0)(-3,-4)(3,4)
+\end{pspicture}
+\hspace{1em}
+\begin{pspicture}(-3,-4)(3,4)
+\psset{algebraic=true, VarStep=true, VarStepEpsilon=.001, showpoints=true}
+ \psplot[linecolor=red,linewidth=1pt]{-2}{2}{Derive(1,sh(x))}
+ \psplot[linecolor=blue,linewidth=1pt]{-2}{2}{Derive(1,ch(x))}
+ \psplot[linecolor=green,linewidth=1pt]{-3}{3}{Derive(1,th(x))}
+ \psaxes{->}(0,0)(-3,-4)(3,4)
+\end{pspicture}
+\end{lstlisting}
+
+
+
+\begin{center}
+\bgroup
+\begin{pspicture}(-7,-3)(7,3)
+\psset{algebraic=true}
+ \psplot[linecolor=red,linewidth=1pt]{-7}{7}{Argsh(x)}
+ \psplot[linecolor=blue,linewidth=1pt]{1}{7}{Argch(x)}
+ \psplot[linecolor=green,linewidth=1pt]{-.99}{.99}{Argth(x)}
+ \psaxes{->}(0,0)(-7,-3)(7,3)
+\end{pspicture}\\[\baselineskip]
+\begin{pspicture}(-7,-3)(7,3)
+ \psset{algebraic, VarStep, VarStepEpsilon=.001, showpoints=true}
+ \psplot[linecolor=red,linewidth=1pt]{-7}{7}{Argsh(x)}
+ \psplot[linecolor=blue,linewidth=1pt]{1.001}{7}{Argch(x)}
+ \psplot[linecolor=green,linewidth=1pt]{-.99}{.99}{Argth(x)}
+ \psaxes{->}(0,0)(-7,-3)(7,3)
+\end{pspicture}
+\egroup
+\end{center}
+
+\begin{lstlisting}
+\begin{pspicture}(-7,-3)(7,3)
+\psset{algebraic=true}
+ \psplot[linecolor=red,linewidth=1pt]{-7}{7}{Argsh(x)}
+ \psplot[linecolor=blue,linewidth=1pt]{1}{7}{Argch(x)}
+ \psplot[linecolor=green,linewidth=1pt]{-.99}{.99}{Argth(x)}
+ \psaxes{->}(0,0)(-7,-3)(7,3)
+\end{pspicture}\\[\baselineskip]
+\begin{pspicture}(-7,-3)(7,3)
+ \psset{algebraic, VarStep, VarStepEpsilon=.001, showpoints=true}
+ \psplot[linecolor=red,linewidth=1pt]{-7}{7}{Argsh(x)}
+ \psplot[linecolor=blue,linewidth=1pt]{1.001}{7}{Argch(x)}
+ \psplot[linecolor=green,linewidth=1pt]{-.99}{.99}{Argth(x)}
+ \psaxes{->}(0,0)(-7,-3)(7,3)
+\end{pspicture}
+\end{lstlisting}
+
+
+
+\begin{center}
+\bgroup
+\begin{pspicture}(-7,-0.5)(7,6)
+\psset{algebraic=true}
+ \psplot[linecolor=red,linewidth=1pt]{-7}{7}{Derive(1,Argsh(x))}
+ \psplot[linecolor=blue,linewidth=1pt]{1.014}{7}{Derive(1,Argch(x))}
+ \psplot[linecolor=green,linewidth=1pt]{-.9}{.9}{Derive(1,Argth(x))}
+ \psaxes{->}(0,0)(-7,0)(7,6)
+\end{pspicture}\\[\baselineskip]
+\begin{pspicture}(-7,-0.5)(7,6)
+\psset{algebraic=true}
+ \psset{algebraic=true, VarStep=true, VarStepEpsilon=.001, showpoints=true}
+ \psplot[linecolor=red,linewidth=1pt]{-7}{7}{Derive(1,Argsh(x))}
+ \psplot[linecolor=blue,linewidth=1pt]{1.014}{7}{Derive(1,Argch(x))}
+ \psplot[linecolor=green,linewidth=1pt]{-.9}{.9}{Derive(1,Argth(x))}
+ \psaxes{->}(0,0)(-7,0)(7,6)
+\end{pspicture}
+\egroup
+\end{center}
+
+\begin{lstlisting}
+\begin{pspicture}(-7,-0.5)(7,6)
+\psset{algebraic=true}
+ \psplot[linecolor=red,linewidth=1pt]{-7}{7}{Derive(1,Argsh(x))}
+ \psplot[linecolor=blue,linewidth=1pt]{1.014}{7}{Derive(1,Argch(x))}
+ \psplot[linecolor=green,linewidth=1pt]{-.9}{.9}{Derive(1,Argth(x))}
+ \psaxes{->}(0,0)(-7,0)(7,6)
+\end{pspicture}\\[\baselineskip]
+\begin{pspicture}(-7,-0.5)(7,6)
+\psset{algebraic=true}
+ \psset{algebraic=true, VarStep=true, VarStepEpsilon=.001, showpoints=true}
+ \psplot[linecolor=red,linewidth=1pt]{-7}{7}{Derive(1,Argsh(x))}
+ \psplot[linecolor=blue,linewidth=1pt]{1.014}{7}{Derive(1,Argch(x))}
+ \psplot[linecolor=green,linewidth=1pt]{-.9}{.9}{Derive(1,Argth(x))}
+ \psaxes{->}(0,0)(-7,0)(7,6)
+\end{pspicture}
+\end{lstlisting}
+
+\clearpage
%--------------------------------------------------------------------------------------
-\subsection[\CMD{psplotDiffEqn} -- solving diffential equations]{\CMD{psplotDiffEqn} -- solving diffential equations\footnote{This part is adapted from the package \texttt{pst-eqdf}, written by Dominique Rodriguez.}}
+\section[\CMD{psplotDiffEqn} -- solving diffential equations]{\CMD{psplotDiffEqn} -- solving diffential equations}
%--------------------------------------------------------------------------------------
A differential euqation of first order is like
-\begin{align} y'=f(x,y) \end{align}
+\begin{align} y^\prime=f(x,y,y^\prime) \end{align}
where $y$ is a function of $x$. We define some vectors $Y=[y, y', \cdots , y^{(n-1)}]$
-und $Y'=[y', y'', \cdots , y^{n}]$, depending to the order $n$.
+und $Y^\prime=[y^\prime, y^{\prime\prime}, \cdots , y^{n}]$, depending to the order $n$.
The syntax of the macro is
\begin{verbatim}
-\psplotDiffEqn[options]{x0}{x1}{y0}{f(x,y)}
+\psplotDiffEqn[options]{x0}{x1}{y0}{f(x,y,y',...)}
\end{verbatim}
\begin{itemize}\setlength\itemsep{0pt}\setlength\parsep{0pt}\setlength\parskip{0pt}
@@ -4060,11 +5217,274 @@ The new options are:
\end{itemize}
-The variable $t$ (time) is represented by $x$ in the \verb+\psplotDiffEqn+,
-$x$ and $y$ (position) are represented respectively by $y[0]$ and $y[1]$
-For \verb+funcx+ and \verb+funcy+ there is some examples at the end.
-\def\Grav{%
+\subsection{Variable step for differential equations}
+
+A new algorithm has been added for adjusting the step according to the variations of
+the curve. The parameter \verb+method+ has a new possible value : \verb+varrkiv+ to
+activate the \textsc{Runge-Kutta} method with variable step, then the parameter
+\verb+varsteptol+ (real value; \verb+.01+ by default) can control the tolerance of
+the algortihm.
+
+\begin{center}
+\bgroup
+\def\Funct{neg}\def\FunctAlg{-y[0]}
+\psset{xunit=1.5, yunit=8, showpoints=true}
+\begin{pspicture}[showgrid=true](0,0)(10,1.2)
+ \psplot[linewidth=6\pslinewidth, linecolor=green, showpoints=false]{0}{10}{2.71828182846 x neg exp}
+ \psplotDiffEqn[linecolor=magenta, method=varrkiv, varsteptol=.1, plotpoints=2]{0}{10}{1}{\Funct}
+ \rput(0,.0){\psplotDiffEqn[linecolor=blue, method=varrkiv, varsteptol=.01, plotpoints=2]{0}{10}{1}{\Funct}}
+ \rput(0,.1){\psplotDiffEqn[linecolor=Orange, method=varrkiv, varsteptol=.001, plotpoints=2]{0}{10}{1}{\Funct}}
+ \rput(0,.2){\psplotDiffEqn[linecolor=red, method=varrkiv, varsteptol=.0001, plotpoints=2]{0}{10}{1}{\Funct}}
+ \psset{linewidth=4\pslinewidth,showpoints=false}
+ \rput*(3.3,.9){\psline[linecolor=magenta](-.75cm,0)}
+ \rput*[l](3.3,.9){\small RK ordre 4 : $\varepsilon<10^{-1}$}
+ \rput*(3.3,.8){\psline[linecolor=blue](-.75cm,0)}
+ \rput*[l](3.3,.8){\small RK ordre 4 : $\varepsilon<10^{-2}$}
+ \rput*(3.3,.7){\psline[linecolor=Orange](-.75cm,0)}
+ \rput*[l](3.3,.7){\small RK ordre 4 : $\varepsilon<10^{-3}$}
+ \rput*(3.3,.6){\psline[linecolor=red](-.75cm,0)}
+ \rput*[l](3.3,.6){\small RK ordre 4 : $\varepsilon<10^{-4}$}
+ \rput*(3.3,.5){\psline[linecolor=green](-.75cm,0)}
+ \rput*[l](3.3,.5){\small solution exacte}
+\end{pspicture}
+\captionof{figure}{Equation $y'=-y$ with $y_0=1$.} \label{fig:minusexpvarstep}
+\egroup
+\end{center}
+
+
+\begin{lstlisting}[wide=true]
+\def\Funct{neg}\def\FunctAlg{-y[0]}
+\psset{xunit=1.5, yunit=8, showpoints=true}
+\begin{pspicture}[showgrid=true](0,0)(10,1.2)
+ \psplot[linewidth=6\pslinewidth, linecolor=green, showpoints=false]{0}{10}{2.71828182846 x neg exp}
+ \psplotDiffEqn[linecolor=magenta, method=varrkiv, varsteptol=.1, plotpoints=2]{0}{10}{1}{\Funct}
+ \rput(0,.0){\psplotDiffEqn[linecolor=blue, method=varrkiv, varsteptol=.01, plotpoints=2]{0}{10}{1}{\Funct}}
+ \rput(0,.1){\psplotDiffEqn[linecolor=Orange, method=varrkiv, varsteptol=.001, plotpoints=2]{0}{10}{1}{\Funct}}
+ \rput(0,.2){\psplotDiffEqn[linecolor=red, method=varrkiv, varsteptol=.0001, plotpoints=2]{0}{10}{1}{\Funct}}
+ \psset{linewidth=4\pslinewidth,showpoints=false}
+ \rput*(3.3,.9){\psline[linecolor=magenta](-.75cm,0)}
+ \rput*[l](3.3,.9){\small RK ordre 4 : $\varepsilon<10^{-1}$}
+ \rput*(3.3,.8){\psline[linecolor=blue](-.75cm,0)}
+ \rput*[l](3.3,.8){\small RK ordre 4 : $\varepsilon<10^{-2}$}
+ \rput*(3.3,.7){\psline[linecolor=Orange](-.75cm,0)}
+ \rput*[l](3.3,.7){\small RK ordre 4 : $\varepsilon<10^{-3}$}
+ \rput*(3.3,.6){\psline[linecolor=red](-.75cm,0)}
+ \rput*[l](3.3,.6){\small RK ordre 4 : $\varepsilon<10^{-4}$}
+ \rput*(3.3,.5){\psline[linecolor=green](-.75cm,0)}
+ \rput*[l](3.3,.5){\small solution exacte}
+\end{pspicture}
+\end{lstlisting}
+
+
+
+\begin{center}
+\bgroup
+\def\Funct{exch neg}
+\psset{xunit=1.5, yunit=5, method=varrkiv, showpoints=true}%%
+\def\quatrepi{12.5663706144}
+\begin{pspicture}(0,-1)(10,1.3)
+ \psaxes{->}(0,0)(0,-1)(10,1.3)
+ \psplot[linewidth=4\pslinewidth, linecolor=green, algebraic=true]{0}{10}{cos(x)}
+ \rput(0,.0){\psplotDiffEqn[linecolor=magenta, plotpoints=7, varsteptol=.1]{0}{10}{1 0}{\Funct}}
+ \rput(0,.0){\psplotDiffEqn[linecolor=blue, plotpoints=201, varsteptol=.01]{0}{10}{1 0}{\Funct}}
+ \rput(0,.1){\psplotDiffEqn[linewidth=2\pslinewidth, linecolor=red, varsteptol=.001]{0}{10}{1 0}{\Funct}}
+ \rput(0,.2){\psplotDiffEqn[linecolor=black, varsteptol=.0001]{0}{10}{1 0}{\Funct}}
+ \rput(0,.3){\psplotDiffEqn[linecolor=Orange, varsteptol=.00001]{0}{10}{1 0}{\Funct}}
+ \psset{linewidth=4\pslinewidth,showpoints=false}
+ \rput*(2.3,.9){\psline[linecolor=magenta](-.75cm,0)}
+ \rput*[l](2.3,.9){\small $\varepsilon<10^{-1}$}
+ \rput*(2.3,.8){\psline[linecolor=blue](-.75cm,0)}
+ \rput*[l](2.3,.8){\small $\varepsilon<10^{-2}$}
+ \rput*(2.3,.7){\psline[linecolor=red](-.75cm,0)}
+ \rput*[l](2.3,.7){\small $\varepsilon<10^{-3}$}
+ \rput*(2.3,.6){\psline[linecolor=black](-.75cm,0)}
+ \rput*[l](2.3,.6){\small $\varepsilon<10^{-4}$}
+ \rput*(2.3,.5){\psline[linecolor=Orange](-.75cm,0)}
+ \rput*[l](2.3,.5){\small $\varepsilon<10^{-5}$}
+ \rput*(2.3,.4){\psline[linecolor=green](-.75cm,0)}
+ \rput*[l](2.3,.4){\small solution exacte}
+\end{pspicture}
+\captionof{figure}{Equation $y''=-y$}\label{fig:trigfunc}
+\egroup
+\end{center}
+
+\begin{lstlisting}[wide=true]
+\def\Funct{exch neg}
+\psset{xunit=1.5, yunit=5, method=varrkiv, showpoints=true}%%
+\def\quatrepi{12.5663706144}
+\begin{pspicture}(0,-1)(10,1.3)
+ \psaxes{->}(0,0)(0,-1)(10,1.3)
+ \psplot[linewidth=4\pslinewidth, linecolor=green, algebraic=true]{0}{10}{cos(x)}
+ \rput(0,.0){\psplotDiffEqn[linecolor=magenta, plotpoints=7, varsteptol=.1]{0}{10}{1 0}{\Funct}}
+ \rput(0,.0){\psplotDiffEqn[linecolor=blue, plotpoints=201, varsteptol=.01]{0}{10}{1 0}{\Funct}}
+ \rput(0,.1){\psplotDiffEqn[linewidth=2\pslinewidth, linecolor=red, varsteptol=.001]{0}{10}{1 0}{\Funct}}
+ \rput(0,.2){\psplotDiffEqn[linecolor=black, varsteptol=.0001]{0}{10}{1 0}{\Funct}}
+ \rput(0,.3){\psplotDiffEqn[linecolor=Orange, varsteptol=.00001]{0}{10}{1 0}{\Funct}}
+ \psset{linewidth=4\pslinewidth,showpoints=false}
+ \rput*(2.3,.9){\psline[linecolor=magenta](-.75cm,0)}
+ \rput*[l](2.3,.9){\small $\varepsilon<10^{-1}$}
+ \rput*(2.3,.8){\psline[linecolor=blue](-.75cm,0)}
+ \rput*[l](2.3,.8){\small $\varepsilon<10^{-2}$}
+ \rput*(2.3,.7){\psline[linecolor=red](-.75cm,0)}
+ \rput*[l](2.3,.7){\small $\varepsilon<10^{-3}$}
+ \rput*(2.3,.6){\psline[linecolor=black](-.75cm,0)}
+ \rput*[l](2.3,.6){\small $\varepsilon<10^{-4}$}
+ \rput*(2.3,.5){\psline[linecolor=Orange](-.75cm,0)}
+ \rput*[l](2.3,.5){\small $\varepsilon<10^{-5}$}
+ \rput*(2.3,.4){\psline[linecolor=green](-.75cm,0)}
+ \rput*[l](2.3,.4){\small solution exacte}
+\end{pspicture}
+\end{lstlisting}
+
+
+
+
+\begin{center}
+\bgroup
+\def\Funct{exch}
+\psset{xunit=4, yunit=1, method=varrkiv, showpoints=true}%%
+\def\quatrepi{12.5663706144}
+\begin{pspicture}(0,-0.5)(3,11)
+ \psaxes{->}(0,0)(3,11)
+ \psplot[linewidth=4\pslinewidth, linecolor=green, algebraic=true]{0}{3}{ch(x)}
+ \rput(0,.0){\psplotDiffEqn[linecolor=magenta, varsteptol=.1]{0}{3}{1 0}{\Funct}}
+ \rput(0,.3){\psplotDiffEqn[linecolor=blue, varsteptol=.01]{0}{3}{1 0}{\Funct}}
+ \rput(0,.6){\psplotDiffEqn[linecolor=red, varsteptol=.001]{0}{3}{1 0}{\Funct}}
+ \rput(0,.9){\psplotDiffEqn[linecolor=black, varsteptol=.0001]{0}{3}{1 0}{\Funct}}
+ \rput(0,1.2){\psplotDiffEqn[linecolor=Orange, varsteptol=.00001]{0}{3}{1 0}{\Funct}}
+ \psset{linewidth=4\pslinewidth,showpoints=false}
+ \rput*(2.3,.9){\psline[linecolor=magenta](-.75cm,0)}
+ \rput*[l](2.3,.9){\small $\varepsilon<10^{-1}$}
+ \rput*(2.3,.8){\psline[linecolor=blue](-.75cm,0)}
+ \rput*[l](2.3,.8){\small $\varepsilon<10^{-2}$}
+ \rput*(2.3,.7){\psline[linecolor=red](-.75cm,0)}
+ \rput*[l](2.3,.7){\small $\varepsilon<10^{-3}$}
+ \rput*(2.3,.6){\psline[linecolor=black](-.75cm,0)}
+ \rput*[l](2.3,.6){\small $\varepsilon<10^{-4}$}
+ \rput*(2.3,.5){\psline[linecolor=Orange](-.75cm,0)}
+ \rput*[l](2.3,.5){\small $\varepsilon<10^{-5}$}
+ \rput*(2.3,.4){\psline[linecolor=green](-.75cm,0)}
+ \rput*[l](2.3,.4){\small solution exacte}
+\end{pspicture}
+\captionof{figure}{Equation $y''=y$}
+\egroup
+\end{center}
+
+\begin{lstlisting}[wide=true]
+\def\Funct{exch}
+\psset{xunit=4, yunit=1, method=varrkiv, showpoints=true}%%
+\def\quatrepi{12.5663706144}
+\begin{pspicture}(0,-0.5)(3,11)
+ \psaxes{->}(0,0)(3,11)
+ \psplot[linewidth=4\pslinewidth, linecolor=green, algebraic=true]{0}{3}{ch(x)}
+ \rput(0,.0){\psplotDiffEqn[linecolor=magenta, varsteptol=.1]{0}{3}{1 0}{\Funct}}
+ \rput(0,.3){\psplotDiffEqn[linecolor=blue, varsteptol=.01]{0}{3}{1 0}{\Funct}}
+ \rput(0,.6){\psplotDiffEqn[linecolor=red, varsteptol=.001]{0}{3}{1 0}{\Funct}}
+ \rput(0,.9){\psplotDiffEqn[linecolor=black, varsteptol=.0001]{0}{3}{1 0}{\Funct}}
+ \rput(0,1.2){\psplotDiffEqn[linecolor=Orange, varsteptol=.00001]{0}{3}{1 0}{\Funct}}
+ \psset{linewidth=4\pslinewidth,showpoints=false}
+ \rput*(2.3,.9){\psline[linecolor=magenta](-.75cm,0)}
+ \rput*[l](2.3,.9){\small $\varepsilon<10^{-1}$}
+ \rput*(2.3,.8){\psline[linecolor=blue](-.75cm,0)}
+ \rput*[l](2.3,.8){\small $\varepsilon<10^{-2}$}
+ \rput*(2.3,.7){\psline[linecolor=red](-.75cm,0)}
+ \rput*[l](2.3,.7){\small $\varepsilon<10^{-3}$}
+ \rput*(2.3,.6){\psline[linecolor=black](-.75cm,0)}
+ \rput*[l](2.3,.6){\small $\varepsilon<10^{-4}$}
+ \rput*(2.3,.5){\psline[linecolor=Orange](-.75cm,0)}
+ \rput*[l](2.3,.5){\small $\varepsilon<10^{-5}$}
+ \rput*(2.3,.4){\psline[linecolor=green](-.75cm,0)}
+ \rput*[l](2.3,.4){\small solution exacte}
+\end{pspicture}
+\end{lstlisting}
+
+
+
+
+
+\subsection{Equation of second order}
+
+Here is the traditionnal simulation of two stars attracting each other according to
+the classical gravitation law in $\displaystyle\frac{1}{r^2}$. In 2-Dimensions, the system to be
+solved is composed of four second order differential equations. In order to be
+described, each of them gives two first order equations, then we obtain a 8 sized vectorial
+equation. In the following example the masses of the stars are 1 and 20.
+
+\[
+\left\{
+\begin{array}[m]{l}
+ x''_1=\displaystyle\frac{M_2}{r^2}\cos(\theta)\\
+ y''_1=\displaystyle\frac{M_2}{r^2}\sin(\theta)\\
+ x''_2=\displaystyle\frac{M_1}{r^2}\cos(\theta)\\
+ y''_2=\displaystyle\frac{M_1}{r^2}\sin(\theta)\\
+\end{array}
+\right.
+\mbox{ avec }
+\left\{
+\begin{array}[m]{l}
+ r^2=(x_1-x_2)^2+(y_1-y_2)^2\\
+ \cos(\theta)=\displaystyle\frac{(x_1-x_2)}{r}\\
+ \sin(\theta)=\displaystyle\frac{(y_1-y_2)}{r}\\
+\end{array}
+\right.
+\mbox{%
+\begin{pspicture}[shift=-2](5,4)\psset{arrowscale=2}
+ \psframe[linewidth=.75\pslinewidth](5,4)
+ \pstGeonode[PosAngle={-90,90}](1,1){M_1}(4,3){M_2}
+ \pstHomO[HomCoef=.33, PointSymbol=none]{M_1}{M_2}[F_1]
+ \psline[arrows=->](M_1)(F_1)
+ \pstHomO[HomCoef=.33, PointSymbol=none]{M_2}{M_1}[F_2]
+ \psline[arrows=->, arrowscale=2](M_2)(F_2)
+ \pstGeonode[PointSymbol=none, PointName=none](M_2|M_1){A}
+ \psline[linewidth=.5\pslinewidth](M_1)(A)
+ \pstMarkAngle{A}{M_1}{M_2}{$\theta$}
+ \ncline[linewidth=.5\pslinewidth, offset=.5, arrows=<->]{M_1}{M_2}
+ \ncput*{$r$}
+\end{pspicture}}
+\]
+
+\begin{table}[htbp]
+ \begin{center}\small
+ \begin{tabular}{|l@{}>{\ttfamily}l@{}>{ \ttfamily \%\% }l|}
+ \hline
+ && x1 y1 x'1 y'1 x2 y2 x'2 y'2\\
+ &/yp2 exch def /xp2 exch def /ay2 exch def /ax2 exch def&mise en variables\\
+ &/yp1 exch def /xp1 exch def /ay1 exch def /ax1 exch def&mise en variables\\
+ &/ro2 ax2 ax1 sub dup mul ay2 ay1 sub dup mul add def&calcul de r*r\\
+ &xp1 yp1&\\
+ &ax2 ax1 sub ro2 sqrt div ro2 div&calcul de x''1\\
+ &ay2 ay1 sub ro2 sqrt div ro2 div&calcul de y''1\\
+ &xp2 yp2&\\
+ &3 index -20 mul&calcul de x''2=-20x''1\\
+ &3 index -20 mul&calcul de y''2=-20y''1\\
+ \hline
+ \end{tabular}
+ \caption{\PostScript source code for the gravitational interaction}
+ \label{intgravcode}
+ \end{center}
+\end{table}
+
+\begin{table}[htbp]
+ \begin{center}\small\newcommand{\POW}{\symbol{'136}}
+ \begin{tabular}{|l@{}>{\ttfamily}l@{}>{ \ttfamily \%\% }l|}
+ \hline
+ &y[2]|&y'[0]\\
+ &y[3]|&y'[1]\\
+ &(y[4]-y[0])/((y[4]-y[0])\POW 2+(y[5]-y[1])\POW 2)\POW 1.5|&y'[2]=y''[0]\\
+ &(y[5]-y[1])/((y[4]-y[0])\POW 2+(y[5]-y[1])\POW 2)\POW 1.5|&y'[3]=y''[1]\\
+ &y[6]|&y'[4]\\
+ &y[7]|&y'[5]\\
+ &20*(y[0]-y[4])/((y[4]-y[0])\POW 2+(y[5]-y[1])\POW 2)\POW 1.5|&y'[6]=y''[4]\\
+ &20*(y[1]-y[5])/((y[4]-y[0])\POW 2+(y[5]-y[1])\POW 2)\POW 1.5&y'[7]=y''[5]\\
+ \hline
+ \end{tabular}
+ \caption{Algebraic description for the gravitational interaction}
+ \label{intgravalgcode}
+ \end{center}
+\end{table}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\newcommand\Grav{%
/yp2 exch def /xp2 exch def /ay2 exch def /ax2 exch def
/yp1 exch def /xp1 exch def /ay1 exch def /ax1 exch def
/ro2 ax2 ax1 sub dup mul ay2 ay1 sub dup mul add def
@@ -4074,102 +5494,81 @@ For \verb+funcx+ and \verb+funcy+ there is some examples at the end.
xp2 yp2
3 index -20 mul
3 index -20 mul}
+\newcommand\GravAlg{%
+ y[2]|y[3]|%
+ (y[4]-y[0])/((y[4]-y[0])^2+(y[5]-y[1])^2)^1.5|%
+ (y[5]-y[1])/((y[4]-y[0])^2+(y[5]-y[1])^2)^1.5|%
+ y[6]|y[7]|%
+ 20*(y[0]-y[4])/((y[4]-y[0])^2+(y[5]-y[1])^2)^1.5|%
+ 20*(y[1]-y[5])/((y[4]-y[0])^2+(y[5]-y[1])^2)^1.5}
%% 0 1 2 3 4 5 6 7
%% x1 y1 x'1 y'1 x2 y2 x'2 y'2
-\def\InitCond{ 1 1 .1 0 -1 -1 -2 0}
-\begin{lstlisting}
-\def\Grav{%
- /yp2 exch def /xp2 exch def /ay2 exch def /ax2 exch def
- /yp1 exch def /xp1 exch def /ay1 exch def /ax1 exch def
- /ro2 ax2 ax1 sub dup [21~mul ay2 ay1 sub dup mul add def
- xp1 yp1
- ax2 ax1 sub ro2 sqrt div ro2 div
- ay2 ay1 sub ro2 sqrt div ro2 div
- xp2 yp2
- 3 index -20 mul 3 index -20 mul}
- %% 0 1 2 3 4 5 6 7
- %% x1 y1 x'1 y'1 x2 y2 x'2 y'2
+
+\begin{LTXexample}[width=5cm]
\def\InitCond{ 1 1 .1 0 -1 -1 -2 0}
-\end{lstlisting}
+\begin{pspicture}[shift=-2,showgrid=true](-3,-2)(2,2)
+ \psplotDiffEqn[whichabs=0, whichord=1, linecolor=blue, method=rk4, plotpoints=100]{0}{3.95}
+ {\InitCond}{\Grav}
+ \psset{showpoints=true,whichabs=4, whichord=5}
+ \psplotDiffEqn[linecolor=black, method=varrkiv, varsteptol=.0001, plotpoints=200]{0}{3.9}
+ {\InitCond}{\Grav}
+\end{pspicture}
+\end{LTXexample}
+\captionof{figure}{Gravitational interaction : fixed landmark, trajectory of the stars}\label{fig:InterGravRepFix}
-%--------------------------------------------------------------------------------------
-\subsubsection{\texttt{plotfuncx} and \texttt{plotfuncy}}
-%--------------------------------------------------------------------------------------
-%[pos=b,caption={Gravitational interaction: center to one of the star}]
-\begin{lstlisting}
-\begin{pspicture}(-4,-2.5)(1,1.1)\psgrid[subgriddiv=1]
- \psplotDiffEqn[linecolor=red, method=rk4, plotpoints=200,%
- plotfuncx=y dup 4 get exch 0 get sub,%
- plotfuncy=dup 5 get exch 1 get sub ]{0}{3.9}{\InitCond}{\Grav}
+
+
+\begin{LTXexample}[width=5cm]
+\def\InitCond{ 1 1 .1 0 -1 -1 -2 0}
+\begin{pspicture}[shift=-1.5,showgrid=true](-4,-2)(1,1)
+ \psset{showpoints=true}
+ \psplotDiffEqn[linecolor=red, plotpoints=200,method=varrkiv, varsteptol=.0001,
+ plotfuncx=y dup 4 get exch 0 get sub ,
+ plotfuncy=dup 5 get exch 1 get sub ]{0}{3.9}{\InitCond}{\Grav}
\end{pspicture}
-\end{lstlisting}
+\end{LTXexample}
+\captionof{figure}{Gravitational interaction : landmark defined by one star}\label{fig:IGnewrep}
\begin{center}
\bgroup
-\begin{pspicture}(-4,-2.5)(1,1.1)\psgrid[subgriddiv=1]
- \psplotDiffEqn[linecolor=red, method=rk4, plotpoints=200,%
- plotfuncx=y dup 4 get exch 0 get sub,%
- plotfuncy=dup 5 get exch 1 get sub ]{0}{3.9}{\InitCond}{\Grav}
+\def\InitCond{ 1 1 .1 0 -1 -1 -2 0}
+\psset{xunit=2}
+\begin{pspicture}[showgrid=true](0,0)(8,9)
+ \psset{showpoints=true}
+ \psplotDiffEqn[linecolor=red, method=varrkiv, plotpoints=2, varsteptol=.0001,
+ plotfuncy=dup 6 get dup mul exch 7 get dup mul add sqrt]{0}{8}{\InitCond}{\Grav}
+ \psplotDiffEqn[linecolor=blue, method=varrkiv, plotpoints=2, varsteptol=.0001,
+ plotfuncy=dup 2 get dup mul exch 3 get dup mul add sqrt]{0}{8}{\InitCond}{\Grav}
\end{pspicture}
\egroup
+\captionof{figure}{Gravitational interaction : vitessesspeed of the stars}
\end{center}
-The center of the landmark is set to $y[0]$ and $y[1]$
-There is also a drawing of the speed (vitesse in french) of the stars which uses
-these parameters.
-
-\iffalse
-
-%--------------------------------------------------------------------------------------
-\subsection{PostScript}
-%--------------------------------------------------------------------------------------
-
-PostScript uses the stack system and the LIFO system, "'Last In, First Out"`.
-
-\newlength{\Li}\settowidth{\Li}{Function}
-\begin{table}[htbp]
- \begin{center}{\ttfamily
- \begin{tabular}{|l|r@{ $\rightarrow$ }l|}\hline
- \multirow{2}{\Li}{\normalfont Function}&\multicolumn{2}{c|}{\normalfont Pile de donnés}\\
- &\normalfont on stack before & \normalfont after\\\hline\hline
- add&$x\quad y$&$x+y$\\\hline
- sub&$x\quad y$&$x-y$\\\hline
- mul&$x\quad y$&$x\times y$\\\hline
- div&$x\quad y$&$x\div y$\\\hline
- sqrt&$x$&$\sqrt{x}$\\\hline
- abs&$x$&$|x|$\\\hline
- neg&$x$&$-x$\\\hline
- cos&$x$&$\cos(x)$ ($x$ in degrees)\\\hline
- sin&$x$&$\sin(x)$ ($x$ in degrees)\\\hline
- tan&$x$&$\tan(x)$ ($x$ in degrees)\\\hline
- atan&$y\quad x$&$\angle{(\vec{Ox};\vec{OM})}$ (in degrees of $M(x,y)$)\\\hline
- ln&$x$&$\ln(x)$\\\hline
- log&$x$&$\log(x)$\\\hline
- array&$n$&\normalfont$v$ (of dimension $n$)\\\hline
- aload&$v$&$x_1\quad x_2\quad \cdots\quad x_n\quad v$\\\hline
- astore&$x_1\quad x_2\quad \cdots\quad x_n\quad v$&$v$\\\hline
- pop&$x$&\\\hline
- dup&$x\quad x$&\\\hline
- roll&$x_1\quad x_2\quad \cdots\quad x_n\quad n p$&\\\hline
- \end{tabular}}
- \caption{Some primitive PostScript macros}\label{tab:primpost}
- \end{center}
-\end{table}
+\begin{lstlisting}
+\psset{xunit=2}
+\begin{pspicture}[showgrid=true](0,0)(8,9)
+ \psset{showpoints=true}
+ \psplotDiffEqn[linecolor=red, method=varrkiv, plotpoints=2, varsteptol=.0001,
+ plotfuncy=dup 6 get dup mul exch 7 get dup mul add sqrt]{0}{8}{\InitCond}{\Grav}
+ \psplotDiffEqn[linecolor=blue, method=varrkiv, plotpoints=2, varsteptol=.0001,
+ plotfuncy=dup 2 get dup mul exch 3 get dup mul add sqrt]{0}{8}{\InitCond}{\Grav}
+\end{pspicture}
+\end{lstlisting}
-\fi
%--------------------------------------------------------------------------------------
\subsubsection{Simple equation of first order$y'=y$}
%--------------------------------------------------------------------------------------
-
+
For the initial value $y(0)=1$ we have the solution $y(x)=e^x$. $y$ is always
on the stack, so we have to do nothing. Using the \verb+algebraic+ option, we write it
as \verb$y[0]$. The following example shows different solutions depending to the number of plotpoints
with $y_0=1$:
-\begin{lstlisting}
+\begin{center}
+\bgroup
\psset{xunit=4, yunit=.4}
\begin{pspicture}(3,19)\psgrid[subgriddiv=1]
\psplot[linewidth=6\pslinewidth, linecolor=green]{0}{3}{Euler x exp}
@@ -4189,10 +5588,10 @@ with $y_0=1$:
\rput*(0.35,11){\psline[linecolor=green](-.75cm,0)}
\rput*[l](0.35,11){\small solution exacte}
\end{pspicture}
-\end{lstlisting}
+\egroup
+\end{center}
-\begin{center}
-\bgroup
+\begin{lstlisting}
\psset{xunit=4, yunit=.4}
\begin{pspicture}(3,19)\psgrid[subgriddiv=1]
\psplot[linewidth=6\pslinewidth, linecolor=green]{0}{3}{Euler x exp}
@@ -4212,66 +5611,9 @@ with $y_0=1$:
\rput*(0.35,11){\psline[linecolor=green](-.75cm,0)}
\rput*[l](0.35,11){\small solution exacte}
\end{pspicture}
-\egroup
-\end{center}
-
-\clearpage
-%--------------------------------------------------------------------------------------
-\subsubsection{$y'=-y$}
-%--------------------------------------------------------------------------------------
-
-For the initial value $y(0)=1$ we get the solution $y(x)=e^{-x}$, which is seen in
-the following example with $y_0=1$:
-
-\begin{lstlisting}[xrightmargin=-1cm]
-\def\Funct{neg}\def\FunctAlg{-y[0]}
-\psset{xunit=1.5, yunit=7}
-\begin{pspicture}(0,0)(10,1)\psgrid[subgriddiv=1]
- \psplot[linewidth=6\pslinewidth,linecolor=green]{0}{10}{Euler x neg exp}
- \psplotDiffEqn[linecolor=magenta,plotpoints=11]{0}{10}{1}{\Funct}
- \psplotDiffEqn[linecolor=blue,plotpoints=101,algebraic=true]{0}{10}{1}{\FunctAlg}
- \psplotDiffEqn[linecolor=Orange,method=rk4,plotpoints=11]{0}{10}{1}{\Funct}
- \psplotDiffEqn[linecolor=red,method=rk4,plotpoints=51]{0}{10}{1}{\Funct}
- \psset{linewidth=4\pslinewidth}
- \rput*(3.3,.9){\psline[linecolor=magenta](-.75cm,0)}
- \rput*[l](3.3,.9){\small Euler order 1 $h=1$}
- \rput*(3.3,.8){\psline[linecolor=blue](-.75cm,0)}
- \rput*[l](3.3,.8){\small Euler order 1 $h=0{,}1$}
- \rput*(3.3,.7){\psline[linecolor=Orange](-.75cm,0)}
- \rput*[l](3.3,.7){\small RK ordre 4 $h=1$}
- \rput*(3.3,.6){\psline[linecolor=red](-.75cm,0)}
- \rput*[l](3.3,.6){\small RK ordre 4 $h=0{,}2$}
- \rput*(3.3,.5){\psline[linecolor=green](-.75cm,0)}
- \rput*[l](3.3,.5){\small solution exacte}
-\end{pspicture}
\end{lstlisting}
-
-\begin{center}
-\bgroup
-\def\Funct{neg}\def\FunctAlg{-y[0]}
-\psset{xunit=1.5, yunit=7}
-\begin{pspicture}(0,0)(10,1)\psgrid[subgriddiv=1]
- \psplot[linewidth=6\pslinewidth,linecolor=green]{0}{10}{Euler x neg exp}
- \psplotDiffEqn[linecolor=magenta,plotpoints=11]{0}{10}{1}{\Funct}
- \psplotDiffEqn[linecolor=blue,plotpoints=101,algebraic=true]{0}{10}{1}{\FunctAlg}
- \psplotDiffEqn[linecolor=Orange,method=rk4,plotpoints=11]{0}{10}{1}{\Funct}
- \psplotDiffEqn[linecolor=red,method=rk4,plotpoints=51]{0}{10}{1}{\Funct}
- \psset{linewidth=4\pslinewidth}
- \rput*(3.3,.9){\psline[linecolor=magenta](-.75cm,0)}
- \rput*[l](3.3,.9){\small Euler order 1 $h=1$}
- \rput*(3.3,.8){\psline[linecolor=blue](-.75cm,0)}
- \rput*[l](3.3,.8){\small Euler order 1 $h=0{,}1$}
- \rput*(3.3,.7){\psline[linecolor=Orange](-.75cm,0)}
- \rput*[l](3.3,.7){\small RK ordre 4 $h=1$}
- \rput*(3.3,.6){\psline[linecolor=red](-.75cm,0)}
- \rput*[l](3.3,.6){\small RK ordre 4 $h=0{,}2$}
- \rput*(3.3,.5){\psline[linecolor=green](-.75cm,0)}
- \rput*[l](3.3,.5){\small solution exacte}
-\end{pspicture}
-\egroup
-\end{center}
-
+\clearpage
%--------------------------------------------------------------------------------------
\subsubsection{$y'=\displaystyle\frac{2-ty}{4-t^2}$}% $
%--------------------------------------------------------------------------------------
@@ -4427,7 +5769,7 @@ The integrals of Fresnel :
-
+\clearpage
%--------------------------------------------------------------------------------------
\subsubsection{Lotka-Volterra}
%--------------------------------------------------------------------------------------
@@ -4697,112 +6039,8 @@ sub %% y' y'/-4-2y
\psplotDiffEqn[linecolor=black,algebraic=true]{0}{26}{5 0}{y[1]|-y[1]/4-2*y[0]}
\end{pspicture}
\end{lstlisting}
-%--------------------------------------------------------------------------------------
-\subsubsection{Gravitation example of second order}
-%--------------------------------------------------------------------------------------
-
-\[
-\left\{
-\begin{array}[m]{l}
- x''_1=\displaystyle\frac{M_2}{r^2}\cos(\theta)\\
- y''_1=\displaystyle\frac{M_2}{r^2}\sin(\theta)\\
- x''_2=\displaystyle\frac{M_1}{r^2}\cos(\theta)\\
- y''_2=\displaystyle\frac{M_1}{r^2}\sin(\theta)\\
-\end{array}
-\right.
-\mbox{ avec }
-\left\{
-\begin{array}[m]{l}
- r^2=(x_1-x_2)^2+(y_1-y_2)^2\\
- \cos(\theta)=\displaystyle\frac{(x_1-x_2)}{r}\\
- \sin(\theta)=\displaystyle\frac{(y_1-y_2)}{r}\\
-\end{array}
-\right.
-\mbox{
-\begin{pspicture}[shift=.5](5,4)\psset{arrowscale=2}
- \psframe[linewidth=.75\pslinewidth](5,4)
- \pstGeonode[PosAngle={-90,90}](1,1){M1}(4,3){M2}
- \pstHomO[HomCoef=.33, PointSymbol=none]{M1}{M2}{F1}
- \psline[arrows=->](M1)(F1)
- \pstHomO[HomCoef=.33, PointSymbol=none]{M2}{M1}{F2}
- \psline[arrows=->, arrowscale=2](M2)(F2)
- \pstGeonode[PointSymbol=none](M2|M1){A}
- \psline[linewidth=.5\pslinewidth](M1)(A)
- \pstMarkAngle{A}{M1}{M2}{$\theta$}
- \ncline[linewidth=.5\pslinewidth, offset=.5, arrows=<->]{M1}{M2}
- \ncput*{$r$}
-\end{pspicture}%
-}
-\]
-
-
-\begin{table}[htbp]
-\centering
- \caption{PostScript code for the gravitation examples}\label{intgravcode}
-\small\ttfamily
- \begin{tabularx}{\linewidth}{XX} \hline
- & x1 y1 x'1 y'1 x2 y2 x'2 y'2\\
- /yp2 exch def /xp2 exch def /ay2 exch def /ax2 exch def&mise en variables\\
- /yp1 exch def /xp1 exch def /ay1 exch def /ax1 exch def&mise en variables\\
- /ro2 ax2 ax1 sub dup mul ay2 ay1 sub dup mul add def&calcul de r*r\\
- xp1 yp1&\\
- ax2 ax1 sub ro2 sqrt div ro2 div&calcul de x''1\\
- ay2 ay1 sub ro2 sqrt div ro2 div&calcul de y''1\\
- xp2 yp2&\\
- 3 index -20 mul&calcul de x''2=-20x''1\\
- 3 index -20 mul&calcul de y''2=-20y''1\\\hline
- \end{tabularx}
-\end{table}
-
-\def\Grav{%
- /yp2 exch def /xp2 exch def /ay2 exch def /ax2 exch def
- /yp1 exch def /xp1 exch def /ay1 exch def /ax1 exch def
- /ro2 ax2 ax1 sub dup mul ay2 ay1 sub dup mul add def
- xp1 yp1
- ax2 ax1 sub ro2 sqrt div ro2 div
- ay2 ay1 sub ro2 sqrt div ro2 div
- xp2 yp2
- 3 index -20 mul
- 3 index -20 mul}
-\def\GravAlg{%
- y[2]|y[3]|%
- (y[4]-y[0])/((y[4]-y[0])^2+(y[5]-y[1])^2)^1.5|%
- (y[5]-y[1])/((y[4]-y[0])^2+(y[5]-y[1])^2)^1.5|%
- y[6]|y[7]|%
- 20*(y[0]-y[4])/((y[4]-y[0])^2+(y[5]-y[1])^2)^1.5|%
- 20*(y[1]-y[5])/((y[4]-y[0])^2+(y[5]-y[1])^2)^1.5}
- %% 0 1 2 3 4 5 6 7
- %% x1 y1 x'1 y'1 x2 y2 x'2 y'2
-\def\InitCond{ 1 1 .1 0 -1 -1 -2 0}
-
-\begin{LTXexample}[pos=t,preset=\centering]
-\begin{pspicture}(-3,-2.5)(2,2.25)
- \psgrid[subgriddiv=0,gridcolor=lightgray,linewidth=1.5pt]
- \psset{method=rk4,plotpoints=200,whichord=1}
- \psplotDiffEqn[whichabs=0,linecolor=blue]{0}{8}{\InitCond}{\Grav}
- \psplotDiffEqn[whichabs=4,whichord=5,linecolor=red]{0}{8}{\InitCond}{\Grav}
- \psplotDiffEqn[whichabs=4,linecolor=Orange,algebraic]{0}{8}{\InitCond}{\GravAlg}
- \psplotDiffEqn[whichabs=0,whichord=1,linecolor=yellow,algebraic]{0}{8}{\InitCond}{\GravAlg}
-\end{pspicture}
-\end{LTXexample}
-
-\begin{LTXexample}[pos=t,preset=\centering]
-\begin{pspicture}(-4,-2.5)(1,1.25)
- \psgrid[subgriddiv=0,gridcolor=lightgray]
- \psplotDiffEqn[linecolor=red,method=rk4,plotpoints=200,linewidth=1.5pt,%
- plotfuncx=y dup 4 get exch 0 get sub,
- plotfuncy=dup 5 get exch 1 get sub ]{0}{8}{\InitCond}{\Grav}
-\end{pspicture}
-\end{LTXexample}
-\begin{LTXexample}[pos=t,preset=\centering]
-\begin{pspicture}(0,-0.5)(8,8)
- \psset{yunit=0.8,method=rk4,plotpoints=200,linewidth=1.5pt}
- \psgrid[subgriddiv=0,gridcolor=lightgray](8,9)
- \psplotDiffEqn[linecolor=red,plotfuncy=dup 6 get dup mul exch 7 get dup mul add sqrt]{0}{8}{\InitCond}{\Grav}
- \psplotDiffEqn[linecolor=blue,plotfuncy=dup 2 get dup mul exch 3 get dup mul add sqrt]{0}{8}{\InitCond}{\Grav}
-\end{pspicture}
-\end{LTXexample}
+\iffalse
\newpage
%--------------------------------------------------------------------------------------
@@ -4886,12 +6124,128 @@ est remarquable.
\end{pspicture}
\end{LTXexample}
+\fi
+
+
+%--------------------------------------------------------------------------------------
+\subsection{\CMD{psMatrixPlot}}
+%--------------------------------------------------------------------------------------
+\begin{filecontents}{matrix.dat}
+/dotmatrix [ %
+0 1 1 0 0 0 0 1 1 1
+0 1 1 0 1 1 1 0 1 0
+1 0 1 1 0 0 0 1 1 0
+0 0 1 0 0 0 0 0 1 1
+1 1 1 1 1 0 1 0 0 1
+0 0 1 1 0 1 0 1 1 1
+1 0 0 0 1 1 0 0 0 1
+0 0 0 1 1 1 0 1 1 0
+1 1 0 0 0 0 1 0 0 1
+1 0 1 0 0 1 1 1 0 0
+] def
+\end{filecontents}
+
+
+This macro allows to visualize a matrix. The datafile must be defined as a PostScript matrix
+named \verb+/dotmatrix+:
+\begin{verbatim}
+/dotmatrix [ % <------------ important line
+0 1 1 0 0 0 0 1 1 1
+0 1 1 0 1 1 1 0 1 0
+1 0 1 1 0 0 0 1 1 0
+0 0 1 0 0 0 0 0 1 1
+1 1 1 1 1 0 1 0 0 1
+0 0 1 1 0 1 0 1 1 1
+1 0 0 0 1 1 0 0 0 1
+0 0 0 1 1 1 0 1 1 0
+1 1 0 0 0 0 1 0 0 1
+1 0 1 0 0 1 1 1 0 0
+] def % <------------ important line
+\end{verbatim}
+
+Important is only the value 0, in this case there happens nothing and for all other
+cases a dot is printed. The syntax of the macro is:
+\begin{verbatim}
+ \psMatrixPlot[options]{rows}{columns}{data file}
+\end{verbatim}
+
+The matrix is scanned line by line from the the first one to the last. In general it
+looks vice versa than the above listed matrix, the first row $0\,1\,1\,0\,0\,0\,0\,1\,1\,1$
+is the first plotted line ($y=1$). With the option \verb+ChangeOrder=true+ it looks exactly like
+the above view.
+
+\bgroup
+\begin{center}
+%\begin{LTXexample}[pos=t,preset=\centering]
+\begin{pspicture}(-0.5,-0.75)(11,11)
+ \psaxes{->}(11,11)
+ \psMatrixPlot[dotsize=1.1cm,dotstyle=square*,linecolor=magenta]%
+ {10}{10}{matrix.dat}
+ \psMatrixPlot[dotsize=.5cm,dotstyle=o,ChangeOrder]{10}{10}{matrix.dat}
+\end{pspicture}
+%\end{LTXexample}
+
+\begin{lstlisting}
+\begin{pspicture}(-0.5,-0.75)(11,11)
+ \psaxes{->}(11,11)
+ \psMatrixPlot[dotsize=1.1cm,dotstyle=square*,linecolor=magenta]%
+ {10}{10}{matrix.dat}
+ \psMatrixPlot[dotsize=.5cm,dotstyle=o,ChangeOrder]{10}{10}{matrix.dat}
+\end{pspicture}
+\end{lstlisting}
+
+\begin{LTXexample}[pos=t,preset=\centering]
+\begin{pspicture}(-0.5,-0.75)(11,11)
+ \psaxes{->}(11,11)
+ \psMatrixPlot[dotscale=3,dotstyle=*,linecolor=blue]{10}{8}{matrix.dat}
+\end{pspicture}
+\end{LTXexample}
+\end{center}
+\egroup
+
+
+%--------------------------------------------------------------------------------------
+\subsection{PostScript}
+%--------------------------------------------------------------------------------------
+
+PostScript uses the stack system and the LIFO system, "'Last In, First Out"`.
+
+\newlength{\Li}\settowidth{\Li}{Function}
+\begin{table}[htbp]
+ \begin{center}{\ttfamily
+ \begin{tabular}{|l|r@{ $\rightarrow$ }l|}\hline
+ \multirow{2}{\Li}{\normalfont Function}&\multicolumn{2}{c|}{\normalfont Meaning}\\
+ &\normalfont on stack before & \normalfont after\\\hline\hline
+ add&$x\quad y$&$x+y$\\\hline
+ sub&$x\quad y$&$x-y$\\\hline
+ mul&$x\quad y$&$x\times y$\\\hline
+ div&$x\quad y$&$x\div y$\\\hline
+ sqrt&$x$&$\sqrt{x}$\\\hline
+ abs&$x$&$|x|$\\\hline
+ neg&$x$&$-x$\\\hline
+ cos&$x$&$\cos(x)$ ($x$ in degrees)\\\hline
+ sin&$x$&$\sin(x)$ ($x$ in degrees)\\\hline
+ tan&$x$&$\tan(x)$ ($x$ in degrees)\\\hline
+ atan&$y\quad x$&$\angle{(\vec{Ox};\vec{OM})}$ (in degrees of $M(x,y)$)\\\hline
+ ln&$x$&$\ln(x)$\\\hline
+ log&$x$&$\log(x)$\\\hline
+ array&$n$&\normalfont$v$ (of dimension $n$)\\\hline
+ aload&$v$&$x_1\quad x_2\quad \cdots\quad x_n\quad v$\\\hline
+ astore&$x_1\quad x_2\quad \cdots\quad x_n\quad v$&$v$\\\hline
+ pop&$x$&\\\hline
+ dup&$x\quad x$&\\\hline
+ roll&$x_1\quad x_2\quad \cdots\quad x_n\quad n p$&\\\hline
+ \end{tabular}}
+ \caption{Some primitive PostScript macros}\label{tab:primpost}
+ \end{center}
+\end{table}
+
%--------------------------------------------------------------------------------------
-\subsection{\CMD{resetOptions}}
+\section{\CMD{resetOptions}}
%--------------------------------------------------------------------------------------
-Sometimes it is difficult to know what options which are changed inside a long document
+Sometimes it is difficult to know what options, which are changed inside a long document,
are different to the default one. With this
macro all options depending to \verb+pst-plot+ can be reset. This depends to all
options of the packages \verb+pstricks+, \verb+pst-plot+ and \verb+pst-node+.
@@ -4906,20 +6260,22 @@ options of the packages \verb+pstricks+, \verb+pst-plot+ and \verb+pst-node+.
{Denis Girou | }
{Peter Hutnick | }
{Christophe Jorssen | }
+{Uwe Kern | }
{Manuel Luque | }
{Jens-Uwe Morawski |}
{Tobias N\"ahring |}
{Rolf Niepraschk |}
-{Dominique Rodriguez |}
{Arnaud Schmittbuhl |}
{Timothy Van Zandt}
\nocite{*}
+\bgroup
+\raggedright
\bibliographystyle{plain}
-\bibliography{pstricks}
-
+\bibliography{pstricks-add-doc}
+\egroup
%--------------------------------------------------------------------------------------
\section{Change log}
@@ -4931,3 +6287,5 @@ See file Changes
%\section{The code}
%\lstinputlisting{pstricks-add.tex}
+
+