diff options
author | Karl Berry <karl@freefriends.org> | 2012-10-26 21:36:14 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-10-26 21:36:14 +0000 |
commit | 4147899f17a6e0b0dde20f309845c4fc0032bce9 (patch) | |
tree | 3609a0dc99736d7a2081187b9e12e9bac63c6bb6 /Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.2dplots.tex | |
parent | 3d12d871ae8a0e941fb2521bdc99ce436aeb17c6 (diff) |
pgfplots (26oct12)
git-svn-id: svn://tug.org/texlive/trunk@28094 c570f23f-e606-0410-a88d-b1316a301751
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.tex | 40 |
1 files changed, 37 insertions, 3 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 a35ef1b049f..16162db494a 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.2dplots.tex +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.2dplots.tex @@ -176,7 +176,7 @@ coordinates Here |xbar| yields |/pgfplots/xbar| because it is an argument to the axis, not to a single plot. 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: + This can be implemented using the keys |symbolic y coords| and |nodes near coords|, respectively: \begin{codeexample}[] \begin{tikzpicture} \begin{axis}[ @@ -385,12 +385,46 @@ Here, |ybar| yields |/pgfplots/ybar| because it is an argument to the axis, not \end{pgfplotskey} -\begin{key}{/pgf/bar width=\marg{dimension} (initially 10pt)} +\begin{key}{/pgf/bar width=\marg{dimension or unit} (initially 10pt)} Configures the width used by |xbar| and |ybar|. It is accepted to provide mathematical expressions. + + As of \PGFPlots\ 1.7, it is allows to provide an \emph{unit} as |bar width|. In this case, the |bar width| will be interpreted as axis unit: +\begin{codeexample}[] +\begin{tikzpicture} +\begin{axis}[ + xbar=0pt,% space of 0pt between adjacent bars + bar width=2, + width=7cm, + height=12cm, + minor y tick num=4, + ytick=data, + enlargelimits=0.15] +\addplot +coordinates + {(10,5) (15,10) (5,15) (24,20) (30,25)}; +\addplot +coordinates + {(3,5) (5,10) (15,15) (20,20) (35,25)}; +\end{axis} +\end{tikzpicture} +\end{codeexample} + In order to interprete arguments as units, you have to write |\pgfplotsset{compat=1.7}| (or newer) into your preamble. Older versions will implicitly append the |pt| suffix if the argument is no dimension. + + \begin{command}{\pgfplotbarwidth} + A mathematical expression which results in the fully computed value of |bar width| (i.e.\ it includes any unit computations). + \end{command} + + Note that you may need to |enlargelimits| in order to see the complete bar -- \PGFPlots\ will not automatically update the axis limits to respect |bar width|. \end{key} -\begin{key}{/pgf/bar shift=\marg{dimension} (initially 0pt)} +\begin{key}{/pgf/bar shift=\marg{dimension or unit} (initially 0pt)} Configures a shift for |xbar| and |ybar|. Use |bar shift| together with |bar width| to draw multiple bar plots into the same axis. It is accepted to provide mathematical expressions. + + As of \PGFPlots\ 1.7, it is allows to provide an \emph{unit} as |bar shift|. In this case, the |bar shift| will be interpreted as axis unit. + \begin{command}{\pgfplotbarshift} + A mathematical expression which results in the fully computed value of |bar shift| (i.e.\ it includes any unit computations). + \end{command} + Note that you may need to |enlargelimits| in order to see the complete bar -- \PGFPlots\ will not automatically update the axis limits to respect |bar shift|. \end{key} |