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.tex60
1 files changed, 59 insertions, 1 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 442fd0f6076..1525e0fe6bb 100644
--- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.2dplots.tex
+++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.2dplots.tex
@@ -88,6 +88,22 @@ coordinates
\end{codeexample}
\end{plottype}
+\begin{plottype}{const plot mark mid}
+ A variant which places marks in the middle of each line segment, causing plots to be symmetric around its data points.
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{axis}
+\addplot+[const plot mark mid]
+coordinates
+{(0,0.1) (0.1,0.15) (0.2,0.5) (0.3,0.62)
+ (0.4,0.56) (0.5,0.58) (0.6,0.65) (0.7,0.6)
+ (0.8,0.58) (0.9,0.55) (1,0.52)};
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
+ Note that ``symmetric'' is only true for constant mesh width: if the $x$--distances between adjacent data points differ, |const plot mark mid| will produce vertical lines in the middle between each pair of consecutive points.
+\end{plottype}
+
\begin{plottype}{jump mark left}
A variant of `|const plot mark left|' which does not draw vertical lines.
\begin{codeexample}[]
@@ -107,6 +123,21 @@ A variant of `|const plot mark left|' which does not draw vertical lines.
A variant of `|const plot mark right|' which does not draw vertical lines.
\end{plottype}
+\begin{plottype}{jump mark mid}
+ A variant of `|const plot mark mid|' which does not draw vertical lines.
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{axis}
+\addplot+[jump mark mid]
+coordinates
+{(0,0.1) (0.1,0.15) (0.2,0.5) (0.3,0.62)
+ (0.4,0.56) (0.5,0.58) (0.6,0.65) (0.7,0.6)
+ (0.8,0.58) (0.9,0.55) (1,0.52)};
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
+\end{plottype}
+
\subsubsection{Bar Plots}
Bar plots place horizontal or vertical bars at coordinates. Multiple bar plots in one axis can be stacked on top of each other or aligned next to each other.
@@ -753,6 +784,33 @@ Comb plots are very similar to bar plots except that they employ single horizont
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.
+
+ \paragraph{Attention:} the fact that |x| refers to \emph{the final $x$ coordinate} means that parametric plots \emph{should use $t$ as variable}\footnote{Sorry for this usability issue.}. Consider the following example:
+\begin{codeexample}[]
+\begin{tikzpicture}
+\begin{axis}[axis equal,
+ axis lines=middle,
+ axis line style={->},
+ tick style={color=black},
+ xtick=\empty,
+ ytick=\empty
+]
+ \addplot[samples=20, domain=0:2*pi,
+ % the default choice 'variable=\x' leads to
+ % unexpected results here!
+ variable=\t,
+ quiver={
+ u={cos(deg(t))},
+ v={-sin(deg(t))},
+ scale arrows=0.5},
+ ->,blue]
+ ({sin(deg(t))}, {cos(deg(t))});
+ \addplot[samples=100, domain=0:2*pi]
+ ({sin(deg(x))}, {cos(deg(x))});
+\end{axis}
+\end{tikzpicture}
+\end{codeexample}
+ \noindent Here, a parametric plot is used to draw a circle and tangent vectors. The choice |variable=\t| plays a functional role besides naming conventions: it allows to access the parametric variable within the expressions for both |u| and |v|. On the other hand, we could have used |u=y| and |v=-x| since |x| expands to the $x$~coordinate with value |sin(deg(t))| and |y| expands to the $y$~coordinate |cos(deg(t))|.
Another important application is to use \emph{table column references} like |quiver/u=\thisrow{col}| in conjunction with |\addplot table|:
\begin{codeexample}[]
@@ -1431,7 +1489,7 @@ First class is \ref{label:for:first:class}, second is \ref{label:for:second:clas
\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[] 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.
+ \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 provide multiple options.
\end{description}
\end{pgfplotskey}