summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/pgfplots/pgfplots.libs.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/pgfplots/pgfplots.libs.tex')
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/pgfplots.libs.tex66
1 files changed, 52 insertions, 14 deletions
diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.libs.tex b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.libs.tex
index 0c49dd0b0be..44ff66ca55c 100644
--- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.libs.tex
+++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.libs.tex
@@ -1,22 +1,22 @@
\section{Related Libraries}
This section describes some libraries which come with \PGFPlots, but they are more or less special and need to be activated separately.
+\pgfmanualpdflabel{\textbackslash usepgfplotslibrary}{}
\subsection{Dates as Input Coordinates}
-\begin{tikzlibrary}{dateplot}
- A library which allows to use dates like |2008-01-01| as input coordinates in plots. The library converts dates to numbers and tick labels will be pretty-printed dates.
+\begin{pgfplotslibrary}{dateplot}
+ A library which allows to use dates like |2008-01-01| or dates with time like |2008-01-01 11:35| as input coordinates in plots. The library converts dates to numbers and tick labels will be pretty-printed dates (or times).
This library is documented in section~\ref{pgfplots:sec:symbolic:coords} on page~\pageref{pgfplots:sec:date:coords}.
-\end{tikzlibrary}
+\end{pgfplotslibrary}
\subsection{Clickable Plots}
-\begin{tikzlibrary}{pgfplotsclickable}
+\begin{pgfplotslibrary}{clickable}
A library which generates small popups whenever one clicks into a plot. The popup displays the coordinate under the mouse pointer. Furthermore, the library allows to display slopes if one holds the mouse pressed and drags it to another point in the plot.
- Although this library has been written for \PGFPlots, it can be used independently of an \PGFPlots\ environment.
- It is completely sufficient to write
+ It is completely sufficient to write
\begin{codeexample}[code only]
-\usetikzlibrary{pgfplotsclickable}
+\usepgfplotslibrary{clickable}
\end{codeexample}
\noindent in the document preamble. This will automatically prepare every plot.
@@ -25,13 +25,30 @@ This section describes some libraries which come with \PGFPlots, but they are mo
\includegraphics[height=6cm]{figures/pgfplotsclickable-fig1.png}
\rlap{\includegraphics[height=6cm]{figures/pgfplotsclickable-fig2.png}}\hfill
- \includegraphics[height=6cm]{figures/pgfplotsclickable-fig3.png}
- \rlap{\includegraphics[height=6cm]{figures/pgfplotsclickable-fig4.png}}\hfill
+ \nobreak
+ These screenshots show the result of clicking into the axis range (left column) and of dragging from one point to another (right column). The second case shows the result of drag- and drop: it displays start- and end points and the equation for the line segment between between the first point of the drag- and drop and the second point where the mouse has been released. The line segment is
+ \[ l(x; x_0,y_0,x_1,y_1) = m \cdot x + n \]
+ where $m = (y_1-y_0) / (x_1-x_0)$ is the slope and $n$ the offset chosen such that $l(x_0;\dotsc) = y_0$. For logarithmic plots, logarithms will be applied before computing slopes.
+
+ \noindent
+ \hbox to \linewidth{%
+ \hspace{-0.5cm}%
+ \begin{tikzpicture}
+ \node at (8cm,0cm) {\includegraphics[height=6cm]{figures/pgfplotsclickable-fig4.png}};
+ \node at (0cm,0cm) {\includegraphics[height=6cm]{figures/pgfplotsclickable-fig3.png}};
+ \end{tikzpicture}\hss}%
\nobreak
- These screenshots show the result of clicking into the axis range (left column) and of dragging from one point to another (right column). The second case shows start- and end points and the slope of the line segment in--between.
+ These screenshots show the result of drag- and drop for \emph{logarithmic} axes: the end points show, again, the coordinates (without logs) and the form field in the middle shows the slope and offset of the linear equation in log coordinates.
+
+ The log basis for any logarithmic axes is usually~$10$, but it respects the current setting of |log basis x| and |log basis y|. The applied log will always use the same logarithm which is also used for the axis descriptions (this is not necessarily the same as used by \PGFPlotstable!).
- This document has been produces with |pgfplotsclickable|, so it is possible to load it into Acrobat Reader and simply click into a plot.
+ This document has been produced with the |clickable| library, so it is possible to load it into Acrobat Reader and simply click into a plot.
+
+ \expandafter\ifx\csname pgfplotsclickabledisabled\endcsname\relax
+ \else
+ \paragraph{Attention:} For this document, the |clickable| library has been deactivated. You may find a different version on \url{http://sourceforge.net/projects/pgfplots}.
+ \fi
A click places an annotation at the coordinate under the mouse pointer, a snap--to--nearest feature is not available (yet?).
@@ -42,6 +59,7 @@ This section describes some libraries which come with \PGFPlots, but they are mo
\item At the time of this writing, only Adobe Acrobat Reader interpretes Javascript and Forms properly. The library doesn't have any effect if the resulting document is used in other viewers (as far as I know).
\end{itemize}
+ Note that although this library has been written for \PGFPlots, it can be used independently of an \PGFPlots\ environment.
\paragraph{Compatibility issues:}
There a several restrictions when using this library. Most of them will vanish in future versions -- but up to now, I can't do magic.
@@ -49,11 +67,18 @@ This section describes some libraries which come with \PGFPlots, but they are mo
\item The library does not yet support rotated axes. Use |clickable=false| for those axes.
\item The library works only with |pdflatex|, |dvips| or |dvipdfm| are not supported\footnote{In fact, they should be. I don't really know why they don't $\hdots$ any hint is welcome.}.
- \item Up to now, it is \emph{not} possible to use this library in conjunction with the image externalization methods of section~\ref{sec:pgfplots:importexport}.
+ \item Up to now, it is \emph{not} possible to use this library together with the |external| library and other image externalization methods of section~\ref{sec:pgfplots:importexport}.
To be more precise, the exported \pdf\ documents will work correctly, but the |\includegraphics| command does not import the dynamic features.
Please note that the exported \pdf\ documents will only work if |\usepackage[pdftex]{eforms}| is placed \emph{before} loading \pgfname, \Tikz\ or \PGFPlots.
+ As long as you are working on a draft version of your document, you might want to use
+\begin{codeexample}[code only]
+\pgfkeys{/pgf/images/include external/.code={\href{file:#1}{\pgfimage{#1}}}
+\end{codeexample}
+ in your preamble. This will generate hyper links around the graphics files which link to the exported figures. Clicking on the hyper links opens the exported figure which, in turn, has been generated with the |clickable| library and allows dynamic features\footnote{This special treatment needs the external files in the same base directory as the main document, so this approach is most certainly \emph{not} suitable for a final document.}.
+
+
\item The library automatically calls |\begin{Form}| at |\begin{document}| and |\end{Form}| at the end of the document. This environment of |hyperref| is necessary for dynamic user interaction and should be kept in mind if the document contains other form elements.
\end{itemize}
@@ -61,9 +86,9 @@ This section describes some libraries which come with \PGFPlots, but they are mo
\begin{itemize}
\item I have used a javascript |sprintf| implementation of Kevin van Zonneveld~\cite{phptojs} (the javascript API has only a limited set of conversions).
\end{itemize}
-\end{tikzlibrary}
+\end{pgfplotslibrary}
-It is possible to customize |pgfplotsclickable| with several options.
+It is possible to customize |pgfplots.clickable| with several options.
\begin{pgfplotskey}{clickable=\mchoice{true,false} (initially true)}
Allows to disable the library for single plots.
@@ -176,3 +201,16 @@ This library provides essentially one command, |\pgfplotsclickablecreate| which
\begin{pgfplotskeylist}{annot/xmin=\marg{number},annot/xmax=\marg{number},annot/ymin=\marg{number},annot/ymax=\marg{number} (initially empty)}
These required keys communicate the axis limits to |\pgfplotsclickablecreate|. They should be set to numbers which can be assigned to a javascript floating point number (standard IEEE double precision).
\end{pgfplotskeylist}
+
+\input pgfplots.libs.units.tex
+\input pgfplots.libs.groupplot.tex
+
+\subsection{Image Externalization}
+\begin{pgfplotslibrary}{external}
+ The |external| library offers a convenient method to export every single |tikzpicture| into a separate~|.pdf| (or~|.eps|). Later runs of \LaTeX\ will simply include these graphics, thereby reducing typesetting time considerably.
+
+ This library is documented in more detail in section~\ref{sec:pgfplots:export} ``Export to {\pdf/\eps}''.
+
+
+ The |external| library has been written by Christian Feuers\"anger (author of \PGFPlots). It has been contributed to \Tikz\ as general purpose library, so the reference documentation along with all tweaks can be found in~\cite[Section ``Externalization Library'']{tikz}. The command |\usepgfplotslibrary{external}| is actually just a wrapper which loads |\usetikzlibrary{external}| or, if this library does not yet exist because the installed \pgfname\ has at most version $2.00$, it will load a copy which is shipped with \PGFPlots.
+\end{pgfplotslibrary}