diff options
Diffstat (limited to 'Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-base-plots.tex')
-rw-r--r-- | Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-base-plots.tex | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-base-plots.tex b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-base-plots.tex index 0ce8c0df587..89b51dffbad 100644 --- a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-base-plots.tex +++ b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-base-plots.tex @@ -18,7 +18,7 @@ This section describes the |plot| module. This module provides a set of commands that are intended to make it reasonably easy to plot functions using \pgfname. It is loaded automatically by |pgf|, but you can load it manually if you have - only included |pgfcore|. + only included |pgfcore|. \end{pgfmodule} @@ -32,7 +32,7 @@ for whatever reason -- you wish to use \pgfname\ for generating a plot. \pgfname\ (conceptually) uses a two-stage process for generating plots. First, a \emph{plot stream} must be produced. This stream -consists (more or less) of a large number of coordinates. Second a +consists (more or less) of a large number of coordinates. Second a \emph{plot handler} is applied to the stream. A plot handler ``does something'' with the stream. The standard handler will issue line-to operations to the coordinates in the stream. However, a @@ -118,7 +118,7 @@ file and converts it into a plot stream. \begin{codeexample}[code only] 2 -5 some text \end{codeexample} - is turned into + is turned into \begin{codeexample}[code only] \pgfplotstreampoint{\pgfpointxy{2}{-5}} \end{codeexample} @@ -128,7 +128,7 @@ file and converts it into a plot stream. either of them is empty and, hence, ignored. When the file has been read completely, |\pgfplotstreamend| is - called. + called. \end{command} @@ -158,10 +158,10 @@ Currently, there is no command that can decide automatically whether the xy-coordinate system should be used or whether the xyz-system should be used. However, it would not be terribly difficult to write a ``smart file reader'' that parses coordinate files a bit more -intelligently. +intelligently. -\begin{command}{\pgfplotfunction\marg{variable}\marg{sample list}\marg{point}} +\begin{command}{\pgfplotfunction\marg{variable}\marg{sample list}\marg{point}} This command will produce coordinates by iterating the \meta{variable} over all values in \meta{sample list}, which should be a list in the |\foreach| syntax. For each value of @@ -172,7 +172,7 @@ intelligently. \begin{tikzpicture}[x=3.8cm/360] \pgfplothandlerlineto \pgfplotfunction{\x}{0,5,...,360}{\pgfpointxy{\x}{sin(\x)+sin(3*\x)}} - \pgfusepath{stroke} + \pgfusepath{stroke} \end{tikzpicture} \end{codeexample} @@ -180,11 +180,11 @@ intelligently. \begin{tikzpicture}[y=3cm/360] \pgfplothandlerlineto \pgfplotfunction{\y}{0,5,...,360}{\pgfpointxyz{sin(2*\y)}{\y}{cos(2*\y)}} - \pgfusepath{stroke} + \pgfusepath{stroke} \end{tikzpicture} \end{codeexample} - Be warnded that if the expressions that need to evaluated for each + Be warned that if the expressions that need to evaluated for each point are complex, then this command can be very slow. \end{command} @@ -217,7 +217,7 @@ set terminal table; set output "#1.table"; set format "%.5f" Assuming that the call succeeded, the next step is to invoke |\pgfplotxyfile| on the file \meta{prefix}|.table|; which is exactly the file that has just been created by |gnuplot|. - + \begin{codeexample}[] \begin{tikzpicture} \draw[help lines] (0,-1) grid (4,1); @@ -284,7 +284,7 @@ macros: |\pgf@plotstreamstart|, |\pgf@plotstreampoint|, and \end{command} \begin{command}{\pgfsetmovetofirstplotpoint} - Specifies that the line-to plot handler (and also some other plot + Specifies that the line-to plot handler (and also some other plot handlers) should issue a move-to command for the first point of the plot instead of a line-to. This will start a new part of the current path, which is not always, but often, @@ -311,6 +311,11 @@ macros: |\pgf@plotstreamstart|, |\pgf@plotstreampoint|, and \end{codeexample} \end{command} +\begin{command}{\pgfplothandlerpolygon} + This handler works like the line-to plot handler, only the line is + closed at the end using |\pgfpathclose|, resulting in a polygon. +\end{command} + \begin{command}{\pgfplothandlerdiscard} This handler will simply throw away the stream. \end{command} @@ -322,7 +327,7 @@ macros: |\pgf@plotstreamstart|, |\pgf@plotstreampoint|, and commands that were issued on the stream. You can then install another handler and invoke \meta{macro} to ``replay'' the stream (possibly many times). - + \begin{codeexample}[] \begin{pgfpicture} \pgfplothandlerrecord{\mystream} @@ -338,10 +343,10 @@ macros: |\pgf@plotstreamstart|, |\pgf@plotstreampoint|, and \mystream \pgfusepath{stroke} \end{pgfpicture} -\end{codeexample} +\end{codeexample} \end{command} -%%% Local Variables: +%%% Local Variables: %%% mode: latex %%% TeX-master: "pgfmanual" -%%% End: +%%% End: |