diff options
author | Karl Berry <karl@freefriends.org> | 2010-04-03 23:06:54 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-04-03 23:06:54 +0000 |
commit | 36080b5cf06fe9bdde3b1edb30fd795a58e6bf10 (patch) | |
tree | 172e727ca5a42cbd0c2440855dbb81f3a5c2148e /Master | |
parent | e27b3d0aaf815fdab1497a0a827998ac044e245d (diff) |
pgfplots update (1apr10)
git-svn-id: svn://tug.org/texlive/trunk@17670 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
75 files changed, 2333 insertions, 647 deletions
diff --git a/Master/texmf-dist/doc/context/third/pgfplots/pgfplotsexample.pdf b/Master/texmf-dist/doc/context/third/pgfplots/pgfplotsexample.pdf Binary files differdeleted file mode 100644 index 4c0d4a58254..00000000000 --- a/Master/texmf-dist/doc/context/third/pgfplots/pgfplotsexample.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/context/third/pgfplots/pgfplotsexample.tex b/Master/texmf-dist/doc/context/third/pgfplots/pgfplotsexample.tex index d9903691077..bb1b6e562a0 100644 --- a/Master/texmf-dist/doc/context/third/pgfplots/pgfplotsexample.tex +++ b/Master/texmf-dist/doc/context/third/pgfplots/pgfplotsexample.tex @@ -1,7 +1,7 @@ %% ConTeXt file \usemodule[pgfplots] -\pgfplotsset{compat=newest}% <-- moves axis labels near ticklabels (respects tick label widths) +\pgfplotsset{compat=1.3}% <-- moves axis labels near ticklabels (respects tick label widths) \starttext Using Con{\TeX}t. diff --git a/Master/texmf-dist/doc/generic/pgfplots/README b/Master/texmf-dist/doc/generic/pgfplots/README index 78e09b81e88..8001a16e128 100644 --- a/Master/texmf-dist/doc/generic/pgfplots/README +++ b/Master/texmf-dist/doc/generic/pgfplots/README @@ -1,5 +1,4 @@ -pgfplots - A tool to work with scientific data. It draws normal and/or -logarithmic plots in two and three dimensions for LaTeX/TeX/ConTeXt. +pgfplots - Create normal/logarithmic plots in two and three dimensions for LaTeX/TeX/ConTeXt. pgfplotstable - Loads, rounds, formats and postprocesses numerical tables. @@ -8,8 +7,9 @@ with a user-friendly interface directly in TeX. The user supplies axis labels, legend entries and the plot coordinates for one or more plots and PGFPlots applies axis scaling, computes any logarithms and axis ticks and draws the plots, supporting line plots, scatter plots, piecewise constant plots, bar -plots, area plots, mesh-- and surface plots and some more. It is based on Till -Tantau's package PGF/TikZ. +plots, area plots, mesh-- and surface plots and some more. + +Pgfplots is based on Till Tantau's package PGF/TikZ (pgf). Pgfplotstable displays numerical tables rounded to desired precision in various display formats, for example scientific format, fixed point format or integer, diff --git a/Master/texmf-dist/doc/latex/pgfplots/ChangeLog b/Master/texmf-dist/doc/latex/pgfplots/ChangeLog index 8e58a522a74..e39a4175aba 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/ChangeLog +++ b/Master/texmf-dist/doc/latex/pgfplots/ChangeLog @@ -1,3 +1,104 @@ +2010-03-31 Christian Feuersaenger <ludewich@users.sourceforge.net> + + - Released version 1.3.1 + +2010-03-25 Christian Feuersaenger <ludewich@users.sourceforge.net> + + - Imported all patches to PGF written by Christian Feuersaenger. + - Fixed bug: axis descriptions for |small| and |footnotesize| styles were + too large + - added |tiny| style + +2010-03-24 Christian Feuersaenger <ludewich@users.sourceforge.net> + + - Fixed bug: overlay did not work properly + - Fixed bug: grids worked only for boxed axes + +2010-03-23 Christian Feuersaenger <ludewich@users.sourceforge.net> + + - Fixed bug: \pgfplotstablesave did not reset 'postproc cell content' + +2010-03-16 Christian Feuersaenger <ludewich@users.sourceforge.net> + + - Fixed bug: 'draw=none' wasn't handled correctly. + +2010-03-12 Christian Feuersaenger <ludewich@users.sourceforge.net> + + - Fixed bug: the table package had spurious spaces + +2010-02-23 Christian Feuersaenger <ludewich@users.sourceforge.net> + + - Fixed bug: the 'date type' was broken due to a missing comma + +2010-02-22 Christian Feuersaenger <ludewich@users.sourceforge.net> + + - Fixed bug: providing a point meta expression twice as in 'point meta=<expr>, point meta=<expr>' yielded an infinite recursion + +2010-02-20 Christian Feuersaenger <ludewich@users.sourceforge.net> + + - Fixed docs for \addlegendimage which was documented using the wrong name |\legendimage| + - Allowed paragraphs in legend texts (was broken before) + +2010-02-18 Christian Feuersaenger <ludewich@users.sourceforge.net> + + - number printing: added 'sci generic' style to customize the appearance + of scientific format and a 'verbatim' style which doesn't use TeX macros + for the formatted numbers. + + +2010-02-09 Christian Feuersaenger <ludewich@users.sourceforge.net> + + - Fixed bug in auto cross referenced of table package manual + + +2010-02-08 Christian Feuersaenger <ludewich@users.sourceforge.net> + + - Fixed problem with spurious white space occuring during table input command + +2010-02-04 Christian Feuersaenger <ludewich@users.sourceforge.net> + + - Fixed problem with spurious white space occuring during table input command + +2010-01-27 Christian Feuersaenger <ludewich@users.sourceforge.net> + + - fixed bug: \coordindex for plot table from already loaded structure was + wrong. + +2010-01-26 Christian Feuersaenger <ludewich@users.sourceforge.net> + + - Introduced 'compat=1.3' . The name 'compat=newest' was not not such a + good idea since it might introduce a problem for following releases. + - Emphasized key names in references to show that /pgfplots/, /tikz/ and + similar prefixes are unnecessary. + - Fixed the 'xticklabels' key such that it also accepts '\\' terminated + lists. This fixes strange bugs with dots '.' as last characters in + entries. + +2010-01-21 Christian Feuersaenger <ludewich@users.sourceforge.net> + - added sanity checks such that 'xmin/max' and friends can't be invoked + within an \addplot. + - plot gnuplot: added user customizable styles to change the dummy + variables. The initial config will now use 'x' for 1d, 'x,y' for 2d, 't' + for 1d parametric and 'u,v' for 2d parametric plots. + - fixed bug: one couldn't use different log/normal scalings in a group + plot. Relaxed sanity checking here. + - added docs for |variable| and |variable y| which appeared to be missing. + +2010-01-14 Christian Feuersaenger <ludewich@users.sourceforge.net> + + - fixed that '\addlegendimage' did not respect the every plot styles. + - added 'every legend image post' style. + + +2010-01-08 Christian Feuersaenger <ludewich@users.sourceforge.net> + + - fixed bug which occurs if 'legend style' is set *after* \begin{axis}. + - plot gnuplot: restored support for the '/tikz/parametric' option: it did only work if + one provided the prefix '/tikz/' explicitly + - plot gnuplot: parametric plots now use the SAME dummy variables as plot + expression. If you write variable=\x, 'x' will be the gnuplot variable. If + you write variable y=\y, 'y' will be the second gnuplot variable. + 2010-01-02 Christian Feuersaenger <ludewich@users.sourceforge.net> - Released version 1.3 diff --git a/Master/texmf-dist/doc/latex/pgfplots/Makefile b/Master/texmf-dist/doc/latex/pgfplots/Makefile index 6414fa5a278..576def59f2f 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/Makefile +++ b/Master/texmf-dist/doc/latex/pgfplots/Makefile @@ -8,7 +8,7 @@ notes: TeX-programming-notes.pdf pgfplots: pgfplots.pdf pgfplotstable: pgfplotstable.pdf -%.pdf: FORCE +%.pdf: update-git-hooks FORCE mkdir -p gnuplot @export TEXMFCNF=.: && $(PDFLATEX) $(@:.pdf=.tex) @bibtex $(@:.pdf=) || exit 0 @@ -19,4 +19,7 @@ pgfplotstable: pgfplotstable.pdf clean: rm -f *.aux *.ind *.idx *.toc *.out *.log *.ilg *.dvi pgfplots.pdf pgfplotstable.pdf *.djs *.bbl *.blg figures/expensiveexample* +update-git-hooks: + @ + FORCE: 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 7657c60b10e..adc6b7268fa 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/gallery/Makefile b/Master/texmf-dist/doc/latex/pgfplots/gallery/Makefile index f65f03818db..27896014114 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/gallery/Makefile +++ b/Master/texmf-dist/doc/latex/pgfplots/gallery/Makefile @@ -20,7 +20,7 @@ prepare: $(DOC_SRC) touch $@ clean: - rm ./example* prepare index.html + rm -f ./example* prepare index.html prepared: $(PREPARED_SRC:%.tex=%.pdf) diff --git a/Master/texmf-dist/doc/latex/pgfplots/gallery/extractexamples.pl b/Master/texmf-dist/doc/latex/pgfplots/gallery/extractexamples.pl index b58e8f00817..5576c9ad7fb 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/gallery/extractexamples.pl +++ b/Master/texmf-dist/doc/latex/pgfplots/gallery/extractexamples.pl @@ -51,6 +51,7 @@ $header = % http://www.ctan.org/tex-archive/graphics/pgf/contrib/pgfplots/doc/latex/plotdata/ \usepackage{pgfplots} +\pgfplotsset{compat=newest} \pagestyle{empty} '; diff --git a/Master/texmf-dist/doc/latex/pgfplots/gallery/pgfshell_cos.sh b/Master/texmf-dist/doc/latex/pgfplots/gallery/pgfshell_cos.sh deleted file mode 100644 index 69dfb98cfb0..00000000000 --- a/Master/texmf-dist/doc/latex/pgfplots/gallery/pgfshell_cos.sh +++ /dev/null @@ -1 +0,0 @@ -awk 'BEGIN{ pi=3.14159; N=10; for(i=0;i<=N;i++) print i,cos(i/N*pi);}' diff --git a/Master/texmf-dist/doc/latex/pgfplots/gallery/pgfshell_replot.sh b/Master/texmf-dist/doc/latex/pgfplots/gallery/pgfshell_replot.sh deleted file mode 100644 index 43f9c74b10d..00000000000 --- a/Master/texmf-dist/doc/latex/pgfplots/gallery/pgfshell_replot.sh +++ /dev/null @@ -1 +0,0 @@ -cat pgfshell_cos.out diff --git a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_DoG.gnuplot b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_DoG.gnuplot index 722f1b2926b..83b33ab108c 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_DoG.gnuplot +++ b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_DoG.gnuplot @@ -1,2 +1,2 @@ set table "gnuplot/pgfplots_DoG.table"; set format "%.5f" -set format "%.7e";; set samples 100; plot [x=-15:15] 1.3*exp(-x**2/10) - exp(-x**2/20); +set format "%.7e";; set samples 100; set dummy x,y; plot [x=-15:15] 1.3*exp(-x**2/10) - exp(-x**2/20); diff --git a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_exp.gnuplot b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_exp.gnuplot index 709bdf2166a..a99cd2f2f1d 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_exp.gnuplot +++ b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_exp.gnuplot @@ -1,2 +1,2 @@ set table "gnuplot/pgfplots_exp.table"; set format "%.5f" -set format "%.7e";; set samples 25; set logscale y 2.71828182845905; plot [x=0:10] exp(x); +set format "%.7e";; set samples 25; set dummy x,y; set logscale y 2.71828182845905; plot [x=0:10] exp(x); diff --git a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_filesuffix.gnuplot b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_filesuffix.gnuplot index 3bbc4c5a6ec..10456404a51 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_filesuffix.gnuplot +++ b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_filesuffix.gnuplot @@ -1,2 +1,2 @@ set table "gnuplot/pgfplots_filesuffix.table"; set format "%.5f" -set format "%.7e";; set samples 25; plot [x=-5:5] (-x**5 - 242); +set format "%.7e";; set samples 25; set dummy x,y; plot [x=-5:5] (-x**5 - 242); diff --git a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_gnuplot_ppp.gnuplot b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_gnuplot_ppp.gnuplot index bee9ff15ac7..7acc4a7fd6e 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_gnuplot_ppp.gnuplot +++ b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_gnuplot_ppp.gnuplot @@ -1,2 +1,2 @@ set table "gnuplot/pgfplots_gnuplot_ppp.table"; set format "%.5f" -set format "%.7e";; set samples 120; plot [x=-40:40] 10000*sin(x/3); +set format "%.7e";; set samples 120; set dummy x,y; plot [x=-40:40] 10000*sin(x/3); diff --git a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_parable.gnuplot b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_parable.gnuplot index 9144ac39184..c94d4875087 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_parable.gnuplot +++ b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_parable.gnuplot @@ -1,2 +1,2 @@ set table "gnuplot/pgfplots_parable.table"; set format "%.5f" -set format "%.7e";; set samples 25; plot [x=-5:5] 4*x**2 - 5; +set format "%.7e";; set samples 25; set dummy x,y; plot [x=-5:5] 4*x**2 - 5; diff --git a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_pow2.gnuplot b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_pow2.gnuplot index fd5e0ab7b3c..b700c64ee70 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_pow2.gnuplot +++ b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_pow2.gnuplot @@ -1,2 +1,2 @@ set table "gnuplot/pgfplots_pow2.table"; set format "%.5f" -set format "%.7e";; set samples 8; set logscale y 2.71828182845905; plot [x=0:10] 2**(-1.5*x -3); +set format "%.7e";; set samples 8; set dummy x,y; set logscale y 2.71828182845905; plot [x=0:10] 2**(-1.5*x -3); diff --git a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_sin.gnuplot b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_sin.gnuplot index 2bc6c2ecd64..1784003af06 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_sin.gnuplot +++ b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_sin.gnuplot @@ -1,2 +1,2 @@ set table "gnuplot/pgfplots_sin.table"; set format "%.5f" -set format "%.7e";; set samples 25; plot [x=-5:5] sin(x); +set format "%.7e";; set samples 25; set dummy x,y; plot [x=-5:5] sin(x); diff --git a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_tangens.gnuplot b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_tangens.gnuplot index 483ee2b9a13..a3e066c321b 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_tangens.gnuplot +++ b/Master/texmf-dist/doc/latex/pgfplots/gnuplot/pgfplots_tangens.gnuplot @@ -1,2 +1,2 @@ set table "gnuplot/pgfplots_tangens.table"; set format "%.5f" -set format "%.7e";; set samples 1000; plot [x=-1.5*pi:1.5*pi] tan(x); +set format "%.7e";; set samples 1000; set dummy x,y; plot [x=-1.5*pi:1.5*pi] tan(x); diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfmanual-en-macros.tex b/Master/texmf-dist/doc/latex/pgfplots/pgfmanual-en-macros.tex index 4033e67b27b..e12e483dcb6 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfmanual-en-macros.tex +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfmanual-en-macros.tex @@ -224,7 +224,7 @@ \ifpgfutil@in@% \extractequalinitial#1\@nil% \else - \pgfmanualentryheadline{{\ttfamily\declare{#1}}\hfill(\extrakeytext no value)}% + \pgfmanualentryheadline{{\ttfamily\declarekey{#1}}\hfill(\extrakeytext no value)}% \def\mykey{#1}% \def\mypath{}% \def\myname{}% @@ -234,6 +234,31 @@ \fi% } +\pgfkeyssetvalue{/pgfmanual/gray key prefixes}{/pgfplots/,/tikz/} + +\def\declarekey#1{% + \begingroup + \gdef\declarekey@didit{0}% + \pgfkeysgetvalue{/pgfmanual/gray key prefixes}\declarekey@gray + \def\declarekey@loop{\foreach \prefix in }% + \expandafter\declarekey@loop\expandafter{\declarekey@gray} {% + \expandafter\pgfutil@in@\expandafter{\prefix}{#1}% + \ifpgfutil@in@ + \expandafter\def\expandafter\declarekey@handleprefix\prefix####1\relax{% + \keyprefix{\prefix}\declare{####1}% + }% + \declarekey@handleprefix#1\relax + \gdef\declarekey@didit{1}% + \breakforeach + \fi + }% + \if0\declarekey@didit + \declare{#1}% + \fi + \endgroup +}% +\def\keyprefix#1{\textcolor{gray}{#1}} + \def\extractkeyequal#1=#2\@nil{% \pgfutil@in@{(default}{#2}% \ifpgfutil@in@% @@ -243,8 +268,8 @@ \ifpgfutil@in@% \extractinitial{#1}#2\@nil% \else -% \pgfmanualentryheadline{{\ttfamily\declare{#1}=}#2\hfill(\extrakeytext no default)}% - \pgfmanualentryheadline{{\ttfamily\declare{#1}=}#2\hfill}% +% \pgfmanualentryheadline{{\ttfamily\declarekey{#1}=}#2\hfill(\extrakeytext no default)}% + \pgfmanualentryheadline{{\ttfamily\declarekey{#1}=}#2\hfill}% \fi% \fi% \def\mykey{#1}% @@ -255,16 +280,16 @@ } \def\extractdefault#1#2(default #3)\@nil{% - \pgfmanualentryheadline{{\ttfamily\declare{#1}\opt{=}}\opt{#2}\hfill (\extrakeytext default {\ttfamily#3})}% + \pgfmanualentryheadline{{\ttfamily\declarekey{#1}\opt{=}}\opt{#2}\hfill (\extrakeytext default {\ttfamily#3})}% } \def\extractinitial#1#2(initially #3)\@nil{% -% \pgfmanualentryheadline{{\ttfamily\declare{#1}=}#2\hfill (\extrakeytext no default, initially {\ttfamily#3})}% - \pgfmanualentryheadline{{\ttfamily\declare{#1}=}#2\hfill (\extrakeytext initially {\ttfamily#3})}% +% \pgfmanualentryheadline{{\ttfamily\declarekey{#1}=}#2\hfill (\extrakeytext no default, initially {\ttfamily#3})}% + \pgfmanualentryheadline{{\ttfamily\declarekey{#1}=}#2\hfill (\extrakeytext initially {\ttfamily#3})}% } \def\extractequalinitial#1 (initially #2)\@nil{% - \pgfmanualentryheadline{{\ttfamily\declare{#1}}\hfill (\extrakeytext initially {\ttfamily#2})}% + \pgfmanualentryheadline{{\ttfamily\declarekey{#1}}\hfill (\extrakeytext initially {\ttfamily#2})}% \def\mykey{#1}% \def\mypath{}% \def\myname{}% diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots-macros.tex b/Master/texmf-dist/doc/latex/pgfplots/pgfplots-macros.tex index 3db2099ab98..037fd69d3eb 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots-macros.tex +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots-macros.tex @@ -244,7 +244,7 @@ \newenvironment{codekey}[1]{% \begin{pgfmanualentry} - \pgfmanualentryheadline{{\ttfamily\declare{#1}\textcolor{gray}{/\pgfmanualpdfref{/handlers/.code}{.code}}=\marg{...}}\hfill}% + \pgfmanualentryheadline{{\ttfamily\declarekey{#1}\textcolor{gray}{/\pgfmanualpdfref{/handlers/.code}{.code}}=\marg{...}}\hfill}% \def\mykey{#1}% \def\mypath{}% \def\myname{}% @@ -264,7 +264,7 @@ } \newenvironment{pgfplotscodetwokey}[1]{% \begin{pgfmanualentry} - \pgfmanualentryheadline{{\ttfamily\declare{/pgfplots/#1}\textcolor{gray}{/\pgfmanualpdfref{/handlers/.code 2 args}{.code 2 args}}=\marg{...}}\hfill}% + \pgfmanualentryheadline{{\ttfamily\declarekey{/pgfplots/#1}\textcolor{gray}{/\pgfmanualpdfref{/handlers/.code 2 args}{.code 2 args}}=\marg{...}}\hfill}% \def\mykey{/pgfplots/#1}% \def\mypath{}% \def\myname{}% @@ -283,7 +283,7 @@ \pgfmanualentryheadline@##1\pgfplots@EOI }% \def\pgfmanualentryheadline@##1\hfill##2\pgfplots@EOI{% - \oldpgfmanualentryheadline{{\ttfamily\declare{##1}\textcolor{gray}{/\pgfmanualpdfref{/handlers/.code}{.code}}=\marg{...}}\hfill}% + \oldpgfmanualentryheadline{{\ttfamily\declarekey{##1}\textcolor{gray}{/\pgfmanualpdfref{/handlers/.code}{.code}}=\marg{...}}\hfill}% } \begin{pgfplotsxykeylist}{#1}% } 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 950de93151b..bb705ef1831 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.basic.reference.tex +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.basic.reference.tex @@ -4,7 +4,7 @@ This section documents commands which provide access to more basic elements of \ However, most elements in this section are only interesting for advanced users -- and perhaps only for special cases. -\subsection{Utitity Commands} +\subsection{Utility Commands} \begin{command}{\foreach \meta{variables} |in| \meta{list} \marg{commands}} A powerful loop command provided by \Tikz, see~\cite[Section Utilities]{tikz}. @@ -42,7 +42,7 @@ All collected = \allcollected. \end{command} \begin{command}{\pgfplotsinvokeforeach\marg{list} \marg{command}} - A variant of |\pgfplotsforeachungrouped| (and such also of |\foreach|) which replaces any occurence of |#1| inside of \meta{command} once for every element in \meta{list}. Thus, it actually assumes that \marg{command} is like a |\newcommand| body. + A variant of |\pgfplotsforeachungrouped| (and such also of |\foreach|) which replaces any occurrence of |#1| inside of \meta{command} once for every element in \meta{list}. Thus, it actually assumes that \marg{command} is like a |\newcommand| body. In other words, \marg{command} is invoked for every element of \marg{list}. The actual element of \marg{list} is available as |#1|. @@ -144,7 +144,7 @@ The number is printed using the current number printing options, see the manual \subsection{Path Operations} \begin{commandlist}{\path,\draw,\fill,\node,\matrix} - These commands are \Tikz\ drawing commands all of which are documented in~\cite{tikz}. They are used to draw or fill paths, generate text nodes or aligned text matrizes. They are equivalent to + These commands are \Tikz\ drawing commands all of which are documented in~\cite{tikz}. They are used to draw or fill paths, generate text nodes or aligned text matrices. They are equivalent to \pgfmanualpdflabel{/tikz/draw}{}|\path[draw]|, \pgfmanualpdflabel{/tikz/fill}{}|\path[fill]|, \pgfmanualpdflabel{/tikz/node}{}|\path[node]|, diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.importexport.tex b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.importexport.tex index 070f573d1e2..ac8b4ba4bcb 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.importexport.tex +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.importexport.tex @@ -29,16 +29,16 @@ The only steps which are necessary is to use \pgfmanualpdflabel{\textbackslash tikzexternalize}{}% |\usepgfplotslibrary{external}| -|\tikzexternalize|\marg{the main file name} +|\tikzexternalize| -\noindent where \meta{the main file name} is the name of your |.tex| file (without the extension |.tex|). No further modification to the document is necessary. Suppose we have a file called |test.tex|: +\noindent somewhere in your document's preamble. No further modification to the document is necessary. Suppose we have a file called |test.tex|: \begin{codeexample}[code only] \documentclass{article} \usepackage{pgfplots} \usepgfplotslibrary{external} -\tikzexternalize{test} +\tikzexternalize% activate externalization! \begin{document} \begin{figure} @@ -64,7 +64,7 @@ The only steps which are necessary is to use \begin{codeexample}[code only] pdflatex -shell-escape test \end{codeexample} -\noindent and \LaTeX\ will now generate the required graphics files |test-figure0.pdf| and |test-figure1.pdf| automatically. Any further call to |pdflatex| will simply use |\includegraphics| and the |tikzpicture|s as such are no longer considered. +\noindent and \LaTeX\ will now generate the required graphics files |test-figure0.pdf| and |test-figure1.pdf| automatically. Any further call to |pdflatex| will simply use |\includegraphics| and the |tikzpicture|s as such are no longer considered (you need a different command line switch for Mik\TeX, see the |shell escape| option). If a figure shall be remade, one can simply delete all or selected graphics files and re-generate them. Alternatively, one can use the command |\tikzset{external/force remake}| somewhere in the document to remake every following picture automatically. @@ -98,7 +98,7 @@ There are three ways to modify the file names of externalized figures: \usepackage{tikz} \usepgfplotslibrary{external} -\tikzexternalize[prefix=figures/]{main} % provide the file's real name +\tikzexternalize[prefix=figures/]% activate with a name prefix \begin{document} @@ -132,7 +132,7 @@ pdflatex -shell-escape main \usepackage{tikz} \usepgfplotslibrary{external} -\tikzexternalize{main} % provide the file's real name +\tikzexternalize% activate externalization! \begin{document} @@ -193,17 +193,19 @@ pdflatex -shell-escape main \begin{key}{/tikz/external/system call=\marg{template}} \label{extlib:systemcall:option} - A template string used to generate system calls. Inside of \marg{template}, the macro |\image| can be used as placeholder for the image which is about to be generated while |\texsource| contains the main file name. + A template string used to generate system calls. Inside of \marg{template}, the macro |\image| can be used as placeholder for the image which is about to be generated while |\texsource| contains the main file name (in truth, it contains |\input|\marg{main file name}, but that doesn't matter). The default is \begin{codeexample}[code only] -\tikzset{external/system call={pdflatex -shell-escape -halt-on-error +\tikzset{external/system call={pdflatex \tikzexternalcheckshellescape -halt-on-error -interaction=batchmode -jobname "\image" "\texsource"} \end{codeexample} + \noindent where \declareandlabel{\tikzexternalcheckshellescape} inserts the value of the configuration key |shell escape| + if and only if the current document has been typeset with |-shell-escape|\footnote{Note that this is always true for the default configuration. This security consideration applies mainly for \texttt{mode=list and make} which will also work \emph{without} shell escapes.}. For |eps| output, you can (and need to) use \begin{codeexample}[code only] -\tikzset{external/system call={latex -shell-escape -halt-on-error +\tikzset{external/system call={latex \tikzexternalcheckshellescape -halt-on-error -interaction=batchmode -jobname "\image" "\texsource"; dvips -o "\image".ps "\image".dvi}} \end{codeexample} @@ -211,12 +213,32 @@ pdflatex -shell-escape main The argument \marg{template} will be expanded using |\edef|, so any control sequences will be expanded. During this evaluation, `|\\|' will result in a normal backslash, `|\|'. Furthermore, double quotes `|"|', single quotes `|'|', semicolons and dashes `|-|' will be made to normal characters if any package uses them as macros. This ensures compatibility with the |german| package, for example. \end{key} +\begin{key}{/tikz/external/shell escape=\marg{command-line arg} (initially -shell-escape)} + Contains the command line option for |latex| which enables the |\write18| feature. For \TeX-Live, this is |-shell-escape|. For Mik\TeX, you should use |\tikzexternalize[shell escape=-enable-write18]|. +\end{key} + +\begin{key}{/tikz/external/mode=\mchoice{convert with system call,list and make,$\dotsc$} (initially convert with system call)} + This allows to change the default operation mode. There are a handful of choices possible, all of them are described in detail in~\cite[section ``Externalization Library'']{tikz}. The most useful ones are probably the initial configuration |convert with system call| and the specialized choice |list and make|. + + The choice |list and make| configures the library to check if there are already external graphics and uses them. If there are no graphics, the library will \emph{skip} the figure. However, it will also generate a |makefile| to generate the graphics, and a list of all required graphics files. + + It is not required to use |make|: the library expects you to generate the images somehow and it doesn't care about the ``how''. Using |make -f |\meta{name-of-tex-file}|.makefile -j 2| allows parallel execution which might, indeed, be an option. Furthermore, the makefile also supports file dependencies: if one of your data tables has been updated, the external graphics will be remade automatically. \PGFPlots\ tells the external library about any file dependencies (input files and tables). + + The two modes have the following characteristics: + \begin{enumerate} + \item |convert with system call| is automatic and does everything on--the--fly. However, it \emph{can't} work with |\ref| and/or |\label| information in external pictures. + \item |list and make| requires either manual (by calling the system calls manually) or semi--automatic conversion (using the generated \meta{main}|.makefile|), and multiple runs of |pdflatex|. The generated Makefile can be processed in parallel. Furthermore, |list and make| provides \emph{full support} for |\ref| and |\label|: any |\label| defined inside of an externalized graphics is still available for the main document. + + If you have legends with |legend to name| or |\label|/|\ref|, you need to generate the graphics defining the |\label| (or |legend to name|), then run |pdflatex| twice on the main document. Afterwards, you can externalize the legend graphics. + \end{enumerate} +\end{key} + The complete reference documentation and remaining options are documented in~\cite[``Externalization Library'']{tikz}. This reference also contains information about \begin{itemize} \item how to use |\tikzset{external/|\declareandlabel{force remake}|}| and |\tikzset{external/|\declareandlabel{remake next}|}| to remake selected figures, \item how to disable the externalization partially with |\tikzset{external/|\declareandlabel{export}|=false}| or completely with |\tikzexternaldisable|, \item how to optimize the speed of the conversion process using |\tikzset{external/optimize command away=\myExpensiveMacro}|, - \item how to use |mode=list and make| to automatically generate makefiles for parallel image externalization\footnote{In case you'd like to test \texttt{list and make}, consider using \texttt{\textbackslash tikzifexternalizing\{\textbackslash nofiles\}\{\}} to suppress \texttt{.aux} file generation during parallel externalization procedures; \texttt{.aux} files would be screwed up otherwise.}, + \item how to add further remake-dependencies with |\tikzpicturedependsonfile|\marg{name} and/or |\tikzexternalfiledependsonfile|\marg{external file}\marg{name}, \item how to typeset such a document without \pgfname\ installed or \item how to provide work-arounds with |.pdf| images and bounding box restrictions. \index{External Graphics!Bounding Box Issues} @@ -229,7 +251,7 @@ There is a small replacement package \declareandlabel{tikzexternal.sty} which ca % \usepackage{tikz} % \usepackage{pgfplots} \usepackage{tikzexternal} -\tikzexternalize{test} % <-- provide the main .tex name +\tikzexternalize% activate externalization \begin{document} \begin{tikzpicture} @@ -323,6 +345,12 @@ These steps are explained in much more detail in Section``Externalizing Graphics It should be noted that this approach of image externalization is not limited to \Tikz\ picture environments. In fact, it collects everything between the begin and end statements into the external file. It is implicitly assumed that the encapsulated stuff is one box, but you can also encapsulate complete paragraphs using something like the \LaTeX\ minipage (or a |\vbox| which is not as powerful but does not affect the remaining document that much). +\begin{key}{/pgf/images/aux in dpth=\mchoice{true,false} (initially false)} + If this boolean is set to |true|, any |\label| information generated inside of the external image is stored into the already mentioned |.dpth| file. The main document can thus reference label information of externalized parts of the document (although you may need to run |latex| several times). + + Label support is provided for |\ref|, and probably |\cite|. The |\pageref| command is only partially supported. +\end{key} + \paragraph{Using the Library Without {\normalfont\pgfname} Installed} Simply uncomment the packages |\usepackage{tikz}| and |\usepackage{pgfplots}| and use \begin{codeexample}[code only] diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.install.tex b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.install.tex index 851be797929..c356a2ebefb 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.install.tex +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.install.tex @@ -37,7 +37,7 @@ However, Mik\TeX\ provides a feature to install packages locally in its own \TeX Mik\TeX\ complains if the provided directory is not TDS conform (see section~\ref{pgfplots:tds} for details), so you can't provide a wrong directory here. This method does also work for other packages, but some packages may need some directory restructuring before Mik\TeX\ accepts them. \subsubsection{Installation of Linux Packages} -At the time of this writing, I am unaware of \PGFPlots\ packages for recent stable Linux distributions. For Ubuntu, there are inofficial Ubuntu Package Repositories which can be added to the Ubuntu Package Tools. The idea is: add a simple URL to the Ubuntu Package Tool, run update and the installation takes place automatically. These URLs are maintained as PPA on Ubuntu Servers. +At the time of this writing, I am unaware of \PGFPlots\ packages for recent stable Linux distributions. For Ubuntu, there are unofficial Ubuntu Package Repositories which can be added to the Ubuntu Package Tools. The idea is: add a simple URL to the Ubuntu Package Tool, run update and the installation takes place automatically. These URLs are maintained as PPA on Ubuntu Servers. The \PGFPlots\ download area on sourceforge contains recent links about Ubuntu Package Repositories, go to \url{http://sourceforge.net/projects/pgfplots/files} @@ -131,7 +131,7 @@ Furthermore, \PGF\ needs to know a \emph{driver} so that the DVI file can be con %\def\pgfsysdriver{pgfsys-dvips.def} \usepackage{pgfplots}. \end{verbatim} - The uncommented commands could be used to set other drivers explictly. + The uncommented commands could be used to set other drivers explicitly. \end{itemize} Please read the corresponding sections in~\cite[Section 7.2.1 and 7.2.2]{tikz} if you have further questions. These sections also contain limitations of particular drivers. @@ -141,7 +141,7 @@ The choice which won't produce any problems at all is |pdflatex|. \PGFPlots\ can handle small up to medium sized plots. However, \TeX\ has never been designed for data plots -- you will eventually face the problem of small memory capacities. See section~\ref{sec:pgfplots:optimization} for how to enlarge them. \subsubsection{Problems with Language Settings and Active Characters} -Both, \PGF\ and \PGFPlots\ use a lot of characters -- which may lead to incompatibilites with other packages which define active characters. Compatibility is better than in earlier versions, but may still be an issue. The manual compiles with the |babel| package for english and french, the |german| package does also work. If you experience any trouble, let me know. Sometimes it may work to disable active characters temporarily (|babel| provides such a command). +Both, \PGF\ and \PGFPlots\ use a lot of characters -- which may lead to incompatibilities with other packages which define active characters. Compatibility is better than in earlier versions, but may still be an issue. The manual compiles with the |babel| package for english and french, the |german| package does also work. If you experience any trouble, let me know. Sometimes it may work to disable active characters temporarily (|babel| provides such a command). \subsubsection{Other Problems} Please read the mailing list at diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.intro.tex b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.intro.tex index af80b0ecd3f..ec1686dadfb 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.intro.tex +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.intro.tex @@ -39,7 +39,7 @@ % for dvipdfm: %\def\pgfsysdriver{pgfsys-dvipdfm.def} \usepackage{pgfplots} -\pgfplotsset{compat=newest}% <-- moves axis labels near ticklabels (respects tick label widths) +\pgfplotsset{compat=1.3}% <-- moves axis labels near ticklabels (respects tick label widths) \begin{document} \begin{figure} diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.libs.tex b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.libs.tex index 44ff66ca55c..0049ec089bf 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.libs.tex +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.libs.tex @@ -26,7 +26,7 @@ This section describes some libraries which come with \PGFPlots, but they are mo \rlap{\includegraphics[height=6cm]{figures/pgfplotsclickable-fig2.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 + These screen shots 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. @@ -39,7 +39,7 @@ This section describes some libraries which come with \PGFPlots, but they are mo \end{tikzpicture}\hss}% \nobreak - 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. + These screen shots 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!). @@ -128,7 +128,7 @@ It is possible to customize |pgfplots.clickable| with several options. \end{pgfplotskey} \begin{pgfplotskey}{annot/font=\marg{javascript font name} (initially font.Times)} - Allows to choose a javascript font for the annotations. Possible choices are limited to what javascripts accepts (which is \emph{not} the same as \LaTeX). The default fonts and its names are shown below. + Allows to choose a javascript font for the annotations. Possible choices are limited to what javascript accepts (which is \emph{not} the same as \LaTeX). The default fonts and its names are shown below. \begin{center} \begin{tabular}{ll} diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.makefile b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.makefile index 2ff065a1d46..1f9688988df 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.makefile +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.makefile @@ -4,144 +4,151 @@ ALL_FIGURES=$(ALL_FIGURE_NAMES:%=%.pdf) allimages: $(ALL_FIGURES) @echo All images exist now. Use make -B to re-generate them. -figures/expensiveexamplepgfplots-figure0.pdf: +FORCEREMAKE: + +include $(ALL_FIGURE_NAMES:%=%.dep) + +%.dep: + touch $@ # will be filled later. + +figures/expensiveexamplepgfplots-figure0.pdf: pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "figures/expensiveexamplepgfplots-figure0" "pgfplots" -figures/expensiveexamplepgfplots-figure1.pdf: +figures/expensiveexamplepgfplots-figure1.pdf: pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "figures/expensiveexamplepgfplots-figure1" "pgfplots" -figures/expensiveexamplepgfplots-figure2.pdf: +figures/expensiveexamplepgfplots-figure2.pdf: pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "figures/expensiveexamplepgfplots-figure2" "pgfplots" -figures/expensiveexamplepgfplots-figure3.pdf: +figures/expensiveexamplepgfplots-figure3.pdf: pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "figures/expensiveexamplepgfplots-figure3" "pgfplots" -figures/expensiveexamplepgfplots-figure4.pdf: +figures/expensiveexamplepgfplots-figure4.pdf: pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "figures/expensiveexamplepgfplots-figure4" "pgfplots" -figures/expensiveexamplepgfplots-figure5.pdf: +figures/expensiveexamplepgfplots-figure5.pdf: pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "figures/expensiveexamplepgfplots-figure5" "pgfplots" -figures/expensiveexamplepgfplots-figure6.pdf: +figures/expensiveexamplepgfplots-figure6.pdf: pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "figures/expensiveexamplepgfplots-figure6" "pgfplots" -figures/expensiveexamplepgfplots-figure7.pdf: +figures/expensiveexamplepgfplots-figure7.pdf: pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "figures/expensiveexamplepgfplots-figure7" "pgfplots" -figures/expensiveexamplepgfplots-figure8.pdf: +figures/expensiveexamplepgfplots-figure8.pdf: pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "figures/expensiveexamplepgfplots-figure8" "pgfplots" -figures/expensiveexamplepgfplots-figure9.pdf: +figures/expensiveexamplepgfplots-figure9.pdf: pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "figures/expensiveexamplepgfplots-figure9" "pgfplots" -figures/expensiveexamplepgfplots-figure10.pdf: +figures/expensiveexamplepgfplots-figure10.pdf: pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "figures/expensiveexamplepgfplots-figure10" "pgfplots" -figures/expensiveexamplepgfplots-figure11.pdf: +figures/expensiveexamplepgfplots-figure11.pdf: pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "figures/expensiveexamplepgfplots-figure11" "pgfplots" -figures/expensiveexamplepgfplots-figure12.pdf: +figures/expensiveexamplepgfplots-figure12.pdf: pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "figures/expensiveexamplepgfplots-figure12" "pgfplots" -figures/expensiveexamplepgfplots-figure13.pdf: +figures/expensiveexamplepgfplots-figure13.pdf: pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "figures/expensiveexamplepgfplots-figure13" "pgfplots" -figures/expensiveexamplepgfplots-figure14.pdf: +figures/expensiveexamplepgfplots-figure14.pdf: pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "figures/expensiveexamplepgfplots-figure14" "pgfplots" -figures/expensiveexamplepgfplots-figure15.pdf: +figures/expensiveexamplepgfplots-figure15.pdf: pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "figures/expensiveexamplepgfplots-figure15" "pgfplots" -figures/expensiveexamplepgfplots-figure16.pdf: +figures/expensiveexamplepgfplots-figure16.pdf: pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "figures/expensiveexamplepgfplots-figure16" "pgfplots" -figures/expensiveexamplepgfplots-figure17.pdf: +figures/expensiveexamplepgfplots-figure17.pdf: pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "figures/expensiveexamplepgfplots-figure17" "pgfplots" -figures/expensiveexamplepgfplots-figure18.pdf: +figures/expensiveexamplepgfplots-figure18.pdf: pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "figures/expensiveexamplepgfplots-figure18" "pgfplots" -figures/expensiveexamplepgfplots-figure19.pdf: +figures/expensiveexamplepgfplots-figure19.pdf: pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "figures/expensiveexamplepgfplots-figure19" "pgfplots" -figures/expensiveexamplepgfplots-figure20.pdf: +figures/expensiveexamplepgfplots-figure20.pdf: pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "figures/expensiveexamplepgfplots-figure20" "pgfplots" -figures/expensiveexamplepgfplots-figure21.pdf: +figures/expensiveexamplepgfplots-figure21.pdf: pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "figures/expensiveexamplepgfplots-figure21" "pgfplots" -figures/expensiveexamplepgfplots-figure22.pdf: +figures/expensiveexamplepgfplots-figure22.pdf: pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "figures/expensiveexamplepgfplots-figure22" "pgfplots" -figures/expensiveexamplepgfplots-figure23.pdf: +figures/expensiveexamplepgfplots-figure23.pdf: pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "figures/expensiveexamplepgfplots-figure23" "pgfplots" -figures/expensiveexamplepgfplots-figure24.pdf: +figures/expensiveexamplepgfplots-figure24.pdf: pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "figures/expensiveexamplepgfplots-figure24" "pgfplots" -figures/expensiveexamplepgfplots-figure25.pdf: +figures/expensiveexamplepgfplots-figure25.pdf: pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "figures/expensiveexamplepgfplots-figure25" "pgfplots" -figures/expensiveexamplepgfplots-figure26.pdf: +figures/expensiveexamplepgfplots-figure26.pdf: pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "figures/expensiveexamplepgfplots-figure26" "pgfplots" -figures/expensiveexamplepgfplots-figure27.pdf: +figures/expensiveexamplepgfplots-figure27.pdf: pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "figures/expensiveexamplepgfplots-figure27" "pgfplots" -figures/expensiveexamplepgfplots-figure28.pdf: +figures/expensiveexamplepgfplots-figure28.pdf: pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "figures/expensiveexamplepgfplots-figure28" "pgfplots" -figures/expensiveexamplepgfplots-figure29.pdf: +figures/expensiveexamplepgfplots-figure29.pdf: pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "figures/expensiveexamplepgfplots-figure29" "pgfplots" -figures/expensiveexamplepgfplots-figure30.pdf: +figures/expensiveexamplepgfplots-figure30.pdf: pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "figures/expensiveexamplepgfplots-figure30" "pgfplots" -figures/expensiveexamplepgfplots-figure31.pdf: +figures/expensiveexamplepgfplots-figure31.pdf: pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "figures/expensiveexamplepgfplots-figure31" "pgfplots" -figures/expensiveexamplepgfplots-figure32.pdf: +figures/expensiveexamplepgfplots-figure32.pdf: pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "figures/expensiveexamplepgfplots-figure32" "pgfplots" -figures/expensiveexamplepgfplots-figure33.pdf: +figures/expensiveexamplepgfplots-figure33.pdf: pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "figures/expensiveexamplepgfplots-figure33" "pgfplots" -figures/expensiveexamplepgfplots-figure34.pdf: +figures/expensiveexamplepgfplots-figure34.pdf: pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "figures/expensiveexamplepgfplots-figure34" "pgfplots" -figures/expensiveexamplepgfplots-figure35.pdf: +figures/expensiveexamplepgfplots-figure35.pdf: pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "figures/expensiveexamplepgfplots-figure35" "pgfplots" -figures/expensiveexamplepgfplots-figure36.pdf: +figures/expensiveexamplepgfplots-figure36.pdf: pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "figures/expensiveexamplepgfplots-figure36" "pgfplots" -figures/expensiveexamplepgfplots-figure37.pdf: +figures/expensiveexamplepgfplots-figure37.pdf: pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "figures/expensiveexamplepgfplots-figure37" "pgfplots" -figures/expensiveexamplepgfplots-figure38.pdf: +figures/expensiveexamplepgfplots-figure38.pdf: pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "figures/expensiveexamplepgfplots-figure38" "pgfplots" -figures/expensiveexamplepgfplots-figure39.pdf: +figures/expensiveexamplepgfplots-figure39.pdf: pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "figures/expensiveexamplepgfplots-figure39" "pgfplots" -figures/expensiveexamplepgfplots-figure40.pdf: +figures/expensiveexamplepgfplots-figure40.pdf: pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "figures/expensiveexamplepgfplots-figure40" "pgfplots" -figures/expensiveexamplepgfplots-figure41.pdf: +figures/expensiveexamplepgfplots-figure41.pdf: pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "figures/expensiveexamplepgfplots-figure41" "pgfplots" -figures/expensiveexamplepgfplots-figure42.pdf: +figures/expensiveexamplepgfplots-figure42.pdf: pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "figures/expensiveexamplepgfplots-figure42" "pgfplots" -figures/expensiveexamplepgfplots-figure43.pdf: +figures/expensiveexamplepgfplots-figure43.pdf: pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "figures/expensiveexamplepgfplots-figure43" "pgfplots" -figures/expensiveexamplepgfplots-figure44.pdf: +figures/expensiveexamplepgfplots-figure44.pdf: pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "figures/expensiveexamplepgfplots-figure44" "pgfplots" -figures/expensiveexamplepgfplots-figure45.pdf: +figures/expensiveexamplepgfplots-figure45.pdf: pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "figures/expensiveexamplepgfplots-figure45" "pgfplots" -figures/expensiveexamplepgfplots-figure46.pdf: +figures/expensiveexamplepgfplots-figure46.pdf: pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "figures/expensiveexamplepgfplots-figure46" "pgfplots" diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.pdf b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.pdf Binary files differindex 170ab6b8f99..238d646785b 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 89d61c21c26..8d2bf40ada7 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.preamble.tex +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.preamble.tex @@ -117,9 +117,11 @@ \usepackage{eurosym} \input{pgfplots-macros} +\usepackage{nicefrac} + \graphicspath{{figures/}} -\def\preambleconfig{width=7cm,compat=newest} +\def\preambleconfig{width=7cm,compat=1.3} \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 7999d661e5b..cb55235b94d 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.2dplots.tex +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.2dplots.tex @@ -34,7 +34,7 @@ Smooth plots interpolate smoothly between successive points. \end{plottype} \subsubsection{Constant Plots} -Constant plots draw lines parallel to the $x$-axis to connect coordinates. The discontinuos edges may be drawn or not, and marks may be placed on left or right ends. +Constant plots draw lines parallel to the $x$-axis to connect coordinates. The discontinuous edges may be drawn or not, and marks may be placed on left or right ends. \begin{plottype}{const plot} Connects all points with horizontal and vertical lines. Marks are placed left-handed on horizontal line segments, causing the plot to be right-sided continuous at all data points. @@ -580,13 +580,13 @@ Area plots may need modified legends, for example using the |area legend| key. F \end{codeexample} \begin{codeexample}[] -\pgfplotstableread{pgfplots.timeseries.dat}\table -\pgfplotstabletypeset\table +\pgfplotstableread{pgfplots.timeseries.dat}\loadedtable +\pgfplotstabletypeset\loadedtable \end{codeexample} \begin{codeexample}[] \pgfplotstableread {pgfplots.timeseries.dat} - {\table} + {\loadedtable} \begin{tikzpicture} \begin{axis}[ @@ -604,19 +604,19 @@ Area plots may need modified legends, for example using the |area legend| key. F legend columns=-1}] \addplot[draw=blue,fill=blue!30!white] - table[x=time,y=1minload] from \table + table[x=time,y=1minload] from \loadedtable \closedcycle; - \addplot table[x=time,y=nodes] from \table; - \addplot table[x=time,y=cpus] from \table; + \addplot table[x=time,y=nodes] from \loadedtable; + \addplot table[x=time,y=cpus] from \loadedtable; \addplot table[x=time,y=processes] - from \table; + from \loadedtable; \legend{1min load,nodes,cpus,processes} \end{axis} \end{tikzpicture} \end{codeexample} \begin{codeexample}[width=4cm] -\pgfplotstableread{pgfplots.timeseries.dat}\table +\pgfplotstableread{pgfplots.timeseries.dat}\loadedtable \begin{tikzpicture} \begin{axis}[ @@ -639,11 +639,11 @@ Area plots may need modified legends, for example using the |area legend| key. F anchor=north, legend columns=2}] - \addplot table[x=time,y=memused] from \table \closedcycle; - \addplot table[x=time,y=memcached] from \table \closedcycle; - \addplot table[x=time,y=membuf] from \table \closedcycle; + \addplot table[x=time,y=memused] from \loadedtable \closedcycle; + \addplot table[x=time,y=memcached] from \loadedtable \closedcycle; + \addplot table[x=time,y=membuf] from \loadedtable \closedcycle; \addplot+[stack plots=false] - table[x=time,y=memtotal] from \table; + table[x=time,y=memtotal] from \loadedtable; \legend{Memory used,Memory cached,Memory buffered,Total memory} \end{axis} \end{tikzpicture} @@ -798,9 +798,9 @@ Scatter plots can be configured using a set of options. One of them is mandatory \paragraph{Remark:} The style |use mapped color| \emph{re}defines |@pre marker code| and |@post marker code|. There is a starred variant \declareandlabel{use mapped color*} which \emph{appends} the functionality while keeping the old marker code. \end{stylekey} -\begin{stylekey}{/pgfplots/scatter/classes=\marg{styles for each classname}} +\begin{stylekey}{/pgfplots/scatter/classes=\marg{styles for each class name}} \label{pgfplots:scatterclasses} - A scatter plot style which visualizes points using several classes. The style assumes that every point coordinate has a class label attached, that means the choice |scatter src=explicit symbolic| is assumed\footnote{If \texttt{scatter src} is not \texttt{explicit symbolic}, we expect a numeric argument which is rounded to the nearest integer. The resulting integer is used a class label. If that fails, the numeric argument is truncated to the nearest integer. If that fails as well, the point has no label.}. A class label can be a number, but it can also be a symbolic constant. Given class labels for every point, \marg{styles for each classname} contains a comma-separated list which associates appearance options to each class label. + A scatter plot style which visualizes points using several classes. The style assumes that every point coordinate has a class label attached, that means the choice |scatter src=explicit symbolic| is assumed\footnote{If \texttt{scatter src} is not \texttt{explicit symbolic}, we expect a numeric argument which is rounded to the nearest integer. The resulting integer is used a class label. If that fails, the numeric argument is truncated to the nearest integer. If that fails as well, the point has no label.}. A class label can be a number, but it can also be a symbolic constant. Given class labels for every point, \marg{styles for each class name} contains a comma-separated list which associates appearance options to each class label. \begin{codeexample}[] \begin{tikzpicture} @@ -870,9 +870,9 @@ It is also possible to provide |scatter/classes| as argument to a single plot, a \end{tikzpicture} \end{codeexample} -In general, the format of \marg{styles for each classname} is a comma separated list of \meta{label}|=|\marg{style options}. +In general, the format of \marg{styles for each class name} is a comma separated list of \meta{label}|=|\marg{style options}. -\paragraph{Attention:} The keys |every mark| and |mark options| have \emph{no effect} when used inside of \marg{styles for each classname}! So, instead of assigning |mark options|, you can simply provide the options directly. They apply only to markers anyway. +\paragraph{Attention:} The keys |every mark| and |mark options| have \emph{no effect} when used inside of \marg{styles for each class name}! So, instead of assigning |mark options|, you can simply provide the options directly. They apply only to markers anyway. \paragraph{Remark:} To use |\label| and |\ref| in conjunction with |scatter/classes|, you can provide the class labels as optional arguments to |\label| in square brackets: @@ -970,7 +970,7 @@ First class is \ref{label:for:first:class}, second is \ref{label:for:second:clas scatter/@post marker code} These two keys constitute the public interface which determines the marker appearance depending on scatter source coordinates. - Redefining them allows fine grained control even over marker types, linestyles and colors. + Redefining them allows fine grained control even over marker types, line styles and colors. The scatter plot algorithm works as follows: \begin{enumerate} @@ -1054,7 +1054,7 @@ Please note that |\ifdim| compares \TeX\ lengths, so the example employs the suf \subsubsection{Interrupted Plots} \index{Interrupted Plots}% \label{pgfplots:interrupt}% -Sometimes it is desireable to draw parts of a single plot separately, without connection between the parts (discontinuities). This can be achieved using the |unbounded coords| key combined with coordinate values |nan|, |inf| or |-inf|. +Sometimes it is desirable to draw parts of a single plot separately, without connection between the parts (discontinuities). This can be achieved using the |unbounded coords| key combined with coordinate values |nan|, |inf| or |-inf|. \begin{pgfplotskey}{unbounded coords=\mchoice{discard,jump} (initially discard)} This key configures what to do if one or more coordinates of a single point are unbounded. Here, unbounded means it is either $\pm \infty$ (|+inf| or |-inf|) or it has the special ``not--a--number'' value |nan|. 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 4192dae2e56..a34e70054e5 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.3dconfiguration.tex +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.3dconfiguration.tex @@ -1,7 +1,7 @@ \subsection{3D Axis Configuration} -This section described keys which are used to configure the appearance of three dimensional figures. Some of them apply for twodimensional plots as special case as well, and they will also be discussed in the respective sections of this manual. +This section described keys which are used to configure the appearance of three dimensional figures. Some of them apply for two--dimensional plots as special case as well, and they will also be discussed in the respective sections of this manual. \subsubsection{View Configuration} \begin{pgfplotskey}{view=\marg{azimuth}\marg{elevation} (initially \{25\}\{30\})} 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 2140d0d15bf..05c431c0588 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.3dplots.tex +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.3dplots.tex @@ -22,11 +22,11 @@ Enough for now, let's continue. The \verbpdfref{\addplot3} command accepts the same input methods as the |\addplot| variant, including expression plotting, coordinates, files and tables. However, a third coordinate is necessary for each of these methods which is usually straight--forward and is explained in all detail in the following. - Furthermore, \verbpdfref{\addplot3} has a way to decide whether a \emph{line} visualization or a \emph{mesh} visualization has to be done. The first one is map from one dimension into $\R^3$ and the latter one a map from two dimensions to $\R^3$. Here, the keys |mesh/rows| and |mesh/cols| are used to define mesh sizes (matrix sizes). Usually, you don't have to care about that because the coordinate input routines already allow either onedimensional or two dimensional structure. + Furthermore, \verbpdfref{\addplot3} has a way to decide whether a \emph{line} visualization or a \emph{mesh} visualization has to be done. The first one is map from one dimension into $\R^3$ and the latter one a map from two dimensions to $\R^3$. Here, the keys |mesh/rows| and |mesh/cols| are used to define mesh sizes (matrix sizes). Usually, you don't have to care about that because the coordinate input routines already allow either one--dimensional or two dimensional structure. \end{addplot3generic} \begin{addplot3operation}[]{coordinates}{\marg{coordinate list}} - The \verbpdfref{\addplot3 coordinates} method works like its twodimensional variant, \verbpdfref{\addplot coordinates} which is described in all detail on page~\pageref{pgfplots:addplot:coordinates}: + The \verbpdfref{\addplot3 coordinates} method works like its two--dimensional variant, \verbpdfref{\addplot coordinates} which is described in all detail on page~\pageref{pgfplots:addplot:coordinates}: A long list of coordinates |(|\meta{x}|,|\meta{y}|,|\meta{z}|)| is expected, separated by white spaces. The input list can be either an unordered series of coordinates, for example for scatter or line plots. It can also have matrix structure, in which case an empty input line (which is equivalent to ``|\par|'') marks the end of one matrix row. Matrix structure can also be provided if one of |mesh/rows| or |mesh/cols| is provided explicitly. @@ -47,7 +47,7 @@ Enough for now, let's continue. \end{codeexample} \noindent Here, \verbpdfref{\addplot3} reads a matrix with three rows and four columns. The empty lines separate one row from the following. - As for the twodimensional |plot coordinates|, it is possible to provide (constant) mathematical expressions inside of single coordinates. The syntax |(|\meta{x}|,|\meta{y}|,|\meta{z}|) |\oarg{meta} can be used just as for two dimensional |plot coordinates| to provide explicit color data; error bars are also supported. + As for the two--dimensional |plot coordinates|, it is possible to provide (constant) mathematical expressions inside of single coordinates. The syntax |(|\meta{x}|,|\meta{y}|,|\meta{z}|) |\oarg{meta} can be used just as for two dimensional |plot coordinates| to provide explicit color data; error bars are also supported. \end{addplot3operation} \begin{addplot3operation}[]{file}{\marg{name}} @@ -91,7 +91,7 @@ Enough for now, let's continue. \end{addplot3operation} \begin{addplot3operation}[]{table}{\oarg{column selection}\marg{file}} - The \verbpdfref{\addplot3 table} input works in the same way as its two dimensional counterpart \verbpdfref{\addplot table}. It only expects a column for the $z$ coordinates. Furthermore, it interpretes empty input lines as end--of--row (more generally, end--of--scanline) markers, just as for |plot file|. The remarks above about the |mesh/ordering| applies here as well. + The \verbpdfref{\addplot3 table} input works in the same way as its two dimensional counterpart \verbpdfref{\addplot table}. It only expects a column for the $z$ coordinates. Furthermore, it interprets empty input lines as end--of--row (more generally, end--of--scanline) markers, just as for |plot file|. The remarks above about the |mesh/ordering| applies here as well. \end{addplot3operation} \begin{pgfplotskeylist}{mesh/rows=\marg{integer},mesh/cols=\marg{integer}} @@ -126,7 +126,7 @@ Enough for now, let's continue. \end{pgfplotskeylist} \begin{pgfplotskey}{mesh/ordering=\mchoice{x varies,y varies,rowwise,colwise} (initially x varies)} - Allows to configure the sequence in which matrizes (meshes) are read from \verbpdfref{\addplot3 coordinates}, \verbpdfref{\addplot3 file} or \verbpdfref{\addplot3 table}. + Allows to configure the sequence in which matrices (meshes) are read from \verbpdfref{\addplot3 coordinates}, \verbpdfref{\addplot3 file} or \verbpdfref{\addplot3 table}. Here, \declaretext{x varies} means a sequence of points where $n$=|mesh/cols| successive points have the $y$ coordinate fixed. This is intuitive when you write down a function because $x$ is horizontal and $y$ vertical. Note that in matrix terminology, $x$ refers to \emph{column indices} whereas $y$ refers to \emph{row indices}. Thus, |x varies| is equivalent to \declaretext{rowwise} ordering in this sense. This is the initial configuration. @@ -380,7 +380,7 @@ The following example uses |mark=cube*| and |z buffer=sort| to place boxes at ea \subsubsection{Mesh Plots} \label{sec:2d:mesh} \begin{plottype}[/pgfplots]{mesh} - A mesh plot uses different colors for each mesh segment. Each mesh segment gets the same color. The color is determined using a ``color coordinate'' which is also called ``meta data'' throughout this document. It is the same data which is used for surface and scatter plots as well, see section~\ref{pgfplots:pointmeta}. In the initial configuration, the ``color coordinate'' is the $z$ axis (or the $y$ axis for two dimensional plots). This color coordinate is mapped linearly into the current color map to determine the color for each mesh segment. Thus, if the smallest occuring color data is, say, $-1$ and the largest is $42$, points with color data $-1$ will get the color at the lower end of the color map and points with color data $42$ the color of the upper end of the color map. + A mesh plot uses different colors for each mesh segment. Each mesh segment gets the same color. The color is determined using a ``color coordinate'' which is also called ``meta data'' throughout this document. It is the same data which is used for surface and scatter plots as well, see section~\ref{pgfplots:pointmeta}. In the initial configuration, the ``color coordinate'' is the $z$ axis (or the $y$ axis for two dimensional plots). This color coordinate is mapped linearly into the current color map to determine the color for each mesh segment. Thus, if the smallest occurring color data is, say, $-1$ and the largest is $42$, points with color data $-1$ will get the color at the lower end of the color map and points with color data $42$ the color of the upper end of the color map. \pgfplotsexpensiveexample \begin{codeexample}[] @@ -560,13 +560,13 @@ The following example uses |mark=cube*| and |z buffer=sort| to place boxes at ea \noindent The |flat| shader provides full support of |z buffer|ing, that means it does also support the choice |z buffer=sort|. There are (currently) two possibilities to determine the single color for every segment: \begin{description} - \item[\declaretext{flat corner}] Uses the color data of one vertex to color the segment. It is not defined which vertex is used here\footnote{\PGFPlots\ just uses the last vertex encountered in its internal processings -- but after any $z$ buffer reorderings.}. + \item[\declaretext{flat corner}] Uses the color data of one vertex to color the segment. It is not defined which vertex is used here\footnote{\PGFPlots\ just uses the last vertex encountered in its internal processings -- but after any $z$ buffer re-orderings.}. \item[\declaretext{flat mean}] Uses the mean of all four color data values as segment color. This is the initial value as it provides symmetric colors for symmetric functions. \end{description} The choice |flat| is actually the same as |flat mean|. Please note that |shader=flat mean| and |shader=flat corner| also influence mesh plots -- the choices determine the mesh segment color. - Another choice is |shader=interp| which uses Gouraud shading (bilinear interpolation) to fill the segments. + Another choice is |shader=interp| which uses Goraud shading (bilinear interpolation) to fill the segments. \pgfplotsexpensiveexample \begin{codeexample}[] 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 9c8c9ccb9ea..9386714999c 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.alignment.tex +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.alignment.tex @@ -13,7 +13,9 @@ The idea is to provide an \marg{coordinate expression} where the axis will be pl \begin{pgfplotskey}{anchor=\marg{name} (initially south west)} \label{option:anchor}% -This option shifts the axis horizontally and vertically such that the axis anchor (a point on the axis) is placed at canvas coordinate $(0,0)$ (this is \emph{not} the logical coordinate, it is an image coordinate). For users who are familiar with \Tikz: an axis is actually a very special node, so anchors work as in~\cite{tikz}. +Chooses one of the different possible positions inside of an axis which is placed with |at|. The |at| key defines the position where to place the axis inside of the embedding picture, the |anchor| key defines which point of the axis shall be positioned by `|at|'. The initial configuration assumes |at={(0,0)}|. Thus, |anchor=center| will place the axis' center at the logical picture position $(0,0)$. Similarly, |anchor=south west| will position the lower left corner of the axis at $(0,0)$. + +For users who are familiar with \Tikz: an axis is actually a very special node, so anchors work as in~\cite{tikz}. Anchors are useful in conjunction with horizontal or vertical alignment of plots, see the examples below. @@ -133,9 +135,17 @@ The default value is |anchor=south west|. You can use anchors in conjunction wit \subsubsection{Vertical alignment with \texttt{baseline}} \label{sec:align}% -\pgfmanualpdflabel{/tikz/baseline}{}% +\begin{key}{/tikz/baseline} +The |baseline| option should be provided as argument to a |tikzpicture|. It configures \Tikz\ to shift the picture position $y=0$ to the embedding text's baseline: +\begin{codeexample}[width=3cm] +This is \tikz[baseline]\fill[red] (0,0) circle(3pt); a picture, +here \tikz[baseline]\fill[red] (0,10pt) circle(3pt); another one. +\end{codeexample} +\noindent Consequently, the |baseline| option allows to align different |tikzpicture|s. An axis is, by default, placed with |at={(0,0)}|, and the |anchor| key specifies which part of the axis is placed at |(0,0)|. Consequently, the |baseline| option, together with |anchor|, allows to align different axes with the embedding text. + The default axis anchor is |south west|, which means that the picture coordinate $(0,0)$ is the lower left corner of the axis. As a consequence, the \Tikz\ option ``|baseline|'' allows vertical alignment of adjacent plots: \begin{codeexample}[] +% 1. Unaligned: \pgfplotsset{domain=-1:1} \begin{tikzpicture} \begin{axis}[xlabel=A normal sized $x$ label] @@ -151,6 +161,7 @@ The default axis anchor is |south west|, which means that the picture coordinate \end{codeexample} \begin{codeexample}[] +% 2. Aligned: \pgfplotsset{domain=-1:1} \begin{tikzpicture}[baseline] \begin{axis}[xlabel=A normal sized $x$ label] @@ -164,7 +175,8 @@ The default axis anchor is |south west|, which means that the picture coordinate \end{axis} \end{tikzpicture} \end{codeexample} -The |baseline| option configures \Tikz\ to shift position $y=0$ to the text's baseline and the |south west| anchor shifts the axis such the $y=0$ is at the lower left axis corner. +\end{key} +The |baseline| key is related to |\begin{minipage}|\oarg{align how} or |\begin{tabular}|\oarg{align how}: the \meta{align how} tells \LaTeX\ which part of the |minipage| or |tabular| shall be positioned on the baseline. Thus, |baseline| does the some for pictures (with more freedom for \meta{align how}). \subsubsection{Horizontal Alignment} \label{sec:halign}% 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 ae02b4c8bb8..4af602d4fd8 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 @@ -133,7 +133,7 @@ coordinates \end{tikzpicture} \end{codeexample} -Inside of an axis environment, the |\addplot| command is the main user interface. It comes in two variants: |\addplot| for twodimensional visualization and \verbpdfref{\addplot3} for threedimensional visualization. +Inside of an axis environment, the |\addplot| command is the main user interface. It comes in two variants: |\addplot| for two--dimensional visualization and \verbpdfref{\addplot3} for three--dimensional visualization. \begin{command}{\addplot\oarg{options} \meta{input data} \meta{trailing path commands};} \label{cmd:pgfplots:addplot} @@ -141,7 +141,7 @@ This is the main plotting command, available within each axis environment. It ca It reads point coordinates from one of the available input sources specified by \meta{input data}, updates limits, remembers \meta{options} for use in a legend (if any) and applies any necessary coordinate transformations (or logarithms). -The \meta{options} can be omitted in which case the next entry from the |cycle list| will be inserted as \meta{options}. These keys characterize the plot's type like linear interpolation, smooth plot, constant interpolation, bar plot, mesh plots, surface plots or whatever and define colors, markers and line specifications\footnote{In version 1.2.2 and earlier, there was an explicit distiction between ``behaviour'' options like error bars, domain, number of samples etc.\ and ``style options'' like color, line width, markers etc. This distiction is obsolete now, simply collect everything into \meta{options}.}\index{Behavior Options}\index{Options!Distinction Behavior, Style Options}. Plot variants like error bars, the number of samples or a sample domain can also be configured in \meta{options}. +The \meta{options} can be omitted in which case the next entry from the |cycle list| will be inserted as \meta{options}. These keys characterize the plot's type like linear interpolation, smooth plot, constant interpolation, bar plot, mesh plots, surface plots or whatever and define colors, markers and line specifications\footnote{In version 1.2.2 and earlier, there was an explicit distinction between ``behaviour'' options like error bars, domain, number of samples etc.\ and ``style options'' like color, line width, markers etc. This distinction is obsolete now, simply collect everything into \meta{options}.}\index{Behavior Options}\index{Options!Distinction Behavior, Style Options}. Plot variants like error bars, the number of samples or a sample domain can also be configured in \meta{options}. The \meta{input data} is one of several coordinate input tools which are described in more detail below. Finally, if |\addplot| successfully processed all coordinates from \meta{input data}, it generates \Tikz\ paths to realize the drawing operations. Any \meta{trailing path commands} are appended to the final drawing command, allowing to continue the \Tikz\ path (from the last plot coordinate). @@ -177,7 +177,7 @@ Some more details: \end{codeexample} You can represent arbitrarily small or very large numbers as long as its logarithm can be represented as a \TeX-length (up to about~$16384$). Of course, any coordinate~$x\le 0$ is not possible since the logarithm of a non-positive number is not defined. Such coordinates will be skipped automatically (using the initial configuration |unbounded coords=discard|). - \item For normal (non--logarithmic) axes, \PGFPlots\ applies floating point arithmetics to support large or small numbers like 0.00000001234 or $1.234\cdot 10^{24}$. Its number range is much larger than \TeX's native support for numbers. The relative precision is between $4$ and $7$ significant decimal digits for the mantisse. + \item For normal (non--logarithmic) axes, \PGFPlots\ applies floating point arithmetics to support large or small numbers like 0.00000001234 or $1.234\cdot 10^{24}$. Its number range is much larger than \TeX's native support for numbers. The relative precision is between $4$ and $7$ significant decimal digits for the mantissa. As soon as the axes limits are completely known, \PGFPlots\ applies a transformation which maps these floating point numbers into \TeX-precision using transformations \[ T_x(x) = 10^{s_x} \cdot x - a_x @@ -373,11 +373,11 @@ or \end{codeexample} Alternatively, you can load the table \emph{once} and use it \emph{multiple} times: \begin{codeexample}[code only] -\pgfplotstableread{datafile.dat}\table +\pgfplotstableread{datafile.dat}\loadedtable ... -\addplot table[x=dof,y=L2] from \table; +\addplot table[x=dof,y=L2] from \loadedtable; ... -\addplot table[x=dof,y=Lmax] from \table; +\addplot table[x=dof,y=Lmax] from \loadedtable; ... \end{codeexample} I am not really sure how much time can be saved, but it works anyway. As a rule of thumb, decide as follows: @@ -432,6 +432,9 @@ Summary and remarks: \end{itemize} \end{addplotoperation} +\subsubsection*{Keys To Configure Table Input} +The following list of keys allow different methods to select input data or different input formats. Note that the common prefix `|table/|' can be omitted if these keys are set after |\addplot table|\oarg{options}. The |/pgfplots/| prefix can always be omitted when used in a \PGFPlots\ method. + \begin{pgfplotskey}{table/header=\mchoice{true,false} (initially true)} Allows to disable header identification for |plot table|. See above. \end{pgfplotskey} @@ -526,7 +529,7 @@ Please note that \PGF's math parser uses degrees for trigonometric functions: %\index{y@\texttt{\textbackslash y} In Coordinate Expressions}% \item The complete set of math expressions can be found in the \PGF\ manual. The most important mathematical operations are - |+|, |-|, |*|, |/|, |abs|, |round|, |floor|, |mod|, |<|, |>|, |max|, |min|, |sin|, |cos|, |tan|, |deg| (conversion from radians to degrees), |rad| (conversion from degrees to radians), |atan|, |asin|, |acos|, |cot|, |sec|, |cosec|, |exp|, |ln|, |sqrt|, the constanst |pi| and |e|, |^| (power operation), |factorial|\footnote{Starting with \PGF\ versions newer than $2.00$, you can use the postfix operator \texttt{!} instead of \texttt{factorial}.}, |rand| (random between $-1$ and $1$), |rnd| (random between $0$ and $1$), number format conversions |hex|, |Hex|, |oct|, |bin| and some more. The math parser has been written by Mark Wibrow and Till Tantau~\cite{tikz}, the FPU routines have been developed as part of \PGFPlots. The documentation for both parts can be found in~\cite{tikz}. + |+|, |-|, |*|, |/|, |abs|, |round|, |floor|, |mod|, |<|, |>|, |max|, |min|, |sin|, |cos|, |tan|, |deg| (conversion from radians to degrees), |rad| (conversion from degrees to radians), |atan|, |asin|, |acos|, |cot|, |sec|, |cosec|, |exp|, |ln|, |sqrt|, the constants |pi| and |e|, |^| (power operation), |factorial|\footnote{Starting with \PGF\ versions newer than $2.00$, you can use the postfix operator \texttt{!} instead of \texttt{factorial}.}, |rand| (random between $-1$ and $1$), |rnd| (random between $0$ and $1$), number format conversions |hex|, |Hex|, |oct|, |bin| and some more. The math parser has been written by Mark Wibrow and Till Tantau~\cite{tikz}, the FPU routines have been developed as part of \PGFPlots. The documentation for both parts can be found in~\cite{tikz}. Please note, however, that trigonometric functions are defined in degrees. The character `|^|' is used for exponentiation (not `|**|' as in gnuplot). @@ -627,6 +630,16 @@ Please note that \PGF's math parser uses degrees for trigonometric functions: \paragraph{Attention:} |samples at| overrides |domain|, even if |domain| has been set \emph{after} |samples at|! Use |samples at={}| to clear \marg{coordinate list} and re-activate |domain|. \end{pgfplotskey} +\begin{pgfplotskeylist}{% + variable=\marg{variable name} (initially x),% + variable y=\marg{variable name} (initially y)} + Defines the variables names which will be sampled in |domain| (with |variable|) and in |domain y| (with |variable y|). + + The same variables are used for parametric and for non-parametric plots. Use |variable=t| to change them if you like (for |gnuplot|, there is such a distinction; see |parametric/var 1d|). + + Technical remark: \Tikz\ also uses the |variable| key. However, it expects a \emph{macro} name, i.e.\ |\x| instead of just |x|. Both possibilities are accepted here. +\end{pgfplotskeylist} + \subsubsection{Mathematical Expressions And File Data} \PGFPlots\ allows to combine `|plot table|' and `|plot expression|' to get both, file input and modifications by means of mathematical expressions. @@ -635,6 +648,8 @@ Please note that \PGF's math parser uses degrees for trigonometric functions: Besides the already discussed possibility to provide a column selection by means of column names (|x||=|\meta{name} or |x index||=|\meta{index}, see section~\ref{pgfplots:addplot:table}), it is also possible to provide mathematical expressions as arguments. Mathematical expressions are specified with |x expr||=|\meta{expression} inside of \meta{column selection and expressions}. They can depend on zero, one or more columns of the input file. A column is referenced using the special command `|\thisrow|\marg{column name}' within \meta{expression} (or |\thisrowno|\meta{column index}). + +\pgfplotstableset{begin table={\begin{tabular}[b]}} \begin{codeexample}[vbox] \pgfplotstabletypeset[columns={maxlevel,L2}]{plotdata/newexperiment1.dat} @@ -721,15 +736,20 @@ Sometimes it is called |shell-escape| or |enable-write18|. Sometimes one needs t The \meta{options} determine the appearance of the plotted function; these parameters also affect the legend. There is also a set of options which are specific to the gnuplot interface. These options are described in all detail in \cite[section~18.6]{tikz}. A short summary is shown below. + +Some remarks: +\begin{itemize} + \item The independent variable for one dimensional plots can be change with the |variable| option, just as for |plot expression|. Similarly, the second variable for two dimensional plots can be changed with |variable y|. + + For |parametric| plots, the variable names need to be adjusted with |parametric/var 1d| and |parametric/var 2d| (since gnuplot uses |t| and |u,v| as initial values for |parametric| plots). + \item Please note that |plot gnuplot| does not allow per point meta data (color data for each coordinate). -Please refer to \cite[section~18.6]{tikz} for more details about |plot function| and the |gnuplot| interaction. + \item The generated output file name can be customized with |id|, see below. +\end{itemize} -\begin{pgfplotskey}{translate gnuplot=\mchoice{true,false} (initially true)} - Enables or disables automatic translation of the exponentiation operator `|^|' to `|**|'. +Please refer to \cite[section~18.6]{tikz} for more details about |plot function| and the |gnuplot| interaction. - This features allows to use |^| in |plot gnuplot| instead of gnuplot's |**|. -\end{pgfplotskey} \end{addplotoperation} \begin{addplotoperation}[]{function}{\marg{gnuplot code}} @@ -742,6 +762,30 @@ Please refer to \cite[section~18.6]{tikz} for more details about |plot function| |\addplot gnuplot |\marg{gnuplot code}|;| \end{addplotoperation} +\begin{pgfplotskey}{translate gnuplot=\mchoice{true,false} (initially true)} + Enables or disables automatic translation of the exponentiation operator `|^|' to `|**|'. + + This features allows to use |^| in |plot gnuplot| instead of gnuplot's |**|. +\end{pgfplotskey} + +\begin{pgfplotskey}{parametric=\mchoice{true,false} (initially false)} + Set this to |true| if you'd like to use parametric plots with |gnuplot|. Parametric plots use a comma separated list of expressions to make up $x(t),\, y(t)$ for a line plot or $x(u,v), \, y(u,v)\, z(u,v)$ for a mesh plot (refer to the gnuplot manual for more information about its input methods for parametric plots). +\end{pgfplotskey} + +\begin{pgfplotskeylist}{% + parametric/var 1d=\marg{variable name} (initially t),% + parametric/var 2d=\marg{variable name,variable name} (initially {u,v})% + } + Allows to change the dummy variables used by |parametric| |gnuplot| plots. The initial setting is the one of |gnuplot|: to use the dummy varialbe `|t|' for parametric line plots and `|u,v|' for parametric mesh plots. + + These keys are quite the same as |variable| and |variable y|, only for parametric plots. If you like to change variables for non-parametric plots, use |variable| and/or |variable y|. + + In case you don't want the distinction between parametric and non-parametric plots, use + + |\pgfplotsset{parametric/var 1d=,parametric/var 2d=}|. + +\end{pgfplotskeylist} + \begin{key}{/tikz/id=\marg{unique string identifier}} A unique identifier for the current plot. It is used to generate temporary filenames for |gnuplot| output. \end{key} @@ -900,6 +944,10 @@ Using |gv|, I determined that the bounding box needs to be shifted |12| units to The scaling will thus ignore the aspect ratio of the external image and prefer the one used by \PGFPlots. You will need to provide |width| and |height| to the \PGFPlots\ axis to change its scaling. Use the |scale only axis| key in such a case. \end{addplotoperation} + +\subsubsection*{Keys To Configure Plot Graphics} +The following list of keys configure |\addplot graphics|. Note that the common prefix `|plot graphics/|' can be omitted if these keys are set after |\addplot graphics|\oarg{options}. The |/pgfplots/| prefix can always be omitted when used in a \PGFPlots\ method. + \begin{pgfplotsxykeylist}{ plot graphics/\x min=\marg{coordinate}, plot graphics/\x max=\marg{coordinate}} diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.axisdescription.tex b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.axisdescription.tex index 6c220b201ae..746c007d1eb 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.axisdescription.tex +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.axisdescription.tex @@ -305,15 +305,15 @@ Labels are \Tikz-Nodes which are placed with \end{codeexample} so their position and appearance can be customized. -\paragraph{Upgrade notice:} Since version 1.3, label placement \emph{can} respect the size of adjacent tick labels. Use |\pgfplotsset{compat=newest}| in the preamble to activate this feature. See |xlabel near ticks| for details. +\paragraph{Upgrade notice:} Since version 1.3, label placement \emph{can} respect the size of adjacent tick labels. Use |\pgfplotsset{compat=1.3}| in the preamble to activate this feature. See |xlabel near ticks| for details. \begin{pgfplotsxykeylist}{\x label shift=\marg{dimension} (initially 0pt),label shift=\marg{dimension}} Shifts labels in direction of the outer normal vector of the axis by an amount of \marg{dimension}. The |label shift| sets all three label shifts to the same value. - \paragraph{Attention:} This does only work if |\pgfplotsset{compat=newest}| has been called (More precisely: if |xlabel near ticks| is active for the respective axis). + \paragraph{Attention:} This does only work if |\pgfplotsset{compat=1.3}| has been called (More precisely: if |xlabel near ticks| is active for the respective axis). \end{pgfplotsxykeylist} -\begin{pgfplotsxykeylist}{\x label near ticks,compat=newest} +\begin{pgfplotsxykeylist}{\x label near ticks,compat=1.3} These keys place axis labels (like |xlabel|) near the tick labels. If tick labels are small, labels will move closer to the axis. If tick labels are large, axis labels will move away from the axis. This is the default for every three dimensional plot, but it \emph{won't} be used initially for two--dimensional plots for backwards compatibility. Take a look at the definition of |near ticklabel| on page~\pageref{key:near:ticklabel} for an example. The definition of these styles is @@ -334,13 +334,13 @@ so their position and appearance can be customized. It is encouraged to write \begin{codeexample}[code only] -\pgfplotsset{compat=newest} +\pgfplotsset{compat=1.3} \end{codeexample} \noindent in your preamble to install the styles document-wide -- it leads to the best output (it avoids unnecessary space). It is not activated initially for backwards compatibility with older versions which used fixed distances from the tick labels. \end{pgfplotsxykeylist} \begin{pgfplotsxykeylist}{\x label absolute,compat=pre 1.3} - Installs placement styles for axis labels such that |xlabel| yields a description of absolute, fixed distance to the axis. This is the initial configuration (for backwards compatibility with versions before 1.3). Use |compat=newest| to get the most recent, more flexible configuration. Take a look at the definition of |near ticklabel| on page~\pageref{key:near:ticklabel} for an example. + Installs placement styles for axis labels such that |xlabel| yields a description of absolute, fixed distance to the axis. This is the initial configuration (for backwards compatibility with versions before 1.3). Use |compat=1.3| to get the most recent, more flexible configuration. Take a look at the definition of |near ticklabel| on page~\pageref{key:near:ticklabel} for an example. These styles are defined by \begin{codeexample}[code only] @@ -566,16 +566,16 @@ Using |\legend| overwrites any other existing legend entries. \end{pgfplotskey} -\begin{command}{\legendimage\marg{options}} +\begin{command}{\addlegendimage\marg{options}} Adds a further ``plot style'' for legend creation. - Each |\addplot| command appends its plot style options to a list, and |\legendimage| adds \meta{options} to the very same list. + Each |\addplot| command appends its plot style options to a list, and |\addlegendimage| adds \meta{options} to the very same list. - Thus, the effect is as if you had provided |\addplot|\oarg{options}, but |\legendimage| bypasses all the logic usually associated with a plot. In other words: except for the legend, the state of the axis remains as if the command would not have been drawn. + Thus, the effect is as if you had provided |\addplot|\oarg{options}, but |\addlegendimage| bypasses all the logic usually associated with a plot. In other words: except for the legend, the state of the axis remains as if the command would not have been drawn. Not even the current plot's index is advanced, making |\addlegendimage| compatible with any plot styles like |ybar|. - Use |\legendimage| to provide custom styles into legends, for example to document custom |\draw| commands inside of an axis. + Use |\addlegendimage| to provide custom styles into legends, for example to document custom |\draw| commands inside of an axis. - You can call |\label| after |\legendimage| just as for a normal style. + You can call |\label| after |\addlegendimage| just as for a normal style. \end{command} \subsubsection{Legend Appearance} @@ -782,6 +782,11 @@ Use |legend columns=-1| to draw all entries horizontally. Configures where the small line specifications will be drawn: left of the description, right of the description or not at all. \end{pgfplotskey} +\begin{stylekey}{/pgfplots/every legend image post} + \label{key:legendimagepost} + A style which can be used to provide drawing options to every small legend image. These options apply after |current plot style| has been set, allowing users different line styles for legends than for plots. +\end{stylekey} + \begin{pgfplotscodekey}{legend image code} \label{opt:legend:image:code} Allows to replace the default images which are drawn inside of legends. When this key is evaluated, the current plot specification has already been activated (using |\begin{scope}[current plot style]|)% @@ -965,7 +970,7 @@ Finally, \ref{pgfplots:label3} is only here to get three examples. Label3 = \ref{pgfplots:label3}; Label2 = \ref{pgfplots:label2} \end{codeexample} - The label is assembled using |legend image code| and the plot style of the last plot. Any \PGFPlots\ option is expanded until only \Tikz\ (or \pgfname) options remain; these options are used to get an independant label\footnote{Please note that you can't use the label/ref mechanism in conjunction with image externalization as this will (naturally) lead to undefined references.}. + The label is assembled using |legend image code| and the plot style of the last plot. Any \PGFPlots\ option is expanded until only \Tikz\ (or \pgfname) options remain; these options are used to get an independent label\footnote{Please note that you can't use the label/ref mechanism in conjunction with image externalization as this will (naturally) lead to undefined references.}. More precisely, the small image generated by |\ref|\marg{label name} is \begin{codeexample}[code only] @@ -1110,9 +1115,9 @@ Feel free to overwrite these styles if the default doesn't fit your needs or tas \end{tikzpicture} \end{codeexample} -In case |middle|, the style |every inner axis x line| allows to adjust the appearenace. +In case |middle|, the style |every inner axis x line| allows to adjust the appearance. -Note that three dimensional axes only support to use the same value for every axis, i.e.\ three dimensional axes support only the |axis lines| key (or, preferrably for 3D axes, the |axis lines*| key -- check what looks best). See section~\ref{sec:pgfplots:axislines:3d} for examples of three dimensional axis line variations. +Note that three dimensional axes only support to use the same value for every axis, i.e.\ three dimensional axes support only the |axis lines| key (or, preferably for 3D axes, the |axis lines*| key -- check what looks best). See section~\ref{sec:pgfplots:axislines:3d} for examples of three dimensional axis line variations. \end{pgfplotskeylist} \begin{pgfplotsxykey}{every inner \x\ axis line} @@ -1605,7 +1610,7 @@ Axis scaling and clipping will be done as if you did not use |hide axis|. \end{stylekey} \begin{stylekey}{/pgfplots/every colorbar} - This style governs the placement, alignment and appearance of color bars. Any desired detail changes for color bars can be put into this style. Additionally, there is a style |colorbar shift| which is set after |every colorbar|. The latter style is intented to contain only shift transformations like |xshift| or |yshift| (making it easier to overwrite or deactivate them). + This style governs the placement, alignment and appearance of color bars. Any desired detail changes for color bars can be put into this style. Additionally, there is a style |colorbar shift| which is set after |every colorbar|. The latter style is intended to contain only shift transformations like |xshift| or |yshift| (making it easier to overwrite or deactivate them). While a color bar is drawn, the predefined node |parent axis| can be used to align at the parent axis. \begin{predefinednode}{parent axis} @@ -1714,7 +1719,7 @@ Axis scaling and clipping will be done as if you did not use |hide axis|. \begin{stylekey}{/pgfplots/colorbar shift} - This style is installed after |every colorbar|. It is intented to contain only shift transformations like |xshift| and/or |yshift|. The reason to provide two separate styles is to allow easier deactivation of shift transformations. + This style is installed after |every colorbar|. It is intended to contain only shift transformations like |xshift| and/or |yshift|. The reason to provide two separate styles is to allow easier deactivation of shift transformations. \begin{codeexample}[code only] \pgfplotsset{ @@ -1817,9 +1822,11 @@ There are a couple of predefined scaling styles which set some of these options: \begin{codeexample}[code only] \pgfplotsset{ small/.style={ - /pgfplots/width=6.5cm, - /pgfplots/height=, - /pgfplots/max space between ticks=25 + width=6.5cm, + height=, + tick label style={font=\footnotesize}, + label style={font=\small}, + max space between ticks=25, } } \end{codeexample} @@ -1848,12 +1855,14 @@ Feel free to redefine the scaling -- the option may still be useful to get more \begin{codeexample}[code only] \pgfplotsset{ footnotesize/.style={ - /pgfplots/width=5cm, - /pgfplots/height=, + width=5cm, + height=, legend style={font=\footnotesize}, tick label style={font=\footnotesize}, label style={font=\small}, - /pgfplots/max space between ticks=20, + title style={font=\small}, + every axis title shift=0pt, + max space between ticks=15, every mark/.append style={mark size=8}, major tick length=0.1cm, minor tick length=0.066cm, @@ -1862,5 +1871,47 @@ Feel free to redefine the scaling -- the option may still be useful to get more \end{codeexample} As for |small|, it can be convenient to set |footnotesize| and set |width| afterwards. -See also the |compat=newest| method which causes the positions of |xlabel|, |ylabel| and |zlabel| to be right near the tick labels. +You will need |compat=1.3| or newer for this to work. +\end{stylekey} + +\begin{stylekey}{/pgfplots/tiny} + Redefines several keys such that the axis is very small. Most descriptions will have |\tiny| as fontsize. + +\begin{codeexample}[] +\begin{tikzpicture} + \begin{axis}[tiny, + title=A ``tiny'' figure, + xlabel=The $x$ axis, + ylabel=The $y$ axis, + minor tick num=1, + legend entries={Leg}] + \addplot+[const plot] + coordinates { + (0,0) (1,1) (3,3) (5,10) + }; + \end{axis} +\end{tikzpicture} +\end{codeexample} + The initial setting is +\begin{codeexample}[code only] +\pgfplotsset{ + tiny/.style={ + width=4cm, + height=, + legend style={font=\tiny}, + tick label style={font=\tiny}, + label style={font=\tiny}, + title style={font=\footnotesize}, + every axis title shift=0pt, + max space between ticks=12, + every mark/.append style={mark size=6}, + major tick length=0.1cm, + minor tick length=0.066cm, + every legend image post/.append style={scale=0.8}, + }, +} +\end{codeexample} +As for |small|, it can be convenient to use |tiny,width=4.5cm| to adjust the width. + +You will need |compat=1.3| or newer for this to work. \end{stylekey} diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.closingplots.tex b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.closingplots.tex index d201284ac15..9f11fc7760a 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.closingplots.tex +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.closingplots.tex @@ -4,7 +4,7 @@ \begin{command}{\closedcycle} Provide |\closedcycle| as \meta{trailing path commands} after |\addplot| to draw a closed line from the last plot coordinate to the first one. - Use |\closedcycle| whenevery you intend to fill the area under a plot. + Use |\closedcycle| whenever you intend to fill the area under a plot. \begin{codeexample}[] \begin{tikzpicture} @@ -21,7 +21,7 @@ \end{axis} \end{tikzpicture} \end{codeexample} - In case of stacked plots, |\closedcycle| connects the current plot with the previous plot instead of connecting with the $x$~axis\footnote{The implementation for stacked plots requires some additional logic to determine the filled area: \lstinline{\\closedcycle} will produce a \texttt{plot coordinates} command with \emph{reversed} coordinates of the previous plot. This is usually irrelevant for end users, but it assumes that the plot's type is symmetric. Since constant plots are inherently unsymmetric, \lstinline{\\closedcycle} will use \texttt{const plot mark right} as reversed sequence for \texttt{const plot mark left}.}. + In case of stacked plots, |\closedcycle| connects the current plot with the previous plot instead of connecting with the $x$~axis\footnote{The implementation for stacked plots requires some additional logic to determine the filled area: \lstinline{\\closedcycle} will produce a \texttt{plot coordinates} command with \emph{reversed} coordinates of the previous plot. This is usually irrelevant for end users, but it assumes that the plot's type is symmetric. Since constant plots are inherently asymmetric, \lstinline{\\closedcycle} will use \texttt{const plot mark right} as reversed sequence for \texttt{const plot mark left}.}. \begin{codeexample}[] \begin{tikzpicture} \begin{axis}[stack plots=y] 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 aa924828fa8..ff0a73d2dd9 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 @@ -158,7 +158,7 @@ The ``relative axis coordinate system'', |rel axis cs|, uses the complete axis v \noindent where \meta{x}, \meta{y} and \meta{z} are coordinates or constant mathematical expressions. The second syntax is only available in three dimensional axes. - There is one speciality: if you reverse an axis (with |x dir=reverse|), points provided by |rel axis cs| will be \emph{unaffected} by the axis reversal. This is intented to provide consistent placement even for reversed axes. Use |allow reversal of rel axis cs=false| to disable this feature. + There is one speciality: if you reverse an axis (with |x dir=reverse|), points provided by |rel axis cs| will be \emph{unaffected} by the axis reversal. This is intended to provide consistent placement even for reversed axes. Use |allow reversal of rel axis cs=false| to disable this feature. 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}. \end{coordinatesystem} diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.markers-meta.tex b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.markers-meta.tex index 56114469f88..6fcce13a478 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.markers-meta.tex +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.markers-meta.tex @@ -415,7 +415,7 @@ The |xcolor| package provides even more methods to combine colors, among them th \begin{pgfplotskey}{colormap=\marg{name}\marg{color specification}} Defines a new colormap named \marg{name} according to \marg{color specification} and activates it using |colormap name=|\marg{name}. - The \marg{color specification} is a sequence of positions and associated colors where linear interpolation is applied inbetween. The syntax is very similar as the one used for \PGF\ shadings described in~\cite[VIII -- Shadings]{tikz}: it is a semicolon--separated series of + The \marg{color specification} is a sequence of positions and associated colors where linear interpolation is applied in-between. The syntax is very similar as the one used for \PGF\ shadings described in~\cite[VIII -- Shadings]{tikz}: it is a semicolon--separated series of \meta{color type}|(|\meta{offset}|)=(|\meta{color value}|); |: @@ -554,7 +554,7 @@ Available color maps are shown below. The usage of the result \meta{\textbackslash macro} is a little bit low--level. \end{command} -\subsubsection{Cycle Lists -- Options Controlling Linestyles} +\subsubsection{Cycle Lists -- Options Controlling Line Styles} \label{sec:cycle:list}% \begin{pgfplotskeylist}{cycle list=\marg{list},cycle list name=\marg{\textbackslash macro}} @@ -562,7 +562,7 @@ Allows to specify a list of plot specifications which will be used for each \hbo The list element with index~$i$ will be chosen where~$i$ is the index of the current |\addplot| command. This indexing does also include plot commands which don't use the |cycle list|. -There are several possiblities to change the currently active |cycle list|: +There are several possibilities to change the currently active |cycle list|: \begin{enumerate} \item Use one of the predefined lists\footnote{In an early version, these lists were called \texttt{\textbackslash coloredplotspeclist} and \texttt{\textbackslash blackwhiteplotspeclist} which appeared to be unnecessarily long, so they have been renamed. The old names are still accepted, however.}, \begin{itemize} @@ -875,7 +875,7 @@ In this case, the \emph{last} entry also needs a terminating `|\\|', but one can \end{codeexample} \noindent The provided |cycle multi list| consists of three lists. The style for a single plot is made up using elements of each of the three lists: the first plot has style |red,solid,mark=*|, the second has |red,solid,mark=x|, the third has |red,solid,mark=o|. The fourth plot restarts the third list and uses the next one of list $2$: it has |red,dotted,mark options={solid},mark=*| and so on. - The last list will always be advanced for a new plot. The list before the last (in our case the second list) will be advanced after the last one has been reset. In other words: |cycle multi list| allows a composition of different |cycle list| in a lexicographical way\footnote{For those who prefer formulars: The plot with index $0 \le i < N$ will use cycle list offsets $i_0,i_1,\dotsc,i_k$, $0 \le i_m < N_m$ where $k$ is the number of arguments provided to \texttt{cycle multi list} and $N_m$ is the number of elements in the $m$th cycle list. The offsets $i_m$ are computed in a loop {\ttfamily \{ int tmp=i; for( int m=k-1; m>=0; m=m-1 ) \{ i\_m = tmp\%N\_m; tmp = tmp/N\_m; \}\}}.}. + The last list will always be advanced for a new plot. The list before the last (in our case the second list) will be advanced after the last one has been reset. In other words: |cycle multi list| allows a composition of different |cycle list| in a lexicographical way\footnote{For those who prefer formulas: The plot with index $0 \le i < N$ will use cycle list offsets $i_0,i_1,\dotsc,i_k$, $0 \le i_m < N_m$ where $k$ is the number of arguments provided to \texttt{cycle multi list} and $N_m$ is the number of elements in the $m$th cycle list. The offsets $i_m$ are computed in a loop {\ttfamily \{ int tmp=i; for( int m=k-1; m>=0; m=m-1 ) \{ i\_m = tmp\%N\_m; tmp = tmp/N\_m; \}\}}.}. The argument for |cycle multi list| is a sequence of arguments as they would have been provided for |cycle list|, separated by \declareandlabel{\nextlist}. In addition to providing a new cycle list, the \meta{list $i$} elements can also denote |cycle list name| values (including the special |auto| cycle list which is the most recently assigned |cycle list| or |cycle list name|). The final |\nextlist| is optional. 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 8eec38ea994..fa2e79f6052 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.numberformatting.tex +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.numberformatting.tex @@ -17,7 +17,7 @@ Please refer to the manual of \PGFPlotstable\ (shipped with this package) for de \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 \[ i \cdot 10^j \] -with $i \in \{2,3,4,5,6,7,8,9\},\, j \in \Z$. This may be valueable in conjunction with the `|extra x ticks|' and `|extra y ticks|' options. +with $i \in \{2,3,4,5,6,7,8,9\},\, j \in \Z$. This may be valuable in conjunction with the `|extra x ticks|' and `|extra y ticks|' options. \begin{codeexample}[] \begin{tikzpicture}% \begin{loglogaxis} diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.preliminaryoptions.tex b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.preliminaryoptions.tex index fe8d58ad432..7dded72cd83 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.preliminaryoptions.tex +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.preliminaryoptions.tex @@ -10,7 +10,9 @@ \end{axis} \end{tikzpicture} \end{codeexample} -\noindent which changes them for the complete axis. Some keys can be changed for each plot: +\noindent which changes them for the complete axis. A |key| in this context can be any option defined in this manual, no matter if it has the |/pgfplots/| or the |/tikz/| key prefix. Note that key prefixes can be omitted in almost all cases. + +Some keys can be changed individually for each plot: \begin{codeexample}[code only] \begin{tikzpicture} \begin{axis} @@ -20,7 +22,7 @@ \end{tikzpicture} \end{codeexample} -The basic engine to manage key--value pairs is |pgfkeys| which is part of \pgfname. This engine always has a key name and a key ``path'', which is somehow similar to file name and directory of files. The common ``directory'' (key path) of \PGFPlots\ is `|/pgfplots/|'. Although the key definitions below provide this full path, it is always (well, almost always) enough to skipt this prefix -- \PGFPlots\ uses it automatically. The same holds for the prefixes `|/tikz/|' which are common for all \Tikz\ drawing options and `|/pgf/|' which are for the (more or less) low--level commands of \pgfname. All these prefixes can be omitted. +The basic engine to manage key--value pairs is |pgfkeys| which is part of \pgfname. This engine always has a key name and a key ``path'', which is somehow similar to file name and directory of files. The common ``directory'' (key path) of \PGFPlots\ is `|/pgfplots/|'. Although the key definitions below provide this full path, it is always (well, almost always) enough to skip this prefix -- \PGFPlots\ uses it automatically. The same holds for the prefixes `|/tikz/|' which are common for all \Tikz\ drawing options and `|/pgf/|' which are for the (more or less) low--level commands of \pgfname. All these prefixes can be omitted. One important concept is the concept of styles. A style is a key which contains one or more other keys. It can be redefined or modified until it is actually used by the internal routines. Each single component of \Tikz\ and \PGFPlots\ can be configured with styles. @@ -34,7 +36,7 @@ sets the line width for every axis to |1pt|. There are several other styles predefined to modify the appearance, see section~\ref{sec:styles}. \begin{command}{\pgfplotsset\marg{key-value-list}} - Defines or sets all options in \marg{key-value-list}. + Defines or sets all options in \marg{key-value-list}. The \meta{key-value-list} can contain any of the options in this manual which have the prefix |/pgfplots/| (you do not need to type the prefix). It is a shortcut for |\pgfqkeys{/pgfplots}|\marg{key-value-list}, that means it inserts the prefix |/pgfplots| to any option which has no full path. 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 8e25d5a7b03..450843801d8 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.scaling.tex +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.scaling.tex @@ -70,7 +70,7 @@ Here, \marg{dimen} is any \TeX\ size like |1mm|, |2cm| or |5pt|. It is allowed t \end{tikzpicture} \end{codeexample} -The second syntax, |x={(|\meta{x}|,|\meta{y}|)}| sets $e_x = (\meta{x},\meta{y})^T$ explicitly\footnote{Please note that you need extra curly braces around the vector. Otherwise, the comma will be interpreted as separator for the next key-value pair.}; the corresponding |y| key works similiarly. This allows to define skewed or rotated axes. +The second syntax, |x={(|\meta{x}|,|\meta{y}|)}| sets $e_x = (\meta{x},\meta{y})^T$ explicitly\footnote{Please note that you need extra curly braces around the vector. Otherwise, the comma will be interpreted as separator for the next key-value pair.}; the corresponding |y| key works similarly. This allows to define skewed or rotated axes. \begin{codeexample}[] \begin{tikzpicture} diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.specifyrange.tex b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.specifyrange.tex index 5ad417ecedc..6997afc53a1 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.specifyrange.tex +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.specifyrange.tex @@ -101,7 +101,7 @@ You can set |xmin|, |xmax| and |ymin|, |ymax| to the minimum/maximum values of y \item The value \declaretext{false} uses tight axis limits as specified by the user (or read from input coordinates). \item The value \declaretext{auto} will enlarge limits only for axis for which axis limits have been determined automatically. - For threedimensional figures, the \declaretext{auto} mechanism applies only for the $z$ axis. The $x$ and $y$ axis won't be enlarged. + For three--dimensional figures, the \declaretext{auto} mechanism applies only for the $z$ axis. The $x$ and $y$ axis won't be enlarged. \item The value \declaretext{upper} enlarges only the upper axis limit while \declaretext{lower} enlarges only the lower axis limit. \item Values like `|enlarge x limits=0.1|' will enlarge lower and upper axis limit relatively (in this example, $10\%$ of the axis limits will be added on both sides). \item It is also possible to change just the relative threshold using the \declaretext{value=}\marg{val} key. It can be combined with any of the other possible values. For example, diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.styleoptions.tex b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.styleoptions.tex index 3b37dc32c47..69fe108fac9 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.styleoptions.tex +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.styleoptions.tex @@ -99,6 +99,11 @@ The initial setting is \begin{codeexample}[code only] \pgfplotsset{every axis title/.style={at={(0.5,1)},above,yshift=6pt}} \end{codeexample} + +To be more precise, the |yshift| doesn't use the hardcoded |6pt|: it uses the value of +\begin{key}{/pgfplots/every axis title shift=\marg{default shift} (initially 6pt)} +\end{key} +which can be reset if needed. \end{stylekey} \pgfplotsshortstylekey title style=every axis title\pgfeov @@ -120,6 +125,12 @@ The initial setting is \pgfplotsshortstylekey legend style=every axis legend\pgfeov +\begin{stylekey}{/pgfplots/every legend image post} + Allows to change the appearance of the small legend images \emph{after} the options of the plot style have been applied. Thus, legend formatting can be changed independently of the plot style using |every legend image post|. + + This key is also documented on page~\pageref{key:legendimagepost}. +\end{stylekey} + \subsubsection*{Styles for axis lines} \begin{xystylekey}{/pgfplots/every outer \x\ axis line (initially empty)} Installed for every axis line which lies on the outer box. @@ -198,7 +209,7 @@ The initial settings are Installed for tick \emph{lines} on either $x$ or $y$ axis. \end{xystylekey} -\pgfplotsshortxystylekey \x\ tick style=every \x\ tick\pgfeov +\pgfplotsshortxystylekey \x tick style=every \x\ tick\pgfeov \begin{xystylekey}{/pgfplots/every minor \x\ tick (initially empty)} Installed for minor tick lines on either $x$ or $y$ axis. 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 e08329345da..0cb1556035f 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.tickoptions.tex +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.reference.tickoptions.tex @@ -13,7 +13,7 @@ The \marg{coordinate list} will be used inside of a |\foreach \x in |\marg{coord \item |{0,2,...,10}| (the same as |{0,2,4,6,8,10}|), \item |{9,...,3.5}| (the same as |{9, 8, 7, 6, 5, 4}|), \item See \cite[Section~34]{tikz} for a more detailed definition of the options. - \item Please be careful with whitespaces inside of \marg{coordinate list} (at least around the dots). + \item Please be careful with white spaces inside of \marg{coordinate list} (at least around the dots). \end{itemize} For logplots, \PGFPlots\ will apply $\log(\cdot)$ to each element in `\marg{coordinate list}'. \begin{codeexample}[] @@ -41,7 +41,7 @@ For logplots, \PGFPlots\ will apply $\log(\cdot)$ to each element in `\marg{coor \vspace*{0.3cm} \noindent -The default choice for tick \emph{positions} in normal plots is to place a tick at each coordinate~$i\cdot h$. The step size~$h$ depends on the axis scaling and the axis limits. It is chosen from a list a ``feasable'' step sizes such that neither too much nor too few ticks will be generated. The default for logplots is to place ticks at positions $10^i$ in the axis' range. The positions depend on the axis scaling and the dimensions of the picture. If log plots contain just one (or two) positions $10^i$ in their limits, ticks will be placed at positions $10^{i\cdot h}$ with ``feasable'' step sizes $h$ as in the case of linear axis. +The default choice for tick \emph{positions} in normal plots is to place a tick at each coordinate~$i\cdot h$. The step size~$h$ depends on the axis scaling and the axis limits. It is chosen from a list a ``feasible'' step sizes such that neither too much nor too few ticks will be generated. The default for logplots is to place ticks at positions $10^i$ in the axis' range. The positions depend on the axis scaling and the dimensions of the picture. If log plots contain just one (or two) positions $10^i$ in their limits, ticks will be placed at positions $10^{i\cdot h}$ with ``feasible'' step sizes $h$ as in the case of linear axis. \noindent The tick \emph{appearance} can be (re-)configured with @@ -271,6 +271,8 @@ coordinates { \end{semilogyaxis} \end{tikzpicture} \end{codeexample} + + Note that it is also possible to terminate list entries with two backslashes, |\\|. In that case, the last entry needs to be terminated by |\\| as well (it is the same alternative syntax which is also accepted for |\legend| and |cycle list|). \end{pgfplotsxykey} @@ -320,30 +322,40 @@ That means you can configure the appearance of linear axis with the number forma \end{codeexample} The following example uses explicitly formatted $x$ tick labels and a small \TeX\ script to format $y$ tick labels in the form \meta{sign}\meta{number}|/10|. +% \usepackage{nicefrac} \begin{codeexample}[width=4cm] +% \usepackage{nicefrace}% required \begin{tikzpicture} \begin{axis}[ - title=A special Prewavelet, + % x ticks explicitly formatted: xtick={0,1,0.5,0.25,0.75}, xticklabels={$0$,$1$,$\frac12$,$\frac14$,$\frac34$}, + % y ticks automatically by some code fragment: ytick=data, - ymajorgrids, yticklabel={% \scriptsize \ifdim\tick pt<0pt % a TeX \if -- see TeX Book \pgfmathparse{-10*\tick}% - $-\pgfmathprintnumber{\pgfmathresult}/10$% + $-\nicefrac{\pgfmathprintnumber{\pgfmathresult}}{10}$% \else - \pgfmathparse{10*\tick}% - $\pgfmathprintnumber{\pgfmathresult}/10$% + \ifdim\tick pt=0pt + \else + \pgfmathparse{10*\tick}% + $\nicefrac{\pgfmathprintnumber{\pgfmathresult}}{10}$% + \fi \fi - } + }, + ymajorgrids, + title=A special Prewavelet, + axis x line=center, + axis y line=left, ] \addplot coordinates {(0,-1.2) (0.25,1.1) (0.5,-0.6) (0.75,0.1) (1,0)}; \end{axis} \end{tikzpicture} \end{codeexample} +\noindent The \TeX\ script takes the |\tick| macro as input and applies some logic. The |\ifdim\tick pt<0pt| means ``if dimension |\tick pt| $ < $ |0pt|''. The |\ifdim| is \TeX's only way to compare real fixed point numbers and the author did not want to invoke |\pgfmath| for this simple task. Since |\ifdim| expects a dimension, we have to use the |pt| suffix which is compatible with |\pgfmath|. The result is that negative numbers, zero and positive numbers are typeset differently. You can change the appearance of tick labels with \begin{codeexample}[code only] diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.resources.tex b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.resources.tex index 194e82d6aa4..87b7a54d236 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.resources.tex +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.resources.tex @@ -41,7 +41,7 @@ However, for large scale plots with a lot of points, limitations of \TeX's capac \subsection{Memory Limitations} The default settings of most \TeX-distributions are quite restrictive, so it may be necessary to adjust them. -Usually, the log--file or the final error message contains a summary about the used ressources, giving a hint which parameter needs to be increased. +Usually, the log--file or the final error message contains a summary about the used resources, giving a hint which parameter needs to be increased. \subsubsection{Mik\TeX} For Mik\TeX, memory limits can be increased in two ways. The first is to use command line switches: diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.tex b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.tex index 5d1b7fec2a3..4d4364563b1 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.tex +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.tex @@ -80,7 +80,7 @@ This package provides tools to generate plots and labeled axes easily. It draws \item consistency of document and font type and font size, \item direct use of \TeX\ math mode in axis descriptions, \item consistency of data and figures (no third party tool necessary), - \item interdocument consistency using preamble configurations and styles. + \item inter document consistency using preamble configurations and styles. \end{itemize} Although not necessary, separate |.pdf| or |.eps| graphics can be generated using the |external| library developed as part of \Tikz. @@ -112,9 +112,9 @@ This release provides a lot of improvements which can be found in all detail in Use \begin{codeexample}[code only] \usepackage{pgfplots} -\pgfplotsset{compat=newest} +\pgfplotsset{compat=1.3} \end{codeexample} - in your preamble to benefit from the improved spacing\footnote{The |compat=newest| 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.}. + 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|. \item \PGFPlots\ 1.3 now supports reversed axes. It is no longer necessary to use work--arounds with negative units. @@ -122,7 +122,7 @@ This release provides a lot of improvements which can be found in all detail in Take a look at the |x dir=reverse| key. - Existing work--arounds will still function properly. Use |\pgfplotsset{compat=newest}| together with |x dir=reverse| to switch to the new version. + Existing work--arounds will still function properly. Use |\pgfplotsset{compat=1.3}| together with |x dir=reverse| to switch to the new version. \end{enumerate} \subsubsection{Old Features Which May Need Attention} @@ -140,11 +140,11 @@ This release provides a lot of improvements which can be found in all detail in \end{enumerate} I apologize for any inconvenience caused by these changes. -\begin{pgfplotskey}{compat=\mchoice{newest,pre 1.3,default} (initially default)} +\begin{pgfplotskey}{compat=\mchoice{1.3,pre 1.3,default,newest} (initially default)} The preamble configuration \begin{codeexample}[code only] \usepackage{pgfplots} -\pgfplotsset{compat=newest} +\pgfplotsset{compat=1.3} \end{codeexample} allows to choose between backwards compatibility and most recent features. @@ -159,11 +159,11 @@ I apologize for any inconvenience caused by these changes. You are encouraged to use \begin{codeexample}[code only] \usepackage{pgfplots} -\pgfplotsset{compat=newest} +\pgfplotsset{compat=1.3} \end{codeexample} in your preamble. - \item Version 1.3 fixes a bug with |anchor=south west| which occured mainly for reversed axes: the anchors where upside--down. This is fixed now. + \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 work--around and want to keep it going, use @@ -174,10 +174,12 @@ I apologize for any inconvenience caused by these changes. \end{enumerate} 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. \end{pgfplotskey} \subsection{The Team} -\PGFPlots\ has been written mainly by Christian Feuersänger with many improvements of Pascal Wolkotte and Nick Papior Andersen as a spare time project. We hope it is useful and provides valueable plots. +\PGFPlots\ has been written mainly by Christian Feuersänger with many improvements of Pascal Wolkotte and Nick Papior Andersen as a spare time project. We hope it is useful and provides valuable plots. If you are interested in writing something but don't know how, consider reading the auxiliary manual \href{file:TeX-programming-notes.pdf}{TeX-programming-notes.pdf} which comes with \PGFPlots. It is far from complete, but maybe it is a good starting point (at least for more literature). diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplotsexample.pdf b/Master/texmf-dist/doc/latex/pgfplots/pgfplotsexample.pdf Binary files differdeleted file mode 100644 index 9f945031366..00000000000 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplotsexample.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplotsexample.tex b/Master/texmf-dist/doc/latex/pgfplots/pgfplotsexample.tex index 9ba0240cc42..074e7738125 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplotsexample.tex +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplotsexample.tex @@ -3,7 +3,7 @@ % for dvipdfm: %\def\pgfsysdriver{pgfsys-dvipdfm.def} \usepackage{pgfplots} -\pgfplotsset{compat=newest}% <-- moves axis labels near ticklabels (respects tick label widths) +\pgfplotsset{compat=1.3}% <-- moves axis labels near ticklabels (respects tick label widths) \begin{document} \begin{figure} diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplotstable.pdf b/Master/texmf-dist/doc/latex/pgfplots/pgfplotstable.pdf Binary files differindex 44298fdc005..2876de353a3 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 15d4668102b..c4be25d48f4 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/pgfplotstable.tex +++ b/Master/texmf-dist/doc/latex/pgfplots/pgfplotstable.tex @@ -36,6 +36,8 @@ tabsize=4, } +\pgfkeys{/pgfmanual/gray key prefixes/.add={/pgfplots/table/,/pgf/number format/,}{}} + \makeatletter \pgfkeys{% /codeexample/prettyprint/key name with handler/.code 2 args={% @@ -65,7 +67,10 @@ } \makeatother -%\pgfplotstableset{debug=true} +\pgfplotstableset{ + %debug=true, + begin table=\begin{tabular}[b], +} \title{% Manual for Package \PGFPlotstable\\ @@ -194,16 +199,18 @@ Technical note: every opened file will be protocolled into your log file. \begin{command}{\pgfplotstableread\marg{file name}\marg{\textbackslash macro}} - Loads the table \marg{file name} into a \TeX-macro \meta{\textbackslash macro}. This macro can than be used several times. + Loads the table \marg{file name} into a \TeX-macro \meta{\textbackslash macro}. This macro can then be used several times. \begin{codeexample}[] -\pgfplotstableread{pgfplotstable.example1.dat}\table -\pgfplotstabletypeset[columns={dof,error1}]\table +\pgfplotstableread{pgfplotstable.example1.dat}\loadedtable +\pgfplotstabletypeset[columns={dof,error1}]\loadedtable \hspace{2cm} -\pgfplotstabletypeset[columns={dof,error2}]\table +\pgfplotstabletypeset[columns={dof,error2}]\loadedtable \end{codeexample} There are variants of this command which do not really built up a struct but which report every line to a ``listener''. There is also a struct which avoids protection by \TeX\ scopes. In case you need such things, consider reading the source code comments. Technical note: every opened file will be protocolled into your log file. + + Note: avoid using `|\table|' as name, it conflicts with |\begin{table}| of \LaTeX. \end{command} \begin{key}{/pgfplots/table/col sep=\mchoice{space,tab,comma,semicolon,colon,braces} (initially space)} @@ -677,7 +684,24 @@ The following styles allow to configure the final table code \emph{after any cel \begin{key}{/pgfplots/table/begin table=\marg{code} (initially \textbackslash begin\{tabular\})} Contains \marg{code} which is generated as table start. - Use |begin table/.add={}{[t]}| to append the prefix |[t]|. + The following example uses a |longtable| instead\index{longtable} of |tabular|: +\begin{codeexample}[code only] +\pgfplotstableset{ + begin table=\begin{longtable}, + end table=\end{longtable}, +} +\end{codeexample} + + It is also possible to \emph{change} the value. For example, +\begin{codeexample}[code only] +\pgfplotstableset{ + begin table/.add={}{[t]}, +} +\end{codeexample} + prepends the empty string |{}| and appends the prefix |[t]|. Thus, `|\begin{tabular}|' becomes `|\begin{tabular}[t]|'. +\end{key} +\begin{key}{/pgfplots/table/end table=\marg{code} (initially \textbackslash end\{tabular\})} + Contains \marg{code} which is generated as table end. \end{key} \begin{codekey}{/pgfplots/table/typeset cell} @@ -696,13 +720,10 @@ The following styles allow to configure the final table code \emph{after any cel \paragraph{Attention:} The value of |\pgfplotstablecol| starts with $1$ in this context, i.e.\ it is in the range $1,\dotsc,n$ where $n=$ |\pgfplotstablecols|. This simplifies checks whether we have the last column. \end{codekey} -\begin{key}{/pgfplots/table/end table=\marg{code} (initially \textbackslash end\{tabular\})} - Contains \marg{code} which is generated as table end. -\end{key} - \begin{key}{/pgfplots/table/outfile=\marg{file name} (initially empty)} \label{page:outfile} Writes the generated tabular code into \marg{file name}. It can then be used with |\input|\marg{file name}, \PGFPlotstable\ is no longer required since it contains a completely normal |tabular|. + \pgfplotstableset{begin table=\begin{tabular}} \begin{codeexample}[] \pgfplotstabletypeset[ columns={dof,error1}, @@ -920,8 +941,10 @@ See section~\ref{sec:number:styles} for how to change the exponential display st Sets both, |fixed zerofill| and |sci zerofill| at once. \end{stylekey} -\begin{key}{/pgf/number format/std} -Configures |\pgfmathprintnumber| to a standard algorithm. It chooses either \texttt{fixed} or \texttt{sci}, depending on the order of magnitude. Let $n=s \cdot m \cdot 10^e$ be the input number and $p$ the current precision. If $-p/2 \le e \le 4$, the number is displayed using the fixed format. Otherwise, it is displayed using the scientific format. +\begin{keylist}{/pgf/number format/std,% + /pgf/number format/std=\meta{lower e}, + /pgf/number format/std=\meta{lower e}:\meta{upper e}} +Configures |\pgfmathprintnumber| to a standard algorithm. It chooses either |fixed| or |sci|, depending on the order of magnitude. Let $n=s \cdot m \cdot 10^e$ be the input number and $p$ the current precision. If $-p/2 \le e \le 4$, the number is displayed using |fixed| format. Otherwise, it is displayed using |sci| format. \begin{codeexample}[] \pgfkeys{/pgf/number format/.cd,std,precision=2} @@ -931,7 +954,9 @@ Configures |\pgfmathprintnumber| to a standard algorithm. It chooses either \tex \pgfmathprintnumber{24415.98123}\hspace{1em} \pgfmathprintnumber{123456.12345} \end{codeexample} -\end{key} +The parameters can be customized using the optional integer argument(s): if $\text{\meta{lower e}} \le e \le \text{\meta{upper e}}$, the number is displayed in |fixed| format, otherwise in |sci| format. Note that \meta{lower e} should be negative for useful results. The precision used for scientific format can be adjusted with |sci precision| if necessary. + +\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. @@ -946,6 +971,18 @@ Configures |\pgfmathprintnumber| to detect integers automatically. If the input \end{codeexample} \end{key} +\begin{command}{\pgfmathifisint\marg{number constant}\marg{true code}\marg{false code}} + A command which does the same check as |int detect|, but it invokes \meta{true code} if the \meta{number constant} actually is an integer and the \meta{false code} if not. + + As a side--effect, |\pgfretval| will contain the parsed number, either in integer format or as parsed floating point number. + + The argument \meta{number constant} will be parsed with |\pgfmathfloatparsenumber|. +\begin{codeexample}[] +15 \pgfmathifisint{15}{is an int: \pgfretval.}{is no int}\hspace{1em} +15.5 \pgfmathifisint{15.5}{is an int: \pgfretval.}{is no int} +\end{codeexample} +\end{command} + \begin{key}{/pgf/number format/int trunc} Truncates every number to integers (discards any digit after the period). @@ -962,6 +999,12 @@ Truncates every number to integers (discards any digit after the period). \begin{key}{/pgf/number format/precision=\marg{number}} Sets the desired rounding precision for any display operation. For scientific format, this affects the mantisse. \end{key} +\begin{key}{/pgf/number format/sci precision=\meta{number or empty} (initially empty)} + Sets the desired rounding precision only for |sci| styles. + + Use |sci precision={}| to restore the initial configuration (which uses the argument provided to |precision| for all number styles). +\end{key} + \subsubsection{Changing Number Format Display Styles}% \label{sec:number:styles}% @@ -1168,6 +1211,29 @@ Typesets the exponent as superscript for any number displayed in scientific form \end{codeexample} \end{key} +\begin{key}{/pgf/number format/sci generic=\marg{keys}} +Allows to define an own number style for the scientific format. Here, \meta{keys} can be one of the following choices (omit the long key prefix): + +\begin{key}{/pgf/number format/sci generic/mantisse sep=\marg{text} (initially empty)} + Provides the separator between a mantisse and the exponent. It might be |\cdot|, for example, +\end{key} +\begin{key}{/pgf/number format/sci generic/exponent=\marg{text} (initially empty)} + Provides text to format the exponent. The actual exponent is available as argument |#1| (see below). +\end{key} + +\begin{codeexample}[] +\pgfkeys{ + /pgf/number format/.cd, + sci, + sci generic={mantisse sep=\times,exponent={10^{#1}}}} +\pgfmathprintnumber{12.345}; +\pgfmathprintnumber{0.00012345} +\end{codeexample} + The \meta{keys} can depend on three parameters, namely on |#1| which is the exponent, |#2| containing the flags entity of the floating point number and |#3| is the (unprocessed and unformatted) mantisse. + + Note that |sci generic| is \emph{not} suitable to modify the appearance of fixed point numbers, nor can it be used to format the mantisse (which is typeset like fixed point numbers). Use |dec sep|, |1000 sep| and |print sign| to customize the mantisse. +\end{key} + \begin{key}{/pgf/number format/@dec sep mark=\marg{text}} Will be placed right before the place where a decimal separator belongs to. However, \marg{text} will be inserted even if there is no decimal separator. It is intented as place-holder for auxiliary routines to find alignment positions. @@ -1186,6 +1252,24 @@ Typesets the exponent as superscript for any number displayed in scientific form The initial setting installs a |\pgfutilensuremath| around each final number to change to math mode if necessary. Use |assume math mode=true| if you know that math mode is active and you don't want |\pgfutilensuremath|. \end{key} +\begin{stylekey}{/pgf/number format/verbatim} + A style which configures the number printer to produce verbatim text output, i.e.\ it doesn't contain \TeX\ macros. +\begin{codeexample}[] +\pgfkeys{ + /pgf/fpu, + /pgf/number format/.cd, + sci, + verbatim} +\pgfmathprintnumber{12.345}; +\pgfmathprintnumber{0.00012345}; +\pgfmathparse{exp(15)} +\pgfmathprintnumber{\pgfmathresult} +\end{codeexample} + The style resets |1000 sep|, |dec sep|, |print sign|, |skip 0.| and sets |assume math mode|. Furthermore, it installs a |sci generic| format for verbatim output of scientific numbers. + + However, it will still respect |precision|, |fixed zerofill|, |sci zerofill| and the overall styles |fixed|, |sci|, |int detect| (and their variants). It might be useful if you intent to write output files. +\end{stylekey} + @@ -1404,7 +1488,7 @@ The preprocessing step allows to change cell contents \emph{before} any typesett \end{stylekey} \begin{codekey}{/pgfplots/table/row predicate} - A boolean predicate which allows to select particular rows of the input table. The argument |#1| contains the current row's index (starting with~$0$, not counting comment lines or column names). + A boolean predicate which allows to select particular rows of the input table, based on the current row's index. The argument |#1| contains the current row's index (starting with~$0$, not counting comment lines or column names). The return value is assigned to the \TeX-if \declareandlabel{\ifpgfplotstableuserow}. If the boolean is not changed, the return value is true. \begin{codeexample}[narrow] @@ -1423,7 +1507,7 @@ The preprocessing step allows to change cell contents \emph{before} any typesett ] {pgfplotstable.example1.dat} \end{codeexample} - Please note that |row predicate| is applied \emph{before} any other option which affects row appearance. It is evaluated before |assign cell content|. For example, the even/odd row styles refer to those rows for which the predicate returns |true|. In fact, you can use |row predicate| to truncate the complete table before it as actually processed. + Please note that |row predicate| is applied \emph{before} any other option which affects row (or column) appearance. It is evaluated before |assign cell content|. One of the consequences ist that even/odd row styles refer to those rows for which the predicate returns |true|. In fact, you can use |row predicate| to truncate the complete table before it has actually been processed. During |row predicate|, the macro |\pgfplotstablerows| contains the total number of \emph{input} rows. @@ -1456,14 +1540,14 @@ The preprocessing step allows to change cell contents \emph{before} any typesett every head row/.style={before row=\toprule,after row=\midrule}, every last row/.style={after row=\bottomrule}} -\pgfplotstabletypeset[string type]{pgfplotstable.example2.dat} - +\pgfplotstabletypeset[string type]{pgfplotstable.example2.dat}% +~ \pgfplotstabletypeset[ - display columns/0/.style={select equal part entry of={0}{2},string type}, - display columns/1/.style={select equal part entry of={0}{2},string type}, - display columns/2/.style={select equal part entry of={1}{2},string type}, - display columns/3/.style={select equal part entry of={1}{2},string type}, - columns={A,B,A,B} + columns={A,B,A,B}, + display columns/0/.style={select equal part entry of={0}{2},string type},% first part of `A' + display columns/1/.style={select equal part entry of={0}{2},string type},% first part of `B' + display columns/2/.style={select equal part entry of={1}{2},string type},% second part of `A' + display columns/3/.style={select equal part entry of={1}{2},string type},% second part of `B' ] {pgfplotstable.example2.dat} \end{codeexample} @@ -1473,7 +1557,7 @@ The preprocessing step allows to change cell contents \emph{before} any typesett \end{stylekey} \begin{stylekey}{/pgfplots/table/unique=\marg{column name}} - A style which appends an |row predicate| which suppresses successive occurances of the same elements in \marg{column name}. + A style which appends a |row predicate| which suppresses successive occurances of the same elements in \marg{column name}. For example, if \marg{column name} contains |1,1,3,5,5,6,5,0|, the application of |unique| results in |1,3,5,6,5,0| (the last |5| is kept -- it is not directly preceeded by another |5|). The algorithm uses string token comparison to find multiple occurances\footnote{To be more precise, the comparison is done using \texttt{\textbackslash ifx}, i.e. cell contents won't be expanded. Only the tokens as they are seen in the input table will be used.}. @@ -1610,7 +1694,7 @@ It is possible to create new tables from scratch or to change tables after they Furthermore, there must be |create on use| statements (see the next subsection) for every column which shall be generated\footnote{Currently, you need to provide at least one column: the implementation gets confused for completely empty tables. If you do not provide any column name, a dummy column will be created.}. Columns are generated - independently, in the order of appearance in |columns|. + independently, in the order of appearance in |columns|. As soon as a column is complete, it can be accessed using any of the basic level access mechanisms. Thus, you can built columns which depend on each other. The table will contain exactly \marg{row count} rows. If \marg{row count} is an |\pgfplotstablegetrowsof| statement, that statement will be executed and the resulting number of rows be used. Otherwise, \marg{row count} will be evaluated as number. \begin{codeexample}[] @@ -1619,9 +1703,9 @@ It is possible to create new tables from scratch or to change tables after they % define how the 'new' column shall be filled: create on use/new/.style={create col/set list={4,5,6,7,...,10}}} % create a new table with 11 rows and column 'new': -\pgfplotstablenew[columns={new}]{11}\table +\pgfplotstablenew[columns={new}]{11}\loadedtable % show it: -\pgfplotstabletypeset[empty cells with={---}]\table +\pgfplotstabletypeset[empty cells with={---}]\loadedtable \end{codeexample} \begin{codeexample}[] @@ -1631,9 +1715,9 @@ It is possible to create new tables from scratch or to change tables after they create on use/new/.style={create col/expr={factorial(15+\pgfplotstablerow)}}, columns={new}] {11} - \table + \loadedtable % show it: -\pgfplotstabletypeset\table +\pgfplotstabletypeset\loadedtable \end{codeexample} \end{commandlist} @@ -1718,7 +1802,7 @@ The \marg{col name} is expected to be a \emph{physical} column name, no alias or The following example takes our well-known input table and creates a copy of the |level| column. Furthermore, it produces a lot of output to show the available macros. Finally, it uses |\pgfkeyslet| to assign the contents of the resulting |\entry| to |next content|. \begin{codeexample}[] -\pgfplotstableread{pgfplotstable.example1.dat}\table +\pgfplotstableread{pgfplotstable.example1.dat}\loadedtable \pgfplotstablecreatecol[ create col/assign/.code={% \getthisrow{level}\entry @@ -1727,13 +1811,13 @@ The following example takes our well-known input table and creates a copy of the (\#\pgfplotstablerow/\pgfplotstablerows)}% \pgfkeyslet{/pgfplots/table/create col/next content}\entry }] - {new}\table + {new}\loadedtable \pgfplotstabletypeset[ column type=l, columns={level,new}, columns/new/.style={string type} -]\table +]\loadedtable \end{codeexample} There is one more speciality: you can use |columns=|\marg{column list} to reduce the runtime complexity of this command. This works only if the |columns| key is provided directly into \marg{options}. In this case |\thisrow| and its variants are only defined for those columns listed in the |columns| value. @@ -2012,10 +2096,10 @@ The example creates two columns: the |new| column is just the sum of each value }, columns={cut}] {2} - \table + \loadedtable % Show the data: -\pgfplotstabletypeset{\table} +\pgfplotstabletypeset{\loadedtable} \begin{tikzpicture} \begin{loglogaxis} @@ -2049,9 +2133,9 @@ The example creates two columns: the |new| column is just the sum of each value }, columns={cut}] {2} - \table + \loadedtable % Show the data: -\pgfplotstabletypeset{\table} +\pgfplotstabletypeset{\loadedtable} \end{codeexample} \PGFPlotstable\ will call |\foreach |\meta{\textbackslash foreach loop head} and it will expand \marg{file name pattern} for every iteration. For every iteration, a simpler list entry of the form @@ -2123,7 +2207,8 @@ Empty cells will be filled with |{}| if |col sep=space|. Use the |empty cells wi \item |every table|, \item |every even row|, |every odd row|, |every even column|, |every odd column|, \item |every first column|, |every last column|, |every first row|, |every last row|, - \item |every head row|. + \item |every head row|, + \item |postproc cell content|, |preproc cell content|. \end{itemize} In case you want to reset all, you should also consider the key |disable rowcol styles|. \end{key} @@ -2191,8 +2276,8 @@ Tables are always stored as a sequence of column vectors. Therefore, iteration o Iterates over every column name of \meta{table}. The \meta{\textbackslash macro} will be set to the currently visited column name. Then, \marg{code} will be executed. During \marg{code}, |\pgfplotstablecol| denotes the current column index (starting with 0). \begin{codeexample}[] \begin{minipage}{0.8\linewidth} -\pgfplotstableread{pgfplotstable.example1.dat}\table -\pgfplotstableforeachcolumn\table\as\col{% +\pgfplotstableread{pgfplotstable.example1.dat}\loadedtable +\pgfplotstableforeachcolumn\loadedtable\as\col{% column name is `\col'; index is\pgfplotstablecol;\par } \end{minipage} @@ -2207,8 +2292,8 @@ Tables are always stored as a sequence of column vectors. Therefore, iteration o For every cell in the column named \meta{column name}, \marg{code} will be executed. During this invocation, the macro \meta{\textbackslash cellcontent} will contain the cell's content and |\pgfplotstablerow| will contain the current row's index. \begin{codeexample}[] \begin{minipage}{0.8\linewidth} -\pgfplotstableread{pgfplotstable.example1.dat}\table -\pgfplotstableforeachcolumnelement{error1}\of\table\as\cell{% +\pgfplotstableread{pgfplotstable.example1.dat}\loadedtable +\pgfplotstableforeachcolumnelement{error1}\of\loadedtable\as\cell{% I have now cell element `\cell' at row index `\pgfplotstablerow';\par } \end{minipage} @@ -2223,11 +2308,11 @@ Tables are always stored as a sequence of column vectors. Therefore, iteration o but any changes of \meta{\textbackslash cellcontent} which might occur during \marg{code} will be written back into the respective cell. \begin{codeexample}[] -\pgfplotstableread{pgfplotstable.example1.dat}\table -\pgfplotstablemodifyeachcolumnelement{error1}\of\table\as\cell{% +\pgfplotstableread{pgfplotstable.example1.dat}\loadedtable +\pgfplotstablemodifyeachcolumnelement{error1}\of\loadedtable\as\cell{% \edef\cell{\#\pgfplotstablerow: \cell}% } -\pgfplotstabletypeset[columns=error1,string type]{\table} +\pgfplotstabletypeset[columns=error1,string type]{\loadedtable} \end{codeexample} If \marg{column name} is a column alias or has been created on-the-fly, a new column named \meta{column name} will be created. @@ -2238,11 +2323,11 @@ Tables are always stored as a sequence of column vectors. Therefore, iteration o The return value will be written to |\pgfplotsretval|. \begin{codeexample}[] -\pgfplotstableread{pgfplotstable.example1.dat}{\table} -\pgfplotstablegetelem{4}{error1}\of{\table} +\pgfplotstableread{pgfplotstable.example1.dat}{\loadedtable} +\pgfplotstablegetelem{4}{error1}\of{\loadedtable} The value (4,error1) is `\pgfplotsretval'. -\pgfplotstablegetelem{2}{[index]0}\of{\table} +\pgfplotstablegetelem{2}{[index]0}\of{\loadedtable} The value (2,0) is `\pgfplotsretval'. \end{codeexample} @@ -2250,7 +2335,7 @@ The value (2,0) is `\pgfplotsretval'. \end{command} \begin{command}{\pgfplotstablegetrowsof\marg{file name or \textbackslash loadedtable}} - Defines |\pgfmathresult| to be the number of rows in a table. The argument may be either a file name or an already loaded table (the \meta{\textbackslash macro} of |\pgfplotstableread|). + Defines |\pgfplotsretval| to be the number of rows in a table\footnote{It will also assign \texttt{\textbackslash pgfmathresult} to the same value.}. The argument may be either a file name or an already loaded table (the \meta{\textbackslash macro} of |\pgfplotstableread|). \end{command} @@ -2277,8 +2362,8 @@ The value (2,0) is `\pgfplotsretval'. \end{codeexample} \begin{codeexample}[] -\pgfplotstabletranspose\table{pgfplotstable.example3.dat} -\pgfplotstabletypeset[string type]\table +\pgfplotstabletranspose\loadedtable{pgfplotstable.example3.dat} +\pgfplotstabletypeset[string type]\loadedtable \end{codeexample} The optional argument \meta{options} can contain options which influence the transposition: @@ -2289,8 +2374,8 @@ The value (2,0) is `\pgfplotsretval'. If \marg{colname} is not empty, it denotes an input column name whose cell values will make up the output column names: \begin{codeexample}[] -\pgfplotstabletranspose[colnames from=c]\table{pgfplotstable.example3.dat} -\pgfplotstabletypeset[string type]\table +\pgfplotstabletranspose[colnames from=c]\loadedtable{pgfplotstable.example3.dat} +\pgfplotstabletypeset[string type]\loadedtable \end{codeexample} The argument \meta{colname} won't appear as cell contents. It is an error if the the cells in \meta{colname} don't yield unique column names. \end{pgfplotskey} @@ -2300,13 +2385,13 @@ The value (2,0) is `\pgfplotsretval'. Will create a further column named \meta{name} which will be filled with the input column names (as string type). \begin{codeexample}[] -\pgfplotstabletranspose[input colnames to=Input]\table{pgfplotstable.example3.dat} -\pgfplotstabletypeset[string type]\table +\pgfplotstabletranspose[input colnames to=Input]\loadedtable{pgfplotstable.example3.dat} +\pgfplotstabletypeset[string type]\loadedtable \end{codeexample} Set \meta{name} to the empty string to disable this column. \begin{codeexample}[] -\pgfplotstabletranspose[input colnames to=]\table{pgfplotstable.example3.dat} -\pgfplotstabletypeset[string type]\table +\pgfplotstabletranspose[input colnames to=]\loadedtable{pgfplotstable.example3.dat} +\pgfplotstabletypeset[string type]\loadedtable \end{codeexample} \end{pgfplotskey} @@ -2317,8 +2402,8 @@ The value (2,0) is `\pgfplotsretval'. If \meta{list} is not empty, it is expected to be a list of column names. Only these columns will be used as input for the transposition, just as if the remaining one weren't there. It is acceptable to provide column aliases or |create on use| arguments inside of \meta{list}. \begin{codeexample}[] -\pgfplotstabletranspose[columns={a,b}]\table{pgfplotstable.example3.dat} -\pgfplotstabletypeset[string type]\table +\pgfplotstabletranspose[columns={a,b}]\loadedtable{pgfplotstable.example3.dat} +\pgfplotstabletypeset[string type]\loadedtable \end{codeexample} Here is the only difference between |\pgfplotstabletranspose| and |\pgfplotstabletranspose*|: the version without `|*|' \emph{resets} the |columns| key before it starts whereas the version with `|*|' simply uses the actual content of |columns|. diff --git a/Master/texmf-dist/doc/latex/pgfplots/todo.txt b/Master/texmf-dist/doc/latex/pgfplots/todo.txt index 780eb01a8a0..baca906ec89 100644 --- a/Master/texmf-dist/doc/latex/pgfplots/todo.txt +++ b/Master/texmf-dist/doc/latex/pgfplots/todo.txt @@ -10,8 +10,9 @@ Testing last test verifications: pgf CVS pgf 2.00 pgf 2.00+compat=default -pgfplotstests 2009-12-30 2009-12-30 2009-12-30 -manual 2009-12-29 2009-12-30 +pgfplotstests for 1.3.1 for 1.3.1 2009-12-30 +manual for 1.3.1 for 1.3.1 +pgfplotstable.pdf for 1.3.1 for 1.3.1 example latex for 1.3 2009-12-30 example context for 1.3 2009-12-30 example plain tex for 1.3 2009-12-30 @@ -33,6 +34,30 @@ The test suite needs to be developed! + test those tickpos num keys! especially in combination with axis line variations. Also test ticklabel pos +--------------- +pgfplots 1.3.1: +--------------- ++ tests (see above) ++ spell checker ++ the ChangeLog is a mess. The automerger failed. + I will need to restore it manually... it mixed stable and master versions. ++ critical: external lib and its backw. compat layer + perhaps I should disable them completely for the stable version? + There are no branches, either fully CVS or not at all. +- import docs for recent number printing styles ++ set version number ++ set release dates for pgfplots.sty and pgfplotstable.sty ++ update ChangeLog to reflect the release and tag git +- update ubuntu PPA +- upload sourceforge images +- release makefile +- CTAN: communicate sourceforge link +- make short, summarized changelog: + - improved parametric plots with gnuplot + - improved normalsize, small and footnotesize scale styles and added tiny + - fixed a lot of bugs + + ------------------------------------------------------------- USER INTERFACE DECISIONS ------------------------------------------------------------- @@ -47,6 +72,12 @@ MISC + disable pgfplots CVS? - documentation todo: + - pgfplots.sty: try to insert the SHA hash of the commit (for non-stable + versions) + - pgfplotstable: the '[b]' option is mysterious in output listings. Hide it + there! + - pgfplotstable: show how to use '\begin{longtable}' + + gnuplot + parametric is not documented. + table + error bar expr + document examples for 3d LINE plots. + the 'tick label anchor' is something which I do not understand myselfes. @@ -75,7 +106,7 @@ MISC + the legend feature for mesh/surf plots: 'every mesh legend' style and the default 'legend image code' + document how to make line plots in 3d - - perhaps: display KNOWN key paths in key definitions in gray, not in red? + + perhaps: display KNOWN key paths in key definitions in gray, not in red? + check if area cycle list is documented + nodes near coords + the 'cube' mark and its parameters 'cube/size [xyz]' @@ -168,7 +199,11 @@ MISC ------------------------------------------------------------- PGF / TikZ Development: ------------------------------------------------------------- - - external lib: 'list and make' does not work together with \include (aux files!) or other file writing things -- at least not if one tries to do that in parallel. + - provide '\times' or more general formatting rules to number printer + + external lib: implement \tikzpicturedependsonfile#1 + + in pgfplots: invoke \tikzpicturedependsonfile. + perhaps the plot-from-table-struct should also use it. + + external lib: 'list and make' does not work together with \include (aux files!) or other file writing things -- at least not if one tries to do that in parallel. + consider the "plot function" patch from Andy Schlaikjer + it seems fadings don't work correctly with externalization!? - include addition of Christophe Jorssen for MD5 checksums in external lib @@ -198,6 +233,48 @@ PGF / TikZ Development: BUGS / FIXES ------------------------------------------------------------- ++ the \pgfplots@ifgridlines@onorientedsurf@should@be@drawn#1#2 is WRONG. + It works ONLY for boxed axes. All others need special handling... + +- table package: + using a non-trivial 'every table' style combined with + \pgfplotstabletypeset[begin table/.add={}{}] + yields a bug: the .add is invoked twice (since the 'every table' stuff is + invoked twice). + + +- yticklabels={<list>}, extra y ticks={...} is incompatible since the extra + ticks share the same tick typesetting routine (which, in turn, queries the + <list>). + +- '\addplot[only marks]' does not assign a plot mark; one needs 'mark=*' + explicitly. that's confusing... + +- The 'text depth' in legend entries is incompatible with 'text width'. + The problem: text width is realized using \begin{minipage}[t] + so its contents is all in the depth. Setting text depths overrides the + height! + +- the '/pgfplots/table/.search also' is overwritten during \addplot table with + /.search also={/pgfplots}. That's not so good. + +- one can't provide 'disable log filter' to \addplot (but it might be + interesting) + +- FPU: atan doesn't check for unbounded inputs. + +- unbounded inputs: improve warning messages: they should not contain low level + FPU args. + +- in tick label reference: the example with \nicefrac has ymajorgrids, but + doesn't display them! Check! +>>>>>>> origin/stable:doc/latex/pgfplots/todo.txt + +- parametric gnuplot plots do not work correctly (see mail of Gabriel Lera) + +- the user interface to set 'tickwidth=0' for a SINGLE axis is not very good: it seems one needs 'xtick style={/pgfplots/tickwidth=0}' to do so... + + + the tick pos stuff works (puh!) However, there is an inconsistency with the axis lines stuff: 'axis lines=left,tick pos=right' @@ -1096,6 +1173,12 @@ X verschiebung des ylabels ist komisch, wegen der rotate option FEATURES ------------------------------------------------------------- +- external lib + makefile support: provide data files automatically as prereqs + +- pgfplotstable file open protocol: provide public listener interface + +- allow to advance cycle list(s) manually + - \addplot coordinates {\macro}; - precise width calculation idea: diff --git a/Master/texmf-dist/doc/plain/pgfplots/pgfplotsexample.pdf b/Master/texmf-dist/doc/plain/pgfplots/pgfplotsexample.pdf Binary files differdeleted file mode 100644 index f298b6dacef..00000000000 --- a/Master/texmf-dist/doc/plain/pgfplots/pgfplotsexample.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/plain/pgfplots/pgfplotsexample.tex b/Master/texmf-dist/doc/plain/pgfplots/pgfplotsexample.tex index 0bad68f222d..fa6dbef5fc6 100644 --- a/Master/texmf-dist/doc/plain/pgfplots/pgfplotsexample.tex +++ b/Master/texmf-dist/doc/plain/pgfplots/pgfplotsexample.tex @@ -2,7 +2,7 @@ \def\pgfsysdriver{pgfsys-pdftex.def} \input pgfplots.tex -\pgfplotsset{compat=newest}% <-- moves axis labels near ticklabels (respects tick label widths) +\pgfplotsset{compat=1.3}% <-- moves axis labels near ticklabels (respects tick label widths) Using plain-\TeX. diff --git a/Master/texmf-dist/source/context/third/pgfplots/pgfplotstests.zip b/Master/texmf-dist/source/context/third/pgfplots/pgfplotstests.zip Binary files differindex ebc679b660e..e279c9897e5 100644 --- a/Master/texmf-dist/source/context/third/pgfplots/pgfplotstests.zip +++ b/Master/texmf-dist/source/context/third/pgfplots/pgfplotstests.zip diff --git a/Master/texmf-dist/source/latex/pgfplots/pgfplotstests.zip b/Master/texmf-dist/source/latex/pgfplots/pgfplotstests.zip Binary files differindex 9c3992bab9f..e73eb57943b 100644 --- a/Master/texmf-dist/source/latex/pgfplots/pgfplotstests.zip +++ b/Master/texmf-dist/source/latex/pgfplots/pgfplotstests.zip diff --git a/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.external.code.tex b/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.external.code.tex index 2df18861a1e..227f5c1a5a4 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.external.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.external.code.tex @@ -31,68 +31,16 @@ % % -\def\pgfplots@orig@pgfincludeexternalgraphics#1{% - \begingroup - \openin\r@pgfplots@reada=#1.dpth - \setbox1=\hbox{\pgfkeysvalueof{/pgf/images/include external/.@cmd}{#1}\pgfeov}% - \ifeof\r@pgfplots@reada - \box1 - \else - \read\r@pgfplots@reada to\pgfincludeexternalgraphics@dp - \closein\r@pgfplots@reada - \dimen0=\pgfincludeexternalgraphics@dp\relax - \hbox{\lower\dimen0 \box1 }% - \fi - \endgroup -} -\def\pgfplots@orig@pgf@external@grab#1{% - \def\pgf@filename{#1}% - \setbox\pgfpic=\hbox\bgroup\bgroup% - \let\endpgfgraphicnamed=\pgf@externalend% -} -\def\pgfplots@orig@pgf@externalend{% - \unskip\egroup\egroup% - {% - \parindent0pt% -% \leftmargin0pt% -% \rightmargin0pt% - \dimen0\ht\pgfpic% - \advance\dimen0\dp\pgfpic% - \ifdim\dp\pgfpic=0pt\relax - \else% store the picture's depth. Otherwise, it would be lost. - \immediate\openout\pgf@plotwrite=\pgf@filename.dpth - \immediate\write\pgf@plotwrite{\the\dp\pgfpic}% - \immediate\closeout\pgf@plotwrite - \fi - \pgfsys@papersize{\the\wd\pgfpic}{\the\dimen0}% - \setbox0=\vbox{% - \kern -1truein% - \hbox{% - \kern -1truein% - \hbox to0pt{% - \wd\pgfexternal@startupbox=0pt% - \ht\pgfexternal@startupbox=0pt% - \dp\pgfexternal@startupbox=0pt% - \box\pgfexternal@startupbox% - \pgfsys@atbegindocument\hss}% - \box\pgfpic% - \kern 1truein}% - \kern1truein}% - \pgfexternal@originalshipout\box0% - }% -} - \pgfplotsiffileexists{tikzlibraryexternal.code.tex}{% \usetikzlibrary{external}% }{% % Backwards compatibility: + \let\pgfplots@backw@compat@AtBeginDocument=\AtBeginDocument + \def\AtBeginDocument#1{}% + \input pgfplotsoldpgfsupp_pgfcoreexternal.code.tex + \let\AtBeginDocument=\pgfplots@backw@compat@AtBeginDocument + % \input pgfplotsoldpgfsupp_tikzlibraryexternal.code.tex - \pgfkeys{ - /pgf/images/include external/.code={\pgfimage{#1}}, - }% - \let\pgfincludeexternalgraphics=\pgfplots@orig@pgfincludeexternalgraphics - \let\pgf@external@grab=\pgfplots@orig@pgf@external@grab - \let\pgf@externalend=\pgfplots@orig@pgf@externalend }% \endinput diff --git a/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.groupplots.code.tex b/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.groupplots.code.tex index ac81e8f5491..bb5ea8de194 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.groupplots.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.groupplots.code.tex @@ -296,7 +296,15 @@ \edef\pgfplots@loc@TMPa{% \noexpand\pgfkeys{/pgfplots/group/.cd,\pgfplots@group@style} }\pgfplots@loc@TMPa + % + \let\pgfplots@set@options@sanitizemode@old=\pgfplots@set@options@sanitizemode + \let\pgfplots@set@options@sanitize@old=\pgfplots@set@options@sanitize + \let\pgfplots@set@options@sanitize=\relax + \let\pgfplots@set@options@sanitizemode=\relax \expandafter\pgfplots@set@options\expandafter{\pgfplots@group@rmopts} + \let\pgfplots@set@options@sanitize=\pgfplots@set@options@sanitize@old + \let\pgfplots@set@options@sanitizemode=\pgfplots@set@options@sanitizemode@old + % \pgfplots@group@individual@setup \pgfplots@group@determine@ticklabels \pgfplots@group@current@plot=0% diff --git a/Master/texmf-dist/tex/generic/pgfplots/numtable/pgfplotstable.code.tex b/Master/texmf-dist/tex/generic/pgfplots/numtable/pgfplotstable.code.tex index ef27a7a2728..157f8874691 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/numtable/pgfplotstable.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/numtable/pgfplotstable.code.tex @@ -448,7 +448,7 @@ \pgfkeyslet{/pgfplots/table/@cell content}\pgfplots@glob@TMPa% }% },% - /pgfplots/table/date type/.default={\year/\month/\day}% + /pgfplots/table/date type/.default={\year/\month/\day},% /pgfplots/table/set content/.style={% /pgfplots/table/postproc cell content/.style={% /pgfplots/table/@cell content={#1}% @@ -916,6 +916,8 @@ /pgfplots/table/every even row/.code=, /pgfplots/table/every first row/.code=, /pgfplots/table/every last row/.code=, + /pgfplots/table/postproc cell content/.code=, + /pgfplots/table/preproc cell content/.code=, }, /pgfplots/table/colnames from/.initial=,% for \pgfplotstabletranspose /pgfplots/table/input colnames to/.initial=colnames,% for \pgfplotstabletranspose @@ -1080,7 +1082,7 @@ \pgfplotsutil@ifdefinedui@withsuffix{#1}{@@table@name}{#2}{#3}% }% -% Defines \pgfmathresult to be the number of rows in table #1. +% Defines \pgfmathresult (and now also \pgfplotsretval) to be the number of rows in table #1. % % #1 may be either a loaded table structure (a macro name) or a table % file name. In the latter case, the file will be loaded temporarily. @@ -1101,6 +1103,7 @@ \pgfmath@smuggleone\pgfmathresult \endgroup }% + \let\pgfplotsretval=\pgfmathresult }% % \pgfplotstablesave[<options>]{<\tablename>}{file name} @@ -1176,7 +1179,8 @@ /pgfplots/table/in col sep=space,% % WARNING: you NEED a '%' before '#1': #1,% - outfile={#3}% + /pgfplots/table/include outfiles=false, + /pgfplots/table/outfile={#3}% ]{#2}% }% @@ -1856,7 +1860,7 @@ \def\thepgfplotstableread@curcol{\the\pgfplotstableread@curcol}% \def\thepgfplotstableread@numcols{\the\pgfplotstableread@numcols}% \def\pgfplotstableread@countreset##1{##1=0 }% - \def\pgfplotstableread@countset##1##2{##1=##2 }% + \def\pgfplotstableread@countset##1##2{##1=##2\relax}% \def\pgfplotstableread@countadvance##1{\advance##1 by1 }% \else % don't re-use integers! We have no protecting scopes! @@ -1906,7 +1910,7 @@ % #1: the <\macro> name of the table which is to be copied to global buffers. % #2: the table file name. \def\pgfplotstable@copy@to@globalbuffers#1#2{% - \global\let\pgfplotstable@colnames@glob=#1 + \global\let\pgfplotstable@colnames@glob=#1\relax \c@pgfplotstable@counta=0\relax% \pgfplotslistforeachungrouped\pgfplotstable@colnames@glob\as\pgfplotstable@loc@TMPa{% \def\pgfplotstable@loc@TMPb{% @@ -3199,7 +3203,7 @@ \global\let\pgfplots@glob@TMPb=\pgfplotstable@newcolname \endgroup \ifpgfplotstablecreatecol@isreallynew - \expandafter\pgfplotslistpushback\expandafter{\pgfplots@glob@TMPb}\to#3 + \expandafter\pgfplotslistpushback\expandafter{\pgfplots@glob@TMPb}\to#3% \fi \expandafter\let\csname\string#3@\pgfplots@glob@TMPb\endcsname=\pgfplots@glob@TMPc }% diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_loader.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_loader.code.tex index c63985e38c4..6d1cb8a2ee1 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_loader.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_loader.code.tex @@ -14,7 +14,7 @@ % #2: for normal processing. \def\pgfplots@ifneedspgfcompabitibilitycode#1#2{% %\pgfkeysifdefined{/handlers/.search also/.@cmd}{#2}{#1}% - \pgfutil@ifundefined{pgfutilsolvetwotwoleq}{#1}{#2}% + \pgfutil@ifundefined{pgfkeysdefnargs}{#1}{#2}% }% \pgfplots@ifneedspgfcompabitibilitycode @@ -22,9 +22,7 @@ \immediate\write16{Package pgfplots: loading complementary code for your PGF version...} \input pgfplotsoldpgfsupp_misc.code.tex \let\pgfkeysloaded=\undefined - % FIXME: this does also load pgfkeysfiltered.code.tex again: \input pgfplotsoldpgfsupp_pgfkeys.code.tex - \input pgfplotsoldpgfsupp_pgfkeysfiltered.code.tex \input pgfplotsoldpgfsupp_pgfmathfloat.code.tex \input pgfplotsoldpgfsupp_pgflibraryplothandlers.code.tex \input pgfplotsoldpgfsupp_pgflibraryfpu.code.tex diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_misc.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_misc.code.tex index 132240e77c7..178da4c3510 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_misc.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_misc.code.tex @@ -3,6 +3,16 @@ % compatibility with PGF 2.0 % ====================================================== +\expandafter\ifx\csname w@pgf@writea\endcsname\relax +\newwrite\w@pgf@writea +\fi + +\expandafter\ifx\csname r@pgf@reada\endcsname\relax +\newread\r@pgf@reada +\fi +\let\pgfutil@inputcheck=\r@pgf@reada + + % from pgfutil-common.tex: % Usage: diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfcoreexternal.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfcoreexternal.code.tex new file mode 100644 index 00000000000..d9e6476398f --- /dev/null +++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfcoreexternal.code.tex @@ -0,0 +1,351 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%% This file is a copy of some part of PGF/Tikz. +%%% It has been copied here to provide : +%%% - compatibility with older PGF versions +%%% - availability of PGF contributions by Christian Feuersaenger +%%% which are necessary or helpful for pgfplots. +%%% +%%% For reasons of simplicity, I have copied the whole file, including own contributions AND +%%% PGF parts. The copyrights are as they appear in PGF. +%%% +%%% Note that pgfplots has compatible licenses. +%%% +%%% This copy has been modified in the following ways: +%%% - nested \input commands have been updated +%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%% Date of this copy: Mi 31. Mär 21:41:41 CEST 2010 %%% + + + +% Copyright 2006 by Till Tantau +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Public License. +% +% See the file doc/generic/pgf/licenses/LICENSE for more details. + +\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcoreexternal.code.tex,v 1.1 2010/03/25 20:57:13 ludewich Exp $ + + + +\newif\ifpgfexternal@allow@aux + +\pgfkeys{ + /pgf/images/include external/.code={\pgfimage{#1}}, + /pgf/images/aux in dpth/.is if=pgfexternal@allow@aux, + /pgf/images/aux in dpth/.default=true +} + +% The external read/write mechanism is used as follows: +% +% In your document, you put a number or all of your pgfpicture (or +% tikzpicture) environments inside a pair of \beginpgfexternal and +% \endpgfexternal. The \beginpgfexternal gets one parameter called the +% graphics name. +% +% Once this is done, the next step is to declare the names of your +% graphics in the document at the beginning using the +% \pgfdeclaregraphicname command. +% +% Now, when you typeset your document, each time a \beginpgfexternal +% command is encountered, it will be checked whether the corresponding +% graphics file exists. If this is the case, it will be included and +% the code between \beginpgfexternal and \endpgfexternal is +% ignored. Otherwise, the code is executed normally. +% +% Things change when you run tex on your file with the \jobname set to +% the name of a decalred graphics name. In this case, only your +% graphic will be typeset, the rest of the document will be "thrown away". +% To be more precise, everything is gobbled up to the beginning +% of the first \beginpgfexternal with the given graphics name. Then, +% the content of the "environment" is put in a box (this "environment" +% need not contain a graphics, it may contain anything that can be put +% in a box). Then a single page is output whose size is exactly the +% size of the picture. +% +% So, once you have run tex repeatedly, each time with the jobname set +% to each of the graphics, you can then run tex on the whole document +% and this will cause all graphics to be included rather than begin +% typeset. +% +% Finally, once all the graphics have been created, you can also say +% \input pgfexternal.tex instead of including pgf/TikZ. + + +\newif\ifpgfexternalreadmainaux +\pgfexternalreadmainauxtrue + +% Tells pgf which jobname is the name of the real file +% +% #1 = name +% +% Description: +% +% This command is used to tell pgf that the file named #1 should be +% typeset normally. If \jobname is not equal to #1, only +% the graphic called \jobname will be typeset. +% +% Example: +% +% \pgfrealjobname{survey} +% +% Note that afterwards, \jobname will be set to the argument. In our +% example, \jobname will be 'survey'. This is to accomplish +% compatibility with aux-file generation. + +\def\pgfrealjobname#1{% + \global\let\pgfactualjobname=\jobname + \edef\pgf@tempa{\expandafter\string\csname #1\endcsname}% + \edef\pgf@tempb{\expandafter\string\csname\jobname\endcsname}% + \ifx\pgf@tempa\pgf@tempb% + \else% + \pgf@external@grabshipouttrue% + \pgfexternal@nofiles + \ifpgfexternalreadmainaux + % and reset the jobname. This should allow to handle any + % \label/\ref constructions which are stored in \jobname.aux (and + % which won't be found otherwise) + \gdef\jobname{#1}% + \fi + \ifpgfexternal@allow@aux + \csname newwrite\endcsname\w@pgfexternal@auxout + \fi + \fi% + \gdef\pgfrealjobname##1{}% avoid multiple calls. +} + +\def\pgfexternal@nofiles{% + % replace \relax. The \nofiles macros does + % \let\makeglossary=\relax + % but the glossary.sty calls \renewcommand\makeglossary (which + % will fail if \makeglossary=\relax). Stupid, but it works. + \let\pgfexternal@nofiles@=\relax + \def\relax{\relax}% + % + % suppress generation of LaTeX .aux, .toc etc files. + % generation of these files is not thread-safe. + % the \csname \endcsname yields \relax if \nofiles doesn't exist. + \csname nofiles\endcsname + % + \let\relax=\pgfexternal@nofiles@ +}% + +\newif\ifpgf@external@grabshipout +\newbox\pgfexternal@startupbox + +\AtBeginDocument{% + \ifpgf@external@grabshipout% + \global\let\pgfexternal@originalshipout=\shipout% + \global\def\shipout{\setbox\pgfpic=}% + \maxdeadcycles=10000% + % Ok, gather everything we have seen up to now in a box. This box + % will contain any specials that have been used. + {% + \output{\global\setbox\pgfexternal@startupbox=\vbox{\csname @begindvi\endcsname\unvbox255}}% + \hbox{}\eject% + }% + \fi% +} + + +% "Environment" for an external graphic. +% +% #1 = graphic name +% +% Example: +% +% \beginpgfgraphicnamed{main-graphic2} +% \begin{tikzpicture} +% ... +% \end{tikzpicture} +% \endpgfgraphicnamed + +\def\pgf@externalbegin#1{% + % First, check whether we wish to grab this graphic: + \let\pgf@next=\pgf@external@normal% + \ifpgf@external@grabshipout% + \edef\pgf@tempa{\expandafter\string\csname #1\endcsname}% + \edef\pgf@tempb{\expandafter\string\csname\pgfactualjobname\endcsname}% + \ifx\pgf@tempa\pgf@tempb% + \let\pgf@next=\pgf@external@grab% + \fi% + \fi% + \pgf@next{#1}% +} + + +\AtBeginDocument{ + \let\beginpgfgraphicnamed=\pgf@externalbegin% overwrite definition of pgfexternal.tex if necessary + \let\endpgfgraphicnamed=\unskip +} + + +% Normal operation: Include an external graphic instead of the +% picture, if such an external picture exists. +\def\pgf@external@normal#1{% + \let\pgf@filename=\pgfutil@empty% + \expandafter\pgf@findfile\pgfsys@imagesuffixlist:+{#1}% + \ifx\pgf@filename\pgfutil@empty% + % Ok, no such image... Just typeset the picture normally. + \let\pgf@next=\relax% + \else% + \let\pgf@next=\pgf@replacepicturebygraphic% + \fi% + \pgf@next% +} + +\long\def\pgf@replacepicturebygraphic#1\endpgfgraphicnamed{% + \expandafter\pgfincludeexternalgraphics\expandafter{\pgf@filename}\unskip +} + +% This is almost the same as \includegraphics{#1}, but it checks +% whether '#1.dpth' exists. In such case, it restores the boxes depth +% stored in #1.dpth. +% +% Furthermore, the .dpth file may contain .aux related information +% collected for the external graphics (references). They start after +% the first line (if any). +\def\pgfincludeexternalgraphics#1{% + \begingroup + \setbox1=\hbox{\pgfkeysvalueof{/pgf/images/include external/.@cmd}{#1}\pgfeov}% + % + \let\pgfincludeexternalgraphics@dp=\pgfutil@empty + \endlinechar=-1 % suppress white space at end + \catcode`\@=11 + \openin\r@pgf@reada=#1.dpth + \pgfincludeexternalgraphics@read@dpth + \ifx\pgfincludeexternalgraphics@dp\pgfutil@empty + \box1 + \else + \dimen0=\pgfincludeexternalgraphics@dp\relax + \hbox{\lower\dimen0 \box1 }% + \fi + \endgroup +} +% +% The .dpth consists of 0-N lines, where each is either a single +% dimension (the box' depth) or something which belongs to the .aux +% file (such lines will always start with a macro). +\def\pgfincludeexternalgraphics@read@dpth{% + \ifeof\r@pgf@reada + \closein\r@pgf@reada + \else + \read\r@pgf@reada to\pgfincludeexternalgraphics@auxline + \ifx\pgfincludeexternalgraphics@auxline\pgfutil@empty + \else + \expandafter\pgfincludeexternalgraphics@read@dpth@line\pgfincludeexternalgraphics@auxline\pgfincludeexternalgraphics@read@dpth@line@EOI + \fi + \expandafter\pgfincludeexternalgraphics@read@dpth + \fi +}% +\long\def\pgfincludeexternalgraphics@read@dpth@line#1#2\pgfincludeexternalgraphics@read@dpth@line@EOI{% + \ifcat\noexpand#1\relax + % Ah -- the first token is a control sequence. It belongs to + % the .aux file. + % + % #1#2\relax% do NOT set the information! many LaTeX commands don't support it (\label for example) + \pgfutil@ifundefined{if@filesw}{% + % sorry, .aux file support only for latex + }{% + % append to main .aux file (for forward references) + \if@filesw + {% + \toks0={#1#2}% + % believe it or not, but the + % \def\dpthimport{...}\dpthimport *makes* a + % difference! In ensures any occuring `##' characters + % are properly expanded to `#'. + \immediate\write\@auxout{\noexpand\def\noexpand\dpthimport{\the\toks0 }\noexpand\dpthimport }% + }% + \fi + }% + \else + \def\pgfincludeexternalgraphics@dp{#1#2}% + \fi +}% + + + +% Grab operation: If jobname matches the graphic name, typeset this +% picture normall. +% REMARK: +% this method is also invoked from within the tikz external library. +\def\pgf@external@grab#1{% + \def\pgf@filename{#1}% + \ifpgfexternal@allow@aux + \begingroup + \pgf@external@init@aux@in@dpth + \fi + \setbox\pgfpic=\hbox\bgroup\bgroup% + \let\endpgfgraphicnamed=\pgf@externalend% +} + +\let\pgf@external@@protected@write@orig=\protected@write +\long\def\pgf@external@@protected@write@immediate#1#2#3{% + \begingroup + \let\pgf@write@=\write + \def\write{\noexpand\immediate\pgf@write@}% + \pgf@external@@protected@write@orig{#1}{#2}{#3}% + \endgroup +}% + +\def\pgf@external@init@aux@in@dpth{% + % tell LaTeX to write aux files... + \csname @fileswtrue\endcsname + % ... but redirect output to the .dpth file! + \immediate\openout\w@pgfexternal@auxout=\pgf@filename.dpth + \let\@auxout=\w@pgfexternal@auxout + % ... and disable the correct page numbers. I can't get that + % (because the correct page number is only available in the + % shipout routine). Use immediate output: + \let\protected@write=\pgf@external@@protected@write@immediate +}% + +% REMARK: +% this method is also invoked from within the tikz external library. +\def\pgf@externalend{% + \unskip\egroup\egroup% + {% + \parindent0pt % leave the space +% \leftmargin0pt% +% \rightmargin0pt% + \dimen0\ht\pgfpic% + \advance\dimen0\dp\pgfpic% + \ifdim\dp\pgfpic=0pt\relax + \else% store the picture's depth. Otherwise, it would be lost. + \ifpgfexternal@allow@aux + \immediate\write\@auxout{\the\dp\pgfpic}% + \immediate\closeout\@auxout + \else + \immediate\openout\pgf@plotwrite=\pgf@filename.dpth + \immediate\write\pgf@plotwrite{\the\dp\pgfpic}% + \immediate\closeout\pgf@plotwrite + \fi + \fi + \pgfsys@papersize{\the\wd\pgfpic}{\the\dimen0}% + \setbox0=\vbox{% + \kern -1truein % + \hbox{% + \kern -1truein % + \hbox to0pt{% + \wd\pgfexternal@startupbox=0pt % + \ht\pgfexternal@startupbox=0pt % + \dp\pgfexternal@startupbox=0pt % + \box\pgfexternal@startupbox% + \pgfsys@atbegindocument\hss}% + \box\pgfpic% + \kern 1truein }% + \kern1truein }% + \pgfexternal@originalshipout\box0 % + }% + \ifpgfexternal@allow@aux + \endgroup + \fi +} + + +\endinput + diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfkeys.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfkeys.code.tex index 6ae79bec9bf..24203d3b330 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfkeys.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfkeys.code.tex @@ -14,7 +14,7 @@ %%% - nested \input commands have been updated %%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%% Date of this copy: Di 29. Dez 22:11:16 CET 2009 %%% +%%% Date of this copy: Mi 31. Mär 21:41:41 CEST 2010 %%% @@ -634,6 +634,85 @@ \pgfkeyssetvalue{#1/.@body}{#3}% } +% Like \pgfkeysdefargs, but `#2' is an integer denoting the expected +% *number* of arguments. +% +% There is a subtle difference between the 'args' command, when it +% comes to spaces: +% a key defined with defargs{#1#2} must not have spaces between the +% arguments when it is used. +% +% See this: +% +%-------------------------------------------------- +% % defnargs: +% \pgfkeysdefnargs{/a}{2}{1=`#1', 2=`#2'} +% \pgfkeys{ +% /a= +% {1} +% {2} +% } +% ->defnargs: 1=`1', 2=`2' +% +% defargs: +% \pgfkeysdefargs{/b}{#1#2}{1=`#1', 2=`#2'} +% \pgfkeys{ +% /b= +% {1} +% {2} +% } +% ->defargs: 1=`1', 2=` 2' (note the space!) +% +% defargs: +% \pgfkeysdefargs{/b}{#1#2}{1=`#1', 2=`#2'} +% \pgfkeys{ +% /b= +% {1}% +% {2} +% } +% ->defargs: 1=`1', 2=`2' +%-------------------------------------------------- +\long\def\pgfkeysdefnargs#1#2#3{\pgfkeysdefnargs@{#1}{#2}{#3}{\def}}% +\long\def\pgfkeysedefnargs#1#2#3{\pgfkeysdefnargs@{#1}{#2}{#3}{\edef}}% +\long\def\pgfkeysdefnargs@#1#2#3#4{% + \ifcase#2\relax + \pgfkeyssetvalue{#1/.@args}{}% + \or + \pgfkeyssetvalue{#1/.@args}{##1}% + \or + \pgfkeyssetvalue{#1/.@args}{##1##2}% + \or + \pgfkeyssetvalue{#1/.@args}{##1##2##3}% + \or + \pgfkeyssetvalue{#1/.@args}{##1##2##3##4}% + \or + \pgfkeyssetvalue{#1/.@args}{##1##2##3##4##5}% + \or + \pgfkeyssetvalue{#1/.@args}{##1##2##3##4##5##6}% + \or + \pgfkeyssetvalue{#1/.@args}{##1##2##3##4##5##6}% + \or + \pgfkeyssetvalue{#1/.@args}{##1##2##3##4##5##6##7}% + \or + \pgfkeyssetvalue{#1/.@args}{##1##2##3##4##5##6##7##8}% + \or + \pgfkeyssetvalue{#1/.@args}{##1##2##3##4##5##6##7##8##9}% + \else + \pgfkeys@error{\string\pgfkeysdefnargs: expected <= 9 arguments, got #2}% + \fi + \pgfkeysgetvalue{#1/.@args}\pgfkeys@tempargs + \def\pgfkeys@temp{\expandafter#4\csname pgfk@#1/.@@body\endcsname}% + \expandafter\pgfkeys@temp\pgfkeys@tempargs{#3}% + % eliminate the \pgfeov at the end such that TeX gobbles spaces + % by using + % \pgfkeysdef{#1}{\pgfkeysvalueof{#1/.@@body}##1} + % (with expansion of '#1'): + \edef\pgfkeys@tempargs{\noexpand\pgfkeysvalueof{#1/.@@body}}% + \def\pgfkeys@temp{\pgfkeysdef{#1}}% + \expandafter\pgfkeys@temp\expandafter{\pgfkeys@tempargs##1}% + \pgfkeyssetvalue{#1/.@body}{#3}% +} + % Defining a key command @@ -642,8 +721,10 @@ \pgfkeysdef{/handlers/.code 2 args}{\pgfkeysdefargs{\pgfkeyscurrentpath}{##1##2}{#1}} \pgfkeysdef{/handlers/.ecode}{\pgfkeysedef{\pgfkeyscurrentpath}{#1}} \pgfkeysdef{/handlers/.ecode 2 args}{\pgfkeysedefargs{\pgfkeyscurrentpath}{##1##2}{#1}} -\pgfkeysdefargs{/handlers/.code args}{#1#2}{\pgfkeysdefargs{\pgfkeyscurrentpath}{#1}{#2}} -\pgfkeysdefargs{/handlers/.ecode args}{#1#2}{\pgfkeysedefargs{\pgfkeyscurrentpath}{#1}{#2}} +\pgfkeysdefnargs{/handlers/.code args}{2}{\pgfkeysdefargs{\pgfkeyscurrentpath}{#1}{#2}} +\pgfkeysdefnargs{/handlers/.ecode args}{2}{\pgfkeysedefargs{\pgfkeyscurrentpath}{#1}{#2}} +\pgfkeysdefnargs{/handlers/.code n args}{2}{\pgfkeysdefnargs{\pgfkeyscurrentpath}{#1}{#2}} +\pgfkeysdefnargs{/handlers/.ecode n args}{2}{\pgfkeysedefnargs{\pgfkeyscurrentpath}{#1}{#2}} % Adding to a key command @@ -651,15 +732,24 @@ % Find out, whether with args or not. \pgfkeysifdefined{\pgfkeyscurrentpath/.@args}% {% Yes, so add to body and reuse args - \pgfkeysaddvalue{\pgfkeyscurrentpath/.@body}{#1}{#2}% - % Redefine code - \pgfkeysgetvalue{\pgfkeyscurrentpath/.@args}{\pgfkeys@tempargs}% - \pgfkeysgetvalue{\pgfkeyscurrentpath/.@body}{\pgfkeys@tempbody}% - \expandafter\expandafter\expandafter\def\expandafter\pgfkeys@temp\expandafter\pgfkeys@tempargs\expandafter{\pgfkeys@tempbody}% - \pgfkeyslet{\pgfkeyscurrentpath/.@cmd}{\pgfkeys@temp}% + \pgfkeysaddvalue{\pgfkeyscurrentpath/.@body}{#1}{#2}% + % Redefine code + {% + \pgfkeysgetvalue{\pgfkeyscurrentpath/.@args}{\pgfkeys@tempargs}% + \pgfkeysgetvalue{\pgfkeyscurrentpath/.@body}{\pgfkeys@tempbody}% + \def\pgfkeys@marshal{\expandafter\gdef\expandafter\pgfkeys@global@temp\pgfkeys@tempargs}% + \expandafter\pgfkeys@marshal\expandafter{\pgfkeys@tempbody}% + }% + \pgfkeysifdefined{\pgfkeyscurrentpath/.@@body}{% + % support for \pgfkeysndefargs: + \pgfkeyslet{\pgfkeyscurrentpath/.@@body}{\pgfkeys@global@temp}% + }{% + % support for \pgfkeysdefargs: + \pgfkeyslet{\pgfkeyscurrentpath/.@cmd}{\pgfkeys@global@temp}% + }% }% {% - % No, so single argument. Redefine accordingly. + % No, so single argument (simple \pgfkeysdef). Redefine accordingly. {% \toks0{#1}% \pgfkeysifdefined{\pgfkeyscurrentpath/.@cmd}% diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfkeysfiltered.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfkeysfiltered.code.tex index 5d7a731334d..c795bc45ffb 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfkeysfiltered.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfkeysfiltered.code.tex @@ -14,7 +14,7 @@ %%% - nested \input commands have been updated %%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%% Date of this copy: Di 29. Dez 22:11:16 CET 2009 %%% +%%% Date of this copy: Mi 31. Mär 21:41:41 CEST 2010 %%% diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryfpu.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryfpu.code.tex index 3bb41804bdb..0af3c3887c5 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryfpu.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryfpu.code.tex @@ -14,7 +14,7 @@ %%% - nested \input commands have been updated %%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%% Date of this copy: Di 29. Dez 22:11:16 CET 2009 %%% +%%% Date of this copy: Mi 31. Mär 21:41:41 CEST 2010 %%% @@ -94,6 +94,11 @@ fpu/output format/sci/.code= {\def\pgfmathfloatparse@output{\pgfmathfloattosci@{\pgfmathresult}}}, fpu/output format/fixed/.code= {\def\pgfmathfloatparse@output{\pgfmathfloattofixed@{\pgfmathresult}}}, fpu/output format/float, + fpu/rel thresh/.code={% + \pgfmathfloatparsenumber{#1}% + \let\pgfmathfloat@relthresh=\pgfmathresult + }, + fpu/rel thresh=1e-4, } \pgfmathfloatcreate{1}{1.0}{0}\let\pgfmathfloatscale=\pgfmathresult @@ -897,6 +902,28 @@ \ifnum\pgfmathfloatiffinite@>2 #3\else #2\fi }% + +% Computes the relative error between #1 and #2 (assuming #2 != 0) and +% invokes #3 if the relative error is below `/pgf/fpu/rel thresh' and +% #4 if that is not the case. +\long\def\pgfmathfloatifapproxequalrel#1#2#3#4{% + \begingroup + \pgfmathfloatparsenumber{#1}% + \let\pgfmathfloatarga=\pgfmathresult + \pgfmathfloatparsenumber{#2}% + \let\pgfmathfloatargb=\pgfmathresult + \pgfmathfloatrelerror@\pgfmathfloatarga\pgfmathfloatargb + \let\pgfmathfloatarga=\pgfmathresult + \pgfmathfloatlessthan@\pgfmathfloatarga\pgfmathfloat@relthresh + \ifpgfmathfloatcomparison + \def\pgfmathfloat@loc@TMPa{#3}% + \else + \def\pgfmathfloat@loc@TMPa{#4}% + \fi + \expandafter\endgroup + \pgfmathfloat@loc@TMPa +}% + % Invokes code '#3' if the flags of the floating point number '#1' % match the flag provided in '#2'. % @@ -1420,6 +1447,7 @@ } \let\pgfmathfloatmod=\pgfmathfloatmod@ + % A modification of \pgfmathfloatmod@ where #3 = 1/#2 is already % known. This may be faster. \def\pgfmathfloatmodknowsinverse@#1#2#3{% @@ -1472,7 +1500,7 @@ % % #1 is a one-argument macro which assigns \pgfmathresult. \def\pgfmathfloatTRIG@#1#2{% - \expandafter\ifx\csname pgfmathfloatTRIG@NUM\endcsname\relax% why not directly!??? Did not work!?? + \expandafter\ifx\csname pgfmathfloatTRIG@NUM\endcsname\relax% % Lazy evaluation: \pgfmathfloatcreate{1}{3.6}{2}% \global\let\pgfmathfloatTRIG@NUM=\pgfmathresult @@ -1515,7 +1543,7 @@ \def\pgfmathfloatatan@#1{% \begingroup - \expandafter\ifx\csname pgfmathfloatatan@TMP\endcsname\relax% why not directly!??? Did not work!?? + \expandafter\ifx\csname pgfmathfloatatan@TMP\endcsname\relax% \pgfmathfloatcreate{1}{1.6}{4}% \global\let\pgfmathfloatatan@TMP=\pgfmathresult \pgfmathfloatcreate{2}{1.6}{4}% diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryplothandlers.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryplothandlers.code.tex index d2089a6fd67..f93028724a3 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryplothandlers.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryplothandlers.code.tex @@ -14,7 +14,7 @@ %%% - nested \input commands have been updated %%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%% Date of this copy: Di 29. Dez 22:11:16 CET 2009 %%% +%%% Date of this copy: Mi 31. Mär 21:41:41 CEST 2010 %%% diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.code.tex index 93a7a0c59e2..a03ef94d6a5 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.code.tex @@ -14,7 +14,7 @@ %%% - nested \input commands have been updated %%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%% Date of this copy: Di 29. Dez 22:11:16 CET 2009 %%% +%%% Date of this copy: Mi 31. Mär 21:41:41 CEST 2010 %%% diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.pdflinks.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.pdflinks.code.tex index edfc48d5a4e..0c20db997a3 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.pdflinks.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.pdflinks.code.tex @@ -14,7 +14,7 @@ %%% - nested \input commands have been updated %%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%% Date of this copy: Di 29. Dez 22:11:16 CET 2009 %%% +%%% Date of this copy: Mi 31. Mär 21:41:41 CEST 2010 %%% @@ -216,6 +216,7 @@ \pgfkeysvalueof{/pdflinks/show labels code/.@cmd}{\pgfmanualpdflabel@@}\pgfeov \fi % + \if@filesw \ifx\pgfmanualpdf@catcode\pgfutil@empty \else \toks0=\expandafter{\pgfmanualpdf@catcode}% @@ -232,6 +233,7 @@ \else \immediate\write\@auxout{\noexpand\endgroup}% \fi + \fi \expandafter\gdef\csname pgfd@lbl@\pgfmanualpdflabel@@\endcsname{w}% 1. remember the label AND remember that we "w"rote it into the pdf. \edef\pgfmanualpdflabel@@{\pgfkeysvalueof{/pdflinks/internal link prefix}.\pgfmanualpdflabel@@}% \expandafter\hypertarget\expandafter{\pgfmanualpdflabel@@}{#2}% @@ -252,8 +254,10 @@ \def\pgfmanual@tempa{\foreach \prefix in }% \pgfkeysgetvalue{/pdflinks/search key prefixes in}\pgfmanual@tempb \expandafter\pgfmanual@tempa\expandafter{\pgfmanual@tempb}{% - \ifcsname pgfd@lbl@\prefix\pgfmanualpdflabel@@\endcsname - \xdef\pgfmanual@glob{\prefix\pgfmanualpdflabel@@}% + \edef\pgfmanualpdflabel@@{\prefix\pgfmanualpdflabel@@}% + \expandafter\pgfmanual@handlespeciallabeltokens@in\expandafter{\pgfmanualpdflabel@@}% + \ifcsname pgfd@lbl@\pgfmanualpdflabel@@\endcsname + \xdef\pgfmanual@glob{\pgfmanualpdflabel@@}% \breakforeach \fi }% @@ -314,6 +318,7 @@ \pgfmath@smuggleone\pgfmanualpdflabel@@ \endgroup }% + \expandafter\def\expandafter\pgfmanualpdfref@substitute@backslash\expandafter#\expandafter1\pgfmanual@pretty@backslash#2\relax{% \edef\pgfmanualpdflabel@@{#1\textbackslash #2}% }% diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.prettyprinter.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.prettyprinter.code.tex index 04fed087887..20e0bf1b4d2 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.prettyprinter.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.prettyprinter.code.tex @@ -14,7 +14,7 @@ %%% - nested \input commands have been updated %%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%% Date of this copy: Di 29. Dez 22:11:16 CET 2009 %%% +%%% Date of this copy: Mi 31. Mär 21:41:41 CEST 2010 %%% diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmathfloat.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmathfloat.code.tex index 67d2be8c72b..62a33269d8b 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmathfloat.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmathfloat.code.tex @@ -14,7 +14,7 @@ %%% - nested \input commands have been updated %%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%% Date of this copy: Di 29. Dez 22:11:16 CET 2009 %%% +%%% Date of this copy: Mi 31. Mär 21:41:41 CEST 2010 %%% @@ -643,11 +643,13 @@ \expandafter\def\expandafter\pgfmathresult\expandafter{\pgfmathresult #1}% }% +% @deprecated. It has been replaced by \pgfmathprintnumber@fixed@styleDEFAULT % #1 maybe a macro \def\pgfmathprintnumber@fixed@stylePERIOD#1#2#3e#4\relax{% \def\pgfmathresult{#1}% } +% @deprecated. It has been replaced by \pgfmathprintnumber@fixed@styleDEFAULT % #1 maybe a macro \def\pgfmathprintnumber@fixed@styleCOMMA#1#2#3e#4\relax{% \ifpgfmathfloatroundhasperiod @@ -721,7 +723,10 @@ % #2: mantisse % #3: exponent % #4: CODE to display if the mantisse is drawn. -% #5: CODE to display if the mantisse is NOT draw. (unused) +% This code will be shown just before the exponent. +% Example: #4=\cdot +% #5: CODE to display if the mantisse is NOT draw. (unused currently) +% Might be used to display '10^1' instead of '1*10^1'. % #6: CODE to display the exponent. \def\pgfmathfloatrounddisplaystyle@shared@impl#1#2e#3\relax#4#5#6{% \pgfkeysgetvalue{/pgf/number format/@sci exponent mark}\pgfmathfloatrounddisplaystyle@e@mark @@ -733,7 +738,7 @@ \or\pgfmathprintnumber@fixed@style{-#2}#1#2e0\relax% \expandafter\pgfmathfloatrounddisplaystyle@shared@impl@\expandafter{\pgfmathresult}{#4#6}% \or - \pgfmathfloatrounddisplaystyle@shared@impl@@{NaN}{}% + \pgfmathfloatrounddisplaystyle@shared@impl@@{\hbox{NaN}}{}% \or \ifpgfmathprintnumber@showpositive \pgfmathfloatrounddisplaystyle@shared@impl@@{+\infty}{}% @@ -802,6 +807,20 @@ \expandafter\pgfmathfloat@loc@TMPb\expandafter{\pgfmathresult}% } +\def\pgfmathfloatrounddisplaystyle@generic#1#2e#3\relax{% + \begingroup + \pgfkeysvalueof {/pgf/number format/sci generic/@/.@cmd}{#3}{#1}{#2}\pgfeov + \pgfkeysgetvalue{/pgf/number format/sci generic/mantisse sep}\pgfmathdisplay@aftermantisse + \pgfkeysgetvalue{/pgf/number format/sci generic/empty mantisse sep}\pgfmathdisplay@nomantisse + \pgfkeysgetvalue{/pgf/number format/sci generic/exponent}\pgfmathdisplay@e + \toks0=\expandafter{\pgfmathdisplay@aftermantisse}% + \toks1=\expandafter{\pgfmathdisplay@nomantisse}% + \toks2=\expandafter{\pgfmathdisplay@e}% + \xdef\pgfmathfloat@glob@TMP{\noexpand\pgfmathfloatrounddisplaystyle@shared@impl#1#2e#3\noexpand\relax{\the\toks0}{\the\toks1}{\the\toks2}}% + \endgroup + \pgfmathfloat@glob@TMP +} + % A macro which takes the argument '<SIGN><MANTISSE>e<EXPONENT>' and % expands to the final TeX-representation for that floating point % number. @@ -817,15 +836,22 @@ \newif\ifpgfmathfloat@usezerofill@fixed \newif\ifpgfmathprintnumber@assumemathmode \newif\ifpgfmathprintnumber@showpositive +\newif\ifpgfmathprintnumber@frac@warn \pgfkeys{% /pgf/number format/.is family, /pgf/number format, fixed/.code= \pgfmath@set@number@printer{pgfmathprintnumber@FIXED}, sci/.code= \pgfmath@set@number@printer{pgfmathprintnumber@SCI}, - std/.code= \pgfmath@set@number@printer{pgfmathprintnumber@STD}, + std/.code= {\pgfmath@set@number@printer{pgfmathprintnumber@STD}\pgfmathprintnumber@STD@setparam{#1}}, + std/.default=,% int detect/.code= \pgfmath@set@number@printer{pgfmathprintnumber@INT@DETECT}, int trunc/.code= \pgfmath@set@number@printer{pgfmathprintnumber@INT@TRUNC}, + frac/.code= \pgfmath@set@number@printer{pgfmathprintnumber@frac},% + frac TeX/.initial=\frac, + frac shift/.initial=4, + frac warning/.is if=pgfmathprintnumber@frac@warn, + frac warning=true, assume math mode/.is if=pgfmathprintnumber@assumemathmode, assume math mode/.default=true, fixed zerofill/.is if= pgfmathfloat@usezerofill@fixed, @@ -835,6 +861,16 @@ zerofill/.style= {/pgf/number format/fixed zerofill=#1,/pgf/number format/sci zerofill=#1}, zerofill/.default= true, precision/.store in= \pgfmathfloat@round@precision, + sci precision/.code={% + \edef\pgfmathfloat@loc@TMPa{#1}% + \ifx\pgfmathfloat@loc@TMPa\pgfutil@empty + \def\pgfmathprintnumber@sci@precision{\pgfmathfloat@round@precision}% + \else + \let\pgfmathprintnumber@sci@precision=\pgfmathfloat@loc@TMPa + \fi + },% + sci precision/.default=, + sci precision=, fixed default/.code= {\let\pgfmathprintnumber@fixed@style=\pgfmathprintnumber@fixed@styleDEFAULT}, set decimal separator/.initial=, dec sep/.style={/pgf/number format/set decimal separator=#1}, @@ -859,6 +895,26 @@ sci E/.code= {\let\pgfmathfloatrounddisplaystyle=\pgfmathfloatrounddisplaystyle@E}, sci subscript/.code= {\let\pgfmathfloatrounddisplaystyle=\pgfmathfloatrounddisplaystyle@subscript}, sci superscript/.code= {\let\pgfmathfloatrounddisplaystyle=\pgfmathfloatrounddisplaystyle@superscript}, + sci generic/.code= {% + \let\pgfmathfloatrounddisplaystyle=\pgfmathfloatrounddisplaystyle@generic + \pgfkeysdefargs{/pgf/number format/sci generic/@}% + {##1##2##3}% + {\pgfqkeys{/pgf/number format/sci generic}{#1}}% + }, + sci generic/mantisse sep/.initial=,% + sci generic/empty mantisse sep/.initial=,% + sci generic/exponent/.initial=,% + sci generic/.value required, + verbatim/.style={% + sci generic={mantisse sep=,exponent={e##1}}, + 1000 sep=, + skip 0.=false, + print sign=false, + dec sep=., + assume math mode, + @dec sep mark=, + @sci exponent mark=, + }, % sci may skip mantisse/.is if=pgfmathfloatround@allow@empty@mantisse, % sci may skip mantisse/.default=true, } @@ -872,14 +928,44 @@ \expandafter\pgfmathprintnumber@STD@issci\pgfmathresult\relax } +\def\pgfmathprintnumber@STD@setparam#1{% + \edef\pgfmathfloat@loc@TMPb{#1}% + \ifx\pgfmathfloat@loc@TMPb\pgfutil@empty + % DEFAULT for lower and upper bound. + \def\pgfmathprintnumber@STD@getlowerbound{% + \c@pgf@counta=\pgfmathfloat@round@precision\relax + \divide\c@pgf@counta by-2\relax + }% + \def\pgfmathprintnumber@STD@upperbound{4}% + \else + \expandafter\pgfutil@in@\expandafter:\expandafter{\pgfmathfloat@loc@TMPb}% + \ifpgfutil@in@ + % we have -4:5 or something like that. + % parse both values: + \def\pgfmathfloat@loc@TMPa##1:##2\relax{% + \edef\pgfmathprintnumber@STD@getlowerbound{% + \noexpand\c@pgf@counta=##1\space + }% + \edef\pgfmathprintnumber@STD@upperbound{##2}% + }% + \expandafter\pgfmathfloat@loc@TMPa\pgfmathfloat@loc@TMPb\relax + \else + % we have just the lower bound: + \def\pgfmathprintnumber@STD@upperbound{4}% + \edef\pgfmathprintnumber@STD@getlowerbound{% + \noexpand\c@pgf@counta=\pgfmathfloat@loc@TMPb\space + }% + \fi + \fi +}% + \def\pgfmathprintnumber@STD@issci#1#2e#3\relax{% \expandafter\ifnum#1<3 - \expandafter\ifnum#3>4 + \expandafter\ifnum#3>\pgfmathprintnumber@STD@upperbound\relax \pgfmathprintnumber@SCI@issci#1#2e#3\relax% \else \begingroup - \c@pgf@counta=\pgfmathfloat@round@precision\relax - \divide\c@pgf@counta by-2\relax + \pgfmathprintnumber@STD@getlowerbound \ifnum#3<\c@pgf@counta \pgfmathprintnumber@SCI@issci#1#2e#3\relax% \else @@ -893,6 +979,198 @@ \fi } +\def\pgfmathprintnumber@frac#1{% + % parse the input: + \pgfmathfloatparsenumber{#1}% + \pgfmathfloatgetfrac{\pgfmathresult}% + \expandafter\pgfmathprintnumber@frac@formatresult\pgfmathresult +} +\def\pgfmathprintnumber@frac@issci#1#2e#3\relax{% + \pgfmathfloatcreate{#1}{#2}{#3}% + \pgfmathfloatgetfrac{\pgfmathresult}% + \expandafter\pgfmathprintnumber@frac@formatresult\pgfmathresult +} +\def\pgfmathprintnumber@frac@formatresult#1#2#3{% + \begingroup + \pgfkeysgetvalue{/pgf/number format/frac TeX}\pgfmathresult + \toks0=\expandafter{\pgfmathresult}% + \def\pgfmathfloat@loc@TMPa{#1}% + \ifx\pgfmathfloat@loc@TMPa\pgfutil@empty + \ifpgfmathprintnumber@showpositive + \def\pgfmathfloat@loc@TMPa{+}% + \fi + \else + % FIXME : doesn't respect show pos! + \fi + \toks1=\expandafter{\pgfmathfloat@loc@TMPa}% + \edef\pgfmathresult{% + \the\toks1 \the\toks0 {#2}{#3}% + }% + \pgfmath@smuggleone\pgfmathresult + \endgroup +}% + +% Defines \pgfmathresult to contain three sets of braces containing +% the sign (optionally containing any components >1), the counter and the denominator for #1. +% +% \pgfmathfloatgetfrac{0.5} -> \pgfmathresult contains {}{1}{2} +% \pgfmathfloatgetfrac{-0.5} -> \pgfmathresult contains {-}{1}{2} +\def\pgfmathfloatgetfrac#1{% + \begingroup + \edef\pgfmathfloat@arg{#1}% + \expandafter\pgfmathfloat@decompose@tok\pgfmathfloat@arg\relax\pgfmathfloat@a@S\pgfmathfloat@a@Mtok\pgfmathfloat@a@E + \def\pgfmathfloat@loc@TMPa{0}% + \ifcase\pgfmathfloat@a@S + % #1 = 0: + \def\pgfmathresult{{}{0}{1}}% + \or% #1 > 0 + \pgfmathfloat@a@S=1 + \def\pgfmathfloat@loc@TMPa{1}% + \or% #1 < 0 + \pgfmathfloat@a@S=-1 + \def\pgfmathfloat@loc@TMPa{1}% + \or + \edef\pgfmathresult{{}{NaN}{1}}% + \or + \edef\pgfmathresult{{}{\infty}{1}}% + \or + \edef\pgfmathresult{{-}{\infty}{1}}% + \fi + \if1\pgfmathfloat@loc@TMPa + \ifnum\pgfmathfloat@a@E<0 + \def\pgfmathfloat@wholenumber{}% + \else + \pgfmathfloattofixed{#1}% + \def\pgfmathfloat@loc@TMPa##1.##2\relax{% + \def\pgfmathfloat@wholenumber{##1}% + \pgfmathfloatparsenumber{0.##2}% + }% + \expandafter\pgfmathfloat@loc@TMPa\pgfmathresult\relax + \expandafter\pgfmathfloat@decompose@tok\pgfmathresult\relax\pgfmathfloat@b@S\pgfmathfloat@a@Mtok\pgfmathfloat@a@E + \fi + \pgfmathfloat@a@E=-\pgfmathfloat@a@E + % + \def\pgfmathfloat@loc@TMPa##1.##2\relax{% + \def\pgfmathfloat@mantisse@first{##1}% + \def\pgfmathfloat@mantisse@ltone{0.##2}% + }% + \expandafter\pgfmathfloat@loc@TMPa\the\pgfmathfloat@a@Mtok\relax + % + \def\pgfmathfloat@loc@@to@int##1.##2\relax##3{% + ##3=##1 + \ifdim0.##2pt>0.5pt + \advance##3 by1 + \fi + }% + % + \ifdim\pgfmathfloat@mantisse@ltone pt=0pt + \def\pgfmathfloat@factor{1}% + \edef\pgfmathfloat@scaled@counter{\the\pgfmathfloat@a@Mtok}% + \else + % FIXME : this here is numerically instable. + % + % The errors of 1/r are magnified by 10^k which + % doesn't work. + \pgfutil@ifundefined{FPdiv}{% + \pgfmathfloatparsenumber{\pgfmathfloat@mantisse@ltone}% + \pgfmathfloatreciprocal@{\pgfmathresult}% + }{% + % \usepackage{fp}. + % yields higher absolute precision. + \FPmessagesfalse% + \FPdebugfalse% + \FPdiv\pgfmathresult{1}{\pgfmathfloat@mantisse@ltone}% + \pgfmathfloatparsenumber{\pgfmathresult}% + }% + \let\pgfmathfloat@inv=\pgfmathresult + \pgfmathfloatcreate{1}{1.0}{\pgfkeysvalueof{/pgf/number format/frac shift}}% + \let\pgfmathfloat@scalebaseten=\pgfmathresult + \pgfmathfloatmultiply@{\pgfmathfloat@inv}{\pgfmathfloat@scalebaseten}% + \let\pgfmathfloat@factor=\pgfmathresult + % + \expandafter\pgfmathfloatparsenumber\expandafter{\the\pgfmathfloat@a@Mtok}% + \let\pgfmathfloat@loc@TMPa=\pgfmathresult + \pgfmathfloatmultiply@{\pgfmathfloat@factor}{\pgfmathfloat@loc@TMPa}% + \pgfmathfloattofixed\pgfmathresult + \let\pgfmathfloat@scaled@counter=\pgfmathresult + % + \pgfmathfloattofixed\pgfmathfloat@factor + \expandafter\pgfmathfloat@loc@@to@int\pgfmathresult\relax{\pgfmathfloat@b@S}% + \edef\pgfmathfloat@factor{\the\pgfmathfloat@b@S}% + \fi + % + \let\pgfmathresultcounter=\pgfmathfloat@b@S + \let\pgfmathresultdenom=\pgfmathfloat@b@E + % + \pgfmathresultdenom=\pgfmathfloat@factor\relax + \pgfmathfloat@multiply@ten@to@the@E\pgfmathresultdenom + % + \expandafter\pgfmathfloat@loc@@to@int\pgfmathfloat@scaled@counter\relax{\pgfmathresultcounter}% +%\message{scale = \pgfmathfloat@factor; Z = \the\pgfmathresultcounter\space ( von \pgfmathfloat@scaled@counter), N = \the\pgfmathresultdenom.}% + % + \pgfmathgreatestcommondivisor{\pgfmathresultcounter}{\pgfmathresultdenom}% + \divide\pgfmathresultcounter by\pgfmathresult\relax + \divide\pgfmathresultdenom by\pgfmathresult\relax + \ifpgfmathprintnumber@frac@warn + \ifnum\pgfmathresultdenom>1000 + \pgfutil@ifundefined{FPdiv}{% + \pgfmathfloattosci@\pgfmathfloat@arg + \immediate\write16{! Package pgf /pgf/number format/frac warning=true: /pgf/number format/frac of `\pgfmathresult' = \the\pgfmathresultcounter\space / \the\pgfmathresultdenom\space might be large due to instabilities. Try \string\usepackage{fp} to improve accuracy.}% + }{}% + \fi + \fi + \ifnum\pgfmathfloat@a@S<0 + \edef\pgfmathresult{{-\pgfmathfloat@wholenumber}{\the\pgfmathresultcounter}{\the\pgfmathresultdenom}}% + \else + \edef\pgfmathresult{{\pgfmathfloat@wholenumber}{\the\pgfmathresultcounter}{\the\pgfmathresultdenom}}% + \fi + \fi + \pgfmath@smuggleone\pgfmathresult + \endgroup +}% +\def\pgfmathfloat@gobble@until@relax#1\relax{} + +% computes the greatest common divisor of two integer numbers (in +% integer arithmetics). +\def\pgfmathgreatestcommondivisor#1#2{% + \begingroup + \count0=#1\relax + \count1=#2\relax + \ifnum\count0=0 + \edef\pgfmathresult{\the\count1}% + \else + \pgfmathgreatestcommondivisor@loop + \edef\pgfmathresult{\the\count0}% + \fi + \pgfmath@smuggleone\pgfmathresult + \endgroup +} +\def\pgfmathgreatestcommondivisor@loop{% + \ifnum\count1=0 + \else + \ifnum\count0>\count1 + \advance\count0 by-\count1 + \else + \advance\count1 by-\count0 + \fi + \expandafter\pgfmathgreatestcommondivisor@loop + \fi +}% + +% multiplies a TeX register by 10^E where E is stored in the register +% \pgfmathfloat@a@E (and it should be positive!)% +% +% #1 a TeX register +\def\pgfmathfloat@multiply@ten@to@the@E#1{% + \ifnum\pgfmathfloat@a@E>0 + \multiply#1 by10 + \advance\pgfmathfloat@a@E by-1 + \def\pgfmathfloat@multiply@ten@to@the@E@next{\pgfmathfloat@multiply@ten@to@the@E{#1}}% + \else + \let\pgfmathfloat@multiply@ten@to@the@E@next=\relax% + \fi + \pgfmathfloat@multiply@ten@to@the@E@next +}% \def\pgfmathprintnumber@INT@TRUNC#1{% \pgfmathfloatparsenumber{#1}% @@ -914,6 +1192,37 @@ \fi } +% Invokes '#2' if '#1' is actually an integer or '#3' if not. +% +% As a side--effect, \pgfretval will be set to the integer value if it +% actually *is* an integer. Otherwise, \pgfretval will contain the +% parsed floating point number. +% +% #1 a number constant (not necessarily a parsed float). +\def\pgfmathifisint#1#2#3{% + \gdef\pgfmathfloatisint@@{0}% + \begingroup + \pgfmathfloatparsenumber{#1}% + \let\pgfretval\pgfmathresult + \pgfmathfloat@to@FMeE@style\pgfmathresult + \expandafter\pgfmathfloatisint@\pgfmathresult\relax + \pgfmath@smuggleone\pgfretval + \endgroup + \if1\pgfmathfloatisint@@ #2\else #3\fi +}% +\def\pgfmathfloatisint@#1#2e#3\relax{% + \ifnum#1<3\relax + \pgfmathfloatcreate{#1}{#2}{#3}% + \pgfmathfloattofixed{\pgfmathresult}% + \def\pgfmathfloat@round@precision{6}% + \expandafter\pgfmathroundto\expandafter{\pgfmathresult}% + \ifpgfmathfloatroundhasperiod + \else + \let\pgfretval\pgfmathresult% + \gdef\pgfmathfloatisint@@{1}% + \fi + \fi +} \def\pgfmathprintnumber@INT@DETECT#1{% \pgfmathfloatparsenumber{#1}% @@ -926,8 +1235,10 @@ \ifnum#1<3\relax \pgfmathfloatcreate{#1}{#2}{#3}% \pgfmathfloattofixed{\pgfmathresult}% + \let\pgfmathfloat@round@precision@=\pgfmathfloat@round@precision \def\pgfmathfloat@round@precision{6}% \expandafter\pgfmathroundto\expandafter{\pgfmathresult}% + \let\pgfmathfloat@round@precision=\pgfmathfloat@round@precision@ \ifpgfmathfloatroundhasperiod \pgfmathprintnumber@SCI@issci#1#2e#3\relax \else @@ -979,7 +1290,9 @@ } \def\pgfmathprintnumber@SCI@issci#1#2e#3\relax{% + \begingroup \pgfmathfloatcreate{#1}{#2}{#3}% + \edef\pgfmathfloat@round@precision{\pgfmathprintnumber@sci@precision}% \ifpgfmathfloat@usezerofill@sci \pgfmathfloatroundzerofill{\pgfmathresult}% \else @@ -987,6 +1300,8 @@ \fi \pgfmathfloat@to@FMeE@style\pgfmathresult \expandafter\pgfmathfloatrounddisplaystyle\pgfmathresult\relax + \pgfmath@smuggleone\pgfmathresult + \endgroup } % Prints argument #1 using the current pretty printer environment (all @@ -994,6 +1309,11 @@ % % You may specify optional arguments with \pgfmathprintnumber[...]. \def\pgfmathprintnumber{% + % \protect allows to supply \pgfmathprintnumber inside of latex + % captions. The \csname yields \relax in case protect is undefined. + \csname protect\endcsname\pgfmathprintnumber@protected +}% +\def\pgfmathprintnumber@protected{% \pgfutil@ifnextchar[% {\pgfmathprintnumber@OPT}% {\pgfmathprintnumber@noopt}% @@ -1063,11 +1383,7 @@ \expandafter\let\expandafter\pgfmathprintnumber@issci\csname #1@issci\endcsname } -\pgfmath@set@number@printer{pgfmathprintnumber@STD} -%\pgfmath@set@number@printer{pgfmathprintnumber@FIXED} -%\pgfmath@set@number@printer{pgfmathprintnumber@FIXED@ZEROFILL} -%\pgfmath@set@number@printer{pgfmathprintnumber@SCI@ZEROFILL} -%\pgfmath@set@number@printer{pgfmathprintnumber@SCI} +\pgfkeys{/pgf/number format/std} %%%%%%%%%%%%%%%%%%%%%%%%%% % diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzexternal.sty b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzexternal.sty index eefc385245e..7814fb566f6 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzexternal.sty +++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzexternal.sty @@ -14,7 +14,7 @@ %%% - nested \input commands have been updated %%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%% Date of this copy: Di 29. Dez 22:11:16 CET 2009 %%% +%%% Date of this copy: Mi 31. Mär 21:41:41 CEST 2010 %%% @@ -45,7 +45,7 @@ \toksdef\t@tikzexternal@tmpb=1 \def\tikzexternalize{\@ifnextchar[{\tikzexternalize@opt}{\tikzexternalize@opt[]}}% -\def\tikzexternalize@opt[#1]#2{\def\tikzexternal@realjob{#2}} +\def\tikzexternalize@opt[#1]{\@ifnextchar\bgroup{\def\tikzexternal@realjob}{\let\tikzexternal@realjob=\jobname}}% \def\tikzsetnextfilename#1{\gdef\tikzexternal@nextfile{#1}} \def\tikzsetexternalprefix#1{\def\tikzexternal@filenameprefix{#1}} diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzexternalshared.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzexternalshared.code.tex index 1993db33660..1e788bd5a27 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzexternalshared.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzexternalshared.code.tex @@ -14,11 +14,11 @@ %%% - nested \input commands have been updated %%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%% Date of this copy: Di 29. Dez 22:11:16 CET 2009 %%% +%%% Date of this copy: Mi 31. Mär 21:41:41 CEST 2010 %%% -% Copyright 2008 by Christian Feuersaenger +% Copyright 2008-2010 by Christian Feuersaenger % % This file may be distributed and/or modified % @@ -87,7 +87,24 @@ \tikzexternalgetnextfilename\tikzexternal@temp \tikzifexternaljobnamematches\tikzexternal@temp{#1}{#2}% \else - #2 + #2% + \fi +}% +% Invokes '#1' if the external lib is currently externalizing the +% current picture. It invokes '#2' if that is not the case. +% +% If the command is invoked outside of a picture, '#2' will be +% invoked. +\def\tikzifexternalizingcurrent#1#2{% + \ifpgf@external@grabshipout + \tikzexternalgetcurrentfilename\tikzexternal@temp + \ifx\tikzexternal@temp\pgfutil@empty + #2% + \else + \tikzifexternaljobnamematches\tikzexternal@temp{#1}{#2}% + \fi + \else + #2% \fi }% @@ -96,25 +113,49 @@ % \def\tikzifexternaljobnamematches#1#2#3{% \edef\pgf@tempa{\expandafter\string\csname#1\endcsname}% - \edef\pgf@tempb{\expandafter\string\csname\jobname\endcsname}% + \edef\pgf@tempb{\expandafter\string\csname\pgfactualjobname\endcsname}% \ifx\pgf@tempa\pgf@tempb #2\else#3 \fi% }% + +\pgfutil@ifundefined{pdfshellescape}{% + \def\tikzexternalcheckshellescape{}% +}{% + \ifnum\pdfshellescape=1 + \def\tikzexternalcheckshellescape{\pgfkeysvalueof{/tikz/external/shell escape}\space}% + \else + \def\tikzexternalcheckshellescape{}% + \fi +}% +\newif\iftikzexternal@auto@detect@jobname + \pgfqkeys{/tikz/external}{ figure list/.is if=tikzexternal@genfigurelist, - figure list=true, + aux in dpth/.style={/pgf/images/aux in dpth=#1},% % 'mode' applies only if \jobname==real job name. mode/.is choice, - mode/only graphics/.code = {\def\tikzexternal@opmode{0}}, + mode/only graphics/.code = {% + \def\tikzexternal@opmode{0}% + \pgfkeysalso{/pgf/images/aux in dpth=true}% + }, mode/no graphics/.code = {\def\tikzexternal@opmode{1}}, % an alias for 'no graphics:' mode/only pictures/.code = {\def\tikzexternal@opmode{1}}, - mode/graphics if exists/.code= {\def\tikzexternal@opmode{2}}, + mode/graphics if exists/.code= {% + \def\tikzexternal@opmode{2}% + \pgfkeysalso{/pgf/images/aux in dpth=true}% + }, mode/list only/.code = {\def\tikzexternal@opmode{3}\tikzexternal@genfigurelisttrue}, - mode/convert with system call/.code={\def\tikzexternal@opmode{4}\tikzexternal@genfigurelistfalse}, - mode/list and make/.code = {\def\tikzexternal@opmode{5}\tikzexternal@genfigurelisttrue}, + mode/convert with system call/.code={% + \def\tikzexternal@opmode{4}% + \pgfkeysalso{/tikz/external/figure list=false,/pgf/images/aux in dpth=false}% + }, + mode/list and make/.code = {% + \def\tikzexternal@opmode{5}% + \pgfkeysalso{/tikz/external/figure list=true,/pgf/images/aux in dpth=true}% + }, mode=convert with system call, - system call/.initial={pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "\image" "\texsource"}, + system call/.initial={pdflatex \tikzexternalcheckshellescape -halt-on-error -interaction=batchmode -jobname "\image" "\texsource"}, % system call/.initial={pdflatex -interaction=batchmode -jobname '\image' '\texsource'; pdftops -eps \image.pdf}, force remake/.is if=tikzexternal@force@remake, force remake/.default=true, @@ -125,7 +166,9 @@ verbose IO/.is if=tikzexternal@verboseio, verbose IO/.default=true, verbose IO=true, + shell escape/.initial=-shell-escape, verbose optimize/.is if=tikzexternal@verbose@optimize, + read main aux/.is if=pgfexternalreadmainaux, optimize/.is choice, optimize/true/.code={% \tikzexternal@optimizetrue @@ -207,11 +250,20 @@ % This method initialises automatic externalization. % -% The first argument is the job's real name, without suffix. +% The command does need any argument, but it has two optional ones: % -% \tikzexternalize{myarticle} +% 1. \tikzexternalize[<options>] % -% Doing so will +% 2. \tikzexternalize{<real job's name>} +% +% 3. \tikzexternalize[<options>]{<real job's name>} +% +% The <real job's name> is the job's file name, without the suffix +% .tex . +% If the <real job's name> is omitted, it will be deduced +% automatically. +% +% The effect is: % 1. automatically surround EVERY tikzpicture by \beginpgfgraphicnamed % sections. % 2. in case that the job's real name and the current \jobname differ, % it will process ONLY the matching tikzpicture. @@ -222,22 +274,137 @@ \tikzexternalize@opt[]% }% }% -\def\tikzexternalize@hasbeencalled{0}% -\def\tikzexternalize@opt[#1]#2{% - \pgfqkeys{/tikz/external}{#1}% - \def\tikzexternal@realjob{#2}% - \pgfrealjobname{#2}% - \def\tikzexternalize@hasbeencalled{1}% - \tikzexternalenable - \def\tikzexternal@determineimgextension##1:##2\relax{\gdef\tikzexternal@imgext{##1}}% - \xdef\pgf@tempa{\pgfsys@imagesuffixlist}% - \expandafter\tikzexternal@determineimgextension\pgf@tempa\relax - \pgfutil@ifundefined{includegraphics}{% - \let\tikzexternal@orig@includegraphics=\relax +\def\tikzexternalize@opt[#1]{% + \pgfutil@ifnextchar\bgroup{% + \tikzexternal@auto@detect@jobnamefalse + \tikzexternalize@opt@withname[#1]% }{% - \let\tikzexternal@orig@includegraphics=\includegraphics + \tikzexternal@auto@detect@jobnametrue + \pgfutil@ifundefined{tikzexternalrealjob}{% + % ok, \tikzexternalrealjob is not known. + % Assume we are currently *not* externalizing. + \let\tikzexternalrealjob=\jobname + }{}% + \def\pgf@tempa{\tikzexternalize@opt@withname[#1]}% + \expandafter\pgf@tempa\expandafter{\tikzexternalrealjob}% }% +}% +\def\tikzexternalize@opt@withname[#1]#2{% + \gdef\tikzexternalrealjob{#2}% + \if1\tikzexternalize@hasbeencalled + \else + \pgfqkeys{/tikz/external}{#1}% + \def\tikzexternal@realjob{#2}% + \tikzexternalauxlock@init + \pgfrealjobname{#2}% + \def\tikzexternalize@hasbeencalled{1}% + \tikzexternalenable + \def\tikzexternal@determineimgextension##1:##2\relax{\gdef\tikzexternalimgextension{##1}}% + \xdef\pgf@tempa{\pgfsys@imagesuffixlist}% + \expandafter\tikzexternal@determineimgextension\pgf@tempa\relax + \pgfutil@ifundefined{includegraphics}{% + \let\tikzexternal@orig@includegraphics=\relax + }{% + \let\tikzexternal@orig@includegraphics=\includegraphics + }% + \let\tikzexternalfiledependsonfile=\tikzexternalfiledependsonfile@ACTIVE + \let\tikzpicturedependsonfile=\tikzpicturedependsonfile@ACTIVE + \fi } +\def\tikzexternalize@hasbeencalled{0}% + +% If mode=`convert with system call', the boolean \ifpgfexternalreadmainaux +% will be set depending on the current lock file. +% +% The idea is as follows: Suppose +% pdflatex -shell-escape mainjob.tex +% is running. +% +% While it runs, +% a) it modifies its mainjob.aux file, +% b) it issues pdflatex -jobname mainjob-figure0 mainjob.tex . +% +% The call (b) will try to read mainjob.aux in order to resolve \ref +% commands. This may fail since the aux +% file is not complete; it may be subject to output buffering. To +% avoid such failure, a locking mechanism is established. +% +% The locking mechanisms causes (a) to write a lock command into +% mainjob.auxlock +% just before (b) is called. Then, (b) will check it. After (b) has +% completed, the lock will be reset. +% +% Thus: mode=convert with system call does NOT support \ref commands +% inside of images. You will need to call the externalization command +% manually. In this case, it should work. +% +% @PRECONDITION : this command must be invoked AFTER +% \tikzexternal@realjob has been defined but BEFORE \pgfrealjobname is +% called. +% +% @POSTCONDITION : If \ifpgfexternalreadmainaux=\iffalse, we won't do +% anything. Otherwise, it will be changed depending for 'mode=convert +% with system call' if necessary. +\def\tikzexternalauxlock@init{% + \if4\tikzexternal@opmode + \ifpgfexternalreadmainaux + % mode=convert with system call + \edef\pgf@tempa{\expandafter\string\csname\tikzexternal@realjob\endcsname}% + \edef\pgf@tempb{\expandafter\string\csname\jobname\endcsname}% + \ifx\pgf@tempa\pgf@tempb + % we are *not* externalizing. Set lock into its + % initial "unlocked" state. + \tikzexternalauxlock@setlock{0}% + \else + % we are externalizing. Query the lock's value: + \tikzexternalauxlock@getlockvalue + \if1\tikzexternallocked + \pgfexternalreadmainauxfalse + \else + \pgfexternalreadmainauxtrue + \fi + \fi + \else + % NO-OP. We won't read the main aux file anyway. + \def\tikzexternalauxlock@setlock##1{}% + \fi + \fi +} +% defines \tikzexternallocked to be either 0 or 1, depending on the +% lock file. +\def\tikzexternalauxlock@getlockvalue{% + \openin\r@pgf@reada=\tikzexternal@realjob.auxlock + \ifeof\r@pgf@reada + % no lock file. Unlock. + \def\tikzexternallocked{0}% + \else + % read first line... + \read\r@pgf@reada to\pgf@tempa + % ... and execute it. + \pgf@tempa + % it should contain a definition of \tikzexternallocked. If + % not, lock it anyway. + \pgfutil@ifundefined + {tikzexternallocked} + {\def\tikzexternallocked{1}}% + {}% + \fi + \closein\r@pgf@reada +}% +\def\tikzexternalauxlock@setlock#1{% + \immediate\openout\w@pgf@writea=\tikzexternal@realjob.auxlock + \immediate\write\w@pgf@writea{\noexpand\def\noexpand\tikzexternallocked{#1}}% + \immediate\closeout\w@pgf@writea +} + +% Expands to the default image extension (it is set by +% \tikzexternalize). +% +% This image extension may not resemble the correct one; you may need +% to overwrite this macro *after* \tikzexternalize in this case. +% +% The default setting uses the first registered image extension. +\def\tikzexternalimgextension{}% % can be used to (temporarily) disable the externalization. \def\tikzexternaldisable{% @@ -339,6 +506,7 @@ \let\tikzexternal@origtikz=\tikz \let\tikzexternal@origpicture=\tikzpicture \let\tikzexternal@origendpicture=\endtikzpicture +\let\tikzexternal@curfilename=\relax % Replacement for '\tikzpicture'. % @@ -348,6 +516,7 @@ % externalize the picture selected by 'jobname' (and only this picture). \def\tikzexternal@tikzpicture@replacement{% \leavevmode + \global\tikzexternal@file@isuptodatetrue% may be set to false during checks. \tikzexternal@getnextfilename\tikzexternal@curfilename \ifx\tikzexternal@curfilename\pgfutil@empty \ifpgf@external@grabshipout @@ -455,11 +624,28 @@ \def\tikzexternalgetnextfilename#1{% \begingroup \let\tikzexternal@getnextfilename@advancecount\relax% NOP + \def\tikzexternal@protocol@to@file##1{}% NOP \tikzexternal@getnextfilename#1% \pgfmath@smuggleone#1% \endgroup }% +% Returns the file name of the current picture. +% +% It returns the empty string in case the command is invoked outside +% of a picture. +% #1 the macro which will contain the file name. +% @see \tikzexternalgetnextfilename +\def\tikzexternalgetcurrentfilename#1{% + \ifx\tikzexternal@curfilename\relax + % we are outside of a picture. + \let#1=\pgfutil@empty + \else + % we are inside of a picture. + \let#1=\tikzexternal@curfilename + \fi +} + % Fills #1 with a filename for the current picture. % % The filename will be generated automatically by appending '-figure<number>' to the real jobname. @@ -506,36 +692,24 @@ \global\let\tikzexternal@nextfile=\pgfutil@empty \global\tikzexternalexportnexttrue % - % Handle verbose output: + \tikzexternal@protocol@to@file#1% +}% + +% #1: the image file name which should be protocolled. (can be a +% macro) +\def\tikzexternal@protocol@to@file#1{% \ifpgf@external@grabshipout% \else \iftikzexternal@genfigurelist - \ifx#1\pgfutil@empty + \edef\tikzexternal@temp{#1}% + \ifx\tikzexternal@temp\pgfutil@empty \else \pgfutil@ifundefined{tikzexternal@listmode@openedfile}{% \message{Opening '\tikzexternal@realjob.figlist' for writing.}% \immediate\openout\tikzexternal@outfile=\tikzexternal@realjob.figlist\relax \gdef\tikzexternal@listmode@openedfile{1}% \if\tikzexternal@opmode5% mode='list and make' - \iftikzexternal@verboseio - \immediate\write16{Opening '\tikzexternal@realjob.makefile' for writing.}% - \fi - \begingroup - % this makes \tikzexternal@outmakefile global: - \globaldefs=1 - % this gets round '\outer\newwrite' in plain TeX: - \csname newwrite\endcsname\tikzexternal@outmakefile - \endgroup - \immediate\openout\tikzexternal@outmakefile=\tikzexternal@realjob.makefile\relax - \immediate\write\tikzexternal@outmakefile{ALL_FIGURE_NAMES=\tikzexternal@DOLLARchar(shell cat \tikzexternal@realjob.figlist)}% - \immediate\write\tikzexternal@outmakefile{ALL_FIGURES=\tikzexternal@DOLLARchar(ALL_FIGURE_NAMES:\tikzexternal@PERCENTchar=\tikzexternal@PERCENTchar\tikzexternal@imgext)}% - \immediate\write\tikzexternal@outmakefile{}% - \immediate\write\tikzexternal@outmakefile{allimages: \tikzexternal@DOLLARchar(ALL_FIGURES)}% - \immediate\write\tikzexternal@outmakefile{\tikzexternal@TABchar @echo All images exist now. Use make -B to re-generate them.}% - \immediate\write\tikzexternal@outmakefile{}% - \pgfutil@ifundefined{AtEndDocument}{}{% - \AtEndDocument{\immediate\write16{===== mode=`list and make': Use 'make -f \tikzexternal@realjob.makefile' to generate all images. Then, re-run (pdf)latex \tikzexternal@realjob. =====}}% - }% + \tikzexternal@list@and@make@prepare \fi }{}% \iftikzexternal@verboseio @@ -543,19 +717,147 @@ \fi \immediate\write\tikzexternal@outfile{#1}% \if\tikzexternal@opmode5% mode='list and make' - \tikzexternal@assemble@systemcall{\pgf@tempa}% - \iftikzexternal@verboseio - \immediate\write16{Writing '#1' to '\tikzexternal@realjob.makefile'.}% - \fi - \immediate\write\tikzexternal@outmakefile{#1\tikzexternal@imgext:}% - \immediate\write\tikzexternal@outmakefile{\tikzexternal@TABchar\pgf@tempa}% - \immediate\write\tikzexternal@outmakefile{}% + \tikzexternal@list@and@make@gentarget{#1}% \fi \fi \fi \fi }% +\def\tikzexternal@list@and@make@gentarget#1{% + \tikzexternal@assemble@systemcall{#1}{\pgf@tempa}% + \iftikzexternal@verboseio + \immediate\write16{Writing '#1' to '\tikzexternal@realjob.makefile'.}% + \fi + \global\tikzexternal@file@isuptodatetrue% only check for force remake: + \tikzexternal@checkforceremake% + \immediate\write\tikzexternal@outmakefile{#1\tikzexternalimgextension: \iftikzexternal@file@isuptodate\else FORCEREMAKE\fi}% + \immediate\write\tikzexternal@outmakefile{\tikzexternal@TABchar\pgf@tempa}% + \immediate\write\tikzexternal@outmakefile{}% +} + +\def\tikzexternal@list@and@make@prepare{% + \iftikzexternal@verboseio + \immediate\write16{Opening '\tikzexternal@realjob.makefile' for writing.}% + \fi + \begingroup + % this makes \tikzexternal@outmakefile global: + \globaldefs=1 + % this gets round '\outer\newwrite' in plain TeX: + \csname newwrite\endcsname\tikzexternal@outmakefile + \endgroup + \immediate\openout\tikzexternal@outmakefile=\tikzexternal@realjob.makefile\relax + \immediate\write\tikzexternal@outmakefile{ALL_FIGURE_NAMES=\tikzexternal@DOLLARchar(shell cat \tikzexternal@realjob.figlist)}% + \immediate\write\tikzexternal@outmakefile{ALL_FIGURES=\tikzexternal@DOLLARchar(ALL_FIGURE_NAMES:\tikzexternal@PERCENTchar=\tikzexternal@PERCENTchar\tikzexternalimgextension)}% + \immediate\write\tikzexternal@outmakefile{}% + \immediate\write\tikzexternal@outmakefile{allimages: \tikzexternal@DOLLARchar(ALL_FIGURES)}% + \immediate\write\tikzexternal@outmakefile{\tikzexternal@TABchar @echo All images exist now. Use make -B to re-generate them.}% + \immediate\write\tikzexternal@outmakefile{}% + \immediate\write\tikzexternal@outmakefile{FORCEREMAKE:}% + \immediate\write\tikzexternal@outmakefile{}% + % + % support for .dep files and auto-dependencies: + \immediate\write\tikzexternal@outmakefile{include $(ALL_FIGURE_NAMES:\tikzexternal@PERCENTchar=\tikzexternal@PERCENTchar.\tikzexternaldepext)}% + \immediate\write\tikzexternal@outmakefile{}% + \tikzexternalmakefiledefaultdeprule + \immediate\write\tikzexternal@outmakefile{}% + \tikzexternal@outmakefile@pendingcommands + \pgfutil@ifundefined{AtEndDocument}{}{% + \AtEndDocument{\immediate\write16{===== mode=`list and make': Use 'make -f \tikzexternal@realjob.makefile' to generate all images. Then, re-run (pdf)latex \tikzexternal@realjob. =====}}% + }% +}% +\def\tikzexternaldepext{dep} + +\def\tikzexternalmakefiledefaultdeprule{% + \immediate\write\tikzexternal@outmakefile{\tikzexternal@PERCENTchar.\tikzexternaldepext:}% + \immediate\write\tikzexternal@outmakefile{\tikzexternal@TABchar touch $@ \tikzexternal@HASHchar\space will be filled later.}% +}% + +% Invokes '#1' if a makefile is to be written and '#2' if not. +\def\tikzexternalifwritesmakefile#1#2{% + \if5\tikzexternal@opmode #1\else #2\fi +}% +\def\tikzexternal@outmakefile@pendingcommands{}% + +% Will write something to the make file. If the makefile is not yet +% opened, #1 will be written as soon as it *is* opened. +\def\tikzexternalwritetomakefile#1{% + \pgfutil@ifundefined{tikzexternal@outmakefile}{% + \expandafter\gdef\expandafter\tikzexternal@outmakefile@pendingcommands\expandafter{% + \tikzexternal@outmakefile@pendingcommands + \immediate\write\tikzexternal@outmakefile{#1}% + }% + }{% + \immediate\write\tikzexternal@outmakefile{#1}% + }% +}% + +\def\tikzexternal@dep@file@name{} + +% Adds a dependency for the externalized picture file name `#1', +% namely another file `#2'. +% +% #1: the fully qualified path name (without image extension) of the +% external graphics for which we are adding a dependency. +% #2: a file name. If this file gets changed, #1 shall be remade. +% +% This command will be actived as soons as \tikzexternalize has been +% called. +\def\tikzexternalfiledependsonfile@ACTIVE#1#2{% + \begingroup + \def\tikzpicturedependsonfile@name{#1}% + \ifx\tikzpicturedependsonfile@name\pgfutil@empty + % could be auto-generated: empty file name means "picture + % won't be externalized". Skip it. + \else + \edef\tikzpicturedependsonfile@name{#1.\tikzexternaldepext}% + \ifx\tikzexternal@dep@file@name\tikzpicturedependsonfile@name + % file is open and ready. + \else + % create new output file. + \pgfutil@ifundefined{tikzexternal@dep@file}{% + \begingroup + % this makes \tikzexternal@dep@file global: + \globaldefs=1 + % this gets round '\outer\newwrite' in plain TeX: + \csname newwrite\endcsname\tikzexternal@dep@file + \endgroup + }{}% + \ifx\tikzexternal@dep@file@name\pgfutil@empty + \else + % it is already open. Close it. + \immediate\closeout\tikzexternal@dep@file + \fi + \global\let\tikzexternal@dep@file@name=\tikzpicturedependsonfile@name + \immediate\openout\tikzexternal@dep@file=\tikzexternal@dep@file@name\relax + \fi + \immediate\write\tikzexternal@dep@file{#1\tikzexternalimgextension: #2}% + \fi + \endgroup +}% +\def\tikzexternalfiledependsonfile#1#2{}% NO-OP until \tikzexternalize has been called. + +% Adds a dependency for the NEXT picture which is about to be +% externalized. If we are currently inside of a picture, the +% dependency is added for this current picture. +% +% #1: a file name. If this file gets changed, the tikzpicture's +% externalized graphics shall be remade. +% +% This command will be actived as soons as \tikzexternalize has been +% called. +\def\tikzpicturedependsonfile@ACTIVE#1{% + \begingroup + \tikzexternalgetcurrentfilename\tikzpicturedependsonfile@name + \ifx\tikzpicturedependsonfile@name\pgfutil@empty + \tikzexternalgetnextfilename\tikzpicturedependsonfile@name + \fi + \expandafter\tikzexternalfiledependsonfile\expandafter{\tikzpicturedependsonfile@name}{#1}% + \endgroup +}% +\def\tikzpicturedependsonfile#1{}% NO-OP until \tikzexternalize has been called. + + % This command is invoked % if and only if ( (grab mode && --jobname matches) || 'mode=graphics if exists' ) % @@ -616,29 +918,6 @@ \tikzpicture }% -% FIXME : this does not respect catcode changes! -%-------------------------------------------------- -% \long\def\tikzexternal@externalizefig@@#1{% -% \let\tikzpicture=\tikzexternal@origpicture -% \iftikzexternal@optimize -% \ifpgf@external@grabshipout -% \tikzexternal@optimize@RESTORE -% \fi -% \fi -% \expandafter\beginpgfgraphicnamed\expandafter{\tikzexternal@curfilename}% -% \tikzpicture -% #1 -% \endtikzpicture -% \endpgfgraphicnamed -% \let\tikzpicture=\tikzexternal@tikzpicture@replacement -% \iftikzexternal@optimize -% \ifpgf@external@grabshipout -% \tikzexternal@optimize@REPLACE -% \fi -% \fi -% \tikzexternal@closeenvironments -% }% -%-------------------------------------------------- % Used by the optimization code. % It will be called if GRAB mode is on. @@ -753,6 +1032,7 @@ \let\endtikzpicture=\relax \tikzexternal@TEXDIALECT@endpicture \let\endtikzpicture=\tikzexternal@origendpicture + \let\tikzexternal@curfilename=\relax } % Throws a tikzpicture away - without further notice. @@ -921,20 +1201,30 @@ \catcode`\^^I=12 \catcode`\$=12 \catcode`\%=12 -\xdef\tikzexternal@TABchar{^^I}\xdef\tikzexternal@PERCENTchar{%}\xdef\tikzexternal@DOLLARchar{$}} +\catcode`\#=12 +\gdef\tikzexternal@HASHchar{#} +\gdef\tikzexternal@TABchar{^^I}\gdef\tikzexternal@PERCENTchar{%}\xdef\tikzexternal@DOLLARchar{$}} % Creates the '/tikz/external/system call' command as string and -% returns it into the (global!) macro #1. -\def\tikzexternal@assemble@systemcall#1{% +% returns it into the (global!) macro #2. +% #1: the image file name (as returned by +% \tikzexternalgetnextfilename) +% #2: the global return value macro +% +\def\tikzexternal@assemble@systemcall#1#2{% \begingroup - \let\image=\tikzexternal@curfilename - \let\texsource=\tikzexternal@realjob + \def\image{#1}% + \iftikzexternal@auto@detect@jobname + \edef\texsource{\string\def\string\tikzexternalrealjob{\tikzexternal@realjob}\string\input{\tikzexternal@realjob}}% + \else + \let\texsource=\tikzexternal@realjob + \fi \ifnum\the\catcode`\"=13 \tikzexternal@activate@normal@dq\fi \ifnum\the\catcode`\'=13 \tikzexternal@activate@normal@sq\fi \ifnum\the\catcode`\;=13 \tikzexternal@activate@normal@semic\fi \ifnum\the\catcode`\-=13 \tikzexternal@activate@normal@dash\fi \let\\=\tikzexternal@normal@backslash - \xdef#1{\pgfkeysvalueof{/tikz/external/system call}}% + \xdef#2{\pgfkeysvalueof{/tikz/external/system call}}% \endgroup }% \long\def\tikzexternal@externalizefig@systemcall@@#1{% @@ -947,11 +1237,14 @@ \else \begingroup % no such image. Generate it! - \tikzexternal@assemble@systemcall{\pgf@tempa}% + \tikzexternal@assemble@systemcall{\tikzexternal@curfilename}{\pgf@tempa}% \iftikzexternal@verboseio \immediate\write16{===== 'mode=convert with system call': Invoking '\pgf@tempa' ========}% \fi + % + \tikzexternalauxlock@setlock1% \immediate\write18{\pgf@tempa}% + \tikzexternalauxlock@setlock0% \expandafter\tikzexternal@externalizefig@systemcall@assertsuccess\expandafter{\pgf@tempa}% \pgfmath@smuggleone\pgf@filename \endgroup @@ -989,6 +1282,19 @@ \tikzexternal@externalizefig@systemcall@next }% +% Sets \iftikzexternal@file@isuptodate to false if one of the "force +% remake" things is active. +\def\tikzexternal@checkforceremake{% + \iftikzexternal@force@remake + \global\tikzexternal@file@isuptodatefalse + \else + \iftikzexternalremakenext + \global\tikzexternal@file@isuptodatefalse + \global\tikzexternalremakenextfalse + \fi + \fi +} + % Checks whether the current picture needs to be externalized. % % This is the case if @@ -997,23 +1303,15 @@ % % It returns \iftikzexternal@file@isuptodate accordingly. \def\tikzexternal@externalizefig@systemcall@uptodatecheck{% - \iftikzexternal@force@remake - \global\tikzexternal@file@isuptodatefalse - \else - \iftikzexternalremakenext + \tikzexternal@checkforceremake + \iftikzexternal@file@isuptodate + % check if there is already a file. + % In that case, use it. If that is not the case, generate it and include it afterwards. + \gdef\pgf@filename{}% + \xdef\pgf@tempa{\noexpand\pgf@findfile\pgfsys@imagesuffixlist:+{\tikzexternal@curfilename}}% + \pgf@tempa + \ifx\pgf@filename\pgfutil@empty% \global\tikzexternal@file@isuptodatefalse - \global\tikzexternalremakenextfalse - \else - % check if there is already a file. - % In that case, use it. If that is not the case, generate it and include it afterwards. - \gdef\pgf@filename{}% - \xdef\pgf@tempa{\noexpand\pgf@findfile\pgfsys@imagesuffixlist:+{\tikzexternal@curfilename}}% - \pgf@tempa - \ifx\pgf@filename\pgfutil@empty% - \global\tikzexternal@file@isuptodatefalse - \else - \global\tikzexternal@file@isuptodatetrue - \fi \fi \fi }% diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzlibraryexternal.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzlibraryexternal.code.tex index ee158b55427..a850f7f3608 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzlibraryexternal.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzlibraryexternal.code.tex @@ -14,7 +14,7 @@ %%% - nested \input commands have been updated %%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%% Date of this copy: Di 29. Dez 22:11:16 CET 2009 %%% +%%% Date of this copy: Mi 31. Mär 21:41:41 CEST 2010 %%% @@ -81,3 +81,8 @@ }% \def\tikzexternal@laTeX@collect@until@end@tikzpicturetikzpicturestring{tikzpicture}% +\AtBeginDocument{% + \pgfutil@ifundefined{tikzexternalrealjob}{% + \global\let\tikzexternalrealjob=\jobname + }{}% +}% diff --git a/Master/texmf-dist/tex/generic/pgfplots/pgfplots.code.tex b/Master/texmf-dist/tex/generic/pgfplots/pgfplots.code.tex index a5ba73ca4ad..bcc43c4051e 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/pgfplots.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/pgfplots.code.tex @@ -419,6 +419,7 @@ /pgfplots/descriptions/.is family, /pgfplots/style commands/.is family, /pgfplots/naming commands/.is family, + /pgfplots/shared with tikz/.is family, /pgfplots/error bars/.is family, /pgfplots/every axis/.style={}, /pgfplots/every axis/.append code={\pgfplotsdeprecatedstylecheck{/tikz/every axis}}, @@ -483,7 +484,9 @@ },% % will be defined in \pgfplotspoint@initialisation: %/tikz/sloped like x axis/.code={...},% - /pgfplots/every axis title/.style={at={(0.5,1)},above,yshift=6pt}, + /pgfplots/title shift/.code={\pgfplots@error{Sorry, there is no 'title shift' option. Consider using 'title style={yshift=...}' (or the low level 'every axis title shift' which works only together with the initial 'every axis title' style)}},% + /pgfplots/every axis title shift/.initial=6pt, + /pgfplots/every axis title/.style={at={(0.5,1)},above,yshift=\pgfkeysvalueof{/pgfplots/every axis title shift}}, /pgfplots/every axis title/.append code={\pgfplotsdeprecatedstylecheck{/tikz/every axis title}}, /pgfplots/every axis title/.belongs to family=/pgfplots/descriptions, /pgfplots/every tick/.style={very thin,gray}, @@ -778,7 +781,7 @@ /pgfplots/xticklabel=, /pgfplots/xticklabels/.belongs to family=/pgfplots/tick, /pgfplots/xticklabels/.code={% - \pgfplots@foreach@to@list{#1}\to\pgfplots@xticklabels + \pgfplotslistnew\pgfplots@xticklabels{#1}% \let\pgfplots@xticklabel=\pgfplots@user@ticklabel@list@x }, % #1 table name or macro @@ -790,7 +793,7 @@ /pgfplots/xticklabels from table/.belongs to family=/pgfplots/tick, /pgfplots/yticklabels/.belongs to family=/pgfplots/tick, /pgfplots/yticklabels/.code={% - \pgfplots@foreach@to@list{#1}\to\pgfplots@yticklabels + \pgfplotslistnew\pgfplots@yticklabels{#1}% \let\pgfplots@yticklabel=\pgfplots@user@ticklabel@list@y }, % #1 table name or macro @@ -805,7 +808,7 @@ /pgfplots/yticklabel=, /pgfplots/zticklabels/.belongs to family=/pgfplots/tick, /pgfplots/zticklabels/.code={% - \pgfplots@foreach@to@list{#1}\to\pgfplots@zticklabels + \pgfplotslistnew\pgfplots@zticklabels{#1}% \let\pgfplots@zticklabel=\pgfplots@user@ticklabel@list@z }, % #1 table name or macro @@ -832,15 +835,15 @@ /pgfplots/extra x tick label=, /pgfplots/extra x tick labels/.belongs to family=/pgfplots/tick, /pgfplots/extra x tick labels/.code={% - \pgfplots@foreach@to@list{#1}\to\pgfplots@extra@xticklabels + \pgfplotslistnew\pgfplots@extra@xticklabels{#1}% \let\pgfplots@extra@xticklabel=\pgfplots@user@extra@ticklabel@list@x }, /pgfplots/extra y tick labels/.code={% - \pgfplots@foreach@to@list{#1}\to\pgfplots@extra@yticklabels + \pgfplotslistnew\pgfplots@extra@yticklabels{#1}% \let\pgfplots@extra@yticklabel=\pgfplots@user@extra@ticklabel@list@y }, /pgfplots/extra z tick labels/.code={% - \pgfplots@foreach@to@list{#1}\to\pgfplots@extra@zticklabels + \pgfplotslistnew\pgfplots@extra@zticklabels{#1}% \let\pgfplots@extra@zticklabel=\pgfplots@user@extra@ticklabel@list@z }, /pgfplots/xtick/.store in= \pgfplots@xtick, @@ -1274,6 +1277,7 @@ /pgfplots/legend plot pos/none/.code= {\def\pgfplots@legend@plot@pos{2}}, /pgfplots/legend plot pos/none/.belongs to family=/pgfplots/legend, /pgfplots/legend plot pos=left, + /pgfplots/every legend image post/.code={},% /pgfplots/line legend/.style={% /pgfplots/legend image code/.code={% \draw[mark repeat=2,mark phase=2,##1] @@ -1449,6 +1453,8 @@ \fi} }, /pgfplots/translate gnuplot/.is if=pgfplots@translategnuplot, + /pgfplots/parametric/var 2d/.initial={\u,\v}, + /pgfplots/parametric/var 1d/.initial=\t, /pgfplots/xfilter/.initial=,% DEPRECATED /pgfplots/yfilter/.initial=,% DEPRECATED /pgfplots/zfilter/.initial=,% DEPRECATED @@ -1465,16 +1471,17 @@ /pgfplots/samples at/.initial=,% empty -> use value of /tikz/samples at! /pgfplots/samples/.initial=,% empty -> use /tikz/samples! /pgfplots/samples y/.initial=,% empty -> use the same as 'samples'. For use in mesh plots. + /pgfplots/variable/.code={\pgfkeysalso{/tikz/variable={#1}}}, /pgfplots/variable y/.initial=\y,% % and provide aliases in the '/pgfplots/' tree to avoid % search path problems just for the following options: - /pgfplots/name/.belongs to family=/pgfplots/naming commands, /pgfplots/name/.code={\pgfkeysalso{/tikz/name={#1}}}, - /pgfplots/alias/.belongs to family=/pgfplots/naming commands, + /pgfplots/overlay/.code={\pgfkeysalso{/tikz/overlay={#1}}}, /pgfplots/alias/.code={\pgfkeysalso{/tikz/alias={#1}}}, /pgfplots/id/.code={\pgfkeysalso{/tikz/id={#1}}}, /pgfplots/prefix/.code={\pgfkeysalso{/tikz/prefix={#1}}}, /pgfplots/raw gnuplot/.code={\pgfkeysalso{/tikz/raw gnuplot={#1}}}, + /pgfplots/parametric/.code={\pgfkeysalso{/tikz/parametric={#1}}},% % /pgfplots/width/.initial=,% /pgfplots/width/.belongs to family=/pgfplots, @@ -2682,22 +2689,39 @@ /pgfplots/max space between ticks=35, }, /pgfplots/small/.style={ - /pgfplots/width=6.5cm, - /pgfplots/height=, - /pgfplots/max space between ticks=25, + width=6.5cm, + height=, + tick label style={font=\footnotesize}, + label style={font=\small}, + max space between ticks=25, }, /pgfplots/footnotesize/.style={ - /pgfplots/width=5cm, - /pgfplots/height=, + width=5cm, + height=, legend style={font=\footnotesize}, tick label style={font=\footnotesize}, label style={font=\small}, - /pgfplots/max space between ticks=15, + title style={font=\small}, + every axis title shift=0pt, + max space between ticks=15, every mark/.append style={mark size=8}, major tick length=0.1cm, minor tick length=0.066cm, - %ylabel style={yshift=-0.3cm}, }, + /pgfplots/tiny/.style={ + width=4cm, + height=, + legend style={font=\tiny}, + tick label style={font=\tiny}, + label style={font=\tiny}, + title style={font=\footnotesize}, + every axis title shift=0pt, + max space between ticks=12, + every mark/.append style={mark size=6}, + major tick length=0.1cm, + minor tick length=0.066cm, + every legend image post/.append style={scale=0.8}, + }, /pgfplots/cube/set size/.code 2 args={% \expandafter\def\csname pgfplots@cube@gethalf@#1\endcsname{% \afterassignment\pgfplots@gobble@until@relax @@ -2716,15 +2740,17 @@ /pgfplots/ztick placement tolerance/.initial=0.05pt, /pgfplots/compat/anchors/.is choice, /pgfplots/compat/anchors/pre 1.3/.code={\pgfplots@deprecated@anchorstrue},% FIXME: WAS \global - /pgfplots/compat/anchors/newest/.code= {\pgfplots@deprecated@anchorsfalse},% - /pgfplots/compat/anchors/default/.code={\pgfplots@deprecated@anchorsfalse},% + /pgfplots/compat/anchors/1.3/.code= {\pgfplots@deprecated@anchorsfalse},% + /pgfplots/compat/anchors/newest/.style= {/pgfplots/compat/anchors/1.3},% + /pgfplots/compat/anchors/default/.style={/pgfplots/compat/anchors/1.3},% /pgfplots/compat/labels/.is choice, /pgfplots/compat/labels/pre 1.3/.style={% /pgfplots/xlabel absolute, /pgfplots/ylabel absolute},% - /pgfplots/compat/labels/newest/.style={% + /pgfplots/compat/labels/1.3/.style={% /pgfplots/xlabel near ticks, /pgfplots/ylabel near ticks},% + /pgfplots/compat/labels/newest/.style={/pgfplots/compat/labels/1.3},% /pgfplots/compat/labels/default/.style={/pgfplots/compat/labels/pre 1.3},% maintain backwards compatibility for labels :-( /pgfplots/compat/.style={% /pgfplots/compat/anchors=#1,% @@ -2771,8 +2797,46 @@ \pgfplotspointrelaxisxyz{-0.03}{-0.03}{-0.03}% \fi }, + /pgfplots/profiler/.code={% + \pgfutil@ifundefined{pgfprofilenew}{% + \usepgflibrary{profiler}% + }{}% + \pgfprofilenewforenvironment[all axes]{pgfplots@environment@opt}% + \pgfprofilesetrel{all axes}% + \pgfprofilenewforcommand[pgfkeys variants]{\pgfkeys}{1}% + \pgfprofilenewforcommand[pgfkeys variants]{\pgfqkeys}{2}% + \pgfprofilenewforcommand[pgfkeys variants]{\pgfkeysalso}{1}% + \pgfprofilenewforcommand[pgfkeys variants]{\pgfkeysfiltered}{1}% + \pgfprofilenewforcommand[pgfkeys variants]{\pgfqkeysfiltered}{2}% + \pgfprofilenewforcommand[pgfkeys variants]{\pgfkeysalsofiltered}{1}% + \pgfprofilenewforcommand[pgfplotsapplistXX handling]{\pgfplotsapplistXXpushback}{1}% + \pgfprofilenewforcommand[pgfplotsapplistXX handling]{\pgfplotsapplistXXflushbuffers}{0}% + \pgfprofilenewforcommandpattern + [pgfplots(app|prepent)listX handling]{\pgfplotsapplistXpushback}{##1\to##2}{{##1}\to{##2}}% + \pgfprofilenewforcommand + [pgfplots(app|prepent)listX handling]{\pgfplotsapplistXflushbuffers}{1}% + \pgfprofilenewforcommandpattern + [pgfplots(app|prepent)listX handling]{\pgfplotsprependlistXpushfront}{##1\to##2}{{##1}\to{##2}}% + \pgfprofilenewforcommand + [pgfplots(app|prepend)listX handling]{\pgfplotsprependlistXflushbuffers}{1}% + \pgfprofilenewforcommand[math parser (basic)]{\pgfmathparse}{1}% + \pgfprofilenewforcommand[math parser (fpu)]{\pgfmathfloatparse@}{1}% + \pgfprofilenewforcommand[math: division (basic)]{\pgfmathdivide@}{2}% + \pgfprofilenewforcommand[math: division (basic)]{\pgfmath@basic@divide@}{2}% + \pgfprofilenewforcommand[near ticklabel anchors]{\pgfplots@borderanchor@for@axis}{3}% + \pgfprofilenewforcommand[ticklabel cs]{\pgfplotspointticklabelcs}{2}% + },% +} + +% call +% \pgfkeyslet{.../.@cmd}\pgfplots@cant@set@in@this@context +% to replace a key with a generic error message. +\def\pgfplots@cant@set@in@this@context#1\pgfeov{\pgfplots@cant@set@in@this@context@} +\def\pgfplots@cant@set@in@this@context@{% + \pgfplotsthrow{unsupported operation}{Sorry, you can't change `\pgfkeyscurrentkeyRAW' in this context. Maybe you need to provide it as \string\begin{axis}[\pgfkeyscurrentkeyRAW=...] ?}\pgfeov } + { \pgfkeysdef{/pgfplots/empty command key}{}% \pgfkeysgetvalue{/pgfplots/empty command key/.@cmd}\pgfplots@loc@TMPa @@ -2873,7 +2937,7 @@ % #1 axis (x or y) % #2 the label -\def\pgfplots@show@label#1#2{% +\long\def\pgfplots@show@label#1#2{% \begingroup % Prepare special alignment features here. % @@ -2904,7 +2968,7 @@ } -\def\pgfplots@show@title#1{% +\long\def\pgfplots@show@title#1{% \node% [/pgfplots/every axis title] {#1}; @@ -3290,15 +3354,20 @@ \pgfplots@addlegendentryexpanded@opts[]% }% } -\def\pgfplots@addlegendentryexpanded@opts[#1]#2{% +\long\def\pgfplots@addlegendentryexpanded@opts[#1]#2{% \begingroup \let\protect=\noexpand - \edef\pgfplots@loc@TMPa{#2}% + \long\edef\pgfplots@loc@TMPa{#2}% \def\pgfplots@loc@TMPb{\pgfplots@addlegendentry@opts[#1]}% \expandafter\pgfplots@loc@TMPb\expandafter{\pgfplots@loc@TMPa}% \endgroup }% +\def\pgfplots@addlegendimage{\pgfutil@ifnextchar[{\pgfplots@addlegendimage@opt}{\pgfplots@addlegendimage@opt[]}}% +\def\pgfplots@addlegendimage@opt[#1]#2{% + \pgfplots@rememberplotspec[#1]{/pgfplots/every axis plot,#2,/pgfplots/.cd,/pgfplots/every axis plot post}% +}% + \def\pgfplots@addlegendentry{% \pgfutil@ifnextchar[{% \pgfplots@addlegendentry@opts @@ -3306,7 +3375,7 @@ \pgfplots@addlegendentry@opts[]% }% } -\def\pgfplots@addlegendentry@opts[#1]#2{% +\long\def\pgfplots@addlegendentry@opts[#1]#2{% \pgfplotslistpushbackglobal[#1]#2\to\pgfplots@legend } @@ -3343,7 +3412,7 @@ \long\def\pgfplots@show@small@legendplots#1#2{ \begingroup \pgfplots@define@currentplotstyle@as{#1,#2}% - \scope[/tikz/current plot style]% this scoping construction allows plot styles to change 'legend image code'. + \scope[/tikz/current plot style,/pgfplots/every legend image post]% this scoping construction allows plot styles to change 'legend image code'. \pgfkeysvalueof{/pgfplots/legend image code/.@cmd}\pgfeov \endscope \endgroup @@ -3357,9 +3426,9 @@ \pgfplots@split@opts@opts[]% }% } -\def\pgfplots@split@opts@opts[#1]#2\pgfplots@result@to#3#4{% - \def#3{#2}% - \def#4{#1}% +\long\def\pgfplots@split@opts@opts[#1]#2\pgfplots@result@to#3#4{% + \long\def#3{#2}% + \long\def#4{#1}% } % Typesets a legend node. @@ -7114,7 +7183,7 @@ \expandafter\def\csname pgfplots@#1minortickstrue\endcsname{\pgfplots@error{Sorry, minor ticks are not supported for this log basis.}}% \expandafter\def\csname pgfplots@#1minorgridstrue\endcsname{\pgfplots@error{Sorry, minor grid lines are not supported for this log basis.}}% \fi - \pgfkeysdef{/pgfplots/log basis #1}{\pgfplots@error{Sorry, you can't change 'log basis #1' in this context.}}% + \pgfkeyslet{/pgfplots/log basis #1/.@cmd}\pgfplots@cant@set@in@this@context % % recompute logtologten for this axis: \pgfmath@basic@multiply@{\reciproclogten}{\pgfplots@loc@TMPa}% @@ -7697,6 +7766,20 @@ \let\prettyprintnumber=\pgfmathprintnumber% +\def\pgfplots@set@options@sanitizemode{% + \pgfkeyslet{/pgfplots/xmode/.@cmd}\pgfplots@cant@set@in@this@context@ + \pgfkeyslet{/pgfplots/ymode/.@cmd}\pgfplots@cant@set@in@this@context@ + \pgfkeyslet{/pgfplots/zmode/.@cmd}\pgfplots@cant@set@in@this@context@ +} +\def\pgfplots@set@options@sanitize{% + \pgfkeyslet{/pgfplots/xmin/.@cmd}\pgfplots@cant@set@in@this@context + \pgfkeyslet{/pgfplots/ymin/.@cmd}\pgfplots@cant@set@in@this@context + \pgfkeyslet{/pgfplots/zmin/.@cmd}\pgfplots@cant@set@in@this@context + \pgfkeyslet{/pgfplots/xmax/.@cmd}\pgfplots@cant@set@in@this@context + \pgfkeyslet{/pgfplots/ymax/.@cmd}\pgfplots@cant@set@in@this@context + \pgfkeyslet{/pgfplots/zmax/.@cmd}\pgfplots@cant@set@in@this@context +}% + \def\pgfplots@set@options#1{% \pgfplots@bb@isactivetrue \pgfplots@curplot@threedimfalse @@ -7713,6 +7796,7 @@ % 'every axis'! \pgfkeyssetfamily{/tikz/name}{/pgfplots/naming commands}% \pgfkeyssetfamily{/tikz/alias}{/pgfplots/naming commands}% + \pgfkeyssetfamily{/tikz/overlay}{/pgfplots/shared with tikz}% \pgfkeyssetfamily{/tikz/variable}{/pgfplots}% \pgfkeysinstallkeyfilterhandler{/pgf/key filter handlers/append filtered to}{\pgfplots@rmopts}% % @@ -7753,16 +7837,16 @@ \fi \fi \pgfplots@deactivefamiliescmd - \pgfkeysdef{/pgfplots/xmode}{\pgfplots@error{You can't set 'xmode' in this context, sorry.}}% - \pgfkeysdef{/pgfplots/ymode}{\pgfplots@error{You can't set 'ymode' in this context, sorry.}}% - \pgfkeysdef{/pgfplots/zmode}{\pgfplots@error{You can't set 'zmode' in this context, sorry.}}% + \pgfplots@set@options@sanitizemode % % Acquire style commands and nameing commands from direct input % options '#1' BEFORE the 'every' styles are processed: \pgfkeysactivatefamily{/pgfplots/naming commands}% + \pgfkeysactivatefamily{/pgfplots/shared with tikz}% \pgfplots@setkeys@from@macro\pgfplots@remaining@input% \let\pgfplots@remaining@input=\pgfplots@rmopts \pgfkeysdeactivatefamily{/pgfplots/naming commands}% + \pgfkeysdeactivatefamily{/pgfplots/shared with tikz}% % % Now, any 'name' and 'alias' options have been processed. % @@ -7796,11 +7880,16 @@ % be set in its context. % \pgfkeysactivatefamily{/pgfplots/legend}% - % this special treatmeant allows the (usually illegal construction) + % this special treatmeant allows the (otherwise unsupported) construction % 'legend style={legend pos=outer north east}': \pgfkeysdef{/pgfplots/every axis legend/.append style}{\pgfkeysalso{##1}}% % \pgfplots@set@keys@from@tikz@style{every axis legend}% + % + % restore: + \pgfkeysdef{/pgfplots/every axis legend/.append style}{% + \pgfkeysalso{/pgfplots/every axis legend/.add code={}{\pgfkeysalso{##1}}}% + }% \pgfkeysdeactivatefamily{/pgfplots/legend}% % % FIXME : VERIFY! @@ -7884,6 +7973,8 @@ \global\let\pgfplots@firstplot@coords@z=\pgfutil@empty \fi \pgfkeysalso{/pgfplots/.search also=/tikz}% + % + \pgfplots@set@options@sanitize } \def\pgfplots@install@abbrev@commands{ @@ -7921,7 +8012,7 @@ }% % \let\legend=\pgfplots@command@legend - \let\addlegendimage=\pgfplots@rememberplotspec + \let\addlegendimage=\pgfplots@addlegendimage \let\addlegendentry=\pgfplots@addlegendentry \let\addlegendentryexpanded=\pgfplots@addlegendentryexpanded } @@ -8083,11 +8174,14 @@ % or something like that is interpreted as /tikz/ key: \pgfplots@invoke@pgfkeyscode{/handler config/full or existing/.@cmd}{}% restrict % set both, pgfplots and tikz keys: - \pgfplotsset{#1}% + % the draw is important since \addplot visualizes its stuff + % with \path coordinates ... + % -> we need to activate draw mode here. + \pgfplotsset{/tikz/draw,#1}% \pgfplots@invoke@pgfkeyscode{/handler config/all/.@cmd}{}% unrestrict % % remember these technical things: they will be - % reset in \draw, so we will need to re-activate + % reset in \path (see below!), so we will need to re-activate % them. % The re-activation is done in 'every path' (see below). % FIXME : is that portable!? diff --git a/Master/texmf-dist/tex/generic/pgfplots/pgfplotscoordprocessing.code.tex b/Master/texmf-dist/tex/generic/pgfplots/pgfplotscoordprocessing.code.tex index e69591d0683..13b71f8e942 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/pgfplotscoordprocessing.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/pgfplotscoordprocessing.code.tex @@ -649,6 +649,13 @@ #3% }% }% +\def\pgfplots@ifaxisline@B@onorientedsurf@should@be@drawn@allaxislinevariations#1#2#3{% + \pgfplots@ifaxisline@B@onorientedsurf@should@be@drawn@{#1}{% + #2% + }{% + #3% + }% +}% % A sub-part of \pgfplots@ifaxisline@B@onorientedsurf@should@be@drawn % which is /only/ based on foreground/background flags. @@ -678,9 +685,9 @@ \def\pgfplots@ifgridlines@onorientedsurf@should@be@drawn#1#2{% % grid lines shall be drawn % if and only if BOTH adjacent axis lines shall be drawn: - \pgfplots@ifaxisline@B@onorientedsurf@should@be@drawn{0}{% + \pgfplots@ifaxisline@B@onorientedsurf@should@be@drawn@allaxislinevariations{0}{% % remark: this is ALWAYS true for 2D plots. - \pgfplots@ifaxisline@B@onorientedsurf@should@be@drawn{1}{% + \pgfplots@ifaxisline@B@onorientedsurf@should@be@drawn@allaxislinevariations{1}{% #1% }{% #2% @@ -1131,6 +1138,7 @@ {\pgf@sys@tonumber{\pgf@ya}}{\pgf@sys@tonumber{\pgf@x}}{\pgfpointorigin}% } + % Adds a further, temporary anchor to every node which will be % processed. The anchor will be named '#3'. It is placed such that % 1. the node's center is on a line in direction of the inwards normal @@ -1147,143 +1155,7 @@ \def\pgfplotsdeclareborderanchorforaxis#1#2#3{% % % - \pgfdeclaregenericanchor{#3}{% - \begingroup - \pgfutil@ifundefined{pgfreferencednodename}{% - % use given transformation matrix. - }{% - \ifx\pgfreferencednodename\pgfutil@empty - % just use the given transformation matrix - we are - % typesetting an unlabeled node. - \else - \pgfsettransform{\csname pgf@sh@nt@\pgfreferencednodename\endcsname}% - \fi - }% - % I only need to apply the trafo matrix to direction vectors. Eliminate - % shifts. - \pgf@pt@x=0pt - \pgf@pt@y=0pt - % - % I'll apply the inverse transformation matrix to direction - % vectors. To ensure the relative position of these vectors - % and the anchors of the node, I have to invert the matrix: - \pgftransforminvert - % - % - % This here is the normal direction (points to the axis) - \pgfqpointscale{-1}{\pgfplotspointouternormalvectorofaxis{#2}}% - % - % we apply the inverse CM onto it here: - \pgf@pos@transform\pgf@x\pgf@y - \edef\pgfplots@tmp@normaldir{\pgf@x=\the\pgf@x\space\pgf@y=\the\pgf@y\space}% - % - % Now: - % auto-determine the canonical (north, north east etc) anchor - % at which the node touches the axis (remember: the axis is to - % be found in direction of the normal vector). If we choose - % this anchor, we *won't* penetrate the axis! - % - % This is a heuristicial procedure. - % - \def\pgfplots@thresh{0.17pt }% 80 degrees - %\def\pgfplots@thresh{0.3pt }% - %\def\pgfplots@thresh{0.707pt }% 45 degrees - \ifdim\pgf@y>0pt - \ifdim\pgf@y>\pgfplots@thresh - % only north anchor - \def\pgfplots@ycomp{north}% - \else - \def\pgfplots@ycomp{}% - \fi - \else - \ifdim\pgf@y<-\pgfplots@thresh - \def\pgfplots@ycomp{south}% - % south anchor - \else - \def\pgfplots@ycomp{}% - \fi - \fi - \ifdim\pgf@x>0pt - \ifdim\pgf@x>\pgfplots@thresh - \def\pgfplots@xcomp{east}% - \else - \def\pgfplots@xcomp{}% - \fi - \else - \ifdim\pgf@x<-\pgfplots@thresh - \def\pgfplots@xcomp{west}% - \else - \def\pgfplots@xcomp{}% - \fi - \fi - \edef\pgfplots@anchor{% - \pgfplots@ycomp - \ifx\pgfplots@ycomp\pgfutil@empty - \else - \ifx\pgfplots@xcomp\pgfutil@empty - \else - \space - \fi - \fi - \pgfplots@xcomp}% - % - % - % Now, I'd like the 'center' of the node on one line with the - % 'at={}' coordinate at which it shall be placed! - % This can be done as follows: - % - % Now, compute two lines: - % 1. a line parallel to the #1 axis which goes - % through our recently identified anchor, - % { x = x_a + r_1 * (#1 axis direction) - % 2. a line from center in direction of the normal, - % { x = x_c + r_2 n, r in R } - % - % Calculate the intersection point and return it! This - % involves a lot of arithmetics :-( - % - % compute (unit#1 - normal): - \pgfplots@tmp@normaldir - \pgf@xb=\pgf@x - \pgf@yb=\pgf@y - % - % and the axis direction (in fact, I use -axis dir. But that - % doesn't matter). - % Scale unit vector to length 1 to improve conditioning: - \pgfqpointscale - {\csname pgfplotsunit#1invlength\endcsname} - {\csname pgfplotspointunit#1\endcsname}% - \pgf@pos@transform\pgf@x\pgf@y - % - \edef\pgfplots@LEQ{% - % solve linear system - {\pgf@sys@tonumber\pgf@xb}{\pgf@sys@tonumber\pgf@x}% - {\pgf@sys@tonumber\pgf@yb}{\pgf@sys@tonumber\pgf@y}% - }% - % - % apply inverse matrix to right-hand-side (and compute RHS): - \pgf@sh@reanchor{##1}{center}% - \edef\pgfplots@loc@center{\pgf@x=\the\pgf@x\space\pgf@y=\the\pgf@y\space}% - \pgfpointdiff% {<start>}{<end>} -> computes <end> - <start> - {\pgfplots@loc@center}% - {\pgf@sh@reanchor{##1}{\pgfplots@anchor}}% - \edef\pgfplots@RHS{{\pgf@sys@tonumber\pgf@x}{\pgf@sys@tonumber\pgf@y}}% - % - \pgfutilsolvetwotwoleq{\pgfplots@LEQ}{\pgfplots@RHS}% - \def\pgfplots@extract####1####2{% - \def\pgfplots@r{####1}% - }% - \expandafter\pgfplots@extract\pgfmathresult - % GOT IT! - % - % compute x_c + r*n: - \pgfpointadd - {\pgfplots@loc@center}% - {\pgfqpointscale{\pgfplots@r}{\pgfplots@tmp@normaldir}}% -%\message{==========>>>>>>>>>> I got finally (\the\pgf@x,\the\pgf@y). <<<<<<<<<===================}% - \pgf@process{}% <- transport outside of group - \endgroup - }% + \pgfdeclaregenericanchor{#3}{\pgfplots@borderanchor@for@axis{#1}{#2}{##1}} % % This variant will ALWAYS be placed on the boundary of the node. % It is deprecated, I am keeping it for some time.... @@ -1321,6 +1193,151 @@ }% }% +% this does the work for \pgfplotsdeclareborderanchorforaxis. +% #1: either x,y or z the direction which varies +% #2: a three-char-string uniquely identifying the axis line. +% The parameter '#1' is redundand: it is the same as the 'v' +% character in '#2'. +% #3: the shape, provided as argument by the pgf routine invoking the +% anchor. +\def\pgfplots@borderanchor@for@axis#1#2#3{% + \begingroup + \pgfutil@ifundefined{pgfreferencednodename}{% + % use given transformation matrix. + }{% + \ifx\pgfreferencednodename\pgfutil@empty + % just use the given transformation matrix - we are + % typesetting an unlabeled node. + \else + \pgfsettransform{\csname pgf@sh@nt@\pgfreferencednodename\endcsname}% + \fi + }% + % I only need to apply the trafo matrix to direction vectors. Eliminate + % shifts. + \pgf@pt@x=0pt + \pgf@pt@y=0pt + % + % I'll apply the inverse transformation matrix to direction + % vectors. To ensure the relative position of these vectors + % and the anchors of the node, I have to invert the matrix: + \pgftransforminvert + % + % + % This here is the normal direction (points to the axis) + \pgfqpointscale{-1}{\pgfplotspointouternormalvectorofaxis{#2}}% + % + % we apply the inverse CM onto it here: + \pgf@pos@transform\pgf@x\pgf@y + \edef\pgfplots@tmp@normaldir{\pgf@x=\the\pgf@x\space\pgf@y=\the\pgf@y\space}% + % + % Now: + % auto-determine the canonical (north, north east etc) anchor + % at which the node touches the axis (remember: the axis is to + % be found in direction of the normal vector). If we choose + % this anchor, we *won't* penetrate the axis! + % + % This is a heuristicial procedure. + % + \def\pgfplots@thresh{0.17pt }% 80 degrees + %\def\pgfplots@thresh{0.3pt }% + %\def\pgfplots@thresh{0.707pt }% 45 degrees + \ifdim\pgf@y>0pt + \ifdim\pgf@y>\pgfplots@thresh + % only north anchor + \def\pgfplots@ycomp{north}% + \else + \def\pgfplots@ycomp{}% + \fi + \else + \ifdim\pgf@y<-\pgfplots@thresh + \def\pgfplots@ycomp{south}% + % south anchor + \else + \def\pgfplots@ycomp{}% + \fi + \fi + \ifdim\pgf@x>0pt + \ifdim\pgf@x>\pgfplots@thresh + \def\pgfplots@xcomp{east}% + \else + \def\pgfplots@xcomp{}% + \fi + \else + \ifdim\pgf@x<-\pgfplots@thresh + \def\pgfplots@xcomp{west}% + \else + \def\pgfplots@xcomp{}% + \fi + \fi + \edef\pgfplots@anchor{% + \pgfplots@ycomp + \ifx\pgfplots@ycomp\pgfutil@empty + \else + \ifx\pgfplots@xcomp\pgfutil@empty + \else + \space + \fi + \fi + \pgfplots@xcomp}% + % + % + % Now, I'd like the 'center' of the node on one line with the + % 'at={}' coordinate at which it shall be placed! + % This can be done as follows: + % + % Now, compute two lines: + % 1. a line parallel to the #1 axis which goes + % through our recently identified anchor, + % { x = x_a + r_1 * (#1 axis direction) + % 2. a line from center in direction of the normal, + % { x = x_c + r_2 n, r in R } + % + % Calculate the intersection point and return it! This + % involves a lot of arithmetics :-( + % + % compute (unit#1 - normal): + \pgfplots@tmp@normaldir + \pgf@xb=\pgf@x + \pgf@yb=\pgf@y + % + % and the axis direction (in fact, I use -axis dir. But that + % doesn't matter). + % Scale unit vector to length 1 to improve conditioning: + \pgfqpointscale + {\csname pgfplotsunit#1invlength\endcsname} + {\csname pgfplotspointunit#1\endcsname}% + \pgf@pos@transform\pgf@x\pgf@y + % + \edef\pgfplots@LEQ{% + % solve linear system + {\pgf@sys@tonumber\pgf@xb}{\pgf@sys@tonumber\pgf@x}% + {\pgf@sys@tonumber\pgf@yb}{\pgf@sys@tonumber\pgf@y}% + }% + % + % apply inverse matrix to right-hand-side (and compute RHS): + \pgf@sh@reanchor{#3}{center}% + \edef\pgfplots@loc@center{\pgf@x=\the\pgf@x\space\pgf@y=\the\pgf@y\space}% + \pgfpointdiff% {<start>}{<end>} -> computes <end> - <start> + {\pgfplots@loc@center}% + {\pgf@sh@reanchor{#3}{\pgfplots@anchor}}% + \edef\pgfplots@RHS{{\pgf@sys@tonumber\pgf@x}{\pgf@sys@tonumber\pgf@y}}% + % + \pgfutilsolvetwotwoleq{\pgfplots@LEQ}{\pgfplots@RHS}% + \def\pgfplots@extract##1##2{% + \def\pgfplots@r{##1}% + }% + \expandafter\pgfplots@extract\pgfmathresult + % GOT IT! + % + % compute x_c + r*n: + \pgfpointadd + {\pgfplots@loc@center}% + {\pgfqpointscale{\pgfplots@r}{\pgfplots@tmp@normaldir}}% +%\message{==========>>>>>>>>>> I got finally (\the\pgf@x,\the\pgf@y). <<<<<<<<<===================}% + \pgf@process{}% <- transport outside of group + \endgroup +}% + % Takes azimuth (horizontal angle) '#1' and elongation (vertical % angle) '#2' (both in degrees) and computes % x,y and z vectors which define the view in the direction @@ -1748,7 +1765,14 @@ },% initfor={% \pgfkeyssetvalue{/pgfplots/point meta/expr}{#1}% - \let\pgfpmeta@expr@origchoice\pgfplotspointmetainputhandler + \def\pgfplots@loc@TMPa{expr}% + \ifx\pgfplots@loc@TMPa\pgfplotspointmetainputhandler + \else + \let\pgfpmeta@expr@origchoice\pgfplotspointmetainputhandler + \fi + \ifx\pgfpmeta@expr@origchoice\pgfplots@loc@TMPa + \let\pgfpmeta@expr@origchoice\pgfutil@empty + \fi }, }% \pgfkeyssetvalue{/pgfplots/point meta/expr}{}% @@ -2650,7 +2674,7 @@ \noexpand\def\noexpand\pgfplotspointmetainputhandler{\pgfplotspointmetainputhandler}% }% {% draw command: - \noexpand\draw% + \noexpand\path% }% }% \pgfplotsapplistXXlet\pgfplots@coord@stream@recorded @@ -3749,10 +3773,10 @@ % \pgfplots@plot@ydomain (will be set to \pgfplots@plot@domain if empty) % \pgfplots@plot@samples@at % \pgfplots@plot@samples@y (will be set to the x variant if empty) -% \tikz@plot@var -% \pgfplots@plot@var@nonmacro -% \pgfplots@plot@var@y -% \pgfplots@plot@var@y@nonmacro +% \tikz@plot@var (will become a macro like '\x') +% \pgfplots@plot@var@nonmacro (the same as \tikz@plot@var, but without backslash) +% \pgfplots@plot@var@y (like \tikz@plot@var, but for y) +% \pgfplots@plot@var@y@nonmacro (like \pgfplots@plot@var@nonmacro, but for y) % 2. the following key-value things are set: % /pgfplots/mesh/rows % /pgfplots/mesh/cols @@ -3764,7 +3788,7 @@ % if the expression plotter should sample a line % and % \def\b@pgfplots@should@sample@LINE{0} -% if it should samples a mesh. +% if it should sample a mesh. \def\pgfplots@plot@expression@preparekeys{% \pgfkeysgetvalue{/pgfplots/domain}\pgfplots@plot@domain \pgfkeysgetvalue{/pgfplots/samples y}\pgfplots@plot@samples@y @@ -3784,6 +3808,15 @@ \let\pgfplots@plot@var@nonmacro=\pgfplots@glob@TMPa \let\pgfplots@plot@var@y@nonmacro=\pgfplots@glob@TMPb % + % make sure the 'plot vars' have a backslash (as it was in tikz + % plot expression): + \ifx\pgfplots@plot@var@nonmacro\tikz@plot@var + \edef\tikz@plot@var{\expandafter\noexpand\csname \tikz@plot@var\endcsname}% + \fi + \ifx\pgfplots@plot@var@y@nonmacro\pgfplots@plot@var@y + \edef\pgfplots@plot@var@y{\expandafter\noexpand\csname \pgfplots@plot@var@y\endcsname}% + \fi + % % Check if we have to sample a line. \def\b@pgfplots@should@sample@LINE{0}% \ifpgfplots@curplot@threedim @@ -4096,6 +4129,26 @@ \pgfplots@gettikzinternal@keyval{raw gnuplot}{iftikz@plot@raw@gnuplot}{\iffalse}% \pgfplots@gettikzinternal@keyval{parametric}{iftikz@plot@parametric}{\iffalse}% % + % determine dummy variables: + \iftikz@plot@parametric + \ifpgfplots@curplot@threedim + \pgfkeysgetvalue{/pgfplots/parametric/var 2d}\pgfplots@gnuplot@dummy% + \else + \pgfkeysgetvalue{/pgfplots/parametric/var 1d}\pgfplots@gnuplot@dummy% + \fi + \ifx\pgfplots@gnuplot@dummy\pgfutil@empty + \else + \expandafter\pgfutil@in@\expandafter,\expandafter{\pgfplots@gnuplot@dummy}% + \ifpgfutil@in@ + \def\pgfplots@loc@TMPa##1,##2\pgfeov{\pgfplotsset{variable={##1},variable y={##2}}}% + \else + \def\pgfplots@loc@TMPa##1\pgfeov{\pgfplotsset{variable={##1}}}% + \fi + \expandafter\pgfplots@loc@TMPa\pgfplots@gnuplot@dummy\pgfeov + \fi + \fi + % + % prepare domain and samples, normalize dummy variables: \pgfplots@plot@expression@preparekeys % % FIXME: what with 'samples at'!? @@ -4112,7 +4165,7 @@ % % \iftikz@plot@raw@gnuplot% - \def\pgfplots@plot@data{\pgfplotgnuplot[\pgfplots@plot@filename]{\pgfplots@gnuplotcode}}% + \def\pgfplots@plot@data{\pgfplotgnuplot[\pgfplots@plot@filename]{\pgfplots@gnuplot@format;\pgfplots@gnuplotcode}}% \else% % collect logs: \def\pgfplots@gnuplot@logdirs{}% @@ -4138,9 +4191,12 @@ \pgfplots@error{Sorry, I do not know how to sample 3D LINE plots with gnuplot... I only know 2D line and 3D mesh. You may want to help the author of pgfplots to improve this feature.}% \fi \fi + \def\pgfplots@gnuplot@x{\pgfplots@plot@var@nonmacro}% + \def\pgfplots@gnuplot@y{\pgfplots@plot@var@y@nonmacro}% \def\pgfplots@plot@data{\pgfplotgnuplot[\pgfplots@plot@filename]{% \pgfplots@gnuplot@format; set samples \pgfkeysvalueof{/pgfplots/samples}\if0\b@pgfplots@should@sample@LINE, \pgfkeysvalueof{/pgfplots/samples y}\fi; + set dummy \pgfplots@gnuplot@x,\pgfplots@gnuplot@y; \ifx\pgfplots@gnuplot@logdirs\pgfutil@empty \else set logscale \pgfplots@gnuplot@logdirs\space 2.71828182845905; @@ -4151,13 +4207,13 @@ % Samples twodimensionally (a lattice): % and the isosamples thing confuses me. set isosamples \pgfkeysvalueof{/pgfplots/samples}\if0\b@pgfplots@should@sample@LINE, \pgfkeysvalueof{/pgfplots/samples y}\fi; - splot [x=\pgfplots@plot@domain] [y=\pgfplots@plot@ydomain] \pgfplots@gnuplotcode;% + splot [\pgfplots@gnuplot@x=\pgfplots@plot@domain] [\pgfplots@gnuplot@y=\pgfplots@plot@ydomain] \pgfplots@gnuplotcode;% \else % *should* sample a line, but I don't know how. - splot [x=\pgfplots@plot@domain] \pgfplots@gnuplotcode;% + splot [\pgfplots@gnuplot@x=\pgfplots@plot@domain] \pgfplots@gnuplotcode;% \fi \else - plot [x=\pgfplots@plot@domain] \pgfplots@gnuplotcode;% + plot [\pgfplots@gnuplot@x=\pgfplots@plot@domain] \pgfplots@gnuplotcode;% \fi }}% \fi% @@ -4513,7 +4569,6 @@ % % % high level user interface functions: - \def\coordindex{\pgfplotstablerow}% \let\lineno=\coordindex% is the same here % % modify \pgfplots@plot@tbl@{x,y,z,meta} if there are diff --git a/Master/texmf-dist/tex/latex/pgfplots/pgfplots.sty b/Master/texmf-dist/tex/latex/pgfplots/pgfplots.sty index 884bfcf37a6..01e1c86bb01 100644 --- a/Master/texmf-dist/tex/latex/pgfplots/pgfplots.sty +++ b/Master/texmf-dist/tex/latex/pgfplots/pgfplots.sty @@ -23,8 +23,13 @@ % along with this program. If not, see <http://www.gnu.org/licenses/>. % %-------------------------------------------- -\def\pgfplotsversion{1.3} -\ProvidesPackage{pgfplots}[2010/01/02 Version \pgfplotsversion] +\def\pgfplotsversion{1.3.1} +\IfFileExists{pgfplots.revision.tex}{\input pgfplots.revision.tex } {\def\pgfplotsrevision{}} +\ifx\pgfplotsrevision\pgfutil@empty +\else + \edef\pgfplotsrevision{\space(git show \pgfplotsrevision)}% +\fi +\ProvidesPackage{pgfplots}[2010/03/31 Version \pgfplotsversion] % ATTENTION: % you MAY need one of diff --git a/Master/texmf-dist/tex/latex/pgfplots/pgfplotstable.sty b/Master/texmf-dist/tex/latex/pgfplots/pgfplotstable.sty index 9f21658671f..45f0af5468f 100644 --- a/Master/texmf-dist/tex/latex/pgfplots/pgfplotstable.sty +++ b/Master/texmf-dist/tex/latex/pgfplots/pgfplotstable.sty @@ -18,7 +18,7 @@ % along with this program. If not, see <http://www.gnu.org/licenses/>. % %-------------------------------------------- -\ProvidesPackage{pgfplotstable}[2010/01/02 Part of pgfplots] +\ProvidesPackage{pgfplotstable}[2010/03/31 Part of pgfplots] % everything is loaded by pgfplots. \RequirePackage{pgfplots} |