summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/pst-plot/pst-plot-doc.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/generic/pst-plot/pst-plot-doc.tex')
-rw-r--r--Master/texmf-dist/doc/generic/pst-plot/pst-plot-doc.tex123
1 files changed, 121 insertions, 2 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-plot/pst-plot-doc.tex b/Master/texmf-dist/doc/generic/pst-plot/pst-plot-doc.tex
index 715e74c97c5..4fdbba4048b 100644
--- a/Master/texmf-dist/doc/generic/pst-plot/pst-plot-doc.tex
+++ b/Master/texmf-dist/doc/generic/pst-plot/pst-plot-doc.tex
@@ -1,4 +1,4 @@
-%% $Id: pst-plot-doc.tex 401 2010-10-21 07:34:02Z herbert $
+%% $Id: pst-plot-doc.tex 432 2010-12-14 08:01:58Z herbert $
\documentclass[11pt,english,BCOR10mm,DIV12,bibliography=totoc,parskip=false,smallheadings
headexclude,footexclude,oneside,dvipsnames,svgnames]{pst-doc}
\listfiles
@@ -473,10 +473,23 @@ An example with ticks on every side of the frame and filled areas:
\end{psgraph}
\end{lstlisting}
+\clearpage
+\subsection{Coordinates of the \nxLenv{psgraph} area}
+The coordinates of the calculated area are saved in the four macros \Lcs{psgraphLLx}, \Lcs{psgraphLLy}, \Lcs{psgraphURx}, and \Lcs{psgraphURy},
+which is LowerLeft, UpperLeft, LowerRight, and UpperRight. The values have no dimension but are saved in the current unit.
+\begin{LTXexample}[width=4cm]
+\psset{llx=-5mm,lly=-1cm}
+\begin{psgraph}[axesstyle=none,ticks=none](0,0)(3.0,9.0){4cm}{5cm}
+ \psdot[dotscale=2](\psgraphLLx,\psgraphLLy)
+ \psdot[dotscale=2](\psgraphLLx,\psgraphURy)
+ \psdot[dotscale=2](\psgraphURx,\psgraphLLy)
+ \psdot[dotscale=2](\psgraphURx,\psgraphURy)
+\end{psgraph}
+\end{LTXexample}
%-------------------------------------------------------------------------------------------
-\subsection{The new options for nxLenv{psgraph}}\label{psgraphoptions}
+\subsection{The new options for \nxLenv{psgraph}}\label{psgraphoptions}
%-------------------------------------------------------------------------------------------
\begin{center}
@@ -536,8 +549,114 @@ can be outside of the visible \Lenv{pspicture} environment.
}
\end{lstlisting}
+\subsection{The new macro \Lcs{pslegend} for \nxLenv{psgraph}}\label{pslegend}
+
+\begin{BDef}
+\Lcs{pslegend}\OptArg{Reference}\OptArg*{\Largr{xOffset,yOffset}}\Largb{Text}
+\end{BDef}
+
+The reference can be one of the \Lkeyval{lb}, \Lkeyval{lt}, \Lkeyval{rb}, or \Lkeyval{rt}, where the
+latter is the default. The values for \texttt{xOffset} and \texttt{yOffset} must be multiples of the unit pt.
+Without an offset the value of \Lcs{pslabelsep} are used.
+The legend has to be defined \emph{before} the environment \Lenv{psgraph}.
+
+\medskip
+\begin{center}
+\readdata{\data}{demo2.data}%
+\readdata{\dataII}{demo3.data}%
+\psset{llx=-1cm,lly=-1.25cm,urx=0.5cm,ury=0.1in,xAxisLabel=Year,%
+ yAxisLabel=Whatever,xAxisLabelPos={c,-0.4in},%
+ yAxisLabelPos={-0.4in,c}}
+\pstScalePoints(1,1){1989 sub}{}
+\pslegend[lt]{\red\rule[1ex]{2em}{1pt} & Data I\\
+ \blue\rule[1ex]{2em}{1pt} & Data II\\
+ \cyan\rule[1ex]{2em}{1pt} & Data III}
+\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{center}
+
+
+\begin{lstlisting}
+\readdata{\data}{demo2.data}%
+\readdata{\dataII}{demo3.data}%
+\psset{llx=-1cm,lly=-1.25cm,urx=0.5cm,ury=0.1in,xAxisLabel=Year,%
+ yAxisLabel=Whatever,xAxisLabelPos={c,-0.4in},%
+ yAxisLabelPos={-0.4in,c}}
+\pstScalePoints(1,1){1989 sub}{}
+\pslegend[lt]{\red\rule[1ex]{2em}{1pt} & Data I\\
+ \blue\rule[1ex]{2em}{1pt} & Data II\\
+ \cyan\rule[1ex]{2em}{1pt} & Data III}
+\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}
+
+\begin{compactitem}
+\item \Lcs{pslegend} uses the commands \Lcs{tabular} and \Lcs{endtabular}, which are only available
+ when running \LaTeX. With \TeX\ you have to redefine the macro \Lcs{pslegend@ii}:
+\begin{lstlisting}
+\def\pslegend@ii[#1](#2){\rput[#1](!#2){\psframebox[style=legendstyle]{%
+ \footnotesize\tabcolsep=2pt%
+ \tabular[t]{@{}ll@{}}\pslegend@text\endtabular}}\gdef\pslegend@text{}}
+\end{lstlisting}
+\item The fontsize can be changed locally for each cell or globally, when also redefining the
+ macro \Lcs{pslegend@ii}.
+\item If you want to use more than two columns for the table or a shadow box, then redefine \Lcs{pslegend@ii}.
+\end{compactitem}
+
+The macro \Lcs{psframebox} uses the style \Lkeyval{legendstyle} which is preset to \Lkeyset{fillstyle=solid},
+\Lkeyset{fillcolor=white}, and \nxLkeyword{linewidth=0.5pt} and can be redefined by
+
+\begin{lstlisting}
+\newpsstyle{legendstyle}{fillstyle=solid,fillcolor=red!20,shadow=true}
+\end{lstlisting}
+
+\medskip
+\begin{center}
+\readdata{\data}{demo2.data}%
+\readdata{\dataII}{demo3.data}%
+\psset{llx=-1cm,lly=-1.25cm,urx=0.5cm,ury=0.1in,xAxisLabel=Year,%
+ yAxisLabel=Whatever,xAxisLabelPos={c,-0.4in},%
+ yAxisLabelPos={-0.4in,c}}
+\newpsstyle{legendstyle}{fillstyle=solid,fillcolor=red!20,shadow=true}
+\pstScalePoints(1,1){1989 sub}{}
+\pslegend[lt](10,10){\red\rule[1ex]{2em}{1pt} & Data I\\
+ \blue\rule[1ex]{2em}{1pt} & Data II\\
+ \cyan\rule[1ex]{2em}{1pt} & Data III}
+\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{center}
+
+
+\begin{lstlisting}
+\readdata{\data}{demo2.data}%
+\readdata{\dataII}{demo3.data}%
+\psset{llx=-1cm,lly=-1.25cm,urx=0.5cm,ury=0.1in,xAxisLabel=Year,%
+ yAxisLabel=Whatever,xAxisLabelPos={c,-0.4in},%
+ yAxisLabelPos={-0.4in,c}}
+\pstScalePoints(1,1){1989 sub}{}
+\newpsstyle{legendstyle}{fillstyle=solid,fillcolor=red!20,shadow=true}
+\pslegend[lt](10,10){\red\rule[1ex]{2em}{1pt} & Data I\\
+ \blue\rule[1ex]{2em}{1pt} & Data II\\
+ \cyan\rule[1ex]{2em}{1pt} & Data III}
+\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}
+
+\clearpage%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\nxLcs{psxTick} and \nxLcs{psyTick}}
Single ticks with labels on an axis can be set with the two