diff options
author | Karl Berry <karl@freefriends.org> | 2011-12-30 22:58:39 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-12-30 22:58:39 +0000 |
commit | 44ccd75065152cd73c512645bc4dc6d258fe62cb (patch) | |
tree | 39e9b861199f3172d9cff378a68f2c773248db87 /Master/texmf-dist/doc/latex | |
parent | b3370daebbffee05312803e74c40f6d0abbf08c4 (diff) |
pgfplots 1.5.1 (29dec11)
git-svn-id: svn://tug.org/texlive/trunk@24977 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex')
43 files changed, 1536 insertions, 311 deletions
diff --git a/Master/texmf-dist/doc/latex/pgfplots/ChangeLog b/Master/texmf-dist/doc/latex/pgfplots/ChangeLog index af6cc90165e..89b6d6e0e7b 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/ChangeLog +++ b/Master/texmf-dist/doc/latex/pgfplots/ChangeLog @@ -1,3 +1,101 @@ +2011-12-29 Christian Feuersaenger <ludewich@users.sourceforge.net> + - RELEASED VERSION 1.5.1 + +2011-12-29 Christian Feuersaenger <ludewich@users.sourceforge.net> + - Added the 'fixed relative' number formatting style. + +2011-12-28 Christian Feuersaenger <ludewich@users.sourceforge.net> + - Added 'const plot mark mid' and 'jump mark mid' plot handlers. + - Added 'log ticks with fixed point' style + +2011-12-22 Christian Feuersaenger <ludewich@users.sourceforge.net> + - Patched tikz ellipses and circles such that they automatically use + pgfplots transformations + +2011-12-19 Christian Feuersaenger <ludewich@users.sourceforge.net> + - patchplots lib: added 'patch type=polygon' + +2011-12-17 Christian Feuersaenger <ludewich@users.sourceforge.net> + - fixed bug: now, 'minor xtick=data' will also work as documented. + - improved docs for \addplot {<data>} node[pos=<fraction>] + - finished feature: \addplot {<data>} node[pos=<fraction>] now outputs the + inverse coord trafo (if any) when using \pgfplotspointplotattime. + +2011-12-16 Christian Feuersaenger <ludewich@users.sourceforge.net> + - fixed bug: \addplot[decorate,...] did not work. + - fixed bug: \addplot[postactions={...},...] did not work. + - fixed bug: \addplot[preactions={...},...] did not work. + +2011-12-10 Christian Feuersaenger <ludewich@users.sourceforge.net> + - fixed bug: axis background path for 2d axes was not filled + +2011-11-03 Christian Feuersaenger <ludewich@users.sourceforge.net> + - PGF bugfix: added FPU support for ==, !=, <=, >=, ? + +2011-10-29 Christian Feuersaenger <ludewich@users.sourceforge.net> + - fixed problem with pgf number printer: it introduced spurious spaces + I updated the pgf backw. compatibility layer accordingly + +2011-10-23 Christian Feuersaenger <ludewich@users.sourceforge.net> + - fixed bug: view={0}{90},axis equal failed. + - fixed bug: \pgfplotstabletranspose with 'colnames from=<first col>' failed + - fixed bug: stacked plots and logs did use the wrong math format (the bug + was introduced two weeks ago) + +2011-10-22 Christian Feuersaenger <ludewich@users.sourceforge.net> + - fixed bug: contour prepared format=matlab did not properly if one + contour level has multiple segments. + - contour filled: introduced sanity checking to detect if the input + sequence is sorted as assumed + +2011-10-15 Christian Feuersaenger <ludewich@users.sourceforge.net> + - provided implementations of \addplot ... node[pos=<p>] {} for scatter and bar plots. + +2011-10-13 Christian Feuersaenger <ludewich@users.sourceforge.net> + - fixed bug: 'stack plots=y,xmode=log' did not work + - added feature 'trim axis group left' and 'trim axis group right' + - fixed bug: markers in polar plots did disappear unless their angle was 0 + +2011-10-08 Christian Feuersaenger <ludewich@users.sourceforge.net> + - improved plot loaded table: added sanity checking for the unsupported \thisrow feature + +2011-09-24 Christian Feuersaenger <ludewich@users.sourceforge.net> + - improved 'node[pos=<fraction>]' feature: now, \pgfplotspointattime + allows to access the logical coordinates of that point. + +2011-09-21 Christian Feuersaenger <ludewich@users.sourceforge.net> + - added 'scatter rgb', 'scatter cmyk', and 'scatter explicit color' styles + +2011-09-03 Christian Feuersaenger <ludewich@users.sourceforge.net> + - new nodes at time in pgfplots feature: used backwards gradient for last point + - new nodes at time: added feature 'pos segment=<plot segment>' + +2011-09-02 Christian Feuersaenger <ludewich@users.sourceforge.net> + - implemented support for nodes at time in plots, i.e. + \addplot... {.....} node[pos=<fraction>] + missing are specifics for plot types and documentation + +2011-08-31 Christian Feuersaenger <ludewich@users.sourceforge.net> + - documented 'execute at begin axis' + +2011-08-22 Christian Feuersaenger <ludewich@users.sourceforge.net> + - fixed bug: 'raw gnuplot' surface input did not work well because + pgfplots used 'samples' and 'samples y' to assign the input matrix + dimensions + +2011-08-10 Christian Feuersaenger <ludewich@users.sourceforge.net> + - fixed bug: Markers in legends have not (always?) been filled properly + because the every axis legend style sets 'fill=white'. + +2011-08-10 Christian Feuersaenger <ludewich@users.sourceforge.net> + - fixed bug: "log origin=0" was wrong (it placed it at 1 = log(e) ). + +2011-08-02 Christian Feuersaenger <ludewich@users.sourceforge.net> + - fixed bug: 'ytick=\empty' in semilogyaxis failed with compilation error + +2011-07-29 Christian Feuersaenger <ludewich@users.sourceforge.net> + - RELEASED VERSION 1.5 + 2011-07-25 Christian Feuersaenger <ludewich@users.sourceforge.net> - added \pgfplotsplotfromname{<label>} macro which does the work for \ref{<label>} diff --git a/Master/texmf-dist/doc/latex/pgfplots/TeX-programming-notes.pdf b/Master/texmf-dist/doc/latex/pgfplots/TeX-programming-notes.pdf Binary files differindex 82a4fcb2760..bfa8b972ca6 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/TeX-programming-notes.pdf +++ b/Master/texmf-dist/doc/latex/pgfplots/TeX-programming-notes.pdf diff --git a/Master/texmf-dist/doc/latex/pgfplots/TeX-programming-notes.tex b/Master/texmf-dist/doc/latex/pgfplots/TeX-programming-notes.tex index 18cad8e6738..c1416c16a51 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/TeX-programming-notes.tex +++ b/Master/texmf-dist/doc/latex/pgfplots/TeX-programming-notes.tex @@ -44,7 +44,7 @@ \begin{document} \maketitle \begin{abstract}% - This document contains notes which are intended for those who are interested in \TeX\ programming. It is valueable for beginners as a first start with a lot of examples, and it is also valueable for experienced \TeX nicians who are interested in details about \TeX\ programming. However, it is neither a complete reference, nor a complete manual of \TeX. + This document contains notes which are intended for those who are interested in \TeX\ programming. It is valuable for beginners as a first start with a lot of examples, and it is also valuable for experienced \TeX nicians who are interested in details about \TeX\ programming. However, it is neither a complete reference, nor a complete manual of \TeX. \end{abstract} \tableofcontents \section{Introduction} @@ -183,12 +183,12 @@ The first thing to know is: \TeX\ deals the input as a long, long sequence of `` The second thing to know is what characters are \emph{before} \TeX\ has seen them. Although this knowledge is rarely needed in every day's life, it is nevertheless important. The characters which are in the input document are nothing but characters at first. Even the characters known to have a special meaning like `|%|', `|\|' or the braces `|{}|' are \emph{not} special -- until they have been converted to a token. This happens when \TeX\ encounters them the first time during its linear processing of the character stream. A token stays a token - and it will remain the same token forever. If you manage to tell \TeX\ that `|\|' is a normal character and \TeX\ sees just one backslash, this backslash will be a normal character token -- even if the meaning of all following backslashes is again special. -Now, we are given a very long list of tokens \meta{token1}\meta{token2}\meta{token3}\meta{token4}\meta{token5}$\cdots$. \TeX\ processes these tokens one-by-one in linear sequence. If \meta{token1} is a character token like `|a|', it is typeset. This is not what I want to write about here now; my main point is how to program in \TeX\footnote{Of course, typesetting is an art in itsself and there is a lot to read about it. Just not here in these notes.}. So, the interesting thing in these notes is when \meta{token1} is a macro. +Now, we are given a very long list of tokens \meta{token1}\meta{token2}\meta{token3}\meta{token4}\meta{token5}$\cdots$. \TeX\ processes these tokens one-by-one in linear sequence. If \meta{token1} is a character token like `|a|', it is typeset. This is not what I want to write about here now; my main point is how to program in \TeX\footnote{Of course, typesetting is an art in itself and there is a lot to read about it. Just not here in these notes.}. So, the interesting thing in these notes is when \meta{token1} is a macro. \subsubsection{Macros} We have already seen some applications of macros above. Actually, most users who are willing to read notes about \TeX\ programming will have seen macros and may have written some on their own -- for example using |\newcommand| (|\newcommand| is a ``more high--level'' version of |\def| used only in \LaTeX). -A macro has a name and is treated as an elementary token in \TeX\ (even if the name is very long). A macro has replacement text. As soon as \TeX\ encounters a macro, it replaces its occurance with the replacement text. Furthermore, a macro can consume one or more of the following tokens as arguments. +A macro has a name and is treated as an elementary token in \TeX\ (even if the name is very long). A macro has replacement text. As soon as \TeX\ encounters a macro, it replaces its occurrence with the replacement text. Furthermore, a macro can consume one or more of the following tokens as arguments. \begin{codeexample}[] \def\macro{This here is actually the replacement text.} Executing it: `\macro'. @@ -202,7 +202,7 @@ This here is not really a surprise. What might come as a surprise is that the ac \def\macro#1-#2.{replacement with arguments: `#1' and `#2'.} Invoking it: \macro a-sign. \end{codeexample} -\noindent The last example |\macro| runs through the token list which follows the occurance of |\macro|. This token list is ``|a-sign.|''. Macro expansion is greedy, that means the first matching pattern is used. Now, our |\macro| expected something, then a minus sign `|-|', then another (possibly long) argument, then a period `|.|'. The argument between |\macro| and the minus sign is available as |#1| and the tokens between the minus sign and the period as |#2|. +\noindent The last example |\macro| runs through the token list which follows the occurrence of |\macro|. This token list is ``|a-sign.|''. Macro expansion is greedy, that means the first matching pattern is used. Now, our |\macro| expected something, then a minus sign `|-|', then another (possibly long) argument, then a period `|.|'. The argument between |\macro| and the minus sign is available as |#1| and the tokens between the minus sign and the period as |#2|. \begin{codeexample}[] \def\macro(#1,#2,#3){I found arguments `#1', `#2' and `#3'.} @@ -235,7 +235,7 @@ The last example already shows something about |\def|: the replacement text can \def\macrotwo{Macro two contains \macroone.} Now, I execute it: \macrotwo. \def\macroone{Redefined macroone} -Now, I exectute the second macro again: \macrotwo. +Now, I execute the second macro again: \macrotwo. \end{codeexample} Macros can be defined almost everywhere in a \TeX\ document. They can also be invoked almost everywhere. @@ -259,7 +259,7 @@ Now, I exectute the second macro again: \macrotwo. `|\macrothree g|'. - Finally, |\macrothree| expects one parameter token (or a token list enclosen in parenthesis). The next token is `|g|', which is consumed from the input token list and the replacement text is inserted -- and `|#1|' is replaced by `|g|'. Then, the token list is + Finally, |\macrothree| expects one parameter token (or a token list enclosed in parenthesis). The next token is `|g|', which is consumed from the input token list and the replacement text is inserted -- and `|#1|' is replaced by `|g|'. Then, the token list is `|Got `g'|'. @@ -471,18 +471,18 @@ Besides |\def| and |\edef|, there are some more commands which allow to define m \end{command} \begin{command}{\gdef\meta{\textbackslash macroname}\meta{argument pattern}\marg{replacement text}} - A shortcut for |\global\def|. It defines |\macroname| globally, independant of the current scope. + A shortcut for |\global\def|. It defines |\macroname| globally, independent of the current scope. You should avoid macros which exist in both, the global namespace and a local scope, with different meanings. Section~\ref{sec:scopes} explains more about scoping. \end{command} \begin{command}{\xdef\meta{\textbackslash macroname}\meta{argument pattern}\marg{replacement text}} - A shortcut for |\global\edef|. It defines |\macroname| globally, independant of the current scope. + A shortcut for |\global\edef|. It defines |\macroname| globally, independent of the current scope. You should avoid macros which exist in both, the global namespace and a local scope, with different meanings. Section~\ref{sec:scopes} explains more about scoping. \end{command} \begin{command}{\csname\meta{expandable tokens}\textbackslash endcsname} - This command is not a macro definition, it is a definition of a macro's \emph{name}. The ``cs'' means ``control sequence''. The |\csname|, |\endcsname| pair defines a control sequence name (a macro name) using \meta{expandable tokens}. The control sequence character `|\|' will be prepended automatically by |\csname|.\footnote{In fact, the contents of \texttt{\textbackslash escapechar} will be used here. If its value is -1, no character will be prepended. The same holds for any occurance where a backslash would be inserted by \TeX\ commands.} + This command is not a macro definition, it is a definition of a macro's \emph{name}. The ``cs'' means ``control sequence''. The |\csname|, |\endcsname| pair defines a control sequence name (a macro name) using \meta{expandable tokens}. The control sequence character `|\|' will be prepended automatically by |\csname|.\footnote{In fact, the contents of \texttt{\textbackslash escapechar} will be used here. If its value is -1, no character will be prepended. The same holds for any occurrence where a backslash would be inserted by \TeX\ commands.} \begin{codeexample}[] \def\macro{Content} This here is normal usage: `\macro'. @@ -553,7 +553,7 @@ The value of \textbackslash i is now \i. \end{codeexample} \noindent The listing above defines |\i|, enters a local scope (a \TeX\ ``group'') and changes |\i|. However, due to \TeX's scoping rules, the old program state will be restored \emph{completely} after returning from the local group! Neither the change to |\i| nor the definition of |\b| will survive. The same holds for register changes or other assignments. -\TeX\ groups can be created in one of three ways: using curly braces\footnote{Or other tokens with the correct category code, compare~\cite{texbook}.}, using |\begingroup| or using |\bgroup|. Curly braces are seldom used to delimit \TeX\ groups because the other commands are more flexible. If one uses curly braces, they need to match up -- it is forbidden to have unmatches curly braces. +\TeX\ groups can be created in one of three ways: using curly braces\footnote{Or other tokens with the correct category code, compare~\cite{texbook}.}, using |\begingroup| or using |\bgroup|. Curly braces are seldom used to delimit \TeX\ groups because the other commands are more flexible. If one uses curly braces, they need to match up -- it is forbidden to have unmatched curly braces. \begin{command}{\begingroup} Starts a new \TeX\ group (a local scope). The scope will be active until it will be closed by |\endgroup|. The |\endgroup| command can occur later in the main token list. \end{command} @@ -595,7 +595,7 @@ A global variable, on the other hand, maintains the same value throughout \emph{ \subsubsection{Transporting Changes to an Outer Group} -There are a couple of methods to ``transport'' changes to an outer scope. Some are copy operations, some require to redo the the changes again after the end of the scope. All of them can be realized using expansion control. +There are a couple of methods to ``transport'' changes to an outer scope. Some are copy operations, some require to redo the changes again after the end of the scope. All of them can be realized using expansion control. Let's start with macro definitions which should be carried over the end of the group. I see the following methods: \begin{itemize} @@ -747,12 +747,12 @@ We have now \texttt{\string temp=\meaning\temp}. \item You should generally make sure that the matching |\else| or |\fi| tokens are ``directly reachable'', i.e.\ without token expansion. - The background here is that \TeX\ works on a token--based level: Whenever it encounters an |\if|\ldots\ statement, it evaluates it and scans tokens to find the matching end part (either an |\else| or an |\fi| token). But it will not expand tokens fduring this scan, although it will count nested |\if...\fi| pairs! Thus, if you are careless, it might become confused and your conditional will go awry. + The background here is that \TeX\ works on a token--based level: Whenever it encounters an |\if|\ldots\ statement, it evaluates it and scans tokens to find the matching end part (either an |\else| or an |\fi| token). But it will not expand tokens during this scan, although it will count nested |\if...\fi| pairs! Thus, if you are careless, it might become confused and your conditional will go awry. \end{enumerate} \subsection{Loops} \label{sec:loops} -As you have seen, in \TeX{} we have a a very specific control over token expansion. This makes it possible to construct even loops via means of recursion. In essence, a loop consist of the following parts: +As you have seen, in \TeX{} we have a very specific control over token expansion. This makes it possible to construct even loops via means of recursion. In essence, a loop consist of the following parts: \begin{itemize} \item counter or, more generally, list of items \item incrementor, or more generally, a next item picker @@ -790,10 +790,10 @@ For a counting loop, we need a counter |\count0|, an incrementor |\advance|, a t There are some subtleties to the above example: \begin{itemize} - \item We put a lot of \% in the example. Why? Note that whenever \TeX{} scans for a number -- e.\,g. as in the case of |#1=#2| -- it will continue scanning token by token, that is digit by digit, till he is sure that the number has ended, even over white space, and even expanding macros in case they themself might not represent numbers again. Hence, \% tells \TeX{} to stop scanning. It is generally good practice to place \% to tell \TeX{} to stop scanning for more digits. However, there are some exceptions to it as well: In case of |\advance#1 by1| one should keep a white space in between, as well as in the case of |\ifnum#1=#2|. + \item We put a lot of \% in the example. Why? Note that whenever \TeX{} scans for a number -- e.\,g. as in the case of |#1=#2| -- it will continue scanning token by token, that is digit by digit, till he is sure that the number has ended, even over white space, and even expanding macros in case they themselves might not represent numbers again. Hence, \% tells \TeX{} to stop scanning. It is generally good practice to place \% to tell \TeX{} to stop scanning for more digits. However, there are some exceptions to it as well: In case of |\advance#1 by1| one should keep a white space in between, as well as in the case of |\ifnum#1=#2|. \item We placed the threshold |3| in |\countingloop{\count0} in 0:{3}| in curly brackets. Why? \TeX{} otherwise will recognize only the token |1| if a threshold of e\,g. |10| is given and stumble over the now remnant `extra' argument |0|. That is because a single letter represents a token to \TeX{}. Hence, two letters are two tokens and -- ungrouped -- become two arguments. Here, we have to group the threshold to make clear what we mean. \item One last thing becomes clear first when debugging is activated: As loops are done by recursion, i.\,e. by expansion followed by expansion till some threshold is reached, we will end with a lot of |\fi|s in the above case. If we place |\tracingmacros=2 \tracingcommands=2| before the |\countingloop| call and inspect the log file this will become apparent. This is bad because \TeX{} will keep a stack frame open for each |\if|\ldots|\fi| sequence. If we now have a loop over 10.000 items \ldots - \item It is not good practice to use one of the system counters, here |\count0|, becaused one can never be sure that is not used for something else or changed somewhere else. E.\,g. when the page is full, \TeX{} will interrupt the current sequence of tokens to deal with creating a new page and finishing the old one, in this course changing |\count0|. Hence, we should also create our own counter. + \item It is not good practice to use one of the system counters, here |\count0|, because one can never be sure that is not used for something else or changed somewhere else. E.\,g. when the page is full, \TeX{} will interrupt the current sequence of tokens to deal with creating a new page and finishing the old one, in this course changing |\count0|. Hence, we should also create our own counter. \end{itemize} Hence, we modify the example as follows: @@ -871,7 +871,7 @@ Again, we make clear the subtleties contained therein: \end{itemize} \subsection{More On \TeX} -This document is far from complete. I recommend reading about conditional expressions in \cite{schwartz} (german, online version) or \cite{texbook} (bounded book). Hints about loops can be found in the manual of \PGFPlots, \cite{pgfplots} and the manual of \PGF, \cite{tikz}. Moreover, \PGFPlots\ and \PGF\ come with a whole lot of utility functions which are documented in the source |.code.tex| files. +This document is far from complete. I recommend reading about conditional expressions in \cite{schwartz} (German, online version) or \cite{texbook} (bounded book). Hints about loops can be found in the manual of \PGFPlots, \cite{pgfplots} and the manual of \PGF, \cite{tikz}. Moreover, \PGFPlots\ and \PGF\ come with a whole lot of utility functions which are documented in the source |.code.tex| files. %\subsection{Conditional Expressions} diff --git a/Master/texmf-dist/doc/latex/pgfplots/bugtracker/minimal_12.pdf b/Master/texmf-dist/doc/latex/pgfplots/bugtracker/minimal_12.pdf Binary files differnew file mode 100644 index 00000000000..930337e8a49 --- /dev/null +++ b/Master/texmf-dist/doc/latex/pgfplots/bugtracker/minimal_12.pdf diff --git a/Master/texmf-dist/doc/latex/pgfplots/bugtracker/minimal_12.tex b/Master/texmf-dist/doc/latex/pgfplots/bugtracker/minimal_12.tex new file mode 100644 index 00000000000..3f11c01a719 --- /dev/null +++ b/Master/texmf-dist/doc/latex/pgfplots/bugtracker/minimal_12.tex @@ -0,0 +1,37 @@ + +\documentclass{article} +\usepackage{pgfplots} +\begin{document} +\begin{tikzpicture} +\begin{axis}[ + small, + width=12cm, + height=1.8in, + ymin=0, + ymax=10, + xmin=0, + xmax=2, + ybar, + ymajorgrids=true, + yminorgrids=false, + minor y tick num=0, + ytick pos=left, + xtick pos=left, + ytick align=center, + yticklabel={$\pgfmathprintnumber{\tick}\%$}, + xtick align=outside, + x tick style={}, + xticklabel style={rotate=45,anchor=east,font=\scriptsize\sffamily}, + extra y tick style={tick pos=right, ticklabel pos=right, grid +style={thick,color=black}}, + extra y ticks={6.25}, + extra y tick labels={Extra Label}, +] + +%\addplot plot[error bars/.cd,y dir=plus,y explicit,x dir=none] table +%[x=Index,y expr=100*\thisrow{AvgLocked},y error=Diff]{locked_tabbed.dat}; + +\end{axis} +\end{tikzpicture} +\end{document} + diff --git a/Master/texmf-dist/doc/latex/pgfplots/bugtracker/minimal_13.pdf b/Master/texmf-dist/doc/latex/pgfplots/bugtracker/minimal_13.pdf Binary files differnew file mode 100644 index 00000000000..9c05dea1f14 --- /dev/null +++ b/Master/texmf-dist/doc/latex/pgfplots/bugtracker/minimal_13.pdf diff --git a/Master/texmf-dist/doc/latex/pgfplots/bugtracker/minimal_13.tex b/Master/texmf-dist/doc/latex/pgfplots/bugtracker/minimal_13.tex new file mode 100644 index 00000000000..3f11c01a719 --- /dev/null +++ b/Master/texmf-dist/doc/latex/pgfplots/bugtracker/minimal_13.tex @@ -0,0 +1,37 @@ + +\documentclass{article} +\usepackage{pgfplots} +\begin{document} +\begin{tikzpicture} +\begin{axis}[ + small, + width=12cm, + height=1.8in, + ymin=0, + ymax=10, + xmin=0, + xmax=2, + ybar, + ymajorgrids=true, + yminorgrids=false, + minor y tick num=0, + ytick pos=left, + xtick pos=left, + ytick align=center, + yticklabel={$\pgfmathprintnumber{\tick}\%$}, + xtick align=outside, + x tick style={}, + xticklabel style={rotate=45,anchor=east,font=\scriptsize\sffamily}, + extra y tick style={tick pos=right, ticklabel pos=right, grid +style={thick,color=black}}, + extra y ticks={6.25}, + extra y tick labels={Extra Label}, +] + +%\addplot plot[error bars/.cd,y dir=plus,y explicit,x dir=none] table +%[x=Index,y expr=100*\thisrow{AvgLocked},y error=Diff]{locked_tabbed.dat}; + +\end{axis} +\end{tikzpicture} +\end{document} + diff --git a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_DoG.table b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_DoG.table index d0bc6aa2934..810947150ee 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_DoG.table +++ b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_DoG.table @@ -1,6 +1,7 @@ -#Curve 0 of 1, 100 points -#x y type +# Curve 0 of 1, 100 points +# Curve title: "1.3*exp(-x**2/10) - exp(-x**2/20)" +# x y type -1.5000000e+01 -1.3007078e-05 i -1.4696970e+01 -2.0398026e-05 i -1.4393939e+01 -3.1696136e-05 i diff --git a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_exp.table b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_exp.table index 05ffaa9cf4a..8780ad734a2 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_exp.table +++ b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_exp.table @@ -1,29 +1,30 @@ -#Curve 0 of 1, 25 points -#x y type -0.0000000e+00 0.0000000e+00 i -4.1666667e-01 4.1666667e-01 i -8.3333333e-01 8.3333333e-01 i -1.2500000e+00 1.2500000e+00 i -1.6666667e+00 1.6666667e+00 i -2.0833333e+00 2.0833333e+00 i -2.5000000e+00 2.5000000e+00 i -2.9166667e+00 2.9166667e+00 i -3.3333333e+00 3.3333333e+00 i -3.7500000e+00 3.7500000e+00 i -4.1666667e+00 4.1666667e+00 i -4.5833333e+00 4.5833333e+00 i -5.0000000e+00 5.0000000e+00 i -5.4166667e+00 5.4166667e+00 i -5.8333333e+00 5.8333333e+00 i -6.2500000e+00 6.2500000e+00 i -6.6666667e+00 6.6666667e+00 i -7.0833333e+00 7.0833333e+00 i -7.5000000e+00 7.5000000e+00 i -7.9166667e+00 7.9166667e+00 i -8.3333333e+00 8.3333333e+00 i -8.7500000e+00 8.7500000e+00 i -9.1666667e+00 9.1666667e+00 i -9.5833333e+00 9.5833333e+00 i -1.0000000e+01 1.0000000e+01 i +# Curve 0 of 1, 25 points +# Curve title: "exp(x)" +# x y type +0.0000000e+00 1.0000000e+00 i +4.1666667e-01 1.5168968e+00 i +8.3333333e-01 2.3009759e+00 i +1.2500000e+00 3.4903430e+00 i +1.6666667e+00 5.2944901e+00 i +2.0833333e+00 8.0311950e+00 i +2.5000000e+00 1.2182494e+01 i +2.9166667e+00 1.8479586e+01 i +3.3333333e+00 2.8031625e+01 i +3.7500000e+00 4.2521082e+01 i +4.1666667e+00 6.4500093e+01 i +4.5833333e+00 9.7839985e+01 i +5.0000000e+00 1.4841316e+02 i +5.4166667e+00 2.2512745e+02 i +5.8333333e+00 3.4149510e+02 i +6.2500000e+00 5.1801282e+02 i +6.6666667e+00 7.8577199e+02 i +7.0833333e+00 1.1919350e+03 i +7.5000000e+00 1.8080424e+03 i +7.9166667e+00 2.7426137e+03 i +8.3333333e+00 4.1602620e+03 i +8.7500000e+00 6.3106881e+03 i +9.1666667e+00 9.5726626e+03 i +9.5833333e+00 1.4520741e+04 i +1.0000000e+01 2.2026466e+04 i diff --git a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_exp.vrs b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_exp.vrs index 8cea9808f2c..4e1b41aeea6 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_exp.vrs +++ b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_exp.vrs @@ -1 +1 @@ -gnuplot 4.2 patchlevel 6 +gnuplot 4.4 patchlevel 2 diff --git a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_gnuplot_ppp.table b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_gnuplot_ppp.table index fa803afffdc..d75fd6b549a 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_gnuplot_ppp.table +++ b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_gnuplot_ppp.table @@ -1,6 +1,7 @@ -#Curve 0 of 1, 120 points -#x y type +# Curve 0 of 1, 120 points +# Curve title: "10000*sin(x/3)" +# x y type -4.0000000e+01 -6.9395153e+03 i -3.9327731e+01 -5.1659813e+03 i -3.8655462e+01 -3.1341153e+03 i diff --git a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_parable.table b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_parable.table index e014e557a37..621e63db652 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_parable.table +++ b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_parable.table @@ -1,6 +1,7 @@ -#Curve 0 of 1, 25 points -#x y type +# Curve 0 of 1, 25 points +# Curve title: "4*x**2 - 5" +# x y type -5.0000000e+00 9.5000000e+01 i -4.5833333e+00 7.9027778e+01 i -4.1666667e+00 6.4444444e+01 i diff --git a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_pow2.table b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_pow2.table index e9ebe377a99..b379011a796 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_pow2.table +++ b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_pow2.table @@ -1,12 +1,13 @@ -#Curve 0 of 1, 8 points -#x y type -0.0000000e+00 -2.0794415e+00 i -1.4285714e+00 -3.5647569e+00 i -2.8571429e+00 -5.0500723e+00 i -4.2857143e+00 -6.5353877e+00 i -5.7142857e+00 -8.0207031e+00 i -7.1428571e+00 -9.5060185e+00 i -8.5714286e+00 -1.0991334e+01 i -1.0000000e+01 -1.2476649e+01 i +# Curve 0 of 1, 8 points +# Curve title: "2**(-1.5*x -3)" +# x y type +0.0000000e+00 1.2500000e-01 i +1.4285714e+00 2.8303865e-02 i +2.8571429e+00 6.4088700e-03 i +4.2857143e+00 1.4511663e-03 i +5.7142857e+00 3.2858891e-04 i +7.1428571e+00 7.4402689e-05 i +8.5714286e+00 1.6847069e-05 i +1.0000000e+01 3.8146973e-06 i diff --git a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_sin.table b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_sin.table index ed5cd95f8f6..b0e96592e42 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_sin.table +++ b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_sin.table @@ -1,6 +1,7 @@ -#Curve 0 of 1, 25 points -#x y type +# Curve 0 of 1, 25 points +# Curve title: "sin(x)" +# x y type -5.0000000e+00 9.5892427e-01 i -4.5833333e+00 9.9168387e-01 i -4.1666667e+00 8.5475261e-01 i diff --git a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_tangens.table b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_tangens.table index 41050d8adee..58a66f2dcbe 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_tangens.table +++ b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_tangens.table @@ -1,6 +1,7 @@ -#Curve 0 of 1, 1000 points -#x y type +# Curve 0 of 1, 1000 points +# Curve title: "tan(x)" +# x y type -4.7123890e+00 -5.4437465e+15 i -4.7029548e+00 -1.0599405e+02 i -4.6935206e+00 -5.2992306e+01 i diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.basic.reference.tex b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.basic.reference.tex index e81c8fcb7d2..09671754622 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.basic.reference.tex +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.basic.reference.tex @@ -98,6 +98,21 @@ Invoke them: The result is `\pgfmathresult'. \end{codeexample} + \noindent The math engine in \pgfname\ typically uses \TeX's internal arithmetics. That means: it is well suited for numbers in the range $[-16384,16384]$ and has a precision of $5$ digits. + + The number range is typically too small for plotting applications. \PGFPlots\ improves the number range by means of |\pgfkeys{/pgf/fpu}\pgfmathparse{1+41}| to activate the ``floating point unit'' (fpu) and to apply all following operations in floating point. + + In \PGFPlots, the key |/pgfplots/use fpu| is typically on, which means that any coordinate arithmetics are carried out with the |fpu|. However, all \pgfname\ related drawing operations still use the standard math engine. + + In case you ever need to process numbers of extended precision, you may want to use +\begin{codeexample}[] +\pgfkeys{/pgf/fpu}% +\pgfmathparse{1000*1000} + +The result is `\pgfmathprintnumber{\pgfmathresult}'. +\end{codeexample} + Note that results of the |fpu| are typically not in human-readable format, so |\pgfmathprintnumber| is the preferred way to typeset such numbers. + Please refer to \cite{tikz} for more details. \end{command} @@ -209,16 +224,59 @@ The number is printed using the current number printing options, see the manual \end{command} \subsection{Specifying Basic Coordinates} +\label{sec:basic:coordinates} \begin{commandlist}{% \pgfplotspointaxisxy\marg{x coordinate}\marg{y coordinate},% \pgfplotspointaxisxyz\marg{x coordinate}\marg{y coordinate}\marg{z coordinate}} - Point commands like |\pgfpointxy| which take logical, absolute coordinates and return a low--level point. Every transformation from user transformations to logarithms are applied. + Point commands like |\pgfpointxy| which take logical, absolute coordinates and return a low--level point. Every transformation from user transformations to logarithms is applied. Since the transformations are initialized after the axis is complete, this command needs to be postponed (see |\pgfplotsextra|). + + This command is the basic--level variant of |axis cs:|\meta{x coordinate}|,|\meta{y coordinate}|,|\meta{z coordinate}. \end{commandlist} \begin{commandlist}{% + \pgfplotspointaxisdirectionxy\marg{x coordinate}\marg{y coordinate},% + \pgfplotspointaxisdirectionxyz\marg{x coordinate}\marg{y coordinate}\marg{z coordinate}} + Point commands like |\pgfpointxy| which take logical, \emph{relative} coordinates and return a low--level point. Every transformation from user transformations to logarithms is applied. The difference to |\pgfplotspointaxisxy| is that the shift of the linear transformation is skipped here (compare |disabledatascaling|). + + This command is the basic--level variant of |axis direction cs:|\meta{x coordinate}|,|\meta{y coordinate}|,|\meta{z coordinate}. Please refer to the documentation of |axis direction cs| for more details. + + Use this command whenever something of \emph{relative} character like directions or lengths need to be supplied. One use-case is to draw ellipses: +\begin{codeexample}[] +\begin{tikzpicture} +\begin{axis}[ + xmin=-3, xmax=3, + ymin=-3, ymax=3, + extra x ticks={-1,1}, + extra y ticks={-2,2}, + extra tick style={grid=major}, +] + \draw[red] \pgfextra{ + \pgfpathellipse{\pgfplotspointaxisxy{0}{0}} + {\pgfplotspointaxisdirectionxy{1}{0}} + {\pgfplotspointaxisdirectionxy{0}{2}} + % see also the documentation of + % 'axis direction cs' which + % allows a simpler way to draw this ellipse + }; + \draw[blue] \pgfextra{ + \pgfpathellipse{\pgfplotspointaxisxy{0}{0}} + {\pgfplotspointaxisdirectionxy{1}{1}} + {\pgfplotspointaxisdirectionxy{0}{2}} + }; + \addplot [only marks,mark=*] coordinates { (0,0) }; +\end{axis} +\end{tikzpicture} +\end{codeexample} + + Since the transformations are initialized after the axis is complete, this command needs to be provided either inside of a \tikzname\ |\path| command (like |\draw| in the example above) or inside of |\pgfplotsextra|. + +\end{commandlist} + + +\begin{commandlist}{% \pgfplotspointrelaxisxy\marg{rel x coordinate}\marg{rel y coordinate},% \pgfplotspointrelaxisxyz\marg{rel x coordinate}\marg{rel y coordinate}\marg{rel z coordinate}} Point commands which take \emph{relative} coordinates such that $x=0$ is the \emph{lower} $x$ axis limit and $x=1$ the \emph{upper} $x$ axis limit. @@ -236,13 +294,80 @@ The number is printed using the current number printing options, see the manual They are used for |axis description cs|, see Section~\ref{pgfplots:sec:axis:description:cs}. \end{commandlist} +\begin{commandlist}{\pgfplotspointaxisorigin} + A point coordinate at the origin, $(0,0,0)$. If the origin is not part of the axis limits, the nearest point on the boundary is returned instead. + + This is the same coordinate as returned by the |origin| anchor. +\end{commandlist} + +\begin{commandlist}{% + \pgfplotstransformcoordinatex\marg{x coordinate of an axis},% + \pgfplotstransformcoordinatey\marg{y coordinate of an axis},% + \pgfplotstransformcoordinatey\marg{z coordinate of an axis}} + Defines |\pgfmathresult| to be the low-level \PGF\ coordinate corresponding to the input argument. + + The command applies any |[xyz] coord trafo| keys, data scalings and/or logarithms or whatever \PGFPlots\ does to map input coordinates to internal coordinates. + + The result can be used inside of a |\pgfpointxy| statement (i.e.\ it still needs to be scaled with the respective \PGF\ unit vector). +\begin{codeexample}[] +\begin{tikzpicture} + \begin{axis}[xmin=0,xmax=2,ymin=0,ymax=5] + \pgfplotsextra{% + \pgfplotstransformcoordinatex{1}% + \let\xcoord=\pgfmathresult + \pgfplotstransformcoordinatey{1}% + \let\ycoord=\pgfmathresult + \pgfpathcircle + {\pgfqpointxy{\xcoord}{\ycoord}} + {5pt}% + \pgfusepath{fill}% + }% + \end{axis} +\end{tikzpicture} +\end{codeexample} + The result of this command is also available as math method |transformcoordinatex| (see the documentation for |axis cs|). + + Please note that the transformations are only initialised if the axis is complete. This means you need to provide |\pgfplotsextra| as is shown in the example above. +\end{commandlist} + +\begin{commandlist}{% + \pgfplotstransformdirectionx\marg{x direction of an axis},% + \pgfplotstransformdirectiony\marg{y direction of an axis},% + \pgfplotstransformdirectiony\marg{z direction of an axis}} + Defines |\pgfmathresult| to be a low-level \PGF\ \emph{direction vector component}. + + A direction vector needs to be \emph{added} to some coordinate in order to get a coordinate, compare the documentation for |\pgfplotspointaxisdirectionxy| and |axis direction cs|. + + The argument \meta{x direction of an axis} is processed in (almost) the same way as for |\pgfplotstransformcoordinatex|. The only difference is that \emph{directions} need no shifting transformation. + + The result of this command is also available as math method |transformdirectionx| (see the documentation for |axis direction cs|). + + See |axis direction cs| for details and examples about this command. +\end{commandlist} + +\begin{command}{\pgfplotsconvertunittocoordinate\marg{x, y or z}\marg{dimension}} + Converts a dimension (with unit!) to a corresponding $x$, $y$ or $z$ coordinate. The result will be written to |\pgfmathresult| (without units). + + It is possible to use the result as arguments for the |\pgfpointxyz| commands. + + The effect is to multiply \meta{dimension} with the inverse length of the unit vector for the specified axis. These lengths are precomputed in \PGFPlots\ so the operation is fast. +\begin{codeexample}[code only] +\pgfplotsconvertunittocoordinate{x}{5pt} +% now, the command uses exactly 5pt in x direction: +\pgfqpointxyz{\pgfmathresult}{4}{3} +\end{codeexample} +\end{command} + + \begin{commandlist}{% \pgfplotspointunitx,% \pgfplotspointunity,% \pgfplotspointunitz}% - Low--level point commands which return the $x$, $y$ or $z$ unit vectors. + Low--level point commands which return the canvas $x$, $y$ or $z$ unit vectors. - The point |\pgfplotspointxyz{1}{0}{0}| is the same as |\pgfplotspointunitx|, the |{0}{1}{0}| coordinate the unit $y$ vector and the |{0}{0}{1}| coordinate the unit $z$ vector. + The |\pgfplotspointunitx| is the \pgfname\ unit vector in $x$ direction. + + These vectors are essentially the same as |\pgfqpointxyz{1}{0}{0}|, |\pgfqpointxyz{0}{1}{0}|, and |\pgfqpointxyz{0}{0}{1}|, respectively. The unit $z$ vector is only defined for three dimensional axes. \end{commandlist} @@ -259,12 +384,6 @@ The number is printed using the current number printing options, see the manual The $x_i$ are the |\pgfplotspointunitx| variants. \end{commandlist} -\begin{commandlist}{\pgfplotspointaxisorigin} - A point coordinate at the origin, $(0,0,0)$. If the origin is not part of the axis limits, the nearest point on the boundary is returned instead. - - This is the same coordinate as returned by the |origin| anchor. -\end{commandlist} - \begin{command}{\pgfplotsqpointoutsideofaxis\marg{three-char-string}\marg{coordinate}\marg{normal distance}} Provides a point coordinate on one of the available four axes in case of a two dimensional figure or on one of the available twelve axes in case of a three dimensional figure. @@ -303,47 +422,6 @@ The number is printed using the current number printing options, see the manual This value is used for |ticklabel cs|. \end{command} -\begin{commandlist}{% - \pgfplotstransformcoordinatex\marg{x coordinate of an axis},% - \pgfplotstransformcoordinatey\marg{y coordinate of an axis},% - \pgfplotstransformcoordinatey\marg{z coordinate of an axis}} - Defines |\pgfmathresult| to be the low-level \PGF\ coordinate corresponding to the input argument. - - The command applies any |[xyz] coord trafo| keys, data scalings and/or logarithms or whatever \PGFPlots\ does to map input coordinates to internal coordinates. - - The result can be used inside of a |\pgfpointxy| statement (i.e.\ it still needs to be scaled with the respective \PGF\ unit vector). -\begin{codeexample}[] -\begin{tikzpicture} - \begin{axis}[xmin=0,xmax=2,ymin=0,ymax=5] - \pgfplotsextra{% - \pgfplotstransformcoordinatex{1}% - \let\xcoord=\pgfmathresult - \pgfplotstransformcoordinatey{1}% - \let\ycoord=\pgfmathresult - \pgfpathcircle - {\pgfqpointxy{\xcoord}{\ycoord}} - {5pt}% - \pgfusepath{fill}% - }% - \end{axis} -\end{tikzpicture} -\end{codeexample} - Please note that the transformations are only initialised if the axis is complete! This means you need to provide |\pgfplotsextra| as is shown in the example above. -\end{commandlist} - -\begin{command}{\pgfplotsconvertunittocoordinate\marg{x, y or z}\marg{dimension}} - Converts a dimension (with unit!) to a corresponding $x$, $y$ or $z$ coordinate. The result will be written to |\pgfmathresult| (without units). - - It is possible to use the result as arguments for the |\pgfpointxyz| commands. - - The effect is to multiply \meta{dimension} with the inverse length of the unit vector for the specified axis. These lengths are precomputed in \PGFPlots\ so the operation is fast. -\begin{codeexample}[code only] -\pgfplotsconvertunittocoordinate{x}{5pt} -% now, the command uses exactly 5pt in x direction: -\pgfqpointxyz{\pgfmathresult}{4}{3} -\end{codeexample} -\end{command} - \begin{commandlist}{\pgfplotsmathfloatviewdepthxyz\marg{x}\marg{y}\marg{z}, \pgfplotsmathviewdepthxyz\marg{x}\marg{y}\marg{z}} Both macros define |\pgfmathresult| to be the ``depth'' of a three dimensional point $\bar x = (x,y,z)$. The depth is defined to be the scalar product of $\bar x$ with $\vec d$, the view direction of the current axis. diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.figlist b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.figlist index f07c8ae81ef..a03fe00ac86 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.figlist +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.figlist @@ -57,6 +57,10 @@ figures/expensiveexamplereference_threedimaxis_7 figures/expensiveexamplereference_threedimaxis_8 figures/expensiveexamplereference_4 figures/expensiveexamplereference_5 +figures/expensiveexamplereference_nodes_0 +figures/expensiveexamplereference_nodes_1 +figures/expensiveexamplereference_nodes_2 +figures/expensiveexamplereference_nodes_3 figures/expensiveexamplepolar_0 figures/expensiveexamplememspeed_0 figures/expensiveexamplememspeed_1 diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.importexport.tex b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.importexport.tex index 0a63ad07dce..9c24c347565 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.importexport.tex +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.importexport.tex @@ -3,7 +3,7 @@ { \tikzset{external/figure name/.add={}{importexport_}}% \label{sec:pgfplots:importexport} -This section contains information of how to single pictures into separate \pdf\ graphics files (or \eps\ graphics files). Furthermore, it explains a matlab (tm) script which allows to convert from matlab to \PGFPlots. +This section contains information of how to single pictures into separate \pdf\ graphics files (or \eps\ graphics files). Furthermore, it explains a matlab (\textregistered) script which allows to convert from matlab to \PGFPlots. \subsection[Export to pdf/eps]{Export to {\normalfont\pdf/\eps}} \label{sec:pgfplots:export} @@ -447,9 +447,9 @@ save P.dat data -ASCII |\addplot3[surf,mesh/cols=10,mesh/ordering=rowwise,shader=interp] file {P.dat};|. \subsubsection{matlab2pgfplots.m} -This is a Matlab (tm) script which attempts to convert a Matlab figure to \PGFPlots. It requires Matlab version 7.4 (or higher). +This is a Matlab (\textregistered) script which attempts to convert a Matlab figure to \PGFPlots. It requires Matlab version 7.4 (or higher). -\paragraph{Attention:} The author of \PGFPlots\ does not have enough time to maintain this script as much as he wants to. In other words, it supports only a small subset of \PGFPlots. You may also want to look at |matlab2tikz|, a conversion script of Nico Schl\"omer available at +\paragraph{Attention:} This script is largely outdated and supports only a very small subset of \PGFPlots. You may want to look at |matlab2tikz|, a conversion script of Nico Schl\"omer available at \url{http://www.mathworks.com/matlabcentral/fileexchange/22022-matlab2tikz} diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.libs.colormaps.tex b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.libs.colormaps.tex index 4d30ee8d0c7..3101743614b 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.libs.colormaps.tex +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.libs.colormaps.tex @@ -6,7 +6,7 @@ \begin{pgfplotslibrary}{colormaps} A small library providing a number of additional |colormap|s. Many of these |colormap|s originate from the free Matlab package ``SC --- powerful image rendering'' of Oliver Woodford. - The purpose of this library is to provide further |colormap|s to all users and to provide some of them which are similar to those used by Matlab (tm). + The purpose of this library is to provide further |colormap|s to all users and to provide some of them which are similar to those used by Matlab (\textregistered). \begin{stylekey}{/pgfplots/colormap/autumn} A style which is equivalent to diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.libs.patchplots.tex b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.libs.patchplots.tex index f226828055a..c78c71af974 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.libs.patchplots.tex +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.libs.patchplots.tex @@ -5,7 +5,7 @@ \subsubsection{Additional Patch Types} \message{Underfull hbox is OK.^^J}% -\begin{pgfplotskey}{patch type=\mchoice{default,rectangle,triangle,line,quadratic spline,cubic spline,\\bilinear,triangle quadr,biquadratic,coons} (initially default)} +\begin{pgfplotskey}{patch type=\mchoice{default,rectangle,triangle,line,quadratic spline,cubic spline,\\bilinear,triangle quadr,biquadratic,coons,polygon,tensor bezier} (initially default)} The |patchplots| library supports several new |patch type|s in addition to the initially available choices (which are |rectangle|,|triangle| and |line|). The documentation of the two--dimensional choices from page~\pageref{key:patch:type} is repeated here. There are two new one--dimensional patch types, namely |quadratic spline| and |cubic spline|. Here, |patch type=quadratic spline| consists of quadratic patches of $n=3$ vertices each. The vertices are interpolated exactly: @@ -207,7 +207,57 @@ coordinates { \noindent The four cubic B\'ezier curves are \emph{equivalent} to \texttt{curveto} paths of \pgfname, i.e.\ \parg{corner 1}|.. controls|\parg{control point A}| and |\parg{control point B}| .. |\parg{corner 2} paths. The interpolated shading is bilinear. More precisely, a bilinear shading in the unit cube $[0,1]^2$ is initialised which is then mapped into the Coons patch such that the corners match. The color interpolation uses only the color data of the four corners, color values of intermediate control points are ignored for the shading (although their value will be respected for the upper and lower limit of color data). In contrast to the finite element patches, a Coons patch is inherently two--dimensional. While you can still use three--dimensional coordinates, \PGFPlots\ will draw the shading as you provide it, without checking for the depth information (as it does for the other |patch type|s). In other words: depending on the current |view| angle, the shading might fold over itself in unexpected ways. Even for two dimensions, Coons patches may fold over themselves. To determine which part is foreground and which part is background, the following rule applies: the four corner points $(0)$, $(3)$, $(6)$, $(9)$ are associated to the unit cube points $(u,v) = (0,0)$, $(0,1)$, $(1,1)$ and $(1,0)$, respectively. The edge between corner $(3)$ and $(6)$ (i.e. the one with $v=1$) is foreground, the edge between $(1)$ and $(9)$ is background. Thus, large values of $v$ are drawn on top of small values of $v$. If $v$ is constant, large values of $u$ are drawn on top of small values of $u$. Thus, reordering the patch vertices (choosing a different first vertex and/or reversing the sequence) allows to get different foreground/background configurations\footnote{Internally, \PGFPlots\ employs such mechanisms to map the higher order isoparametric patch types to Coons patches, sorting according their corner's depth information.}. + + The choice \declareandlabel{tensor bezier} is similar to |patch type=coons|: it allows to define a bezier patch. However, it allows more freedom: it has $16$ control points instead of the $12$ of a |coons| patch. The four additional control points are situated in the center of each patch. This |patch type| generates \texttt{.pdf} shadings of type~$7$ (whereas |coons| patches are shadings of type~$6$). It has been added for reasons of completeness, although it has not been tested properly. Please refer to the specification of the \texttt{.pdf} format for details\footnote{If someone is willing to test it and document it, feel free to email me!}. + + The choice \declareandlabel{polygon} expects polygons with a fixed number of vertices. This |patch type| requires the number of vertices as argument: + \begin{pgfplotskey}{vertex count=\meta{count}} + The number of vertices to be used for |patch type=polygon|. The number can be arbitrary. All input patches are expected to have this many vertices -- but it is acceptable if a patch uses the same vertex multiple times. This means that |patch type=polygon| accepts polygons with different numbers of vertices, but you need to apply some sort of ``manual padding''. + + This parameter is (currently) mandatory. + \end{pgfplotskey} + A |patch| plot with |patch type=polygon| simply connects the $n$=|vertex count| vertices in their order of appearance and closes the resulting path: +\begin{codeexample}[] +\begin{tikzpicture} + \begin{axis}[view/h=120,xlabel=$x$,ylabel=$y$] + \addplot3[ + opacity=0.5, + table/row sep=\\, + patch, + patch type=polygon, + vertex count=5, + patch table with point meta={% + % pt1 pt2 pt3 pt4 pt5 cdata + 0 1 7 2 2 0\\ + 1 6 5 5 5 1\\ + 1 5 4 2 7 2\\ + 2 4 3 3 3 3\\ + }] + table { + x y z\\ + 0 2 0\\%0 + 2 2 0\\%1 + 0 1 3\\%2 + 0 0 3\\%3 + 1 0 3\\%4 + 2 0 2\\%5 + 2 0 0\\%6 + 1 1 2\\%7 + }; +% replicate the vertex list to show \coordindex: +\addplot3[only marks,nodes near coords=\coordindex] +table[row sep=\\] { +0 2 0\\ 2 2 0\\ 0 1 3\\ 0 0 3\\ +1 0 3\\ 2 0 2\\ 2 0 0\\ 1 1 2\\ +}; + \end{axis} +\end{tikzpicture} +\end{codeexample} + \noindent The example above defines the |patch| by means of a connectivity table (|patch table with point meta|) and a vertex list (the normal input coordinates of the plot): there are~$8$ vertices and~$4$ polygons. Note that~$2$ of these polygons are triangles, one has $4$ corners and only of them actually has all~$5$ allocated corners. This effect can be achieved by replicating one of the corners. The connectivity table in our example defines a unique color for each polygon: $0$ for the first patch, $1$ for the second, $2$ for the third, and $3$ for the last. These numbers map into the current |colormap|. + + The |patch type=polygon| supports \emph{neither} triangulation \emph{nor} shading \emph{nor} refinement. The order of appearance of the input points is supposed to be the order in which the line--to operations of the resulting path are generated. + \end{pgfplotskey} @@ -243,7 +293,7 @@ coordinates { The refined patches reproduce the geometry's shape exactly. In addition, they improve color interpolation. Note that its purpose is just visualization, therefor hanging nodes are allowed (and will be generated by |patch refine| for most |patch type|s). - Patch refinement is implemented for all supported patches except for |patch type=coons|. + Patch refinement is implemented for all supported patches except for |patch type=coons|, |tensor bezier|, and |polygon|. \end{pgfplotskey} \begin{pgfplotskey}{patch to triangles=\mchoice{true,false} (initially false)} @@ -270,7 +320,7 @@ coordinates { For one--dimensional |patch type|s like |quadratic spline|, |patch to triangles| results in approximation by means of |patch type=line| instead of |triangle|. - The |patch to triangles| feature is implemented for all supported patches except for |patch type=coons|. + The |patch to triangles| feature is implemented for all supported patches except for |patch type=coons|, |tensor bezier|, and |polygon|. \end{pgfplotskey} \subsubsection{Peculiarities of Flat Shading and High Order Patches} diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.libs.polar.tex b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.libs.polar.tex index cded9ba07af..a03994d5e80 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.libs.polar.tex +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.libs.polar.tex @@ -130,8 +130,14 @@ The |polar| library also supports partial axes. If you provide |xmin|/|xmax|, yo \end{codeexample} Currently, the first angle must be lower than the second one. But you can employ the periodicity to get pies as follows: +\message{Overfull hbox is OK}% \begin{codeexample}[] \begin{tikzpicture} + \begin{polaraxis}[xmin=90,xmax=270] + \addplot coordinates {(0,1) (90,1) (180,1) (270,1)}; + \end{polaraxis} +\end{tikzpicture}~% +\begin{tikzpicture} \begin{polaraxis}[xmin=270,xmax=420] \addplot coordinates {(0,1) (90,1) (180,1) (270,1)}; \end{polaraxis} diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.makefile b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.makefile index 54ecfb8bdf2..42acbc1be17 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.makefile +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.makefile @@ -188,6 +188,18 @@ figures/expensiveexamplereference_4.pdf: figures/expensiveexamplereference_5.pdf: pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "figures/expensiveexamplereference_5" "\def\tikzexternalrealjob{pgfplots}\input{pgfplots}" +figures/expensiveexamplereference_nodes_0.pdf: + pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "figures/expensiveexamplereference_nodes_0" "\def\tikzexternalrealjob{pgfplots}\input{pgfplots}" + +figures/expensiveexamplereference_nodes_1.pdf: + pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "figures/expensiveexamplereference_nodes_1" "\def\tikzexternalrealjob{pgfplots}\input{pgfplots}" + +figures/expensiveexamplereference_nodes_2.pdf: + pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "figures/expensiveexamplereference_nodes_2" "\def\tikzexternalrealjob{pgfplots}\input{pgfplots}" + +figures/expensiveexamplereference_nodes_3.pdf: + pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "figures/expensiveexamplereference_nodes_3" "\def\tikzexternalrealjob{pgfplots}\input{pgfplots}" + figures/expensiveexamplepolar_0.pdf: pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "figures/expensiveexamplepolar_0" "\def\tikzexternalrealjob{pgfplots}\input{pgfplots}" diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.pdf b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.pdf Binary files differindex 5250a46b483..937f4c670ed 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.pdf +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.pdf diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.preamble.tex b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.preamble.tex index 7204490b1e2..dcefd3a1da3 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.preamble.tex +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.preamble.tex @@ -149,7 +149,7 @@ \graphicspath{{figures/}} -\def\preambleconfig{width=7cm,compat=1.4} +\def\preambleconfig{width=7cm,compat=1.5.1} \expandafter\pgfplotsset\expandafter{\preambleconfig} 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} diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.3dconfiguration.tex b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.3dconfiguration.tex index 5cac72c8414..3f7d0c91e92 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.3dconfiguration.tex +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.3dconfiguration.tex @@ -45,7 +45,7 @@ This section described keys which are used to configure the appearance of three The |view| is computed as follows. The view is defined by two rotations: the first rotation uses the \meta{azimuth} angle to rotate around the $z$ axis. Afterwards, the view is rotated \meta{elevation} degrees around the \emph{rotated} $x$ axis (more precisely, it is rotated $-$\meta{elevation} degrees). The resulting transformed $x$--$z$--plane is the viewport, i.e.\ the view direction is always the transformed positive $y$ axis. - The |view| argument is compatible with the argument of the Matlab (tm) view command, i.e.\ you can use + The |view| argument is compatible with the argument of the Matlab (\textregistered) view command, i.e.\ you can use |[h,v] = view| @@ -178,6 +178,8 @@ This section described keys which are used to configure the appearance of three \begin{pgfplotskey}{plot box ratio=\marg{\meta{x stretch} \meta{y stretch} \meta{z stretch}} (initially 1 1 1)} Allows to customize the aspect ratio between the three different axes in a three dimensional plot. + Note that this key is different from the related |unit vector ratio|: the plot box is only useful for three dimensional axes, and it will usually distort the unit vector ratios. If you want equal unit ratios, consider using |unit vector ratio|. + The |plot box ratio| is applied before any rotations and stretch--to--fill routines have been invoked. Thus, the initial setting\footnote{Note that you can also use the syntax \texttt{\{1\}\{1\}\{1\}} instead of space-separation.} |1 1 1| makes all axes equally long before the stretch--to--fill routine is applied. \pgfplotsexpensiveexample diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.3dplots.tex b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.3dplots.tex index af882182fdc..86b1f562b2c 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.3dplots.tex +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.3dplots.tex @@ -167,7 +167,7 @@ Enough for now, let's continue. \end{axis} \end{tikzpicture} \end{codeexample} - Again, note the subtle difference to the common matrix indexing where a column has the second index fixed. \PGFPlots\ refers to the way one would write down a function on a sheet of paper (this is consistent with how Matlab (tm) displays discrete functions with matrices). + Again, note the subtle difference to the common matrix indexing where a column has the second index fixed. \PGFPlots\ refers to the way one would write down a function on a sheet of paper (this is consistent with how Matlab (\textregistered) displays discrete functions with matrices). \end{pgfplotskey} @@ -625,7 +625,7 @@ The following example uses |mark=cube*| and |z buffer=sort| to place boxes at ea \end{axis} \end{tikzpicture} \end{codeexample} - \noindent In principle, there is nothing wrong with the idea as such, and it looks quite good -- but it enlarges the resulting pdf document considerably and might take a long time to render. It works as follows: for every mesh element (either triangle for |patch| plots or rectangle for lattice plots), it creates a low level shading. It then fills the single mesh element with that shading, and strokes the edges with |faceted color|. The declaration of that many low level shadings is rather inefficient in terms of pdf objects (large output files) and might render slowly\footnote{My experience is as follows: Acrobat reader can efficiently render huge \texttt{interp} shadings. But it is very slow for \texttt{faceted interp} shadings. Linux viewers like xpdf, okular and evince take a very long time to render \texttt{interp} shadings, but are fast for \texttt{faceted interp} shadings.}. For orthogonal plots (like |view={0}{90}|), the effect of |faceted interp| can be gained with less cost if one uses two separate |\addplot| commands: one with |surf| and one with |mesh|. Handle this choice with care. + \noindent In principle, there is nothing wrong with the idea as such, and it looks quite good -- but it enlarges the resulting pdf document considerably and might take a long time to render. It works as follows: for every mesh element (either triangle for |patch| plots or rectangle for lattice plots), it creates a low level shading. It then fills the single mesh element with that shading, and strokes the edges with |faceted color|. The declaration of that many low level shadings is rather inefficient in terms of pdf objects (large output files) and might render slowly\footnote{My experience is as follows: Acrobat reader can efficiently render huge \texttt{interp} shadings. But it is very slow for \texttt{faceted interp} shadings. Linux viewers like xpdf are reasonably efficient for \texttt{interp} (at least with my bugfixes to libpoppler) and are also fast for \texttt{faceted interp} shadings.}. For orthogonal plots (like |view={0}{90}|), the effect of |faceted interp| can be gained with less cost if one uses two separate |\addplot| commands: one with |surf| and one with |mesh|. Handle this choice with care. \paragraph{Details:} \begin{itemize} @@ -648,10 +648,8 @@ The following example uses |mark=cube*| and |z buffer=sort| to place boxes at ea \item It uses the current color map in any case, ignoring |draw| and |fill|. \item For surface plots with lots of points, |shader=interp| produces smaller |pdf| documents, requires less compilation time in \TeX\ and requires less time to display in Acrobat Reader than |shader=flat|. - \item So, the postscript driver \emph{truncates} coordinates to 24 bit -- which might result in a loss of precision (the truncation is not very intelligent). See the |surf shading/precision| key for details. To improve compatibility, this 24 bit truncation algorithm is enabled by default also for pdf documents. - \item - At the time of this writing, few viewers provide satisfying support for |shader=interp|. The Acrobat Reader has full and fast support for interpolated shadings. But some free Linux viewers like xpdf, - okular and evince need a long time and do not display the colors correctly\footnote{The author of this package has submitted bugfixes to xpdf/libpoppler, so this issue will hopefully be fixed with upcoming versions.} (evince even shows transparency). I hope this message will soon become outdated... if not, provide bug reports to the Linux community to communicate the need to improve support for Type 4 (|patch|) and Type 5 pdf (|surf|) and Type 7 (|patch| and elements of the |patchplots| library) shadings. + \item The postscript driver \emph{truncates} coordinates to 24 bit -- which might result in a loss of precision (the truncation is not very intelligent). See the |surf shading/precision| key for details. To improve compatibility, this 24 bit truncation algorithm is enabled by default also for pdf documents. + \item The choice |shader=interp| works well with either Acrobat Reader or recent versions of free viewers\footnote{The author of this package has submitted bugfixes to xpdf/libpoppler which should be part of the current stable versions of many viewers.}. However, some free viewers show colors incorrectly (like evince). I hope this message will soon become outdated... if not, provide bug reports to the Linux community to communicate the need to improve support for Type 4 (|patch|) and Type 5 pdf (|surf|) and Type 7 (|patch| and elements of the |patchplots| library) shadings. \item The |interp| shader yields the same outcome as |faceted interp,faceted color=none|, although |faceted interp| requires much more ressources. \end{itemize} \end{itemize} @@ -1177,7 +1175,7 @@ There are currently \emph{no} equivalents of |const plot| and its variants or th \end{axis} \end{tikzpicture} \end{codeexample} - Patch plots make use of the |mesh| configuration, including the |shader|. Thus, the example above uses the initial |shader=faceted| (which uses the \emph{mean} color data to determine a triangle's color and a related stroke color). The |shader=interp| yields the following result\footnote{At the time of this writing, many free readers, especially those for Linux, have difficulties displaying the correct color maps and take a long time to render. Acrobat reader displays the shading according to the pdf standard. Bugfixes for xpdf/libpoppler are currently about to be tested.}: + Patch plots make use of the |mesh| configuration, including the |shader|. Thus, the example above uses the initial |shader=faceted| (which uses the \emph{mean} color data to determine a triangle's color and a related stroke color). The |shader=interp| yields the following result: \begin{codeexample}[] \begin{tikzpicture} \begin{axis} @@ -1459,7 +1457,7 @@ There are currently \emph{no} equivalents of |const plot| and its variants or th The choice |patch type=|\declareandlabel{line} expects $n=2$ vertices which make up a line. It is used for one-dimensional |mesh| plots (see Section~\ref{sec:1d:mesh} for examples). - There are more values for |patch type| like |bilinear|, |triangle quadr|, |biquadratic|, |coons| and |tensor bezier|. Please refer to the separate |patchplots| library in Section~\ref{sec:lib:patchplots}. + There are more values for |patch type| like |bilinear|, |triangle quadr|, |biquadratic|, |coons|, |polygon| and |tensor bezier|. Please refer to the separate |patchplots| library in Section~\ref{sec:lib:patchplots}. \end{pgfplotskey} \begin{stylekey}{/pgfplots/every patch} diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.alignment.tex b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.alignment.tex index 1abde181669..8d22d833337 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.alignment.tex +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.alignment.tex @@ -543,4 +543,18 @@ The |pgfinterruptboundingbox| environment does not include its content into the It works similarly to |trim axis left|: the effect is that everything right of the right axis line of the last axis environment is truncated from the bounding box. \end{stylekey} + +\begin{stylekey}{/tikz/trim axis group left} + A style which has the same effect as |trim axis left|, but is tailored for the |groupplots| library. + + It has the value |trim left=(group c1r1.south west)|. + + The style needs to be provided as argument to |\begin{tikzpicture}[trim axis group left]|. It expects (at least) one |groupplot| environment in the picture. The effect is to trim everything which is left of the first group axis' anchor |south west| (i.e.\ everything left of the left axis boundary). +\end{stylekey} + +\begin{stylekey}{/tikz/trim axis group right} + A style which has the same effect as |trim axis right|, but is tailored for the |groupplots| library. + + It works similarly to |trim axis group left|: the effect is that everything right of the rightmost axis in a group plot (the last element of the |groupplot| environment) is truncated from the bounding box. +\end{stylekey} \end{pgfplotskey} diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.axis-addplot.tex b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.axis-addplot.tex index 7aa6b11237c..2cbbc623b96 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.axis-addplot.tex +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.axis-addplot.tex @@ -937,7 +937,7 @@ The \meta{options} determine the appearance of the plotted function; these param \pgfkeys{/pdflinks/search key prefixes in/.add={/pgfplots/plot graphics/,}{}} \begin{addplotoperation}[]{graphics}{\marg{file name}} - This plot type allows to extend the plotting capabilities of \PGFPlots\ beyond its own limitations. The idea is to generate the graphics as such (for example, a contour plot, a complicated shaded surface\footnote{See also Section~\ref{sec:pgfplots:surfplots} for an overview of \PGFPlots\ methods to draw shaded surfaces.} or a large point cluster) with an external program like Matlab (tm) or |gnuplot|. The graphics, however, should \emph{not} contain an axis or descriptions. Then, we use |\includegraphics| and a \PGFPlots\ axis which fits exactly on top of the imported graphics. + This plot type allows to extend the plotting capabilities of \PGFPlots\ beyond its own limitations. The idea is to generate the graphics as such (for example, a contour plot, a complicated shaded surface\footnote{See also Section~\ref{sec:pgfplots:surfplots} for an overview of \PGFPlots\ methods to draw shaded surfaces.} or a large point cluster) with an external program like Matlab (\textregistered) or |gnuplot|. The graphics, however, should \emph{not} contain an axis or descriptions. Then, we use |\includegraphics| and a \PGFPlots\ axis which fits exactly on top of the imported graphics. Of course, one could do this manually by providing proper scales and such. The operation |plot graphics| is intended so simplify this process. However the \emph{main difficulty} is to get images with correct bounding box. Typically, you will have to adjust bounding boxes manually. @@ -973,7 +973,7 @@ Our first test was successful -- and not difficult at all because graphics progr \begin{enumerate} \item The free vector graphics program |inkscape| can help here. Its feature ``File $\gg$ Document Properties: Fit page to selection'' computes a tight bounding box around every picture element. - However, some images may contain a rectangular path which is as large as the bounding box (Matlab (tm) computes such |.eps| images). In this case, use the ``Ungroup'' method (context menu of |inkscape|) as often as necessary and remove such a path. + However, some images may contain a rectangular path which is as large as the bounding box (Matlab (\textregistered) computes such |.eps| images). In this case, use the ``Ungroup'' method (context menu of |inkscape|) as often as necessary and remove such a path. Finally, save as |.eps|. 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 a97eb068e5e..0e7dc2f4705 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.axisdescription.tex +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.axisdescription.tex @@ -907,6 +907,8 @@ Allows to replace the default images which are drawn inside of legends. When thi The default is the style |line legend|. + +\paragraph{Technical note:} At the time when legend images are drawn, the style |every axis legend| is in effect -- which have unwanted side-effects due to changed parameters (especially those concerning node placement, alignment, and shifting). It might be necessary to reset these parameters manually (\PGFPlots\ also attempts to reset the fill color). \end{pgfplotscodekey} \begin{stylekey}{/pgfplots/line legend} @@ -1376,7 +1378,7 @@ Note that legend texts are realized using |\node|\oarg{options} \marg{text}|;|, These keys allow to choose the locations of the axis lines. The last one, |axis lines| sets the same value for every axis. Ticks and tick labels are placed according to the chosen value as well. -The choice |bottom| will draw the $x$ line at $y=y_{\text{min}}$, |middle| will draw the $x$~line at $y=0$, and |top| will draw it at $y=y_{\text{max}}$. Finally, |box| is a combination of options |top| and |bottom|. The $y$~variant works similarly. +The choice |bottom| will draw the $x$ line at $y=y_{\text{min}}$, |middle| will draw the $x$~line at $y=0$, and |top| will draw it at $y=y_{\text{max}}$. Finally, |box| is a combination of options |top| and |bottom|. The choice |axis x line=none| is an alias for |hide x axis|. The $y$- and $z$ variants work in a similar way. The case |center| is a synonym for |middle|, both draw the line through the respective coordinate~$0$. If this coordinate is not part of the axis limit, the lower axis limit is chosen instead. @@ -1384,9 +1386,9 @@ The case |center| is a synonym for |middle|, both draw the line through the resp The starred versions $\dotsc$|line*| \emph{only} affect the axis lines, without correcting the positions of axis labels, tick lines or other keys which are (possibly) affected by a changed axis line. The non-starred versions are actually styles which set the starred key \emph{and} some other keys which also affect the figure layout: \begin{itemize} \item In case |axis x line=box|, the style |every boxed x axis| will be installed immediately. - \item In case |axis x line|$\neq$|box|, the style |every non boxed x axis| will be installed immediately. Furthermore, axis labels positions will be adjusted to fit the chosen value. + \item In case |axis x line|$\neq$|box|, the style |every non boxed x axis| will be installed immediately. Furthermore, some of these choices will modify axis label positions. \end{itemize} -The same holds true for the |y|-variants. The default styles are defined as +The handling of |axis y line| and |axis z line| is similar. The default styles are defined as \begin{codeexample}[code only] \pgfplotsset{ every non boxed x axis/.style={ @@ -1397,6 +1399,16 @@ The same holds true for the |y|-variants. The default styles are defined as every boxed x axis/.style={} } \end{codeexample} +In addition, conditional modifications of axis label styles will be taken. For example, |axis x line=middle| will set +\begin{codeexample}[code only] +\pgfplotsset{every axis x label/.style={at={(current axis.left of origin)},anchor=south west}} +\end{codeexample} +if the matching $y$ style has value |axis y line=right| and +\begin{codeexample}[code only] +\pgfplotsset{every axis x label/.style={at={(current axis.right of origin)},anchor=south east}} +\end{codeexample} +if |axis y line|$\neq$|right|. + Feel free to overwrite these styles if the default doesn't fit your needs or taste. Again, these styles will \emph{not} be used for |axis line*|. \begin{codeexample}[] diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.gridoptions-axiscoordinates.tex b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.gridoptions-axiscoordinates.tex index 23f04d5aacb..4c049a293ec 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.gridoptions-axiscoordinates.tex +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.gridoptions-axiscoordinates.tex @@ -43,7 +43,22 @@ Grid lines will be drawn before tick lines are processed, so ticks will be drawn \end{pgfplotsxykeylist} -\subsection{Accessing Axis Coordinates for Annotations} +\subsection{Custom Annotations} +Often, one may want to add custom drawing elements or descriptive texts to an axis. These graphical elements should be associated to some logical coordinate, grid point, or perhaps they should just be placed somewhere into the axis. + +\PGFPlots\ assists with the following ways when it comes to annotations: +\begin{enumerate} + \item You can explicitly provide any \Tikz\ instruction like |\draw ... ;| into the axis. Here, the |axis cs| allows + to provide coordinates of \PGFPlots. + + Furthermore, |rel axis cs| allows to position \Tikz\ elements relatively (like ``$50\%$ of the axis' width). + \item \PGFPlots\ can automatically generate nodes at every coordinate using its |nodes near coords| feature. + %\item \PGFPlots\ can automatically generate \Tikz\ labels for every coordinate (FIXME). + \item \PGFPlots\ allows you to place nodes on a plot, using the |\addplot ... node[pos=|\meta{fraction}|] {};| feature. +\end{enumerate} +This section explains all of the approaches, except for the |nodes near coords| feature which is documented in its own section. + +\subsubsection{Accessing Axis Coordinates in Graphical Elements} \label{sec:axis:coords}% \begin{coordinatesystem}{axis cs} \PGFPlots\ provides a new coordinate system for use inside of an axis, the ``axis coordinate system'', |axis cs|. @@ -110,11 +125,103 @@ It can be used to draw any \Tikz-graphics at axis coordinates. It is used like \end{tikzpicture} \end{codeexample} -\paragraph{Attention:} Whenever you draw additional graphics, consider using |axis cs|! It applies any logarithms, data scaling transformations or whatever \PGFPlots\ usually does! +Whenever you draw additional graphics, consider using |axis cs|! It applies any custom transformations (including |symbolic x coords|), logarithms, data scaling transformations or whatever \PGFPlots\ usually does and provides a low level \pgfname\ coordinate as result. -There is also a low--level interface to access the transformations and coordinates, see Section~\ref{sec:pgfplots:lowlevel} on page~\pageref{sec:pgfplots:lowlevel}. +In case you need only one component (say, the $y$ component) of such a vector, you can use the |\pgfplotstransformcoordinatey| command, see Section~\ref{sec:basic:coordinates} for details about basic level access. + +The result of |axis cs| is always an absoute position inside of an axis. This means, in particular, that \emph{adding} two points has unexpected effects: the expression |(axis cs:0,0) ++ (axis cs:1,0)| is not necessarily the same as |(axis cs:1,0)|. The background for such unexpected effects is that \PGFPlots\ applies a \emph{shifted} linear transformation which moves the origin in order to support its high accuracy and high data range (compare the documentation of |disabledatascaling|). + +In order to express \emph{relative} positions (or lengths), you need to use |axis direction cs|. +\end{coordinatesystem} + +\begin{coordinatesystem}{axis direction cs} + While |axis cs| allows to supply \emph{absolute positions}, |axis direction cs| supplies \emph{directions}. It allows to express \emph{relative} positions, includings lengths and dimensions, by means of axis coordinates. + + As noted in the documentation for |axis cs|, adding two coordinates by means of the \tikzname\ |++| operator may have unexpected effects. The correct way for |++| operations is |axis direction cs|: +\begin{codeexample}[] +\begin{tikzpicture} +\begin{axis} + \draw[red,-stealth] + (axis cs:1000,0) + -- % = line-to + ++ % = calculate a vector sum + (axis direction cs:1000,0); + + \addplot [only marks,mark=*] + coordinates { (1000,0) (2000,1) }; +\end{axis} +\end{tikzpicture} +\end{codeexample} + \noindent Here, the target of the red arrow is the position |(axis cs:2000,0)| as expected. + + Using relative positions is mainly useful for linear axes. Applying this command to log-axes might still work, but it requires more care. + + One use-case is to supply lengths -- for example in order to support |circle| or |ellipse| paths. The correct way to draw an ellipse in \PGFPlots\ would be to specify the two involved radii by means of two |(axis direction cs:|\meta{x,y}|)| expressions. In general, this is possible if you use the basic level macros |\pgfpathellipse| and |\pgfplotspointaxisdirectionxy|. Please refer to the documentation of |\pgfplotspointaxisdirectionxy| for two examples of drawing arbitrary ellipses by means of this method. + + Since drawing circles and ellipses inside of an axis is a common use-case, \PGFPlots\ automatically communicates its coordinate system transformations to \tikzname: whenever you write |\draw ellipse[|\declareandlabel{x radius}|=|\meta{x}|,|\declareandlabel{y radius}|=|\meta{y}|]|, the arguments \meta{x} and \meta{y} are considered to be \PGFPlots\ direction vectors and are handed over to |axis direction cs|. Consequently, ellipses with axis parallel radii are straight-forward and use the normal \tikzname\ syntax: +\begin{codeexample}[] +% requires \pgfplotsset{compat=1.5.1} ! +\begin{tikzpicture} +\begin{axis}[ + xmin=-2.5, xmax=2.5, + ymin=-2.5, ymax=2.5, + xtick={-2,-1,0,1,2}, + ytick={-2,-1,0,1,2}, + grid=major, +] + % standard tikz syntax: + \draw[black] (axis cs:0,0) + ellipse [ + x radius=1, y radius=2]; + + \draw[red] (axis cs:0,0) + ellipse [rotate=90, + x radius=1, y radius=2]; + % see \pgfplotspointaxisdirectionxy + % for arbitrary ellipses +\end{axis} +\end{tikzpicture} +\end{codeexample} + Here, the two ellipses are specified as usual in \tikzname. \PGFPlots\ ensures that all necessary transformations are applied to the two radii. Note that \PGFPlots\ usually has different axis scales for $x$~and~$y$. As a consequence, the rotated red ellipse does not fit into the axis lines; we would need to use |axis equal| to allow properly rotated ellipses. + + \paragraph{Attention:} this modification to circles and ellipses requires |\pgfplotsset{compat=1.5.1}|. + + The same applies to circles: in the standard view, a circle with \declareandlabel{radius}|=|$r$ will appear as an ellipse due to the different axis scales. Supplying |axis equal| results in true circles: +\begin{codeexample}[] +% requires \pgfplotsset{compat=1.5.1} ! +\begin{tikzpicture} +\begin{axis}[tiny,enlargelimits, + xmin=-1,xmax=1, + ymin=-1,ymax=1, + xtick={-1,0,1}, + ytick={-1,0,1}, + grid=major, +] + \draw[blue] (axis cs:0,0) circle[radius=1]; +\end{axis} +\end{tikzpicture} +\end{codeexample} +\begin{codeexample}[] +\begin{tikzpicture} +\begin{axis}[tiny,enlargelimits, + axis equal, + xmin=-1,xmax=1, + ymin=-1,ymax=1, + xtick={-1,0,1}, + ytick={-1,0,1}, + grid=major, +] + \draw[blue] (axis cs:0,0) circle[radius=1]; +\end{axis} +\end{tikzpicture} +\end{codeexample} + + In case you need access to |axis direction cs| inside of math expressions, you can employ the additional math function \declareandlabel{transformdirectionx}. It does the same as |axis direction cs|, but only in $x$ direction. The result of |transformdirectionx| is a dimensionless unit which can be interpreted relative to the current \pgfname\ $x$ unit vector $e_x$ (see the documentation of |\pgfplotstransformdirectionx| for details). + There are the math commands |transformdirectionx|, \declareandlabel{transformdirectiony}, and (if the axis is three--dimensional) \declareandlabel{transformdirectionz}. Each of them defines |\pgfmathresult| to contain the result of |\pgfplotstransformdirectionx| (or its variants for $y$ and $z$, respectively). + \end{coordinatesystem} + \begin{coordinatesystem}{rel axis cs} The ``relative axis coordinate system'', |rel axis cs|, uses the complete axis vectors as units. That means `$x=0$' denotes the point on the lower $x$ axis range and `$x=1$' the point on the upper $x$ axis range (see the remark below for |x dir=reverse|). @@ -176,3 +283,286 @@ There is also a low--level interface to access the transformations and coordinat The initial configuration |true| means that points placed with |rel axis cs| and/or |ticklabel cs| will be at the same position inside of the axes even if its ordering has been reversed. The choice |false| will disable the special treatment of |x dir=reverse|. \end{pgfplotskey} + +\subsubsection{Placing Nodes on Coordinates of a Plot} +{ +\tikzset{external/figure name/.add={}{nodes_}}% +The |\addplot| command is not only used for \PGFPlots, it can also carry additional drawing instructions which are handed over to \Tikz\ after the plot's path is complete. Among others, this can be used to add further nodes on the path. + +\begin{key}{/tikz/pos=\marg{fraction}} + The \meta{fraction} identifies a part of the recently completed plot if it is used before the trailing semicolon: +\pgfplotsexpensiveexample +\begin{codeexample}[] +\begin{tikzpicture} + \begin{axis} + \addplot[blue,domain=0:360] {sin(x)} + [yshift=8pt] + node[pos=0] {$0$} + node[pos=0.25] {$\pi/2$} + node[pos=0.5] {$\pi$} + node[pos=0.75] {$3/2\pi$} + node[pos=1] {$2\pi$} + ; + \end{axis} +\end{tikzpicture} +\end{codeexample} +\noindent Here, the |[yshift=8pt]| tells \Tikz\ to shift all following nodes upwards. The |node[pos=0] {$0$}| instruction tells \Tikz\ to add a text node at $0\%$ of the recently completed plot. The relative position $0\%$ (|pos=0|) refers to the first coordinate which has been seen by \PGFPlots, and $100\%$ (|pos=1|) refers to the last coordinate. Any value between $0$ and $1$ is interpolated in-between. Note that all these nodes belong to the plot's visualization (which is terminated by the semicolon). Consequently, all these nodes inherit the same graphic settings (like color choices). + + The position on the plot is computed by \PGFPlots\ using \emph{logical} coordinates. That means: it computes the overall length of the curve before the curve is projected to screen coordinates and identifies the desired position\footnote{This can be a time-consuming process. Consider using the external library if you have lots of such figures.}. Afterwards, it projects the final position to screen coordinates. Thus, the position identifies a location on the plot which is always the same, even in case of a rotated three-dimensional axis. \PGFPlots\ will linearly interpolate the fraction between successive coordinates. + + Valid choices for \meta{fraction} are any numbers in the range $[0,1]$. + + Note that the precise meaning of |pos| depends on the current plot handler: for most plot handlers, it defaults to linear interpolation (as in the examples above). For |only marks|, |scatter|, |ybar|, |xbar|, |ybar interval|, and |xbar interval|, it snaps to the nearest encountered coordinate. In this context, ``snap to nearest'' means that |pos=|$p$ refers to the coordinate with index $i = \text{round}(p \cdot N)$ where $N$ is the total number of points: +\begin{codeexample}[] +\begin{tikzpicture} +\begin{axis}[title=Snap to nearest for scatter plots] +\addplot+[only marks] + coordinates {(0,0) (1,1) (2,2) (3,3)} + node[pos=0, pin=0 :0 ] {} + node[pos=0.1, pin=90 :0.1 ] {} + node[pos=0.2, pin=200:0.2 ] {} + node[pos=0.3, pin=135:0.3 ] {} + node[pos=0.4, pin=0 :0.4 ] {} + node[pos=0.5, pin=60 :0.5 ] {} + node[pos=0.75,pin=180:0.75] {} + node[pos=1, pin=90 :1 ] {} +; +\end{axis} +\end{tikzpicture} +\end{codeexample} + \noindent the previous example shows that |pos=|$p$ maps to one of the four available coordinates, namely the one whose index is closest to $p\cdot N$. Note that in such a case, the distance between coordinates is irrelevant -- only the coordinate index counts. + + + Note that the fact that \PGFPlots\ uses \emph{logical} coordinates to compute the target positions can produce unexpected effects if $x$ and $y$ axis operate on a different scales. Suppose, for example, that $x$ is always of order $10^3$ whereas $y$ is of order $10^{-3}$. In such a scenario, the $y$ coordinate have no significant contribution to the curve's length -- although the rescaled axes clearly show ``significant'' $y$ dynamics. Consider using |axis equal| together with |pos| to produce comparable effects. +\end{key} + +\begin{key}{/tikz/sloped (initially false)} + Providing the \Tikz\ key |sloped| to a node identified by |pos| causes it to be rotated such that it adapts to the plot's gradient. +\pgfplotsexpensiveexample +\begin{codeexample}[] +\begin{tikzpicture} + \begin{axis} + \addplot[blue,domain=0:360,samples=31] {sin(x)} + [every node/.style={yshift=8pt},sloped] + node[pos=0] {$0$} + node[pos=0.25] {$\pi/2$} + node[pos=0.5] {$\pi$} + node[pos=0.75] {$3/2\pi$} + node[pos=1] {$2\pi$} + ; + \end{axis} +\end{tikzpicture} +\end{codeexample} + Note that the sequence in which |sloped| and shift transformations are applied is important: if shifts are applied first (as would be the case without the |every node/.style| construction), the shifts do not respect the rotation. If |sloped| is applied first, any subsequent shifts will be applied in the \emph{rotated} coordinates. Thus, the case |every node/.style={yshift=8pt}| shifts every node by |8pt| in direction of its normal vector. + + The |sloped| transformation is based on the gradient between two points (the two points adjacent to |pos|). Consequently, it inherits any sampling weaknesses. To see this, consider the example above with a different number of samples: +\pgfplotsexpensiveexample +\begin{codeexample}[] +% same as above with different number of samples +\begin{tikzpicture} + \begin{axis} + \addplot[blue,domain=0:360,samples=25] {sin(x)} + [every node/.style={yshift=8pt},sloped] + node[pos=0] {$0$} + node[pos=0.25] {$\pi/2$} + node[pos=0.5] {$\pi$} + node[pos=0.75] {$3/2\pi$} + node[pos=1] {$2\pi$} + ; + \end{axis} +\end{tikzpicture} +\end{codeexample} + \noindent Here, the two extreme points have small slopes due to the sampling. While this does not seriously affect the quality of the plot, it has a huge impact on the transformation matrizes. Keep this in mind when you work with |sloped| (perhaps it even helps to add a further |rotate| argument). +\end{key} + +\begin{key}{/tikz/allow upside down=\mchoice{true,false} (initially false)} + If |/tikz/sloped| is enabled and one has some difficult line plot, the transformation may cause nodes to be drawn upside down. The default configuration |allow upside down=false| will switch the rotation matrix, whereas |allow upside down| allows this case. +\end{key} + +\begin{key}{/tikz/pos segment=\marg{segment index} (initially empty)} + Occasionally, one has a single plot which consists of multiple segments (like those generated by |empty line=jump| or |contour prepared|). The individual segments will typically have different lengths, so it is tedious to identify a position on one of these segments. + + If |pos segment=|\meta{segment index} is non-empty, the key |pos=|\meta{fraction} is interpreted relatively to the provided segment rather than the whole plot. The argument \meta{segment index} is an integer, where $0$ denotes the first segment. +\begin{codeexample}[] +\begin{tikzpicture} +\begin{axis}[tiny] +\addplot coordinates { + (0,0) (1,0) + + (1,1) (2,1)} + [pos segment=0,yshift=7pt,font=\footnotesize] + node[pos=0] {0} + node[pos=0.5] {0.5} + node[pos=1] {1}; +\end{axis} +\end{tikzpicture} +\end{codeexample} + Here, the plot has two segments. However, all three annotation nodes are placed with |pos segment=0|. + +\pgfplotsexpensiveexample +\begin{codeexample}[] +\begin{tikzpicture} +\begin{axis} +\addplot3[contour gnuplot,domain=0:1] {x*y} + [sloped, + allow upside down, + pos segment=2, + every node/.style={yshift=7pt}] + node[pos=0] {0} + node[pos=0.5] {0.5} + node[pos=1] {1} + ; + +\end{axis} +\end{tikzpicture} +\end{codeexample} + This plot has four segments (which are generated automatically by the plot handler). The annotation nodes are placed + on the third segment, where |sloped| causes them to be rotated, |allow upside down| improves the rendering of the `$0$', and |every node/.style| install a shift in direction of the normal vector (see the documentation of |sloped| for details). +\end{key} + +Occasionally, one wants to place a node using |pos| \emph{and} one wants to typeset the coordinates of that point inside of the node. This can be accomplished using |\pgfplotspointplotattime|: +\begin{commandlist}{\pgfplotspointplotattime,\pgfplotspointplotattime\marg{fraction}} + This command is part of the |pos=|\marg{fraction} implementation: it defines the current point of \pgfname\ to \meta{fraction} of the current plot. Without an argument in curly braces, |\pgfplotspointplotattime| will take the current argument of the |pos| key. + + Thus, the command computes the basic \pgfname\ coordinates -- but it also returns the \emph{logical} coordinates of the resulting point into the following keys: +\begin{pgfplotsxykeylist}{/data point/\x} + After |\pgfplotspointplotattime| returns, these macros contain the $x$, $y$, and $z$ coordinates of the resulting point. They can be used by means of |\pgfkeysvalueof{/data point/x}|, for example. +\begin{codeexample}[] +\begin{tikzpicture} + \begin{axis} +\addplot {x} + [left,/pgf/number format/relative=0] +node[pos=0.5] {% + \pgfplotspointplotattime + $(\pgfmathprintnumber + {\pgfkeysvalueof{/data point/x}}, + \pgfmathprintnumber + {\pgfkeysvalueof{/data point/y}})$ +} +node[pos=0.25] {% + \pgfplotspointplotattime + $(\pgfmathprintnumber + {\pgfkeysvalueof{/data point/x}}, + \pgfmathprintnumber + {\pgfkeysvalueof{/data point/y}})$ +} +node[pos=0.7,pin=180:{% + \pgfplotspointplotattime{0.7} + $(\pgfmathprintnumber + {\pgfkeysvalueof{/data point/x}}, + \pgfmathprintnumber + {\pgfkeysvalueof{/data point/y}})$ +}] {} + ; + \end{axis} +\end{tikzpicture} +\end{codeexample} + + In the example above, three nodes have been placed using different |pos=| arguments. Invoking |\pgfplotspointplotattime| inside of the associated node's body checks if |pos| already has a value and uses that value. The third node displays the coordinates inside of a |pin|. Due to internals of \tikzname, the |pin| knows nothing about the |pos=0.7| argument of its enclosing |node|, so we need to replicate the `|0.7|' argument for |\pgfplotspointplotattime{0.7}|. The |/pgf/number format/relative=0| style causes the number printer to round relative to $10^0$ (compare against the same example without this style). + + In case you have |symbolic x coords| (or any other |x coord inv tafo| which produces non-numeric results), the output stored in |/data point/x| will be the symbolic expression: +\begin{codeexample}[] +\begin{tikzpicture} + \begin{axis}[symbolic x coords={A,B,C,D}] +\addplot coordinates {(A,0) (B,1) (C,1) (D,2)} + [left] +node[pos=0.3] {% + \pgfplotspointplotattime + $(\pgfkeysvalueof{/data point/x}, + \pgfmathprintnumber + {\pgfkeysvalueof{/data point/y}})$ +} +node[pos=0.7,pin=180:{% + \pgfplotspointplotattime{0.7} + $(\pgfkeysvalueof{/data point/x}, + \pgfmathprintnumber + {\pgfkeysvalueof{/data point/y}})$ +}] {} + ; + \end{axis} +\end{tikzpicture} +\end{codeexample} + \noindent In that specific case, you have to avoid |\pgfmathprintnumber| since the argument is \emph{no} number. Note that |symbolic x coords| cannot return fractions between, say, $A$ and $B$ as you would expect. However, the point will still be placed at the fractional position (unless you have a |scatter| or |bar| plot). + + The computation of coordinates for the |pos| feature is computationally expensive for plots with many points. To reduce time, \PGFPlots\ will cache computed values: invoking the command |\pgfplotspointplotattime| multiple times with the same argument will reuse the computed value. +\end{pgfplotsxykeylist} + + +\end{commandlist} + +} + + +\subsubsection{Placing Decorations on Top of a Plot} +{ +\tikzset{external/figure name/.add={}{decorations_}}% + +\tikzname\ comes with the powerful \declareandlabel{decorations} library (or better: set of libraries). Decorations allow to replace or extend an existing path by means of fancy additional graphics. An introduction into the decorations functionality of \tikzname\ is beyond the scope of this manual and the interested reader should read the associated section in~\cite{tikz}. + +This section shows how to use decorations to enhance plots in \PGFPlots. +Suppose you have some graphics for which you would like to add ``direction pointers'': +\begin{codeexample}[] +\begin{tikzpicture}[] +% An undecorated graphics with a lot of +% pretty-printing styles: +\begin{axis}[ + axis lines=middle, + title=Undecorated Graphics, + xmin=-2, xmax=2, ymin=-2, ymax=2, + xtick={-1,1}, ytick={-1,1}, + % this disables the standard + % tick label *text* (but not the line) + yticklabel=\ , + extra description/.code={ + % this generates custom y labels to implement + % individual styles for every tick: + \node[below left] at (axis cs:0,-1) {$-1$}; + \node[above left] at (axis cs:0,1) {$1$}; + }, + axis line style={->}, + ] + \addplot[blue,samples=100,domain=0:2*pi] + ({sin(deg(2*x))}, {sin(deg(x))}); +\end{axis} +\end{tikzpicture} +\end{codeexample} +\noindent Our aim is to add short pointers indicating the direction of the parameterization. + +The solution is to use |\usetikzlibrary{decorations.markings}| and a decoration inside of |\addplot|: +% \usetikzlibrary{decorations.markings} +\begin{codeexample}[] +% requires \usetikzlibrary{decorations.markings} +\begin{tikzpicture}[] +% Same as in previous example, but with decorations: +\begin{axis}[axis lines=middle, + title=Decorated Graphics, + xmin=-2, xmax=2, ymin=-2, ymax=2, + xtick={-1,1}, ytick={-1,1}, + % this disables the standard + % tick label *text* (but not the line) + yticklabel=\ , + extra description/.code={ + % this generates custom y labels to implement + % individual styles for every tick: + \node[below left] at (axis cs:0,-1) {$-1$}; + \node[above left] at (axis cs:0,1) {$1$}; + }, + axis line style={->}, + ] + \addplot[blue,samples=100,domain=0:2*pi, + postaction={decorate},% ------ + decoration={markings, % ------ + mark=at position 0.25 with {\arrow{stealth}}, + mark=at position 0.5 with {\arrow{stealth}}, + mark=at position 0.75 with {\arrow{stealth}}} + ] + ({sin(deg(2*x))}, {sin(deg(x))}); +\end{axis} +\end{tikzpicture} +\end{codeexample} + \noindent The only changes are in the option list for |\addplot|: it contains a \declareandlabel{postaction}|={|\declareandlabel{decorate}|}| which activates the decoration (without replacing the original path) and some specification \declareandlabel{decoration} containing details about how to decorate the path. + + A discussion of details of the |decorations| libraries is beyond the scope of this manual (see~\cite{tikz} for details), but the main point is to add the required decorations to |\addplot| and its option list. + +} + diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.miscellaneous.tex b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.miscellaneous.tex index 63ce93068d6..6ce239cd815 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.miscellaneous.tex +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.miscellaneous.tex @@ -22,7 +22,7 @@ The \textbf{effect} of the transformation is that your plot coordinates can be o The option ``|disabledatascaling|'' disables this data transformation. This has two consequences: first, coordinate expressions like \parg{{\normalfont\texttt{axis cs:}}x,y} have the same effect as \parg{x,y}, no re-scaling is applied. Second, coordinates are restricted to what \TeX\ can handle\footnote{Please note that the axis' scaling requires to compute $1/( x_\text{max} - x_{\text{min}} )$. The option \protect\pgfmanualpdfref{disabledatascaling}{\texttt{disabledatascaling}} may lead to overflow or underflow in this context, so use it with care! Normally, the data scale transformation avoids this problem.}. -So far, the data scale transformation applies only to normal axis (logarithmic scales do not need it). +So far, the data scale transformation applies only to normal axes (logarithmic scales do not need it). \end{pgfplotskey} @@ -36,6 +36,16 @@ You may use this in conjunction with |x filter=...| to reset any counters or wha This axis option allows to invoke \meta{commands} after each |\addplot| command. The argument \meta{commands} can be any \TeX\ content. \end{pgfplotskey} +\begin{pgfplotskey}{execute at begin axis=\marg{commands}} + Allows to invoke \meta{commands} at the end of |\begin{axis}| (or the other ``begin axis'' statements). + + The statement is execute as (almost) last statement before the preparation has been completed. +\end{pgfplotskey} + +\begin{pgfplotskey}{execute at end axis=\marg{commands}} + The counterpart for |execute at begin axis|. The hook is actually superfluos, it is executed immediately after |before end axis|. It is executed in the same \TeX\ group as |execute at begin axis|. +\end{pgfplotskey} + \begin{pgfplotskey}{execute at begin plot visualization=\marg{commands}} Allows to add customized code which is executed at the beginning of each plot visualization. In contrast to |execute at begin plot|, this happens not immediately during |\addplot|, but late during the postprocessing of |\end{axis}| when actual drawing commands are generated. @@ -139,7 +149,7 @@ This is the counter--part of |execute at begin plot visualization|. \end{pgfplotskey} \begin{pgfplotscodekey}{before end axis} -Allows to insert \meta{commands} just before the axis is ended. This option takes effect inside of the clipped area. +Allows to insert \meta{commands} just before the axis is ended (see also |execute at end axis|). This option takes effect inside of the clipped area. \begin{codeexample}[] \pgfplotsset{every axis/.append style={ before end axis/.code={ diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.numberformatting.tex b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.numberformatting.tex index 3504fcbdb18..640b162ef18 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.numberformatting.tex +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.numberformatting.tex @@ -1,9 +1,95 @@ \subsection{Number Formatting Options} \label{sec:number:printing}% -\PGFPlots\ typesets tick labels rounded to given precision and in configurable number formats. The command to do so is |\pgfmathprintnumber|; it uses the current set of number formatting options. +\PGFPlots\ typesets tick labels rounded to given precision and in configurable number formats. The command to do so is |\pgfmathprintnumber|; it uses the current set of number formatting options. In addition, \PGFPlots\ might prepare tick numbers before they are handed over to |\pgfmathprintnumber|. -These options are described in all detail in the manual for \PGFPlotstable, which comes with \PGFPlots. Please refer to that manual. +The options related to number printing as such are described in all detail in the manual for \PGFPlotstable, which comes with \PGFPlots. This section contains the reference for everything which is specific to an axis, and only a brief survey over the number formatting options as such. + +\subsubsection{Frequently Used Number Printing Settings} +\label{sec:number:faq} +This section provides a brief survey about the most frequently used aspects of number formatting in \PGFPlots. +\begin{enumerate} + \item \PGFPlots\ computes common tick scaling factors like $\cdot 10^2$ and produces only integers as tick labels. + + In order to get numbers like $0.001$ as tick labels instead of $1$ with a separate label $\cdot 10^{-3}$, you can use |scaled ticks=false| in your axis. See the description of |scaled ticks| for details. + + \item In order to customize the way numbers are rounded and/or displayed, + use something like |xticklabel style={/pgf/number format/.cd,fixed,precision=5}|. + + Here is a short list of possibilities: +\begin{codeexample}[] +\pgfmathprintnumber{123.456789} +\end{codeexample} +\begin{codeexample}[] +\pgfmathprintnumber{12345.6789} +\end{codeexample} + +\begin{codeexample}[] +\pgfmathprintnumber + [fixed,precision=5]{12345.6789} +\end{codeexample} + +\begin{codeexample}[] +\pgfmathprintnumber + [fixed,fixed zerofill,precision=5]{12345.6789} +\end{codeexample} + +\begin{codeexample}[] +\pgfmathprintnumber + [fixed,fixed zerofill,precision=5,use comma] + {12345.6789} +\end{codeexample} + +\begin{codeexample}[] +\pgfmathprintnumber + [sci]{12345.6789} +\end{codeexample} + +\begin{codeexample}[] +\pgfmathprintnumber + [sci,sci zerofill,precision=5]{12345.6789} +\end{codeexample} + +\begin{codeexample}[] +\pgfmathprintnumber + [sci,sci generic= + {mantissa sep=\times,exponent={10^{#1}}}] + {12.345} +\end{codeexample} + +\begin{codeexample}[] +\pgfmathprintnumber[frac]{0.333333333333333}; + \pgfmathprintnumber[frac]{0.5} +\end{codeexample} + +\begin{codeexample}[] +\pgfmathprintnumber[print sign]{2} +\end{codeexample} + +\begin{codeexample}[] +\pgfmathprintnumber + [1000 sep={\,},fixed,precision=6]{1000000.123456} +\end{codeexample} + +\begin{codeexample}[] +\pgfmathprintnumber + [1000 sep={\,},fixed,precision=6,1000 sep in fractionals]{1000000.123456} +\end{codeexample} + + \noindent Each of these keys requires the prefix `|/pgf/number format/|' when used inside of a \PGFPlots\ style (try |/pgf/number format/.cd,|\meta{number formatting keys} to use the same prefix for many \meta{number formatting keys}). + + The number formatting uses |\pgfmathprintnumber|, a \pgfname\ command to typeset numbers. A full reference of all supported options is shipped with \PGFPlots: it is documented in the reference manual for \PGFPlotstable, Section `Number Formatting Options'. The same reference can be found in the documentation for \pgfname. + + Note that the number printer knows \emph{nothing} about \PGFPlots. In particular, it is not responsible for logs and their representation. + + \item For a logarithmic axis, one may want to modify the number formatting style for the \emph{exponent only}. In this case, redefine the style |log plot exponent style| (its documentation contains a couple of examples). + + \item In order to get |fixed| point tick labels on a logarithmic axis, you can use |log ticks with fixed point| (see below). +\end{enumerate} + + +\subsubsection{PGFPlots-specific Number Formatting} +This section contains fine--tuning options to change number formatting aspects -- but only things which are specific to \PGFPlots\ like peculiarities of tick labels on logarithmic axes. Consider browsing Section~\ref{sec:number:faq} first to see if you need this section. \begin{command}{\pgfmathprintnumber\marg{x}} Generates pretty-printed output for the (real) number \meta{x}. The input number \meta{x} is parsed using |\pgfmathfloatparsenumber| which allows arbitrary precision. @@ -13,6 +99,106 @@ Numbers are typeset in math mode using the current set of number printing option Please refer to the manual of \PGFPlotstable\ (shipped with this package) for details about options related to number-printing. \end{command} +\begin{stylekey}{/pgfplots/log ticks with fixed point} + Reconfigures \PGFPlots\ to display tick labels of logarithmic axes using \emph{fixed point} numbers instead of the exponential style. + +\begin{codeexample}[] +\begin{tikzpicture} +\begin{semilogyaxis}[log ticks with fixed point] + \addplot+[domain=0:10] {exp(x)}; +\end{semilogyaxis} +\end{tikzpicture} +\end{codeexample} + +\begin{codeexample}[] +\begin{tikzpicture} +\begin{loglogaxis}[ + log ticks with fixed point, + xlabel=Cost,ylabel=Error] +\addplot coordinates { + (5, 8.31160034e-02) + (17, 2.54685628e-02) + (49, 7.40715288e-03) + (129, 2.10192154e-03) + (321, 5.87352989e-04) + (769, 1.62269942e-04) + (1793, 4.44248889e-05) + (4097, 1.20714122e-05) + (9217, 3.26101452e-06) +}; +\addplot coordinates { + (7, 8.47178381e-02) + (31, 3.04409349e-02) + (111, 1.02214539e-02) + (351, 3.30346265e-03) + (1023, 1.03886535e-03) + (2815, 3.19646457e-04) + (7423, 9.65789766e-05) + (18943, 2.87339125e-05) + (47103, 8.43749881e-06) +}; +\legend{Case 1,Case 2} +\end{loglogaxis} +\end{tikzpicture} +\end{codeexample} + + The style replaces |log number format basis|. +\end{stylekey} + +\begin{pgfplotskey}{log plot exponent style=\marg{key-value-list}} +Allows to configure the number format of log plot exponents. This style is installed just before `|log number format basis|' will be invoked. Please note that this style will be installed within the default code for `|log number format code|'. +\begin{codeexample}[] +\pgfplotsset{ + samples=15, + width=7cm, + xlabel=$x$, + ylabel=$f(x)$, + extra y ticks={45}, + legend style={at={(0.03,0.97)}, + anchor=north west}} + +\begin{tikzpicture} +\begin{semilogyaxis}[ + log plot exponent style/.style={ + /pgf/number format/fixed zerofill, + /pgf/number format/precision=1}, + domain=-5:10] + + \addplot {exp(x)}; + \addplot {exp(2*x)}; + + \legend{$e^x$,$e^{2x}$} +\end{semilogyaxis} +\end{tikzpicture} +\end{codeexample} + +\begin{codeexample}[] +\pgfplotsset{ + samples=15, + width=7cm, + xlabel=$x$, + ylabel=$f(x)$, + extra y ticks={45}, + legend style={at={(0.03,0.97)}, + anchor=north west}} + +\begin{tikzpicture} +\begin{semilogyaxis}[ + log plot exponent style/.style={ + /pgf/number format/fixed, + /pgf/number format/use comma, + /pgf/number format/precision=2}, + domain=-5:10] + + \addplot {exp(x)}; + \addplot {exp(2*x)}; + + \legend{$e^x$,$e^{2x}$} +\end{semilogyaxis} +\end{tikzpicture} +\end{codeexample} +\end{pgfplotskey} + \label{sec:identify:minor:log}% \begin{pgfplotskey}{log identify minor tick positions=\mchoice{true,false} (initially false)} Set this to |true| if you want to identify log--plot tick labels at positions @@ -80,75 +266,20 @@ This key will have a different meaning when the log basis has been chosen explic \begin{pgfplotscodekey}{log base 10 number format code} -Allows to change the overall appearance of base 10 log plot tick labels. The default is -\begin{codeexample}[code only] -\pgfplotsset{ - log base 10 number format code/.code={$10^{\pgfmathprintnumber{#1}}$} -} -\end{codeexample} -where the `|log plot exponent style|' allows to change number formatting options. +Allows to change the overall appearance of base 10 log plot tick labels. The default implementation invokes |log number format basis={10}{#1}|. + + Use |log plot exponent style| if you only want to change number formatting options for the exponent. \end{pgfplotscodekey} \begin{pgfplotscodekey}{log number format basis} - This part of the representation routines for log ticks in \emph{arbitrary} basis (see the |log basis x| key). It is used instead of the key above if the log basis has been changed. The first supplied argument is the log basis, the second the exponent. The initial configuration is + Typesets a logarithmic tick. The first supplied argument is the log basis, the second the exponent. The initial configuration is \begin{codeexample}[code only] \pgfplotsset{ /pgfplots/log number format basis/.code 2 args={$#1^{\pgfmathprintnumber{#2}}$} } \end{codeexample} + + Use |log plot exponent style| if you only want to change number formatting options for the exponent. \end{pgfplotscodekey} -\begin{pgfplotskey}{log plot exponent style=\marg{key-value-list}} -Allows to configure the number format of log plot exponents. This style is installed just before `|log base 10 number format code|' will be invoked. Please note that this style will be installed within the default code for `|log number format code|'. -\begin{codeexample}[] -\pgfplotsset{ - samples=15, - width=7cm, - xlabel=$x$, - ylabel=$f(x)$, - extra y ticks={45}, - legend style={at={(0.03,0.97)}, - anchor=north west}} - -\begin{tikzpicture} -\begin{semilogyaxis}[ - log plot exponent style/.style={ - /pgf/number format/fixed zerofill, - /pgf/number format/precision=1}, - domain=-5:10] - - \addplot {exp(x)}; - \addplot {exp(2*x)}; - - \legend{$e^x$,$e^{2x}$} -\end{semilogyaxis} -\end{tikzpicture} -\end{codeexample} - -\begin{codeexample}[] -\pgfplotsset{ - samples=15, - width=7cm, - xlabel=$x$, - ylabel=$f(x)$, - extra y ticks={45}, - legend style={at={(0.03,0.97)}, - anchor=north west}} - -\begin{tikzpicture} -\begin{semilogyaxis}[ - log plot exponent style/.style={ - /pgf/number format/fixed, - /pgf/number format/use comma, - /pgf/number format/precision=2}, - domain=-5:10] - - \addplot {exp(x)}; - \addplot {exp(2*x)}; - - \legend{$e^x$,$e^{2x}$} -\end{semilogyaxis} -\end{tikzpicture} -\end{codeexample} -\end{pgfplotskey} diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.scaling.tex b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.scaling.tex index 911090212c2..c5c8537a8d5 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.scaling.tex +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.scaling.tex @@ -139,7 +139,7 @@ This feature is used to realize the \verbpdfref{\addplot3 graphics} feature, com The initial choice \declaretext{auto} chooses one of the other possible choices depending on the actual context. More precisely, it is the same as |none| if at least one of |x|, |y|, or |z| is provided (meaning that these keys are the final unit size). If no unit is provided, it defaults to |stretch to fill|. - The choice |none| does not apply any rescaling at all. Use this if prescribed lengths of |x|, |y| (and perhaps |z|) should be used. In other words: it ignores |width| and |height|. + The choice |none| does not apply any rescaling at all. Use this if prescribed lengths of |x|, |y| (and perhaps |z|) should be used. In other words: it ignores |width| and |height|. In this case, you may want to set |x post scale| and its variants to rescale units manually. The choice |stretch to fill| takes |x|, |y|, and |z| as they have been found (either from user input or from some automatic processing) and rescales the axis with two \emph{separate} scales: one which results in the proper |width| and one which results in the proper |height|. As a consequence, the unit vectors are modified and distorted such that the final image fits into the prescribed dimensions. This is usually what one expects unless one provides unit directions explicitly. @@ -302,8 +302,12 @@ This feature is used to realize the \verbpdfref{\addplot3 graphics} feature, com \end{pgfplotskeylist} \end{pgfplotskey} -\begin{pgfplotsxykeylist}{\x\ post scale=\marg{scale} (initially 1)} +\begin{pgfplotsxykeylist}{\x\ post scale=\marg{scale} (initially empty),scale=\marg{scale} (initially empty)} Lets \PGFPlots\ compute the axis scaling based on |width|, |height|, |view|, |plot box ratio|, |axis equal| or explicit unit vectors with |x|, |y|, |z| and \emph{rescales} the resulting vector(s) according to \meta{scale}. + + The |scale| key sets all three keys to the same \meta{uniform scale} value. This is effectively the same as if you rescale the complete axis (without changing sizes of descriptions). + + The other keys allow individually rescaled axes. \begin{codeexample}[] \begin{tikzpicture} \begin{axis}[y post scale=1] @@ -331,9 +335,3 @@ This feature is used to realize the \verbpdfref{\addplot3 graphics} feature, com \end{tikzpicture} \end{codeexample} \end{pgfplotsxykeylist} - -\begin{pgfplotskey}{scale=\marg{uniform scale}} - A style which sets |x post scale|, |y post scale|, and |z post scale| to the same \meta{uniform scale} value. - - This is effectively the same as if you rescale the complete axis (without changing sizes of descriptions). -\end{pgfplotskey} diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.symbolic-transformations.tex b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.symbolic-transformations.tex index 1bfde0062d4..5c1d36ee684 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.symbolic-transformations.tex +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.symbolic-transformations.tex @@ -70,6 +70,9 @@ It is possible to provide a string dictionary to \PGFPlots. An input coordinate \end{codeexample} The effect of the transformation is simply that input coordinates can be elements of the dictionary and tick labels will be chosen out of this dictionary as well. + + + \paragraph{See also} the option to add tick and/or grid lines at every encountered coordinate using |xtick=data| (or |minor xtick=data|). \end{pgfplotsxykeylist} \subsubsection{Dates as Input Coordinates} diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.tickoptions.tex b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.tickoptions.tex index a60d6774e55..c0f213634fa 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.tickoptions.tex +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.tickoptions.tex @@ -117,8 +117,9 @@ These style commands can be used at any time. The tick line width can be configu \end{pgfplotsxykeylist} -\begin{pgfplotsxykeylist}{minor \x tick=\marg{position list} (initially empty),minor tick=\marg{position list}} - Allows to provide a list of minor tick positions manually. The syntax is exactly the same as for |xtick| or |ytick|: simply provide a comma--separated list of tick positions. +\begin{pgfplotsxykeylist}{minor \x tick=\mchoice{data,\normalfont\marg{coordinate list}} (initially empty),% + minor tick=\mchoice{data,\normalfont\marg{coordinate list}}} + Allows to provide a list of minor tick positions manually. The syntax is almost the same as for |xtick| or |ytick|: simply provide either a comma--separated list of tick positions or the special value |data|. An empty argument argument disables the |minor tick| feature (in contrast to |xtick| where the special value |\empty| clears the list and an empty argument causes \PGFPlots\ to compute a default tick list). In contrast to |minor x tick num|, this key allows to provide \emph{non--uniform} minor tick positions. @@ -131,6 +132,14 @@ These style commands can be used at any time. The tick line width can be configu \end{tikzpicture} \end{codeexample} +\begin{codeexample}[] +\begin{tikzpicture} + \begin{axis}[minor ytick=data] + \addplot {x^2}; + \end{axis} +\end{tikzpicture} +\end{codeexample} + This key has precedence over |minor x tick num| and its variants; if both of them are given, |minor xtick| is preferred and |minor x tick num| is ignored. \end{pgfplotsxykeylist} @@ -640,8 +649,6 @@ A further -- not very useful -- example is shown below. Every $x$ tick label has \end{tikzpicture} \end{codeexample} - Unfortunately, \meta{num} can't be evaluated with \PGF's math parser (yet) to maintain the full data range accepted by \PGFPlots. - The last option, |scaled ticks=manual:|\marg{label}\marg{code} allows even more customization. It allows \emph{full control} over the displayed scaling label \emph{and} the scaling code: \meta{label} is used as-is inside of the tick scaling label while \meta{code} is supposed to be a one-argument-macro which scales each tick. Example: \begin{codeexample}[] \begin{tikzpicture} diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.tex b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.tex index 4c79e5d593c..0196ebbe729 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.tex +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.tex @@ -22,7 +22,7 @@ \input{pgfplots.preamble.tex} %\RequirePackage[german,english,francais]{babel} -\def\matlabcolormaptext{This colormap is similar to one shipped with Matlab (tm) under a similar name.} +\def\matlabcolormaptext{This colormap is similar to one shipped with Matlab (\textregistered) under a similar name.} \IfFileExists{tikzlibraryspy.code.tex}{% \usetikzlibrary{spy} @@ -30,6 +30,8 @@ \message{ERROR: tikz SPY library NOT available. The manual will only compile partially.^^J}% }% +\usetikzlibrary{decorations.markings} + \usepgfplotslibrary{% ternary, smithchart, @@ -131,83 +133,59 @@ However, note that this library requires at least \PGF\ version $2.00$. At the t This release provides a lot of improvements which can be found in all detail in \texttt{ChangeLog} for interested readers. However, some attention is useful with respect to the following changes. \subsubsection{New Optional Features} +\PGFPlots\ has been written with backwards compatibility in mind: old \TeX\ files should compile without modifications and without changes in the appearance. However, new features occasionally lead to a different behavior. In such a case, \PGFPlots\ will deactivate the new feature\footnote{In case of broken backwards compatibility, we apologize -- and ask you to submit a bug report. We will take care of it.}. + +Any new features or bugfixes which cause backwards compatibility problems need to be activated \emph{manually} and \emph{explicitly}. In order to do so, you should use +\begin{codeexample}[code only] +\usepackage{pgfplots} +\pgfplotsset{compat=1.5.1} +\end{codeexample} +\noindent in your preamble. This will configure the compatibility layer. + +Here is a list of changes introduced in recent versions of \PGFPlots: \begin{enumerate} - \item \PGFPlots\ 1.4 has fixed several smaller bugs which might produce differences of about $1$--$2\text{pt}$ compared to earlier releases. If you experience problems, use |\pgfplotsset{compat=1.3}|. + \item \PGFPlots\ 1.5.1 interpretes circle- and ellipse radii as \PGFPlots\ coordinates (older versions used \pgfname\ unit vectors which have no direct relation to \PGFPlots). In other words: starting with version 1.5.1, it is possible to write |\draw circle[radius=5]| inside of an axis. This requires |\pgfplotsset{compat=1.5.1}| or higher. + + Without this compatibility setting, circles and ellipses use low--level canvas units of \pgfname\ as in earlier versions. + + \item \PGFPlots\ 1.5 uses |log origin=0| as default (which influences logarithmic bar plots or stacked logarithmic plots). Older versions keep |log origin=infty|. This requires |\pgfplotsset{compat=1.5}| or higher. + + \item \PGFPlots\ 1.4 has fixed several smaller bugs which might produce differences of about $1$--$2\text{pt}$ compared to earlier releases. This requires |\pgfplotsset{compat=1.4}| or higher. \item \PGFPlots\ 1.3 comes with user interface improvements. The technical distinction between ``behavior options'' and ``style options'' of older versions is no longer necessary (although still fully supported). - \item \PGFPlots\ 1.3 has a new feature which allows to \emph{move axis labels tight to tick labels} automatically. + This is always activated. - Since this affects the spacing, it is not enabled be default. + \item \PGFPlots\ 1.3 has a new feature which allows to \emph{move axis labels tight to tick labels} automatically. This is strongly recommended. It requires |\pgfplotsset{compat=1.3}| or higher. - Use -\begin{codeexample}[code only] -\usepackage{pgfplots} -\pgfplotsset{compat=1.4} -\end{codeexample} - in your preamble to benefit from the improved spacing\footnote{The |compat=1.3| setting is necessary for new features which move axis labels around like reversed axis. However, \PGFPlots\ will still work as it does in earlier versions, your documents will remain the same if you don't set it explicitly.}. - Take a look at the next page for the precise definition of |compat|. + Since this affects the spacing, it is not enabled be default. \item \PGFPlots\ 1.3 now supports reversed axes. It is no longer necessary to use workarounds with negative units. \pgfkeys{/pdflinks/search key prefixes in/.add={/pgfplots/,}{}} Take a look at the |x dir=reverse| key. - Existing workarounds will still function properly. Use |\pgfplotsset{compat=1.3}| together with |x dir=reverse| to switch to the new version. + Existing workarounds will still function properly. Use |\pgfplotsset{compat=1.3}| or higher together with |x dir=reverse| to switch to the new version. \end{enumerate} \subsubsection{Old Features Which May Need Attention} \begin{enumerate} \item The |scatter/classes| feature produces proper legends as of version 1.3. This may change the appearance of existing legends of plots with |scatter/classes|. - \item Due to a small math bug in \PGF\ $2.00$, you \emph{can't} use the math expression `|-x^2|'. It is necessary to use `|0-x^2|' instead. The same holds for - `|exp(-x^2)|'; use `|exp(0-x^2)|' instead. - - This will be fixed with \PGF\ $>2.00$. - \item Starting with \PGFPlots\ $1.1$, |\tikzstyle| should \emph{no longer be used} to set \PGFPlots\ options. Although |\tikzstyle| is still supported for some older \PGFPlots\ options, you should replace any occurance of |\tikzstyle| with |\pgfplotsset{|\meta{style name}|/.style={|\meta{key-value-list}|}}| or the associated |/.append style| variant. See Section~\ref{sec:styles} for more detail. \end{enumerate} I apologize for any inconvenience caused by these changes. -\begin{pgfplotskey}{compat=\mchoice{1.5,1.4,1.3,pre 1.3,default,newest} (initially default)} +\begin{pgfplotskey}{compat=\mchoice{1.5.1,1.5,1.4,1.3,pre 1.3,default,newest} (initially default)} The preamble configuration \begin{codeexample}[code only] \usepackage{pgfplots} -\pgfplotsset{compat=1.4} +\pgfplotsset{compat=1.5.1} \end{codeexample} allows to choose between backwards compatibility and most recent features. - \PGFPlots\ version 1.5 with |compat=1.5| or |compat=newest| enables |log origin=0|. Older versions keep |log origin=infty|. - - \PGFPlots\ version 1.4 with |compat=1.4| or |compat=newest| fixes some small bugs related to axis scaling. This might lead to differences of $1$--$2\text{pt}$ compared to earlier versions. Use the choice |1.3| (or earlier) to disable these fixes. - - \PGFPlots\ version 1.3 with |compat=1.3| comes with new features which may lead to significiantly different spacings compared to earlier versions: - \begin{enumerate} - \item Version 1.3 comes with the |xlabel near ticks| feature which places (in this case $x$) axis labels ``near'' the tick labels, taking the size of tick labels into account. - - Older versions used |xlabel absolute|, i.e.\ an absolute distance between the axis and axis labels (now matter how large or small tick labels are). - - The initial setting \emph{keeps backwards compatibility}. - - You are encouraged to use -\begin{codeexample}[code only] -\usepackage{pgfplots} -\pgfplotsset{compat=1.4} -\end{codeexample} - in your preamble. - - \item Version 1.3 fixes a bug with |anchor=south west| which occurred mainly for reversed axes: the anchors where upside--down. This is fixed now. - - - If you have written some workaround and want to keep it going, use - - |\pgfplotsset{compat/anchors=pre 1.3}|\pgfmanualpdflabel{/pgfplots/compat/anchors}{} - - to disable the bug fix. - \end{enumerate} - Occasionally, you might want to use different versions in the same document. Then, provide \begin{codeexample}[code only] \begin{figure} @@ -216,11 +194,43 @@ I apologize for any inconvenience caused by these changes. \caption{...} \end{figure} \end{codeexample} - \noindent in order to restrict the compatibility setting to the actual context (in this case, the |figure| environment. + \noindent in order to restrict the compatibility setting to the actual context (in this case, the |figure| environment). Use |\pgfplotsset{compat=default}| to restore the factory settings. - The setting |\pgfplotsset{compat=newest}| will always use features of the most recent version. This might result in small changes in the document's appearance. + The setting |\pgfplotsset{compat=newest}| will always use features of the most recent version. This might result in small changes in the document's appearance. Note that it is generally a good idea to select the most recent version which is compatible with your document. This ensures that future changes will still be compatible with your document. + + Although typically unnecessary, it is also possible to activate only selected changes and keep compatibility to older versions in general: + \begin{pgfplotskeylist}{compat/path replacement=\meta{version},compat/labels=\meta{version},compat/scaling=\meta{version},compat/general=\meta{version}} + Let us assume that we have a document with |\pgfplotsset{compat=1.3}| and you want to keep it this way. + + In addition, you realized that version 1.5.1 supports circles and ellipses. Then, use +\begin{codeexample}[] +% preamble: +\pgfplotsset{compat=1.3,compat/path replacement=1.5.1} +\begin{tikzpicture} +\begin{axis}[ + extra x ticks={-2,2}, + extra y ticks={-2,2}, + extra tick style={grid=major}] + \addplot {x}; + \draw (axis cs:0,0) circle[radius=2]; +\end{axis} +\end{tikzpicture} +\end{codeexample} + + All of these keys accept the possible values of the |compat| key. + + The |compat/path replacement| key controls how radii of circles and ellipses are interpreted. + + The |compat/labels| key controls how axis labels are aligned: either uses adjacent to ticks or with an absolute offset. + + The |compat/scaling| key controls some bugfixes introduced in version 1.4: they might introduce slight scaling differences in order to improve the accuracy. + + The |compat/general| key currently only activates |log origin|. + + The detailed effects can be seen on the beginning of this section. + \end{pgfplotskeylist} \end{pgfplotskey} \subsection{The Team} diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots_contourtmp0.table b/Master/texmf-dist/doc/latex/pgfplots/pgfplots_contourtmp0.table index e1dfa45dc9e..117788c78ff 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots_contourtmp0.table +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots_contourtmp0.table @@ -1,6 +1,7 @@ -#Surface 0 of 1 surfaces +# Surface 0 of 1 surfaces +# Curve title: ""pgfplots_contourtmp0.dat"" # Contour 0, label: 0.4 0.666656 0.245934 0.4 0.595451 0.166658 0.4 diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots_contourtmp1.table b/Master/texmf-dist/doc/latex/pgfplots/pgfplots_contourtmp1.table index 88fa8530634..243e089c21f 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots_contourtmp1.table +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots_contourtmp1.table @@ -1,6 +1,7 @@ -#Surface 0 of 1 surfaces +# Surface 0 of 1 surfaces +# Curve title: ""pgfplots_contourtmp1.dat"" # Contour 0, label: 25 -5 -5 25 diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplotstable.pdf b/Master/texmf-dist/doc/latex/pgfplots/pgfplotstable.pdf Binary files differindex 6246b142872..ec463c59f91 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplotstable.pdf +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplotstable.pdf diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplotstable.tex b/Master/texmf-dist/doc/latex/pgfplots/pgfplotstable.tex index 1af5eb8b231..caf37fc33ac 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplotstable.tex +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplotstable.tex @@ -1405,6 +1405,28 @@ The parameters can be customized using the optional integer argument(s): if $\te Although supported, I discourage from using |fixed zerofill| or |sci zerofill| in this context -- it may lead to a suggestion of higher precision than is actually used (because |fixed zerofill| might simply add |.00| although there was a different information before |relative| rounded the result). \end{stylekey} +\begin{keylist}{/pgf/number format/fixed relative} + Configures |\pgfmathprintnumber| to format numbers in a similar way to the |fixed| style, but the |precision| is interpreted relatively to the number's exponent. + + The motivation is to get the same rounding effect as for |sci|, but to display the number in the |fixed| style: +\begin{codeexample}[] +\pgfkeys{/pgf/number format/.cd,fixed relative,precision=3} +\pgfmathprintnumber{1000.0123}\hspace{1em} +\pgfmathprintnumber{100.0567}\hspace{1em} +\pgfmathprintnumber{0.000010003452}\hspace{1em} +\pgfmathprintnumber{0.010073452}\hspace{1em} +\pgfmathprintnumber{1.23567}\hspace{1em} +\pgfmathprintnumber{1003.75}\hspace{1em} +\pgfmathprintnumber{1006.75}\hspace{1em} +\end{codeexample} + + The effect of |fixed relative| is that the number is rounded to \emph{exactly} the first \meta{precision} non-zero digits, no matter how many leading zeros the number might have. + + Use |fixed relative| if you want |fixed| and if you know that only the first $n$ digits are correct. Use |sci| if you need a scientific display style and only the first $n$ digits are correct. + + Note that |fixed relative| ignores the |fixed zerofill| flag. +\end{keylist} + \begin{key}{/pgf/number format/int detect} Configures |\pgfmathprintnumber| to detect integers automatically. If the input number is an integer, no period is displayed at all. If not, the scientific format is chosen. diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplotstodo.pdf b/Master/texmf-dist/doc/latex/pgfplots/pgfplotstodo.pdf Binary files differindex d05525c74a2..6a2b52c5979 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplotstodo.pdf +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplotstodo.pdf diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplotstodo.tex b/Master/texmf-dist/doc/latex/pgfplots/pgfplotstodo.tex index 69467841566..cf93843552b 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplotstodo.tex +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplotstodo.tex @@ -34,13 +34,13 @@ last test verifications: \begin{tabular}{lllll} & pgf CVS & pgf 2.10 & pgf 2.00 &pgf 2.00+compat=default\\ -pgfplotstests & for 1.5 & for 1.5 & for 1.4 &2009-12-30 \\ -manual & for 1.5 & for 1.5 & for 1.5 & \\ -pgfplotstable.pdf & for 1.5 & for 1.5 & for 1.5\\ +pgfplotstests & for 1.5.1 & for 1.5.1 & for 1.4 &2009-12-30 \\ +manual & for 1.5.1 & for 1.5.1 & for 1.5 & \\ +pgfplotstable.pdf & for 1.5.1 & for 1.5.1 & for 1.5\\ example latex & for 1.5 & for 1.5 & 2009-12-30 \\ -example context & for 1.5 & for 1.5 & 2009-12-30 \\ -example plain tex & for 1.5 & for 1.5 & 2009-12-30 \\ -tests context & for 1.4 &\\ +example context & for 1.5.1 & for 1.5.1 & 2009-12-30 \\ +example plain tex & for 1.5.1 & for 1.5.1 & 2009-12-30 \\ +tests context & for 1.4 & for 1.5.1\\ \end{tabular} \section{Future work} @@ -122,6 +122,63 @@ tests context & for 1.4 &\\ \section{Documentation todo} \begin{bugtracker} +\begin{doctodo}[+] + document that \verb|axis lines=none| is essentially an alias for \verb|hide axis| . +\end{doctodo} + +\begin{doctodo}[+] + Document how to use decorations inside of plots +\begin{verbatim} + \begin{tikzpicture}[] + + \begin{axis}[axis lines=middle, + xmin=-2, + xmax=2, + ymin=-2, + ymax=2, + xtick={-1,1}, + ytick={-1,1}, + yticklabel=\ ,% this disables the standard tick label *text* (but not the line) + extra description/.code={ + % this generates custom y labels to implement individual + % styles for every tick: + \node[below left] at (axis cs:0,-1) {$-1$}; + \node[above left] at (axis cs:0,1) {$1$}; + }, + axis line style={->}, + ]%,x=1cm,y=1cm] + \addplot[samples=100,domain=0:2*pi, + % tedious, but necessary: pgfplots accidentally resets the + % "decorate" option at the beginning of the path (probably a + % bug). + % This is a work-around: + every path/.style={ + postaction={decorate}, + every path/.style={}, + }, + decoration={markings, + mark=at position 0.25 with {\arrow{>}}, + mark=at position 0.5 with {\arrow{>}}, + mark=at position 0.75 with {\arrow{>}}} + ] + ({sin(deg(2*x))}, {sin(deg(x))}); + \end{axis} + \end{tikzpicture} +\end{verbatim} + +\end{doctodo} + + +\begin{doctodo} + document some FAQ for number formatting options. + + This should contain how to get non-exponential number printing for log axes +\end{doctodo} + +\begin{doctodo}[+] + \verb|\pgfplotspointplotattime| . +\end{doctodo} + \begin{doctodo} bei dem Bsp-Tex zu pgfplotstable scheint eine Zeile im Tex-File zu fehlen: \verb|\usepackage{pgfplotstable}| @@ -197,7 +254,7 @@ document the possibiliy of skewed 3d axes by means of manually provided unit vec \end{verbatim} \end{doctodo} -\begin{doctodo}[open] +\begin{doctodo}[+] mention \verb|xtick=data| in docs for \verb|symbolic x coords| \end{doctodo} @@ -772,6 +829,131 @@ Thanks! \section{Bugs in PGFPlots} \begin{bugtracker} +\begin{bug} + Using \verb|hide axis| or \verb|axis lines=none| causes the axis to vanish -- but it will still consume space in the bounding box! + + A work-around for the user who reported the bug was to use \verb|clip=false|: + +\begin{minimal} +\documentclass{article} +\usepackage[utf8]{inputenc} +\usepackage{pgfplots} +\pgfplotsset{compat=1.4} +\begin{document} + +\begin{figure} + \centering + \fbox{% + \begin{tikzpicture} + \begin{axis}[axis equal,scale=2,axis lines=none,clip=false] + \addplot3[surf,samples=9,domain=-1:1,y domain=0:2*pi,z buffer=sort,opacity=0.75] + ({cos(deg(y)) * (1 + x/2 * cos(deg(y)/2))}, + {sin(deg(y)) * (1 + x/2 * cos(deg(y)/2))}, + {x/2 * sin(deg(y)/2)}); + \end{axis} + \end{tikzpicture}} + \caption{M"obiusband} +\end{figure} + +\end{document} +\end{minimal} + + Interestingly, this does NOT work for 1d plots... here is what I found out today: + \begin{itemize} + \item excluding the clip path helps for the example above. + \item it has no effect for 1d plots (2d axis) + \item excluding the background path instruction from the low level node causes the bounding box to be empty -- for both 2d and 3d + \end{itemize} + + See \verb|unittest_hideaxis*|. + +\end{bug} + +\begin{bug}[+] + Adding a decoration to a plot requires \verb|every path/.style={decorate,every path/.style={}}| because pgfplots sets its options inside of a \verb|\scope[<options>]|. + + This should be fixed. +\end{bug} + +\begin{bug} + disable tick scale label if the ticks have been disabled. + + \verb|https://sourceforge.net/tracker/index.php?func=detail&aid=3457210&group_id=224188&atid=1060656| +\end{bug} + +\begin{bug} + nodes near coords is broken for layer branch +\end{bug} + +\begin{bug}[closed] + \verb|axis equal,view={0}{90}| for a 3d axis leads to compilation errors (although it seems to work) +\end{bug} + +\begin{bug} + xbar and nodes near coords does not automatically align the nodes, see \verb|http://tex.stackexchange.com/questions/31701/pgfplots-nodes-near-coords-on-xbar-chart-is-off| +\end{bug} + +\begin{bug} + view direction is imprecise. It seems as if the $z$ direction is wrong. + + See the recent commits on branch \verb|mesh_bg_colormap| +\end{bug} + +\begin{bug} + cannot provide clip path usage in pgfplots commands because of the nested scopes. + + to reproduce, try to give \verb|\addplot+[/tikz/clip]| to some plot. +\end{bug} + +\begin{bug} + 3d: automatic label placement for 'axis lines=center' is buggy +\end{bug} + +\begin{bug} + \verb|\pgfplotsforeachungrouped| cannot be combined with three or more arguments like \verb|\foreach| +\end{bug} + +\begin{bug} + If one specifies \verb|\scope| within an axis, the plots (partially) use their variables, but legends do not. +\begin{minimal} +\documentclass{article} + \usepackage{pgfplots} + \pgfplotsset{ + compat=newest, + } +\begin{document} + \begin{tikzpicture} + \begin{axis}[ +% reverse legend, % uncomment and one entry is missing + legend pos=north west, + ] + \begin{scope}[only marks] + \addplot + coordinates { (0,0) (1,1) } node [right] {a}; + \addplot +% [green] % uncomment and legend does exactly the wrong thing + coordinates { (0,1) (1,2) } node [right] {b}; + \end{scope} + \begin{scope}[mark=none] + \addplot + coordinates { (0,0.5) (1,1.5) } node [right] {c}; + \addplot +% [orange] % uncomment and it works + % (I think this is luck, because it does the same + % thing as the [green] example above) + coordinates { (0,1.5) (1,2.5) } node [right] {d}; + \end{scope} + \legend{ + a, + b, + c, + d, + } + \end{axis} + \end{tikzpicture} +\end{document} +\end{minimal} +\end{bug} \begin{bug} the below example of a latex file gives the following error upon the 2nd run of latex. The first run works fine. This happens both when running dvilualatex and just latex, both from TexLive 2011. @@ -834,7 +1016,7 @@ l.30 \ref{govconsumptionlegend} the table package does not support non-ASCII column names. If there are non-ASCII column names, it might fail to produce a readable error message. \end{bug} -\begin{bug} +\begin{bug}[prio=2] \#3213889 hyperref boxes are in wrong position for vertical labels see \url{http://tex.stackexchange.com/questions/13364/how-to-make-pgfplots-vertical-labels-have-proper-hyperref-erence-box @@ -842,7 +1024,7 @@ l.30 \ref{govconsumptionlegend} \end{bug} -\begin{bug} +\begin{bug}[prio=1] CRASH: \begin{minimal} \begin{tikzpicture} @@ -863,7 +1045,7 @@ CRASH: \end{minimal} \end{bug} -\begin{bug} +\begin{bug}[prio=1] Using $0$ in pgfplots coordinate systems does not necessarily mean ``no offset''. This is misleading. Bug sourceforge \#3168030: \begin{minimal} \documentclass[a4paper]{article} @@ -907,7 +1089,9 @@ CRASH: \end{minimal} \end{bug} -\begin{bug} + + +\begin{bug}[prio=2] The clipping of tick lines uses the middle of axis lines; it does not incorporate the line width of the axis lines. \begin{minimal} \documentclass{article} @@ -935,7 +1119,7 @@ CRASH: \end{minimal} \end{bug} -\begin{bug} +\begin{bug}[prio=2] can someone confirm the following behavior. The y label of a plot gets truncated in some circumstances if the external library is used. This happens for me if no title is specified for a plot. Consider the @@ -961,8 +1145,10 @@ following example: \end{minimal} \end{bug} -\begin{bug} - Decorations in plots appear to be problematic: + + +\begin{bug}[prio=8,+] + Decorations in plots appear to be problematic (this is a duplicate! caused by the fact that decorate=false is used at the beginning of every plot, need to adjust every path style): \begin{minimal} \documentclass{scrartcl} @@ -981,12 +1167,31 @@ following example: \draw [postaction={draw, decorate, decoration=border}] (0,-3cm) -- ++(5cm,0.5cm); %funktioniert \end{tikzpicture} + +\begin{tikzpicture} + +\begin{axis} + +\addplot+[postaction={draw, decorate, decoration=border}, + % tedious, but necessary: pgfplots accidentally resets the + % "decorate" option at the beginning of the path (probably a + % bug). + % This is a work-around: + every path/.style={ + postaction={decorate}, + every path/.style={}, + }, + ] coordinates {(0,0) (5,0.5)}; %funktioniert nicht + +\end{axis} + +\end{tikzpicture} \end{document} \end{minimal} \end{bug} -\begin{bug} +\begin{bug}[prio=10,closed] Markers in legends are not (always?) filled properly \begin{minimal} \documentclass{article} @@ -1002,13 +1207,14 @@ following example: \end{tikzpicture} \end{document} \end{minimal} + caused by the fact that options of `every axis legend' are in effect at this time -- which includes \verb|fill=white|. \end{bug} -\begin{bug} +\begin{bug}[prio=11,closed] polar lib: the clipping of markers doesn't work correctly for partial polar axes. \end{bug} -\begin{bug} +\begin{bug}[prio=1] The legend has the \verb|text depth=0.15em| initial configuration, which is extremely bad for legend entries with huge depth (large fractionals or formulas?) \end{bug} @@ -1090,11 +1296,11 @@ see also \url{https://sourceforge.net/tracker/?func=detail&atid=1060656&aid=3033 fails and resorts to guesses! \end{bug} -\begin{bug} +\begin{bug}[prio=3] \verb|\addplot table[blue]| ignores the color options! \end{bug} -\begin{bug} +\begin{bug}[prio=10] providing \verb|ymin=0| for a logarithmic axes has no effect; and there is no sanity checking \end{bug} @@ -1157,10 +1363,14 @@ Missing character: There is no k in font nullfont! anywhere in the code -- the \verb|\def| introduces special checks for the \verb|#| whereas the \verb|\toks| does not. \end{bug} -\begin{bug}[prio=2] +\begin{bug}[prio=7,+] It is not possible to use \verb|\addplot ... node[pos=0.5] {a};| in pgfplots. Reason: the timer information is tikz high level, but pgfplots uses the PGF basic layer. + + DONE. + + Open: the \verb|\pgfplotspointplotattime| should provide more useful output: SCI notation and it should respect custom trafos \end{bug} @@ -1191,11 +1401,11 @@ Missing character: There is no k in font nullfont! \end{minimal} \end{bug} -\begin{bug} +\begin{bug}[prio=1] providing \verb|\legend{}| without any \verb|\addplot| commands causes a problem \end{bug} -\begin{bug}[prio=3] +\begin{bug}[prio=3,closed] It is not (properly) possible to provide \verb|surf| to \verb|\addplot|. \begin{verbatim} \begin{tikzpicture} @@ -1279,7 +1489,7 @@ style={thick,color=black}}, \end{minimal} \end{bug} -\begin{bug}[-,prio=3] +\begin{bug}[-,prio=1] the axis line combination styles can't be adjusted for 3D because they are evaluated too early. \end{bug} @@ -1311,10 +1521,6 @@ style={thick,color=black}}, \end{bug} \begin{bug}[-] - document INS 671 does not compile with pgfplots 1.4 and pgf 2.00 -\end{bug} - -\begin{bug}[-] numplotspertype and forget plot and ybar interval yields errors. \end{bug} @@ -1372,7 +1578,7 @@ and you can remark that colour filling overlaps x- and y-axis ! So I suggest tha 3D axes: it is difficult to get an 1:1 correspondence to tikz. \end{bug} -\begin{bug}[-] +\begin{bug}[closed] 3D axes: providing three unit vectors is not sufficient, one also needs to set 'view={}{}'. That should be done automatically. @@ -1393,14 +1599,14 @@ and you can remark that colour filling overlaps x- and y-axis ! So I suggest tha refine/triangulation etc. and shouldn't make a difference otherwise. \end{bug} -\begin{bug}[-] +\begin{bug}[closed] manual errors of given pgfplots\_unstable version: 94 2.5.12 \verb|addplot+[patch] --> addplot3+[patch]| 162 "xmode, ymode, zmode" and "x dir, ..." come again on page 177 \end{bug} -\begin{bug}[-] +\begin{bug}[closed] don't loose \verb|\ref|'s when externalizing I'll provide a minimal later \end{bug} @@ -1415,7 +1621,7 @@ and you can remark that colour filling overlaps x- and y-axis ! So I suggest tha plot graphics: \verb|\ref| legend doesn't work properly \end{bug} -\begin{bug}[-] +\begin{bug}[-,prio=9] french babel and colorbars are not fully compatible. The problem is that colorbars use '\verb|\addplot| graphics {};' with a fixed catcode for the ';' -- which might lead to problems. @@ -1486,12 +1692,12 @@ and you can remark that colour filling overlaps x- and y-axis ! So I suggest tha with them as far as I know. \end{bug} -\begin{bug}[-] +\begin{bug}[-,prio=2] contour external doesn't handle explicitly provided matrix data (mesh/rows and mesh/cols) yet. \end{bug} -\begin{bug}[-] +\begin{bug}[-,prio=2] contour external doesn't handle the ordering flag correctly. \end{bug} @@ -1505,7 +1711,7 @@ and you can remark that colour filling overlaps x- and y-axis ! So I suggest tha sanity checking here. \end{bug} -\begin{bug}[-] +\begin{bug}[-,prio=2] the title style for 'footnotesize' is not as I want it to: it doesn't respect the depth below the baseline. Or does it need a \verb|\strut|? \end{bug} @@ -1642,7 +1848,7 @@ and you can remark that colour filling overlaps x- and y-axis ! So I suggest tha gnuplot: set terminal table seems to be deprecated. \end{bug} -\begin{bug}[-] +\begin{bug}[closed] gnuplot and 3D $\leadsto$ I need a shared interface to prepare the required keys for expression plotting \end{bug} @@ -1703,7 +1909,7 @@ and you can remark that colour filling overlaps x- and y-axis ! So I suggest tha \end{bug} -\begin{bug}[-] +\begin{bug}[closed] 3D: axis equal implementation might not be correct (at least not for view special cases) \end{bug} @@ -1854,6 +2060,34 @@ and you can remark that colour filling overlaps x- and y-axis ! So I suggest tha % FEATURES \section{Feature Proposals PGFPlots} \begin{bugtracker} + +\begin{feature} + improve support for circle / ellipse paths inside of an axis + + compare \url{http://www.digipedia.pl/usenet/thread/16719/198} + + \url{http://sourceforge.net/mailarchive/forum.php?thread_name=D595FD68-AFAB-4C1C-8B9D-A2F84D1A0598\%40mac.com&forum_name=pgfplots-features} + +\end{feature} + +\begin{feature} + provide log labels without exponents, i.e. $10000$ instead of $10^4$ +\end{feature} + +\begin{feature} + it would be nice to have automatic PNG export for huge graphics. Such an approach, combined with plot graphics, + could result in considerably smaller pdfs and faster rendering. At the same time, it would not suffer the limitation which arises if one uses the external lib and converts the complete figure to png (including axis descritpions) +\end{feature} + +\begin{feature} + There is no simple way to provide LOG colorbars: + \begin{enumerate} + \item ymode=log is not supported in `every colorbar' due to key filtering problems + \item disablelogfilter appears to be useless and does not respect `log basis' + \end{enumerate} + If those two this would be fixed, one could provide \verb|colorbar style={ymode=log,disablelogfilter}| and would get a proper logarithmic colorbar. Perhaps even combined with \verb|log basis| ... ? +\end{feature} + \begin{feature} Cases-statement in math parser \end{feature} @@ -2014,10 +2248,11 @@ If there would be a search path like \verb|\graphicspath| for graphics it would ternary diagram for extractions (more details will come) \end{feature} -\begin{feature}[-] +\begin{feature}[-,prio=9] filled area between 2 addplot's (already requested in mailing list) perhaps style 'fill plot' which is applied in vis phase. There, one can access the postprocessed information of the previous plot. + DUPLICATE \end{feature} \begin{feature}[-] @@ -2097,12 +2332,14 @@ If there would be a search path like \verb|\graphicspath| for graphics it would or confusing.... \end{feature} -\begin{feature}[-] +\begin{feature}[-,prio=9] > Is it possible to shade the area between two curves, using pgfplots, such as > in this example: \url{http://www.mathworks.com/matlabcentral/fileexchange/13188} > The only shading I could find is between one curve and the x axis... Shading > between curves seems to be possible, but only with stacked curves. Is is > possible to disable stacking somehow, but keep the closedcycle behavior? + + DUPLICATE \end{feature} \begin{feature}[-] @@ -2476,7 +2713,7 @@ Das Plotten sollte dann out-of-the-box m\"oglich sein. \end{verbatim} \end{feature} -\begin{feature}[-] +\begin{feature}[+] I got several feature requests for non-cartesian axes. Perhaps there is a way to generalize the complete procedure... as far as I remember, I use the pointxyz routines anyway to place tick marks and so on. @@ -2490,7 +2727,7 @@ Das Plotten sollte dann out-of-the-box m\"oglich sein. \url{http://www.siart.de/lehre/smithdgr.pdf} \end{feature} -\begin{feature} +\begin{feature}[+] smith charts \url{http://www.siart.de/lehre/tutorien.xhtml#smishort} @@ -2576,13 +2813,15 @@ Das Plotten sollte dann out-of-the-box m\"oglich sein. \end{feature} -\begin{feature}[-] +\begin{feature}[-,prio=9] it might be interesting to fill the area between two paths. Perhaps there is such a feature in pgf; or perhaps I can generalize the \verb|\closedcycle| implementation written for stacked plots. + + DUPLICATE \end{feature} -\begin{feature}[-] +\begin{feature}[+] provide a \verb|\numplotsperplothandler| or something like that. This would improve things for bar plots! \end{feature} |