summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.2dplots.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.2dplots.tex')
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.2dplots.tex534
1 files changed, 505 insertions, 29 deletions
diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.2dplots.tex b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.2dplots.tex
index 1eccd01e5c9..442fd0f6076 100644
--- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.2dplots.tex
+++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.2dplots.tex
@@ -1,6 +1,8 @@
\subsection{Two Dimensional Plot Types}
-\PGFPlots\ supports several two-dimensional line-plots like piecewise linear line plots, piecewise constant plots, smoothed plots, bar plots and comb plots. Most of them use the \PGF\ plot handler library directly, see \cite[section 18.8]{tikz}.
+{
+\tikzset{external/figure name/.add={}{twodim_}}%
+\PGFPlots\ supports several two-dimensional line plots like piecewise linear line plots, piecewise constant plots, smoothed plots, bar plots and comb plots. Most of them use the \PGF\ plot handler library directly, see \cite[section 18.8]{tikz}.
Plot types are part of the plot style, so they are set with options. Most of the basic 2d plot types are part of \Tikz, see \cite[section 18.8]{tikz}, and are probably known to users of \Tikz. They are documented here as well.
@@ -72,7 +74,7 @@ An alias for `|const plot|'.
\end{plottype}
\begin{plottype}{const plot mark right}
- A variant which places marks on the right of each line segment, causing plots to be left-sided continuous at coordinates.
+ A variant which places marks on the right of each line segment, causing plots to be left-sided continuous at the given coordinates.
\begin{codeexample}[]
\begin{tikzpicture}
\begin{axis}
@@ -142,13 +144,48 @@ coordinates
\end{codeexample}
Here |xbar| yields |/pgfplots/xbar| because it is an argument to the axis, not to a single plot.
- Besides line-, fill- and colorstyles, bars can be configured with |bar width| and |bar shift|, see below.
+ For bar plots, it is quite common to provide textual coordinates or even descriptive nodes near the bars.
+ This can be realized using the |symbolix y coords| and |nodes near coords| keys, respectively:
+\begin{codeexample}[]
+\begin{tikzpicture}
+ \begin{axis}[
+ xbar, xmin=0,
+ width=12cm, height=3.5cm, enlarge y limits=0.5,
+ xlabel={\#participants},
+ symbolic y coords={no,yes},
+ ytick=data,
+ nodes near coords, nodes near coords align={horizontal},
+ ]
+ \addplot coordinates {(3,no) (7,yes)};
+ \end{axis}
+\end{tikzpicture}
+\end{codeexample}
+ The |symbolic y coords| defines a dictionary of accepted coordinates which are then expected in $y$ coordinates and the |nodes near coords| key displays values as extra nodes (see their reference documentations for details). The example employs |enlarge y limits| in order to get some more free space since the default spacing is not always appropriate for bar plots.
+
+ Note that it might be quite important to include |xmin=0| explicitly as in the example above. Without it, the lower bound will be used:
+\begin{codeexample}[]
+\begin{tikzpicture}
+ \begin{axis}[
+ title=Uses lowest $x$ coords for xmin,
+ xbar,
+ width=12cm, height=3.5cm, enlarge y limits=0.5,
+ xlabel={\#participants},
+ symbolic y coords={no,yes},
+ ytick=data,
+ nodes near coords, nodes near coords align={horizontal},
+ ]
+ \addplot coordinates {(1,no) (9,yes)};
+ \end{axis}
+\end{tikzpicture}
+\end{codeexample}
+
+ Besides line, fill, and colorstyles, bars can be configured with |bar width| and |bar shift|, see below.
\end{plottype}
\begin{stylekey}{/pgfplots/xbar=\marg{shift for multiple plots} (default 2pt)}
This style sets |/tikz/xbar| \emph{and} some commonly used options concerning horizontal bars for the complete axis. This is automatically done if you provide |xbar| as argument to an axis argument, see above.
-The |xbar| style defines shifts if multiple plots are placed into one axis. It draws bars adjacent to each other, separated by \marg{shift for multiple plots}. Furthermore, it sets the style |bar cycle list| and sets tick and legend appearance options.
+The |xbar| style defines shifts if multiple plots are placed into one axis. It draws bars adjacent to each other, separated by \meta{shift for multiple plots}. Furthermore, it sets the style |bar cycle list| and sets tick and legend appearance options.
The style is defined as follows.
\begin{codeexample}[code only]
@@ -168,7 +205,7 @@ The style is defined as follows.
},
}
\end{codeexample}
-The formular for |bar shift| assigns shifts dependent on the total number of plots and the current plot's number. It is designed to fill a total width of $n \cdot $|bar width|$ + (n-1) \cdot $\marg{shift for multiple plots}. The $0.5$ compensates for centering.
+The formula for |bar shift| assigns shifts dependent on the total number of plots and the current plot's number. It is designed to fill a total width of $n \cdot $|bar width|$ + (n-1) \cdot $\meta{shift for multiple plots}. The $0.5$ compensates for centering.
\end{stylekey}
\begin{plottype}{ybar}
@@ -183,7 +220,7 @@ The formular for |bar shift| assigns shifts dependent on the total number of plo
\end{codeexample}
The example above simply changes how input coordinates shall be visualized. As mentioned for |xbar|, one usually needs modified legends and shifts for multiple bars in the same axis.
- There is a predefined style which installs these customizations when provided to the axis-environment:
+ There is a predefined style which installs these customizations when provided to the axis environment:
\begin{codeexample}[]
\begin{tikzpicture}
\begin{axis}[
@@ -216,7 +253,29 @@ The formular for |bar shift| assigns shifts dependent on the total number of plo
\end{axis}
\end{tikzpicture}
\end{codeexample}
-Here |ybar| yields |/pgfplots/ybar| because it is an argument to the axis, not to a single plot. The style affects the first three |\addplot| commands. Note that it shifts them horizontally around the plot coordinates. The fourth |\addplot| command is some kind of annotation which doesn't |update limits|.
+Here, |ybar| yields |/pgfplots/ybar| because it is an argument to the axis, not to a single plot. The style affects the first three |\addplot| commands. Note that it shifts them horizontally around the plot coordinates. The fourth |\addplot| command is some kind of annotation which doesn't |update limits|.
+
+ The |ybar| style can be combined with |symbolic x coords| in a similar way as described for |xbar|:
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{axis}[
+ ybar,
+ enlargelimits=0.15,
+ legend style={at={(0.5,-0.15)},
+ anchor=north,legend columns=-1},
+ ylabel={\#participants},
+ symbolic x coords={tool8,tool9,tool10},
+ xtick=data,
+ nodes near coords,
+ nodes near coords align={vertical},
+ ]
+\addplot coordinates {(tool8,7) (tool9,9) (tool10,4)};
+\addplot coordinates {(tool8,4) (tool9,4) (tool10,4)};
+\addplot coordinates {(tool8,1) (tool9,1) (tool10,1)};
+\legend{used,understood,not understood}
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
As for |xbar|, the bar width and shift can be configured with |bar width| and |bar shift|. However, the bar shift is better provided as argument to |/pgfplots/ybar| since this style will overwrite the bar shift. Thus, prefer |/pgfplots/ybar=4pt| to set the bar shift.
@@ -247,6 +306,28 @@ Here |ybar| yields |/pgfplots/ybar| because it is an argument to the axis, not t
\end{axis}
\end{tikzpicture}
\end{codeexample}
+
+ Any support style changes are possible, of course. A useful example for bar plots might be to use rotated tick labels:
+\begin{codeexample}[]
+\begin{tikzpicture}
+ \begin{axis}[
+ ybar,
+ enlargelimits=0.15,
+ legend style={at={(0.5,-0.2)},
+ anchor=north,legend columns=-1},
+ ylabel={\#participants},
+ symbolic x coords={excellent,good,neutral,%
+ not good,poor},
+ xtick=data,
+ nodes near coords,
+ nodes near coords align={vertical},
+ x tick label style={rotate=45,anchor=east},
+ ]
+ \addplot coordinates {(excellent,0) (good,8)
+ (neutral,2) (not good,0) (poor,0)};
+ \end{axis}
+\end{tikzpicture}
+\end{codeexample}
\end{plottype}
\begin{stylekey}{/pgfplots/ybar=\marg{shift for multiple plots} (default 2pt)}
@@ -254,7 +335,7 @@ Here |ybar| yields |/pgfplots/ybar| because it is an argument to the axis, not t
If you supply |ybar| to an axis environment, |/pgfplots/ybar| will be chosen instead of |/tikz/ybar|.
- It changes the legend, draws ticks outside of the axis lines and draws multiple |\addplot| arguments adjacent to each other; block--centered at the $x$ coordinate and separated by \marg{shift for multiple plots}. It will also install the |bar shift| for |every node near coord|. Furthermore, it installs the style |bar cycle list|. It is defined similarly to |/pgfplots/xbar|.
+ It changes the legend, draws ticks outside of the axis lines and draws multiple |\addplot| arguments adjacent to each other; block--centered at the $x$ coordinate and separated by \meta{shift for multiple plots}. It will also install the |bar shift| for |every node near coord|. Furthermore, it installs the style |bar cycle list|. It is defined similarly to |/pgfplots/xbar|.
\end{stylekey}
\begin{pgfplotskey}{bar cycle list}
@@ -378,9 +459,200 @@ Here |ybar| yields |/pgfplots/ybar| because it is an argument to the axis, not t
\end{stylekey}
\begin{pgfplotsxykey}{\x ticklabel interval boundaries}
- These are style keys which set |x tick label as interval| (see page~\pageref{key:pgfplots:ticklabelasinterval} for details) and configure the tick appearance to be \marg{start} -- \marg{end} for each tick interval.
+ These are style keys which set |x tick label as interval| (see page~\pageref{key:pgfplots:ticklabelasinterval} for details) and configure the tick appearance to be \meta{start} -- \meta{end} for each tick interval.
\end{pgfplotsxykey}
+\subsubsection{Histograms}
+\begin{plottype}[/pgfplots]{hist=\textcolor{black}{\normalfont\marg{options with {\normalfont\texttt{hist/}} prefix}}}
+ A histogram plot takes one-dimensional input data and counts the occurrence of values: it determines the data range $[\underline m,\overline m]$ and subdivides it into $N$ equally sized bins with $(N+1)$ end--points. Then, it counts the number of points falling into each bin. More precisely, it computes the $N+1$ points $\underline m =: x_0 < x_1 < \dotsb < x_N := \overline m$ using $x_i := \underline m + i \cdot (\overline m - \underline m)/N$. Then, it creates the $N+1$ coordinates $(x_i, y_i)$, $i=0,\dotsc,N-1$ by means of
+ \[
+ y_i :=
+ \begin{cases}
+ \text{bincount}\bigl([x_i,x_{i+1})\bigr)\Bigr) & i<N\\
+ y_{N-1} & i = N,
+\end{cases}
+ \]
+ i.e.\ the value of the last coordinate is replicated.
+ This set of $(N+1)$ interval boundaries is then visualized by an |ybar interval| plot handler.
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{axis}[
+ ybar interval,
+ xticklabel=
+\pgfmathprintnumber\tick--\pgfmathprintnumber\nexttick
+]
+ \addplot+[hist={bins=3}]
+ table[row sep=\\,y index=0] {
+ data\\
+ 1\\ 2\\ 1\\ 5\\ 4\\ 10\\
+ 7\\ 10\\ 9\\ 8\\ 9\\ 9\\
+ };
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
+ We see that |hist={bins=3}| takes a table with one column as input. The data values fall into the range $[1,10]$ which is partitioned into~$3$ intervals (of equal lengths). Finally, the number of points falling into each of the three bins is plotted. The |xticklabel| key shows the range (note that it works only in conjunction with |x tick label as interval| which has been enabled by |ybar interval| before). We see that there are $3$ elements in the range $[1,4)$, $2$~elements in the range $[4,7)$ and finally $7$ elements in the range $[7,10]$.
+
+ The bins are half--open intervals, i.e.\ the end--point does not belong to the bin. Only the last bin contains its right end point.
+\pgfplotsexpensiveexample
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{axis}[
+ ybar interval,
+ xtick=,% reset from ybar interval
+ xticklabel=
+ {$[\pgfmathprintnumber\tick,%
+ \pgfmathprintnumber\nexttick)$}
+]
+% a data file containing 8000 normally distributed
+% random numbers of mean 0 and variance 1
+\addplot+[hist={data=x}]
+ file {plotdata/pgfplots.randn.dat};
+
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
+
+ The |hist| plot type can be combined with \verbpdfref{plot expression} as well: provide the usual \meta{expression} as you would for a line plot. Then, configure the value for |data=|\meta{expression} in dependence of |x|, |y|, or |z|:
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{axis}[
+ tiny,
+ height=4cm,width=12cm,
+ ybar interval,
+ ymin=0,
+ xmin=0,xmax=1,
+ axis on top,
+ extra x ticks={0,1},
+ extra x tick style={
+ grid=none,
+ x tick label as interval=false,
+ xticklabel=$\pgfmathprintnumber\tick$
+ },
+ xticklabel={$[\pgfmathprintnumber[fixed]\tick,\cdot)$}
+]
+ \addplot+[samples=200,hist] {rnd};
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
+ \noindent The example uses the |rnd| method of \pgfname\ which defines |y| to contain uniform random numbers in the range $[0,1]$. Then, it configures |hist|. Note that |hist| has the default |data=y| such that it uses the |y| coordinate as input. Note furthermore that the |x| value is effectively ignored here. The options after |\begin{axis}[...]| are mainly to scale the graphics and to insert the right limits. The |extra x ticks| method is inserted to demonstrate how to add further tick marks without affecting the overall layout. Note that the |extra x tick style| sets |x tick label as interval=false| to disable the special tick handling which is active for the rest of the plot.
+
+ The following keys configure |hist|. If they are provided inside of \meta{options}, the common key prefix |hist/| can be omitted.
+
+ \begin{pgfplotskey}{hist/data=\marg{expression} (initially y)}
+ Tells |hist| how to get its data. The common idea is to provide a mathematical \meta{expression} which depends on data supplied by the |\addplot| statement. For example, if you have |\addplot expression|, the \meta{expression} may depend upon |x|, |y| or |z|. In case of an |\addplot table| input routine, the \meta{expression} can employ |\thisrow|\marg{colname} to access the currently active table row in the designated column.
+
+ It is also possible to avoid invocations of the math parser. Use \declareandlabel{hist/data value}|=|\marg{value} instead to do so. Here, \meta{value} should be of a numeric constant.
+
+ The initial configuration employs what would usually become the final |y| coordinate as input (to be more precise, the initial value is |data value=\pgfkeysvalueof{/data point/y}|).
+ \end{pgfplotskey}
+
+ \begin{pgfplotskeylist}{%
+ hist/data min=\marg{min value} (initially /pgfplots/xmin),%
+ hist/data max=\marg{max value} (initially /pgfplots/xmax)}%
+ Allows to provide the min/max values (the $\underline m$ and $\overline m$) values manually.
+
+ If empty, these v (walues will be deduced from the input data range.
+
+ The resulting interval will be splitted into |hist/bins| intervals.
+
+ The initial configuration uses any provided data limits, i.e.\ the (natural) choices |hist/data min=||xmin| and |hist/data max=||xmax|.
+ \end{pgfplotskeylist}
+
+ \begin{pgfplotskey}{hist/bins=\marg{number of intervals} (initially 10)}
+ Specifies the number of intervals to use.
+ \end{pgfplotskey}
+
+ \begin{pgfplotskey}{hist/intervals=\marg{true,false} (initially true)}
+ If |intervals=true| (the initial configuration), |hist| will generate $N+1$ coordinates, with
+ \[ \underline m = x_0 < x_1 < \dotsb < x_{N} = \overline m \]
+ where $[\underline m,\overline m]$ is the data range. In this case, the data points for $x_{N-1}$ and $x_N$ will get the same value, namely the number of elements in the last bin. This is (only) useful in conjunction with |const plot| or |ybar interval|.
+
+ If |intervals=false|, the last data point will be omitted and exactly $N$ coordinates will be generated. In this case, the right end point is not returned explicitly.
+ \end{pgfplotskey}
+
+ \begin{pgfplotskey}{hist/cumulative=\marg{true,false} (initially false)}
+ Allows to compute a cumulative histogram.
+
+ A cumulative histogram uses the sum of all previous bins and the current one as final value.
+
+ Here is the example from above, this time with |hist/cumulative|:
+
+\pgfplotsexpensiveexample
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{axis}[
+ ybar interval,
+ xtick=,% reset from ybar interval
+ xticklabel=
+ {$[\pgfmathprintnumber\tick,
+ \pgfmathprintnumber\nexttick)$}
+]
+% a data file containing 8000 normally distributed
+% random numbers of mean 0 and variance 1
+\addplot+[hist={
+ data=x,
+ cumulative}]
+ file {plotdata/pgfplots.randn.dat};
+
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
+
+ \end{pgfplotskey}
+
+ \begin{stylekey}{/pgfplots/hist/handler (initially ybar interval)}
+ Allows to change the way the generated coordinates are visualized. The |hist/handler| key is a style, so use |hist/handler/.style={const plot}| to change it.
+ \end{stylekey}
+
+ \begin{pgfplotscodekey}{hist/data filter}
+ Allows to define coordinate filters, similar to the coordinate filter key |x filter| described in Section~\ref{sec:filters}. The argument |#1| is the coordinate as it has been found after processing |hist/data|. The code is supposed to assign |\pgfmathresult| to contain the result. If |\pgfmathresult| is empty afterwards, it will be skipped. Otherwise, it is supposed to contain a number.
+
+ This filter is applied \emph{before} the histogram is computed. Note that |x filter| and |y filter| are applied \emph{after} the histogram is computed.
+
+ Note that predefined styles like |each nth point| can also be applied to |hist/data| if
+ \begin{enumerate}
+ \item an asterisk `|*|' is appended to the predefined style's name and
+ \item the first argument to the style is |hist/data|.
+ \end{enumerate}
+ For example, |each nth point*={hist/data}{2}| will skip each second input value of |hist/data| (try it out).
+ \end{pgfplotscodekey}
+
+ \begin{pgfplotsxycodekeylist}{
+ /pgfplots/hist/data coord trafo,%
+ /pgfplots/hist/data coord inv trafo}%
+ These keys work in the same way as for |x coord trafo| and |x coord inv trafo|. They are applied to the |hist/data| value before the histogram is evaluated and after the result value is assigned, respectively.
+
+ Note that |hist| will apply the |hist/data coord inv trafo| before it visualizes its results. Consequently, it may be necessary to assign a similar transformation to |x coord trafo| as well.
+
+ See the documentation of |x coord trafo| for more information about custom transformations.
+ \end{pgfplotsxycodekeylist}
+
+ \begin{pgfplotskey}{hist/symbolic coords=\marg{list}}
+ A style which enables |symbolic x coords| for an axis containing |hist| plots:
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{axis}[
+ ybar interval,
+ hist/symbolic coords={A,B,C,D,E,F,G,H,I,J},
+ xticklabel={[\tick--\nexttick[},
+]
+ \addplot+[hist={bins=3}]
+ table[row sep=\\,y index=0] {
+ data\\
+ A\\ B\\ A\\ D\\ F\\ J\\
+ G\\ J\\ I\\ H\\ I\\ I\\
+ };
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
+ The style does two things: first, it defines |hist/data coord trafo| and |hist/data coord inv trafo|, then, it calls |symbolic x coords| with the same argument.
+
+ \paragraph{Attention}: do not use |hist/data=x| or other symbolic values as input when you have |symbolic coords|. Rather than symbolic values, you need to provide \emph{expandable} values like |\pgfkeysvalueof{/data point/x}| (which has the same effect, but directly expands to the correct value).
+
+ Please refer to the documentation of |symbolic x coords| for further details about symbolic coordinates.
+ \end{pgfplotskey}
+\end{plottype}
+
\subsubsection{Comb Plots}
Comb plots are very similar to bar plots except that they employ single horizontal/vertical lines instead of rectangles.
@@ -407,6 +679,142 @@ Comb plots are very similar to bar plots except that they employ single horizont
\end{codeexample}
\end{plottype}
+\subsubsection{Quiver Plots (Arrows)}
+\label{sec:pgfplots:quiver2d}
+\begin{plottype}[/pgfplots]{quiver=\textcolor{black}{\marg{{\normalfont options with `\texttt{quiver/}' prefix}}}}
+ A plot type which draws small arrows, starting at $(x,y)$, in direction of $(u,v)$.
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{axis}
+ \addplot[blue,
+ quiver={u=1,v=2*x},
+ -stealth,samples=15] {x^2};
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
+
+ The base point $(x,y)$ is provided as before; in the example above, it is generated by |plot expression| and yields $(x,x^2)$. The vector direction $(u,v)$ needs to be given in addition. Our example with |quiver/u=1| and |quiver/v=2*x| results in $u=1$ and $v=2x$. Thus, we have defined and visualized a vector field for the derivative of $f(x) = x^2$.
+
+ A common example is to visualize the gradient $(\partial_x f,\partial_y f)(x,y)$ of a two--dimensional function $f(x,y)$:
+\pgfplotsexpensiveexample
+\begin{codeexample}[]
+\begin{tikzpicture}
+ \begin{axis}[
+ title={$x \exp(-x^2-y^2)$ and its gradient},
+ domain=-2:2,
+ view={0}{90},
+ axis background/.style={fill=white},
+ ]
+ \addplot3[contour gnuplot={number=9,
+ labels=false},thick]
+ {exp(0-x^2-y^2)*x};
+ \addplot3[blue,
+ quiver={
+ u={exp(0-x^2-y^2)*(1-2*x^2)},
+ v={exp(0-x^2-y^2)*(-2*x*y)},
+ scale arrows=0.3,
+ },
+ -stealth,samples=15]
+ {exp(0-x^2-y^2)*x};
+ \end{axis}
+\end{tikzpicture}
+\end{codeexample}
+ \noindent The example visualizes $f(x,y) = x\exp(-x^2-y^2)$ using |contour gnuplot| as first step. The options |contour/number| and |contour/labels| provide fine-tuning for the contour and are not of interest here (so is the |axis background| which just improves visibility of contour lines). What we are interested in is the |quiver=| style: it defines |u| and |v| to some two--dimensional expressions. Furthermore, we used |quiver/scale arrows| to reduce the arrow size. The |-stealth| is a \Tikz\ style which configures outgoing arrow styles of type `|stealth|'. The |samples=15| key configures how we get our input data. In our case, we have input data $(x_i,y_j,f(x_i,y_j))$ with $15$ samples for each, $i$ and $j$.
+
+ It is also possible to place quiver plots on a prescribed $z$ value:
+\pgfplotsexpensiveexample
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{axis}[
+ domain=0:1,
+ xmax=1,
+ ymax=1,
+]
+\addplot3[surf] {x*y};
+\addplot3[blue,/pgfplots/quiver,
+ quiver/u=y,
+ quiver/v=x,
+ quiver/w=0,
+ quiver/scale arrows=0.1,
+ -stealth,samples=10] {1};
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
+ \noindent Here, the quiver plots is placed on top of a |surf|. It visualizes the gradient (using a common scale factor of $1/10$ to reduce the arrow lengths). The |quiver/w=0| means that arrows have no $z$ difference, and the |{1}| argument indicates that all start at $(x_i,y_j,1)$. Here, the values $(x_i,y_j)$ are sampled in the |domain=0:1| argument (with |samples=10|), i.e.\ arrows start at $(x_i,y_j,1)$ and end at $(x_i+y_j/10, y_j+x_i/10, 1)$.
+
+ So far, quiver plots do not assume a special sequence of input points. This has two consequences: first, you can plot any vector field by considering just $(x,y) + (u,v)$ (or $(x,y,z) + (u,v,w)$) -- the data doesn't necessarily need to be a two--dimensional function (as opposed to |surf| etc). On the other hand, you need to provide |quiver/scale arrows| manually since |quiver| doesn't know the mesh width in case you provide matrix data\footnote{Actually, I might add something like \texttt{quiver/scale arrows=auto} in the future, I don't know yet. Loops through input data are slow in \TeX, automatic mesh widths computation even more...}.
+
+ Note that quiver plots are currently not available together with logarithmic axes.
+
+ \begin{pgfplotskeylist}{%
+ quiver/u=\meta{expression} (initially 0),
+ quiver/v=\meta{expression} (initially 0),
+ quiver/w=\meta{expression} (initially 0)}
+ These keys define how the vector directions $(u,v)$ (or, for three dimensional plots, $(u,v,w)$) shall be set.
+
+ The \meta{expression} can be a constant expression like |quiver/u=1| or |quiver/u=42*5|. It may also depend on the final base point values using the values |x|, |y| or |z| as in the example above. In this context, |x| yields the $x$ coordinate of the point where the vector starts, |y| the $y$ coordinate and so on.
+
+ Another important application is to use \emph{table column references} like |quiver/u=\thisrow{col}| in conjunction with |\addplot table|:
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{axis}[title=Quiver and plot table]
+ \addplot[blue,
+ quiver={u=\thisrow{u},v=\thisrow{v}},
+ -stealth]
+ table
+ {
+ x y u v
+ 0 0 1 0
+ 1 1 1 1
+ 2 4 1 4
+ 3 9 1 6
+ 4 16 1 8
+ };
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
+ \noindent Here, the \meta{expression} employs |\thisrow| which always refers to the actual row of |\addplot table|.
+
+ Note that \meta{expression} should always be of numeric type (no symbolic input extensions are supported currently).
+ \end{pgfplotskeylist}
+ \begin{pgfplotskeylist}{%
+ quiver/u value=\marg{value} (initially 0),
+ quiver/v value=\marg{value} (initially 0),
+ quiver/w value=\marg{value} (initially 0)}
+ These keys have the \emph{same function} as |quiver/u| and its variants. However, they don't call the math parser, so only single values are allowed (including something like |\thisrow{columnname}|).
+ \end{pgfplotskeylist}
+
+ \begin{pgfplotskeylist}{%
+ quiver/colored,
+ quiver/colored=\marg{color}}
+ Allows to define an individual color for each arrow. Omitting the argument `\meta{color}' is identical to |quiver/colored=mapped color| which uses the |point meta| to get colors for every arrow.
+
+ If you just want to set the same color for every arrow, prefer using |\addplot[blue,quiver]| which is more efficient.
+ \end{pgfplotskeylist}
+
+ \begin{pgfplotskey}{quiver/scale arrows=\marg{scale} (initially 1)}
+ Allows to rescale the arrows by a factor. This may be necessary if the arrow length is longer than the distance between adjacent base points $(x_i,y_i)$. There may come a feature to rescale them automatically.
+ \end{pgfplotskey}
+
+ \begin{pgfplotskey}{quiver/update limits=\mchoice{true,false} (initially true)}
+ A boolean indicating whether points $(x,y) + (u,v)$ shall contribute to the axis limits.
+ \end{pgfplotskey}
+
+ \begin{stylekey}{/pgfplots/quiver/every arrow (initially empty)}
+ Allows to provide individual arrow styles.
+
+ The style can contain any \Tikz\ drawing option. It might depend upon |mapped color| (provided |point meta| has been set).
+
+ Again, if you don't need individual arrow styles, prefer using a plot style (|cycle list| or argument to |\addplot|) which is more efficient.
+ \end{stylekey}
+
+ \begin{pgfplotsxycodekeylist}{%
+ quiver/before arrow,%
+ quiver/after arrow}%
+ Advanced keys for more fine tuning of the display. They allow to install some \TeX\ code manually before or after the drawing operations for single arrows. Both are initially empty.
+ \end{pgfplotsxycodekeylist}
+\end{plottype}
+
\subsubsection{Stacked Plots}
\begin{pgfplotskey}{stack plots=\mchoice{x,y,false} (initially false)}
Allows stacking of plots in either $x$ or $y$ direction. Stacking means to add either $x$- or $y$ coordinates of successive |\addplot| commands on top of each other.
@@ -452,6 +860,32 @@ Comb plots are very similar to bar plots except that they employ single horizont
\begin{codeexample}[]
\begin{tikzpicture}
+\begin{axis}[
+ ybar stacked,
+ enlargelimits=0.15,
+ legend style={at={(0.5,-0.20)},
+ anchor=north,legend columns=-1},
+ ylabel={\#participants},
+ symbolic x coords={tool1, tool2, tool3, tool4,
+ tool5, tool6, tool7},
+ xtick=data,
+ x tick label style={rotate=45,anchor=east},
+ ]
+\addplot+[ybar] plot coordinates {(tool1,0) (tool2,2)
+ (tool3,2) (tool4,3) (tool5,0) (tool6,2) (tool7,0)};
+\addplot+[ybar] plot coordinates {(tool1,0) (tool2,0)
+ (tool3,0) (tool4,3) (tool5,1) (tool6,1) (tool7,0)};
+\addplot+[ybar] plot coordinates {(tool1,6) (tool2,6)
+ (tool3,8) (tool4,2) (tool5,6) (tool6,5) (tool7,6)};
+\addplot+[ybar] plot coordinates {(tool1,4) (tool2,2)
+ (tool3,0) (tool4,2) (tool5,3) (tool6,2) (tool7,4)};
+\legend{never, rarely, sometimes, often}
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
+
+\begin{codeexample}[]
+\begin{tikzpicture}
\begin{axis}[stack plots=x,/tikz/xbar]
\addplot coordinates
{(1,0) (2,1) (2,2) (3,3)};
@@ -485,7 +919,7 @@ The current implementation for |stack plots| does \emph{not} interpolate missing
\begin{pgfplotskey}{reverse stacked plots=\mchoice{true,false} (initially true, default true)}
Configures the sequence in which stacked plots are drawn. This is more or less a technical detail which should not be changed in any normal case.
- The motivation is as follows: suppose multiple |\addplot| commands are stacked on top of each other and they are processed in the order of appearance. Than, the second plot could easily draw its lines (or fill area) on top of the first one - hiding its marker or line completely. Therefor, \PGFPlots\ reverses the sequence of drawing commands.
+ The motivation is as follows: suppose multiple |\addplot| commands are stacked on top of each other and they are processed in the order of appearance. Then, the second plot could easily draw its lines (or fill area) on top of the first one - hiding its marker or line completely. Therefor, \PGFPlots\ reverses the sequence of drawing commands.
This has the side-effect that any normal \Tikz-paths inside of an axis will also be processed in reverse sequence.
\end{pgfplotskey}
@@ -667,11 +1101,11 @@ Draws a simple scatter plot: all markers have the same appearance.
\end{axis}
\end{tikzpicture}
\end{codeexample}
- The |only marks| visualization style simply draws marks at every coordinate. Marks can be set with |mark=|\meta{mark name} and marker options like size and color can be specified using the |mark options=|\marg{style options} key (or by modifying the |every mark| style). The available markers along with the accepted style options can be found in section~\ref{sec:markers} on page~\pageref{sec:markers}.
+ The |only marks| visualization style simply draws marks at every coordinate. Marks can be set with |mark=|\meta{mark name} and marker options like size and color can be specified using the |mark options=|\meta{style options} key (or by modifying the |every mark| style). The available markers along with the accepted style options can be found in Section~\ref{sec:markers} on page~\pageref{sec:markers}.
\end{plottype}
\label{pgfplots:scatter}
-More sophisticated scatter plots change the marker appearance for each data point. An example is that marker colors depend on the magnitude of function values $f(x)$ or other provided coordinates. The term ``scatter plot'' will be used for this type of plots in the following sections.
+More sophisticated scatter plots change the marker appearance for each data point. An example is that marker colors depend on the magnitude of function values $f(x)$ or other provided coordinates. The term ``scatter plot'' will be used for this type of plot in the following sections.
Scatter plots require ``source'' coordinates. These source coordinates can be the $y$ coordinate, or explicitly provided additional values.
@@ -705,12 +1139,12 @@ Scatter plots can be configured using a set of options. One of them is mandatory
\begin{pgfplotskey}{scatter src=\mchoice{none,\meta{expression},x,y,z,f(x),explicit,explicit symbolic} (initially none)}
\label{pgfplots:scatter:src}
- This key is necessary for any scatter plot and it is set to |f(x)| as soon as |scatter| is activated and no different choice has been made. It needs to be provided as \marg{option} for |\addplot| to configure the value used to determine marker appearances. Actually, |scatter src| is nothing but an alias for |point meta|, so the main documentation for this key is on page~\pageref{pgfplots:pointmeta}. However, we summarize the choices here together with scatter plot examples.
+ This key is necessary for any scatter plot and it is set to |f(x)| as soon as |scatter| is activated and no different choice has been made. It needs to be provided as \meta{option} for |\addplot| to configure the value used to determine marker appearances. Actually, |scatter src| is nothing but an alias for |point meta|, so the main documentation for this key is on page~\pageref{pgfplots:pointmeta}. However, we summarize the choices here together with scatter plot examples.
Usually, |scatter src| provides input data (numeric or string type) which is used to determine colors and other style options for markers.
The default configuration expects numerical data which is mapped linearly into the current color map.
- The value of |scatter src| determines how to get this data: the choices \declaretext{x}, \declaretext{y} and \declaretext{z} will use either the $x$, $y$ or $z$ coordinates to determine marker options. Any coordinate filters, logarithms or stacked-plot computations have already been applied to these values (use |rawx|, |rawy| and |rawz| for unprocessed values). The special choice |f(x)| is the same as |y| for two dimensional plots and the same as |z| for three dimensional plots. The choice \declaretext{explicit} expects the scatter source data as additional coordinate from the coordinate input streams (see section~\ref{pgfplots:providing:input} for how to provide input meta data or below for some small examples). They will be treated as numerical data. The choice \declaretext{explicit symbolic} also expects scatter source data as additional meta information for each input coordinate, but it treats them as strings, not as numerical data. Consequently, no arithmetics is performed. It is task of the scatter plot style to do something with it. See, for example, the |scatter/classes| style below.
+ The value of |scatter src| determines how to get this data: the choices \declaretext{x}, \declaretext{y} and \declaretext{z} will use either the $x$, $y$ or $z$ coordinates to determine marker options. Any coordinate filters, logarithms or stacked-plot computations have already been applied to these values (use |rawx|, |rawy| and |rawz| for unprocessed values). The special choice |f(x)| is the same as |y| for two dimensional plots and the same as |z| for three dimensional plots. The choice \declaretext{explicit} expects the scatter source data as additional coordinate from the coordinate input streams (see Section~\ref{pgfplots:providing:input} for how to provide input meta data or below for some small examples). They will be treated as numerical data. The choice \declaretext{explicit symbolic} also expects scatter source data as additional meta information for each input coordinate, but it treats them as strings, not as numerical data. Consequently, no arithmetics is performed. It is the task of the scatter plot style to do something with it. See, for example, the |scatter/classes| style below.
Finally, it is possible to provide an arbitrary mathematical expression which involves zero, one or more of the values \declaretext{x} (the current $x$ coordinate), \declaretext{y} (the current $y$ coordinate) or \declaretext{z} (the current $z$ coordinate, if any).
If data is read from tables, mathematical expressions might also involve |\thisrow|\marg{column name} or |\thisrowno|\marg{column index} to access any of the table cells in the current row.
@@ -763,9 +1197,9 @@ Scatter plots can be configured using a set of options. One of them is mandatory
\end{pgfplotskey}
\begin{stylekey}{/pgfplots/scatter/use mapped color=\marg{options for each marker} (initially draw=mapped color!80!black,fill=mapped color)}
- This style is installed by default. When active, it recomputes the color |mapped color| for every processed point coordinate by transforming the |scatter src| coordinates into the current color map linearly. Then, it evaluates the options provided as \marg{options for each marker} which are expected to depend on |mapped color|.
+ This style is installed by default. When active, it recomputes the color |mapped color| for every processed point coordinate by transforming the |scatter src| coordinates into the current color map linearly. Then, it evaluates the options provided as \meta{options for each marker} which are expected to depend on |mapped color|.
- The user interface for color maps is described in section~\ref{pgfplots:colormap}.
+ The user interface for color maps is described in Section~\ref{pgfplots:colormap}.
\begin{codeexample}[]
\begin{tikzpicture}
\begin{axis}[title=Default arguments]
@@ -805,7 +1239,7 @@ Scatter plots can be configured using a set of options. One of them is mandatory
\begin{stylekey}{/pgfplots/scatter/classes=\marg{styles for each class name}}
\label{pgfplots:scatterclasses}
- A scatter plot style which visualizes points using several classes. The style assumes that every point coordinate has a class label attached, that means the choice |scatter src=explicit symbolic| is assumed\footnote{If \texttt{scatter src} is not \texttt{explicit symbolic}, we expect a numeric argument which is rounded to the nearest integer. The resulting integer is used a class label. If that fails, the numeric argument is truncated to the nearest integer. If that fails as well, the point has no label.}. A class label can be a number, but it can also be a symbolic constant. Given class labels for every point, \marg{styles for each class name} contains a comma-separated list which associates appearance options to each class label.
+ A scatter plot style which visualizes points using several classes. The style assumes that every point coordinate has a class label attached, that means the choice |scatter src=explicit symbolic| is assumed\footnote{If \texttt{scatter src} is not \texttt{explicit symbolic}, we expect a numeric argument which is rounded to the nearest integer. The resulting integer is used a class label. If that fails, the numeric argument is truncated to the nearest integer. If that fails as well, the point has no label.}. A class label can be a number, but it can also be a symbolic constant. Given class labels for every point, \meta{styles for each class name} contains a comma-separated list which associates appearance options to each class label.
\begin{codeexample}[]
\begin{tikzpicture}
@@ -835,7 +1269,7 @@ Scatter plots can be configured using a set of options. One of them is mandatory
\end{axis}
\end{tikzpicture}
\end{codeexample}
-In this example, the coordinate |(0.1,0.15)| has the associated label `|a|' while |(0.45,0.27)| has the label `|c|' (see section~\ref{sec:addplot} for details about specifying point meta data). Now, The argument to |scatter/classes| contains styles for every label -- for label `|a|', square markers will be drawn in color blue.
+In this example, the coordinate |(0.1,0.15)| has the associated label `|a|' while |(0.45,0.27)| has the label `|c|' (see Section~\ref{sec:addplot} for details about specifying point meta data). Now, the argument to |scatter/classes| contains styles for every label -- for label `|a|', square markers will be drawn in color blue.
The generation of a legend works as for a normal plot -- but |scatter/classes| requires one legend entry for every provided class. It communicates the class labels to the legend automatically. It works as if there had been different |\addplot| commands, one for every class label.
@@ -858,6 +1292,7 @@ It is also possible to provide |scatter/classes| as argument to a single plot, a
% 0.76 0.5 b
% 0.55 0.32 c
\addplot[
+ % clickable coords={\thisrow{label}},
scatter/classes={
a={mark=square*,blue},%
b={mark=triangle*,red},%
@@ -875,9 +1310,9 @@ It is also possible to provide |scatter/classes| as argument to a single plot, a
\end{tikzpicture}
\end{codeexample}
-In general, the format of \marg{styles for each class name} is a comma separated list of \meta{label}|=|\marg{style options}.
+In general, the format of \meta{styles for each class name} is a comma separated list of \meta{label}|=|\marg{style options}.
-\paragraph{Attention:} The keys |every mark| and |mark options| have \emph{no effect} when used inside of \marg{styles for each class name}! So, instead of assigning |mark options|, you can simply provide the options directly. They apply only to markers anyway.
+\paragraph{Attention:} The keys |every mark| and |mark options| have \emph{no effect} when used inside of \meta{styles for each class name}! So, instead of assigning |mark options|, you can simply provide the options directly. They apply only to markers anyway.
\paragraph{Remark:} To use |\label| and |\ref| in conjunction with |scatter/classes|, you can provide the class labels as optional arguments to |\label| in square brackets:
@@ -901,10 +1336,14 @@ In general, the format of \marg{styles for each class name} is a comma separated
First class is \ref{label:for:first:class}, second is \ref{label:for:second:class}.
\end{codeexample}
+\paragraph{Remark:} It is possible to click into the plot to display labels with mouse popups, see the |clickable coords| key of the |clickable| library.
+
\paragraph{Remark:} The style |scatter/classes| \emph{re}defines |@pre marker code| and |@post marker code|. There is a starred variant \declareandlabel{scatter/classes*} which \emph{appends} the functionality while keeping the old marker code.
\end{stylekey}
-\begin{pgfplotskey}{nodes near coords=\marg{content} (default \textbackslash pgfmathprintnumber\textbackslash pgfplotspointmeta)}
+\begin{pgfplotskeylist}{%
+ nodes near coords=\marg{content} (default \textbackslash pgfmathprintnumber\textbackslash pgfplotspointmeta),
+ nodes near coords*=\marg{content} (default \textbackslash pgfmathprintnumber\textbackslash pgfplotspointmeta)}
A |scatter| plot style which places text nodes near every coordinate.
\begin{codeexample}[]
@@ -916,7 +1355,7 @@ First class is \ref{label:for:first:class}, second is \ref{label:for:second:clas
\end{axis}
\end{tikzpicture}
\end{codeexample}
- The \marg{content} is, if nothing else has been specified, the content of the ``point meta'', displayed using the default \meta{content}=|\pgfmathprintnumber{\pgfplotspointmeta}|. The macro |\pgfplotspointmeta| contains whatever has been selected by the |point meta| key, it defaults to the $y$ coordinate for two dimensional plots and the $z$ coordinate for three dimensional plots.
+ The \meta{content} is, if nothing else has been specified, the content of the ``point meta'', displayed using the default \meta{content}=|\pgfmathprintnumber{\pgfplotspointmeta}|. The macro |\pgfplotspointmeta| contains whatever has been selected by the |point meta| key, it defaults to the $y$ coordinate for two dimensional plots and the $z$ coordinate for three dimensional plots.
Since |point meta=explicit symbolic| allows to treat string data, you can provide textual descriptions which will be shown inside of the generated nodes\footnote{In this case, the |\textbackslash pgfmathprintnumber| will be skipped automatically.}:
@@ -937,6 +1376,33 @@ First class is \ref{label:for:first:class}, second is \ref{label:for:second:clas
\end{codeexample}
The square brackets are the way to provide explicit |point meta| for |plot coordinates|. Please refer to the documentation of |plot file| and |plot table| for how to get point meta from files.
+ The \meta{content} can also depend on something different than |\pgfplotspointmeta|. But since \meta{content} is evaluated during |\end{axis}|, \PGFPlots\ might not be aware of any special information inside of \meta{content} -- you'll need to communicate it to \PGFPlots\ with the |visualization depends on| key as follows:
+\begin{codeexample}[width=3cm]
+\begin{tikzpicture}
+ \begin{axis}[enlargelimits=0.2]
+ \addplot[
+ scatter,mark=*,only marks,
+ % we use 'point meta' as color data...
+ point meta=\thisrow{color},
+ % ... therefore, we can't use it as argument for nodes near coords ...
+ nodes near coords*={$(\pgfmathprintnumber[frac]\myvalue)$},
+ % ... which requires to define a visualization dependency:
+ visualization depends on={\thisrow{myvalue} \as \myvalue},
+ ]
+ table {
+ x y color myvalue
+ 0.5 0.2 1 0.25
+ 0.2 0.1 2 1.5
+ 0.7 0.6 3 0.75
+ 0.35 0.4 4 0.125
+ 0.65 0.1 5 2
+ };
+ \end{axis}
+\end{tikzpicture}
+\end{codeexample}
+ \noindent The example uses a |scatter| plot to get different colors, where the |scatter src| (or, equivalently, |point meta|) is already used to define the markers color. In addition to the colored |scatter| plot, we'd like to add |nodes near coords|, where the displayed nodes should contain |\thisrow{myvalue}|. To do so, we define |scatter,point meta=\thisrow{color}| (just as described in the previous sections). Furthermore, we use \declare{nodes near coords*} in order to \emph{combine} different |scatter| styles (see below for details). The value for |nodes near coords*| depends on |\thisrow{myvalue}|, but we can't use |\pgfplotspointmeta| (which is already occupied). Thus, we communicate the additional input data by means of |visualization depends on={\thisrow{myvalue} \as \myvalue}|. The statement defines a new macro, |\myvalue|, and assigns the value |\thisrow{myvalue}|. Furthermore, it configures \PGFPlots\ to remember this particular macro and its contents until |\end{axis}| (see the documentation for |visualization depends on| for details).
+
+
The style |nodes near coords| might be useful for bar plots, see |ybar| for an example of |nodes near coords|.
\paragraph{Remarks and Details:}
@@ -947,10 +1413,10 @@ First class is \ref{label:for:first:class}, second is \ref{label:for:second:clas
In order to use |nodes near coords| together with other |scatter| plot styles (like |scatter/use mapped color| or |scatter/classes|), you may append a star to each of these keys. The variant \declareandlabel{nodes near coords*} will \emph{append} code to |scatter/@pre marker code| without overwriting the previous value.
\item Consider using |enlargelimits| together with |nodes near coords| if text is clipped away.
- \item Currently |nodes near coords| does not work satisfactory for |ybar interval| or |xbar interval|, sorry.
+ \item Currently |nodes near coords| does not work satisfactorily for |ybar interval| or |xbar interval|, sorry.
\end{itemize}
-\end{pgfplotskey}
+\end{pgfplotskeylist}
\begin{stylekey}{/pgfplots/every node near coord}
A style used for every node generated by |nodes near coords|. It is initially empty.
@@ -959,13 +1425,13 @@ First class is \ref{label:for:first:class}, second is \ref{label:for:second:clas
\begin{pgfplotskey}{nodes near coords align=\marg{alignment method} (initially auto)}
Specifies how to align nodes generated by |nodes near coords|.
- Possible choices for \marg{alignment} are
+ Possible choices for \meta{alignment method} are
\begin{description}
- \item[]\declare{auto} Uses |horizontal| if the $x$ coordinates are shown or |vertical| in all other cases. This checks the current value of |point meta|.
+ \item[]\declare{auto} uses |horizontal| if the $x$ coordinates are shown or |vertical| in all other cases. This checks the current value of |point meta|.
\item[]\declare{horizontal} uses |left| if |\pgfplotspointmeta| $<0$ and |right| otherwise.
\item[]\declare{vertical} uses |below| if |\pgfplotspointmeta| $<0$ and |above| otherwise.
- \item[] Its also possible to provide any \Tikz\ alignment option such as |anchor=north east|, |below| or something like that. It is also allowed if multiple options are provided.
+ \item[] It is also possible to provide any \Tikz\ alignment option such as |anchor=north east|, |below| or something like that. It is also allowed to privde multiple options.
\end{description}
\end{pgfplotskey}
@@ -981,7 +1447,7 @@ First class is \ref{label:for:first:class}, second is \ref{label:for:second:clas
\begin{enumerate}
\item The scatter source coordinates form a data stream whose data limits are computed additionally to the axis limits. This step is skipped for |symbolic| meta data.
\item Before any markers are drawn, a linear coordinate transformation from these data limits to the interval $[0.0,1000.0]$ is initialised.
-\item Every scatter source coordinate\footnote{During the evaluation, the public macros \texttt{\textbackslash pgfplotspointmeta} and \texttt{\textbackslash pgfplotspointmetarange} indicate the source coordinate and the source coordinate range in the format $a:b$ (for log--axis, they are given in fixed point representation and for linear axes in floating point).} will be transformed linearly and the result is available as macro |\pgfplotspointmetatransformed| $ \in [0.0,1000.0]$.
+\item Every scatter source coordinate\footnote{During the evaluation, the public macros \texttt{\textbackslash pgfplotspointmeta} and \texttt{\textbackslash pgfplotspointmetarange} indicate the source coordinate and the source coordinate range in the format $a:b$ (for log--axis, they are given in fixed-point representation and for linear axes in floating point).} will be transformed linearly and the result is available as macro |\pgfplotspointmetatransformed| $ \in [0.0,1000.0]$.
The decision is thus based on per thousands of the data range. The transformation is skipped for |symbolic| meta data (and the meta data is simply contained in the mentioned macro).
\item The \pgfname\ coordinate system is translated such that |(0pt,0pt)| is the plot coordinate.
@@ -1027,6 +1493,7 @@ Please note that |\ifdim| compares \TeX\ lengths, so the example employs the suf
\end{pgfplotsxycodekeylist}
\subsubsection{1D Colored Mesh Plots}
+\label{sec:1d:mesh}
\begin{plottype}[/pgfplots]{mesh}
Uses the current color map to determine colors for each fixed line segment. Each line segment will get the same color.
\begin{codeexample}[]
@@ -1051,7 +1518,7 @@ Please note that |\ifdim| compares \TeX\ lengths, so the example employs the suf
\end{axis}
\end{tikzpicture}
\end{codeexample}
- This onedimensional |mesh| plot is actually a special case of the twodimensional mesh plots, so more detailed configuration, including how to change the color data, can be found in section~\ref{sec:2d:mesh}.
+ This one-dimensional |mesh| plot is actually a special case of the twodimensional mesh plots, so more detailed configuration, including how to change the color data, can be found in Section~\ref{sec:2d:mesh}.
\end{plottype}
@@ -1120,3 +1587,12 @@ Sometimes it is desirable to draw parts of a single plot separately, without con
\end{codeexample}
\end{pgfplotskey}
+More about this coordinate filtering can be found in Section~\ref{sec:filters} ``Skipping Or Changing Coordinates -- Filters''.
+
+\subsubsection{Patch Plots}
+Patch Plots visualize a sequence of one or more triangles (or other sorts of patches). These triangles can be drawn with a single color (|shader=flat| and |shader=faceted interp|) or with interpolated colors (|shader=interp|).
+
+There are both two- and three-dimensional patch plots, both with the same interface and the same keys. Therefore, the reference documentation for patch plots can be found in Section~\ref{sec:pgfplots:3d:patch} together with three--dimensional patch plots.
+
+\label{sec:pgfplots:2d:patch}
+}