summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.axisdescription.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.axisdescription.tex')
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.axisdescription.tex95
1 files changed, 73 insertions, 22 deletions
diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.axisdescription.tex b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.axisdescription.tex
index 6c220b201ae..746c007d1eb 100644
--- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.axisdescription.tex
+++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.axisdescription.tex
@@ -305,15 +305,15 @@ Labels are \Tikz-Nodes which are placed with
\end{codeexample}
so their position and appearance can be customized.
-\paragraph{Upgrade notice:} Since version 1.3, label placement \emph{can} respect the size of adjacent tick labels. Use |\pgfplotsset{compat=newest}| in the preamble to activate this feature. See |xlabel near ticks| for details.
+\paragraph{Upgrade notice:} Since version 1.3, label placement \emph{can} respect the size of adjacent tick labels. Use |\pgfplotsset{compat=1.3}| in the preamble to activate this feature. See |xlabel near ticks| for details.
\begin{pgfplotsxykeylist}{\x label shift=\marg{dimension} (initially 0pt),label shift=\marg{dimension}}
Shifts labels in direction of the outer normal vector of the axis by an amount of \marg{dimension}. The |label shift| sets all three label shifts to the same value.
- \paragraph{Attention:} This does only work if |\pgfplotsset{compat=newest}| has been called (More precisely: if |xlabel near ticks| is active for the respective axis).
+ \paragraph{Attention:} This does only work if |\pgfplotsset{compat=1.3}| has been called (More precisely: if |xlabel near ticks| is active for the respective axis).
\end{pgfplotsxykeylist}
-\begin{pgfplotsxykeylist}{\x label near ticks,compat=newest}
+\begin{pgfplotsxykeylist}{\x label near ticks,compat=1.3}
These keys place axis labels (like |xlabel|) near the tick labels. If tick labels are small, labels will move closer to the axis. If tick labels are large, axis labels will move away from the axis. This is the default for every three dimensional plot, but it \emph{won't} be used initially for two--dimensional plots for backwards compatibility. Take a look at the definition of |near ticklabel| on page~\pageref{key:near:ticklabel} for an example.
The definition of these styles is
@@ -334,13 +334,13 @@ so their position and appearance can be customized.
It is encouraged to write
\begin{codeexample}[code only]
-\pgfplotsset{compat=newest}
+\pgfplotsset{compat=1.3}
\end{codeexample}
\noindent in your preamble to install the styles document-wide -- it leads to the best output (it avoids unnecessary space). It is not activated initially for backwards compatibility with older versions which used fixed distances from the tick labels.
\end{pgfplotsxykeylist}
\begin{pgfplotsxykeylist}{\x label absolute,compat=pre 1.3}
- Installs placement styles for axis labels such that |xlabel| yields a description of absolute, fixed distance to the axis. This is the initial configuration (for backwards compatibility with versions before 1.3). Use |compat=newest| to get the most recent, more flexible configuration. Take a look at the definition of |near ticklabel| on page~\pageref{key:near:ticklabel} for an example.
+ Installs placement styles for axis labels such that |xlabel| yields a description of absolute, fixed distance to the axis. This is the initial configuration (for backwards compatibility with versions before 1.3). Use |compat=1.3| to get the most recent, more flexible configuration. Take a look at the definition of |near ticklabel| on page~\pageref{key:near:ticklabel} for an example.
These styles are defined by
\begin{codeexample}[code only]
@@ -566,16 +566,16 @@ Using |\legend| overwrites any other existing legend entries.
\end{pgfplotskey}
-\begin{command}{\legendimage\marg{options}}
+\begin{command}{\addlegendimage\marg{options}}
Adds a further ``plot style'' for legend creation.
- Each |\addplot| command appends its plot style options to a list, and |\legendimage| adds \meta{options} to the very same list.
+ Each |\addplot| command appends its plot style options to a list, and |\addlegendimage| adds \meta{options} to the very same list.
- Thus, the effect is as if you had provided |\addplot|\oarg{options}, but |\legendimage| bypasses all the logic usually associated with a plot. In other words: except for the legend, the state of the axis remains as if the command would not have been drawn.
+ Thus, the effect is as if you had provided |\addplot|\oarg{options}, but |\addlegendimage| bypasses all the logic usually associated with a plot. In other words: except for the legend, the state of the axis remains as if the command would not have been drawn. Not even the current plot's index is advanced, making |\addlegendimage| compatible with any plot styles like |ybar|.
- Use |\legendimage| to provide custom styles into legends, for example to document custom |\draw| commands inside of an axis.
+ Use |\addlegendimage| to provide custom styles into legends, for example to document custom |\draw| commands inside of an axis.
- You can call |\label| after |\legendimage| just as for a normal style.
+ You can call |\label| after |\addlegendimage| just as for a normal style.
\end{command}
\subsubsection{Legend Appearance}
@@ -782,6 +782,11 @@ Use |legend columns=-1| to draw all entries horizontally.
Configures where the small line specifications will be drawn: left of the description, right of the description or not at all.
\end{pgfplotskey}
+\begin{stylekey}{/pgfplots/every legend image post}
+ \label{key:legendimagepost}
+ A style which can be used to provide drawing options to every small legend image. These options apply after |current plot style| has been set, allowing users different line styles for legends than for plots.
+\end{stylekey}
+
\begin{pgfplotscodekey}{legend image code}
\label{opt:legend:image:code}
Allows to replace the default images which are drawn inside of legends. When this key is evaluated, the current plot specification has already been activated (using |\begin{scope}[current plot style]|)%
@@ -965,7 +970,7 @@ Finally, \ref{pgfplots:label3} is only here to get three examples.
Label3 = \ref{pgfplots:label3};
Label2 = \ref{pgfplots:label2}
\end{codeexample}
- The label is assembled using |legend image code| and the plot style of the last plot. Any \PGFPlots\ option is expanded until only \Tikz\ (or \pgfname) options remain; these options are used to get an independant label\footnote{Please note that you can't use the label/ref mechanism in conjunction with image externalization as this will (naturally) lead to undefined references.}.
+ The label is assembled using |legend image code| and the plot style of the last plot. Any \PGFPlots\ option is expanded until only \Tikz\ (or \pgfname) options remain; these options are used to get an independent label\footnote{Please note that you can't use the label/ref mechanism in conjunction with image externalization as this will (naturally) lead to undefined references.}.
More precisely, the small image generated by |\ref|\marg{label name} is
\begin{codeexample}[code only]
@@ -1110,9 +1115,9 @@ Feel free to overwrite these styles if the default doesn't fit your needs or tas
\end{tikzpicture}
\end{codeexample}
-In case |middle|, the style |every inner axis x line| allows to adjust the appearenace.
+In case |middle|, the style |every inner axis x line| allows to adjust the appearance.
-Note that three dimensional axes only support to use the same value for every axis, i.e.\ three dimensional axes support only the |axis lines| key (or, preferrably for 3D axes, the |axis lines*| key -- check what looks best). See section~\ref{sec:pgfplots:axislines:3d} for examples of three dimensional axis line variations.
+Note that three dimensional axes only support to use the same value for every axis, i.e.\ three dimensional axes support only the |axis lines| key (or, preferably for 3D axes, the |axis lines*| key -- check what looks best). See section~\ref{sec:pgfplots:axislines:3d} for examples of three dimensional axis line variations.
\end{pgfplotskeylist}
\begin{pgfplotsxykey}{every inner \x\ axis line}
@@ -1605,7 +1610,7 @@ Axis scaling and clipping will be done as if you did not use |hide axis|.
\end{stylekey}
\begin{stylekey}{/pgfplots/every colorbar}
- This style governs the placement, alignment and appearance of color bars. Any desired detail changes for color bars can be put into this style. Additionally, there is a style |colorbar shift| which is set after |every colorbar|. The latter style is intented to contain only shift transformations like |xshift| or |yshift| (making it easier to overwrite or deactivate them).
+ This style governs the placement, alignment and appearance of color bars. Any desired detail changes for color bars can be put into this style. Additionally, there is a style |colorbar shift| which is set after |every colorbar|. The latter style is intended to contain only shift transformations like |xshift| or |yshift| (making it easier to overwrite or deactivate them).
While a color bar is drawn, the predefined node |parent axis| can be used to align at the parent axis.
\begin{predefinednode}{parent axis}
@@ -1714,7 +1719,7 @@ Axis scaling and clipping will be done as if you did not use |hide axis|.
\begin{stylekey}{/pgfplots/colorbar shift}
- This style is installed after |every colorbar|. It is intented to contain only shift transformations like |xshift| and/or |yshift|. The reason to provide two separate styles is to allow easier deactivation of shift transformations.
+ This style is installed after |every colorbar|. It is intended to contain only shift transformations like |xshift| and/or |yshift|. The reason to provide two separate styles is to allow easier deactivation of shift transformations.
\begin{codeexample}[code only]
\pgfplotsset{
@@ -1817,9 +1822,11 @@ There are a couple of predefined scaling styles which set some of these options:
\begin{codeexample}[code only]
\pgfplotsset{
small/.style={
- /pgfplots/width=6.5cm,
- /pgfplots/height=,
- /pgfplots/max space between ticks=25
+ width=6.5cm,
+ height=,
+ tick label style={font=\footnotesize},
+ label style={font=\small},
+ max space between ticks=25,
}
}
\end{codeexample}
@@ -1848,12 +1855,14 @@ Feel free to redefine the scaling -- the option may still be useful to get more
\begin{codeexample}[code only]
\pgfplotsset{
footnotesize/.style={
- /pgfplots/width=5cm,
- /pgfplots/height=,
+ width=5cm,
+ height=,
legend style={font=\footnotesize},
tick label style={font=\footnotesize},
label style={font=\small},
- /pgfplots/max space between ticks=20,
+ title style={font=\small},
+ every axis title shift=0pt,
+ max space between ticks=15,
every mark/.append style={mark size=8},
major tick length=0.1cm,
minor tick length=0.066cm,
@@ -1862,5 +1871,47 @@ Feel free to redefine the scaling -- the option may still be useful to get more
\end{codeexample}
As for |small|, it can be convenient to set |footnotesize| and set |width| afterwards.
-See also the |compat=newest| method which causes the positions of |xlabel|, |ylabel| and |zlabel| to be right near the tick labels.
+You will need |compat=1.3| or newer for this to work.
+\end{stylekey}
+
+\begin{stylekey}{/pgfplots/tiny}
+ Redefines several keys such that the axis is very small. Most descriptions will have |\tiny| as fontsize.
+
+\begin{codeexample}[]
+\begin{tikzpicture}
+ \begin{axis}[tiny,
+ title=A ``tiny'' figure,
+ xlabel=The $x$ axis,
+ ylabel=The $y$ axis,
+ minor tick num=1,
+ legend entries={Leg}]
+ \addplot+[const plot]
+ coordinates {
+ (0,0) (1,1) (3,3) (5,10)
+ };
+ \end{axis}
+\end{tikzpicture}
+\end{codeexample}
+ The initial setting is
+\begin{codeexample}[code only]
+\pgfplotsset{
+ tiny/.style={
+ width=4cm,
+ height=,
+ legend style={font=\tiny},
+ tick label style={font=\tiny},
+ label style={font=\tiny},
+ title style={font=\footnotesize},
+ every axis title shift=0pt,
+ max space between ticks=12,
+ every mark/.append style={mark size=6},
+ major tick length=0.1cm,
+ minor tick length=0.066cm,
+ every legend image post/.append style={scale=0.8},
+ },
+}
+\end{codeexample}
+As for |small|, it can be convenient to use |tiny,width=4.5cm| to adjust the width.
+
+You will need |compat=1.3| or newer for this to work.
\end{stylekey}