summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex')
-rw-r--r--Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex129
1 files changed, 122 insertions, 7 deletions
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 6d472d25700..3f8824f1758 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
@@ -612,6 +612,7 @@ or \verb|t| (top), where the default is \verb|c|, the center of the object.
\end{LTXexample}
+\clearpage
It is also possible to put a vertical brace around a default paragraph. This works
with setting two invisible nodes at the beginning and the end of the paragraph.
Inentation is possible with a minipage.
@@ -3523,7 +3524,8 @@ The following constants are are defined in the package:
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}|.
+For \textbf{all} following examples in this section we did a
+global\\ \lstinline[frame=single]|\psset{trigLabels=true,labelFontSize=\small}|.
@@ -3880,7 +3882,8 @@ some nonsense in this line ���time forcex forcey
%--------------------------------------------------------------------------------------
By default the plot macros \verb|\dataplot|, \verb|\fileplot| and \verb|\listplot| plot every
data record. The package \verb|pst-plot-add| defines additional keys \verb|nStep, nStart, nEnd| and \verb|xStep, xStart, xEnd|, which allows
-to plot only a selected part of the data records, e.g. \verb|nStep=10|. These "n" options mark the number of the record to be plot ($0,1,2,...$) and the "x" ones the x-values of the data records.
+to plot only a selected part of the data records, e.g. \verb|nStep=10|. These "`n"'
+options mark the number of the record to be plot ($0,1,2,...$) and the "`x"' ones the x-values of the data records.
\begin{center}
@@ -3896,7 +3899,8 @@ Name & Default setting\\\hline
\verb|xStep| & \verb|0|\\
\verb|plotNo| & \verb|1|\\
\verb|plotNoMax| & \verb|1|\\
-\verb|ChangeOrder| & \verb|false|
+\verb|ChangeOrder| & \verb|false|\\
+(\verb+plotstyle+)& \verb+line+
\end{tabular}
\end{center}
@@ -4114,6 +4118,7 @@ without any modification to the data file:
\end{pspicture}
\end{LTXexample}
+\clearpage
%--------------------------------------------------------------------------------------
@@ -4132,6 +4137,7 @@ the values are used in a reverse order:
7 3.5 5
10 2 9
\end{filecontents*}
+\psset{lly=-.5cm}
\begin{psgraph}[axesstyle=frame,ticklinestyle=dotted,ticksize=0 10](0,0)(10,10){4in}{2in}%
\readdata{\data}{test.dat}%
\pscustom[fillstyle=solid,fillcolor=gray]{%
@@ -4141,8 +4147,117 @@ the values are used in a reverse order:
\end{LTXexample}
+\clearpage
+%--------------------------------------------------------------------------------------
+\subsubsection{Example for \texttt{plotstyle}}
+%--------------------------------------------------------------------------------------
+The \verb+plotstyle+ option is defined in the package \verb+pst-plot+, but its value
+\verb+LSM+ (\textbf{L}east \textbf{S}quare \textbf{Method}) is only valid for the
+\verb+pstricks-add+ package. Instead of plotting the data records as dots or a line,
+the \verb+listplot+ macro calculates the values for a line $y=v\cdot x+u$ which fits
+best all data records.
+
+\bgroup
+\centering
+\begin{filecontents*}{LSM.dat}
+0 1 1 3 2.8 4 3 2.9 2 5 4 4 5 5.5 6 8.2 8 7
+\end{filecontents*}
+\psset{lly=-.5cm}
+\readdata{\data}{LSM.dat}
+\begin{psgraph}[arrows=->](0,0)(0,0)(8,8){.5\textwidth}{!}
+ \listplot[plotstyle=dots]{\data}
+ \listplot[plotstyle=LSM,linecolor=red]{\data}
+\end{psgraph}
+\egroup
+
+
+\begin{lstlisting}
+\begin{filecontents*}{LSM.dat}
+0 1 1 3 2.8 4 3 2.9 2 5 4 4 5 5.5 6 8.2 8 7
+\end{filecontents*}
+\psset{lly=-.5cm}
+\readdata{\data}{LSM.dat}
+\begin{psgraph}[arrows=->](0,0)(0,0)(8,8){.5\textwidth}{!}
+ \listplot[plotstyle=dots]{\data}
+ \listplot[§\ON§plotstyle§\OFF§=§\ON§LSM§\OFF§,linecolor=red]{\data}
+\end{psgraph}
+\end{lstlisting}
+
+
+The macro looks for the lowest and biggest x-value and draws the line for this interval.
+It is possible to pass another values to the macro by setting the \verb+xStart+ and/or
+\verb+xEnd+ options. They are preset with an empty value \verb+{}+.
+
+\bgroup
+\centering
+\begin{filecontents*}{LSM.dat}
+0 1 1 3 2.8 4 3 2.9 2 5 4 4 5 5.5 6 8.2 8 7
+\end{filecontents*}
+\readdata{\data}{LSM.dat}
+\psset{lly=-1.75cm}
+\begin{psgraph}[arrows=->](0,0)(0,0)(8,8){.5\textwidth}{!}
+ \listplot[plotstyle=dots]{\data}
+ \listplot[PstDebug=1,plotstyle=LSM,xStart=-0.5,xEnd=8.5,linecolor=red]{\data}
+\end{psgraph}
+\egroup
+
+\begin{lstlisting}
+\begin{filecontents*}{LSM.dat}
+0 1 1 3 2.8 4 3 2.9 2 5 4 4 5 5.5 6 8.2 8 7
+\end{filecontents*}
+\readdata{\data}{LSM.dat}
+\psset{lly=-1.75cm}
+\begin{psgraph}[arrows=->](0,0)(0,0)(8,8){.5\textwidth}{!}
+ \listplot[plotstyle=dots]{\data}
+ \listplot[§\ON§PstDebug§\OFF§=1,plotstyle=§\ON§LSM§\OFF§,§\ON§xStart§\OFF§=-0.5,§\ON§xEnd§\OFF§=8.5,linecolor=red]{\data}
+\end{psgraph}
+\end{lstlisting}
+
+
+With \verb+PstDebug=1+ one gets the equation $y=v\cdot x+u$ printed, beginning at
+the position (0|-50pt). This cannot be changed, because it is only for some kind
+of debugging. Pay attention for the correct \verb+xStart+- and \verb+xEnd+-values,
+when you use the \verb+\pstScalePoints+-Macro. In the following example we use an
+x-interval from 0 to 3 to plot the values; first we substract 0.003 from all x-values
+and then scale them with 10000. This is not taken into account for the \verb+xStart+-
+and \verb+xEnd+-values.
+\bgroup
+\centering
+\begin{filecontents*}{LSM.dat}
+0.003298697 1.397785583
+0.003193358 1.615489564
+0.003094538 2.044019006
+0.003001651 2.259240127
+\end{filecontents*}
+\readdata{\data}{LSM.dat}
+\pstScalePoints(10000,1){ 0.003 sub }{}
+\psset{lly=-1.75cm}
+\psgraph[arrows=->,Ox=0.0030,Dx=0.0001,dx=\psxunit](0,0)(3.2,3){10cm}{5cm}
+ \listplot[showpoints=true,linewidth=1pt,linecolor=blue]{\data}
+ \listplot[PstDebug=1,plotstyle=LSM,linewidth=0.1pt,linestyle=dashed,%
+ xStart=-0.25,xEnd=3.3]{\data}
+\endpsgraph
+\egroup
+
+\begin{lstlisting}
+\begin{filecontents*}{LSM.dat}
+0.003298697 1.397785583
+0.003193358 1.615489564
+0.003094538 2.044019006
+0.003001651 2.259240127
+\end{filecontents*}
+\readdata{\data}{LSM.dat}
+§\ON§\pstScalePoints§\OFF§(10000,1){ 0.003 sub }{}
+\psset{lly=-1.75cm}
+\psgraph[arrows=->,Ox=0.0030,Dx=0.0001,dx=\psxunit](0,0)(3.2,3){10cm}{5cm}
+ \listplot[showpoints=true,linewidth=1pt,linecolor=blue]{\data}
+ \listplot[PstDebug=1,plotstyle=§\ON§LSM§\OFF§,linewidth=0.1pt,linestyle=dashed,%
+ xStart=-0.25,xEnd=3.3]{\data}
+\endpsgraph
+\end{lstlisting}
+
%--------------------------------------------------------------------------------------
\section{Polar plots}
@@ -4337,10 +4452,10 @@ In the following example, the y unit gets the same value as the one for the x-ax
\begin{center}
\readdata{\data}{demo1.dat}
-\psset{xAxisLabel=x-Axes,yAxisLabel=y-Axes,llx=-.5cm,ury=0.5cm%
+\psset{xAxisLabel=x-Axes,yAxisLabel=y-Axes,llx=-.5cm,ury=0.5cm,
xAxisLabelPos={3cm,-1cm},yAxisLabelPos={-1.5cm,2.5cm}}
\pstScalePoints(1,0.00000001){}{}
-\begin{psgraph}[axesstyle=frame,xticksize=0 7.5,yticksize=0 25,subticksize=1,%
+\begin{psgraph}[axesstyle=frame,xticksize=0 7.5,yticksize=0 25,subticksize=1,
ylabelFactor={\cdot 10^8},Dx=5,Dy=1,xsubticks=2](0,0)(25,7.5){5.5cm}{5cm}
\listplot[linecolor=red, linewidth=2pt, showpoints=true]{\data}
\end{psgraph}
@@ -4348,10 +4463,10 @@ In the following example, the y unit gets the same value as the one for the x-ax
\begin{lstlisting}
\readdata{\data}{demo1.dat}
-\psset{§\ON§xAxisLabel§\OFF§=x-Axes,§\ON§yAxisLabel§\OFF§=y-Axes,llx=-.5cm,ury=0.5cm%
+\psset{§\ON§xAxisLabel§\OFF§=x-Axes,§\ON§yAxisLabel§\OFF§=y-Axes,llx=-.5cm,ury=0.5cm,
§\ON§xAxisLabelPos§\OFF§={3cm,-1cm},§\ON§yAxisLabelPos§\OFF§={-1.5cm,2.5cm}}
\pstScalePoints(1,0.00000001){}{}
-\begin{psgraph}[axesstyle=frame,xticksize=0 7.5,yticksize=0 25,subticksize=1,%
+\begin{psgraph}[axesstyle=frame,xticksize=0 7.5,yticksize=0 25,subticksize=1,
§\ON§ylabelFactor§\OFF§={\cdot 10^8},Dx=5,Dy=1,xsubticks=2](0,0)(25,7.5){5.5cm}{5cm}
\listplot[linecolor=red, linewidth=2pt, showpoints=true]{\data}
\end{psgraph}