summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/datatool/dataplot.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/datatool/dataplot.sty')
-rw-r--r--Master/texmf-dist/tex/latex/datatool/dataplot.sty984
1 files changed, 513 insertions, 471 deletions
diff --git a/Master/texmf-dist/tex/latex/datatool/dataplot.sty b/Master/texmf-dist/tex/latex/datatool/dataplot.sty
index 8da1b86d9d6..564cc58d12b 100644
--- a/Master/texmf-dist/tex/latex/datatool/dataplot.sty
+++ b/Master/texmf-dist/tex/latex/datatool/dataplot.sty
@@ -39,17 +39,20 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{dataplot}[2013/01/15 v2.13 (NLCT)]
+\ProvidesPackage{dataplot}[2013/06/28 v2.14 (NLCT)]
\RequirePackage{xkeyval}
\RequirePackage{tikz}
\RequirePackage{datatool}
\usetikzlibrary{plotmarks}
\usetikzlibrary{plothandlers}
+\usetikzlibrary{calc}
\newcommand*{\DTLplotstream}[4][\boolean{true}]{%
-\@sDTLforeach[#1]{#2}{\dtl@x=#3,\dtl@y=#4}{%
-\DTLconverttodecimal{\dtl@x}{\dtl@decx}%
-\DTLconverttodecimal{\dtl@y}{\dtl@decy}%
-\pgfplotstreampoint{\pgfpointxy{\dtl@decx}{\dtl@decy}}}}
+ \@sDTLforeach[#1]{#2}{\dtl@x=#3,\dtl@y=#4}{%
+ \DTLconverttodecimal{\dtl@x}{\dtl@decx}%
+ \DTLconverttodecimal{\dtl@y}{\dtl@decy}%
+ \pgfplotstreampoint{\pgfpointxy{\dtl@decx}{\dtl@decy}}%
+ }%
+}
\newcommand*{\DTLplotmarks}{%
\pgfuseplotmark{o},%
\pgfuseplotmark{x},%
@@ -269,366 +272,364 @@ east,southeast,south,southwest,west,northwest}[northeast]{%
\dtl@legendsetting=\nr\relax
}
\define@key{dataplot}{legendlabels}{\def\dtl@legendlabels{#1}}
-\newcommand*{\DTLplot}[3][\boolean{true}]{{%
-\let\dtl@xkey=\relax
-\let\dtl@ykey=\relax
-\let\dtl@legendlabels=\relax
-\setkeys{dataplot}{#3}%
-\let\dtl@plotmarklist=\DTLplotmarks
-\let\dtl@plotlinelist=\DTLplotlines
-\let\dtl@plotmarkcolorlist=\DTLplotmarkcolors
-\let\dtl@plotlinecolorlist=\DTLplotlinecolors
-\def\dtl@legend{}%
-\ifx\dtl@legendlabels\relax
- \edef\dtl@legendlabels{#2}%
-\fi
-\ifx\dtl@xkey\relax
- \PackageError{dataplot}{Missing x setting for
- \string\DTLplot}{}%
-\else
- \ifx\dtl@ykey\relax
- \PackageError{dataplot}{Missing y setting for
+\newcommand*{\DTLplot}[3][\boolean{true}]{%
+\bgroup
+ \let\dtl@xkey=\relax
+ \let\dtl@ykey=\relax
+ \let\dtl@legendlabels=\relax
+ \setkeys{dataplot}{#3}%
+ \let\dtl@plotmarklist=\DTLplotmarks
+ \let\dtl@plotlinelist=\DTLplotlines
+ \let\dtl@plotmarkcolorlist=\DTLplotmarkcolors
+ \let\dtl@plotlinecolorlist=\DTLplotlinecolors
+ \def\dtl@legend{}%
+ \ifx\dtl@legendlabels\relax
+ \edef\dtl@legendlabels{#2}%
+ \fi
+ \ifx\dtl@xkey\relax
+ \PackageError{dataplot}{Missing x setting for
\string\DTLplot}{}%
\else
- \ifx\dtl@bounds\relax
- \DTLcomputebounds[#1]{#2}{\dtl@xkey}{\dtl@ykey}
- {\DTLminX}{\DTLminY}{\DTLmaxX}{\DTLmaxY}%
- \ifx\dtl@minx\relax
- \else
- \let\DTLminX=\dtl@minx
- \fi
- \ifx\dtl@maxx\relax
- \else
- \let\DTLmaxX=\dtl@maxx
- \fi
- \ifx\dtl@miny\relax
- \else
- \let\DTLminY=\dtl@miny
- \fi
- \ifx\dtl@maxy\relax
+ \ifx\dtl@ykey\relax
+ \PackageError{dataplot}{Missing y setting for
+ \string\DTLplot}{}%
+ \else
+ \ifx\dtl@bounds\relax
+ \DTLcomputebounds[#1]{#2}{\dtl@xkey}{\dtl@ykey}
+ {\DTLminX}{\DTLminY}{\DTLmaxX}{\DTLmaxY}%
+ \ifx\dtl@minx\relax
+ \else
+ \let\DTLminX=\dtl@minx
+ \fi
+ \ifx\dtl@maxx\relax
+ \else
+ \let\DTLmaxX=\dtl@maxx
+ \fi
+ \ifx\dtl@miny\relax
+ \else
+ \let\DTLminY=\dtl@miny
+ \fi
+ \ifx\dtl@maxy\relax
+ \else
+ \let\DTLmaxY=\dtl@maxy
+ \fi
\else
- \let\DTLmaxY=\dtl@maxy
+ \expandafter\dtl@getbounds\dtl@bounds\@nil
\fi
- \else
- \expandafter\dtl@getbounds\dtl@bounds\@nil
- \fi
- \@dtl@tmpcount=\DTLplotwidth
- \FPsub{\dtl@dx}{\DTLmaxX}{\DTLminX}%
- \FPdiv{\dtl@unit@x}{\number\@dtl@tmpcount}{\dtl@dx}%
- \@dtl@tmpcount=\DTLplotheight
- \FPsub{\dtl@dy}{\DTLmaxY}{\DTLminY}%
- \FPdiv{\dtl@unit@y}{\number\@dtl@tmpcount}{\dtl@dy}%
- \ifDTLxtics
- \ifx\dtl@xticlist\relax
- \ifx\dtl@xticgap\relax
- \dtl@constructticklist\DTLminX\DTLmaxX
- \dtl@unit@x\dtl@xticlist
- \else
- \DTLifFPopenbetween{0}{\DTLminX}{\DTLmaxX}{%
- \dtl@constructticklistwithgapz
- \DTLminX\DTLmaxX\dtl@xticlist\dtl@xticgap}{%
- \dtl@constructticklistwithgap
- \DTLminX\DTLmaxX\dtl@xticlist\dtl@xticgap}%
- \fi
- \fi
- \let\dtl@xminorticlist\@empty
- \ifDTLxminortics
- \let\dtl@prevtick=\relax
- \@for\dtl@nexttick:=\dtl@xticlist\do{%
- \ifx\dtl@prevtick\relax
+ \@dtl@tmpcount=\DTLplotwidth
+ \divide\@dtl@tmpcount by 65536\relax
+ \dtlsub{\dtl@dx}{\DTLmaxX}{\DTLminX}%
+ \dtldiv{\dtl@scale@x}{\number\@dtl@tmpcount}{\dtl@dx}%
+ \dtlmul{\dtl@offset@x}{-\dtl@scale@x}{\DTLminX}%
+ \@dtl@tmpcount=\DTLplotheight
+ \divide\@dtl@tmpcount by 65536\relax
+ \dtlsub{\dtl@dy}{\DTLmaxY}{\DTLminY}%
+ \dtldiv{\dtl@scale@y}{\number\@dtl@tmpcount}{\dtl@dy}%
+ \dtlmul{\dtl@offset@y}{-\dtl@scale@y}{\DTLminY}%
+ \ifDTLxtics
+ \ifx\dtl@xticlist\relax
+ \ifx\dtl@xticgap\relax
+ \dtlsub{\dtl@mingap}{\number\DTLmintickgap}{\dtl@offset@x}%
+ \dtldiv{\dtl@mingap}{\dtl@mingap}{\dtl@scale@x}%
+ \dtldiv{\dtl@mingap}{\dtl@mingap}{65536}%
+ \dtl@constructticklist\DTLminX\DTLmaxX
+ \dtl@mingap\dtl@xticlist
\else
- \dtl@constructminorticklist
- \dtl@prevtick\dtl@nexttick\dtl@unit@x\dtl@xminorticlist
+ \DTLifFPopenbetween{0}{\DTLminX}{\DTLmaxX}{%
+ \dtl@constructticklistwithgapz
+ \DTLminX\DTLmaxX\dtl@xticlist\dtl@xticgap}{%
+ \dtl@constructticklistwithgap
+ \DTLminX\DTLmaxX\dtl@xticlist\dtl@xticgap}%
\fi
- \let\dtl@prevtick=\dtl@nexttick
- }%
- \fi
- \ifx\dtl@xticlabels\relax
- \settoheight{\dtl@xticlabelheight}{\dtl@xticlist}%
- \else
- \settoheight{\dtl@xticlabelheight}{\dtl@xticlabels}%
- \fi
- \else
- \setlength{\dtl@xticlabelheight}{0pt}%
- \fi
- \setlength{\dtl@yticlabelwidth}{0pt}%
- \ifDTLytics
- \ifx\dtl@yticlist\relax
- \ifx\dtl@yticgap\relax
- \dtl@constructticklist\DTLminY\DTLmaxY
- \dtl@unit@y\dtl@yticlist
- \else
- \DTLifFPopenbetween{0}{\DTLminY}{\DTLmaxY}{%
- \dtl@constructticklistwithgapz
- \DTLminY\DTLmaxY\dtl@yticlist\dtl@yticgap}{%
- \dtl@constructticklistwithgap
- \DTLminY\DTLmaxY\dtl@yticlist\dtl@yticgap}%
\fi
+ \let\dtl@xminorticlist\@empty
+ \ifDTLxminortics
+ \let\dtl@prevtick=\relax
+ \@for\dtl@nexttick:=\dtl@xticlist\do{%
+ \ifx\dtl@prevtick\relax
+ \else
+ \dtl@constructminorticklist
+ \dtl@prevtick\dtl@nexttick\dtl@scale@x\dtl@xminorticlist
+ \fi
+ \let\dtl@prevtick=\dtl@nexttick
+ }%
+ \fi
+ \ifx\dtl@xticlabels\relax
+ \settoheight{\dtl@xticlabelheight}{\dtl@xticlist}%
+ \else
+ \settoheight{\dtl@xticlabelheight}{\dtl@xticlabels}%
+ \fi
+ \else
+ \setlength{\dtl@xticlabelheight}{0pt}%
\fi
- \let\dtl@yminorticlist\@empty
- \ifDTLyminortics
- \let\dtl@prevtick=\relax
- \@for\dtl@nexttick:=\dtl@yticlist\do{%
- \ifx\dtl@prevtick\relax
+ \setlength{\dtl@yticlabelwidth}{0pt}%
+ \ifDTLytics
+ \ifx\dtl@yticlist\relax
+ \ifx\dtl@yticgap\relax
+ \dtlsub{\dtl@mingap}{\number\DTLmintickgap}{\dtl@offset@y}%
+ \dtldiv{\dtl@mingap}{\dtl@mingap}{\dtl@scale@y}%
+ \dtldiv{\dtl@mingap}{\dtl@mingap}{65536}%
+ \dtl@constructticklist\DTLminY\DTLmaxY
+ \dtl@mingap\dtl@yticlist
\else
- \dtl@constructminorticklist
- \dtl@prevtick\dtl@nexttick\dtl@unit@y\dtl@yminorticlist
+ \DTLifFPopenbetween{0}{\DTLminY}{\DTLmaxY}{%
+ \dtl@constructticklistwithgapz
+ \DTLminY\DTLmaxY\dtl@yticlist\dtl@yticgap}{%
+ \dtl@constructticklistwithgap
+ \DTLminY\DTLmaxY\dtl@yticlist\dtl@yticgap}%
\fi
- \let\dtl@prevtick=\dtl@nexttick
- }%
- \fi
- \ifx\dtl@ylabel\relax
- \else
- \ifx\dtl@yticlabels\relax
- \@for\dtl@thislabel:=\dtl@yticlist\do{%
- \FPround{\dtl@thislabel}{\dtl@thislabel}
- {\c@DTLplotroundYvar}%
- \settowidth{\dtl@tmplength}{\dtl@thislabel}%
- \ifdim\dtl@tmplength>\dtl@yticlabelwidth
- \setlength{\dtl@yticlabelwidth}{\dtl@tmplength}%
+ \fi
+ \let\dtl@yminorticlist\@empty
+ \ifDTLyminortics
+ \let\dtl@prevtick=\relax
+ \@for\dtl@nexttick:=\dtl@yticlist\do{%
+ \ifx\dtl@prevtick\relax
+ \else
+ \dtl@constructminorticklist
+ \dtl@prevtick\dtl@nexttick\dtl@scale@y\dtl@yminorticlist
\fi
+ \let\dtl@prevtick=\dtl@nexttick
}%
+ \fi
+ \ifx\dtl@ylabel\relax
\else
- \@for\dtl@thislabel:=\dtl@yticlabels\do{%
- \settowidth{\dtl@tmplength}{\dtl@thislabel}%
- \ifdim\dtl@tmplength>\dtl@yticlabelwidth
- \setlength{\dtl@yticlabelwidth}{\dtl@tmplength}%
- \fi
- }%
+ \ifx\dtl@yticlabels\relax
+ \@for\dtl@thislabel:=\dtl@yticlist\do{%
+ \dtlround{\dtl@thislabel}{\dtl@thislabel}
+ {\c@DTLplotroundYvar}%
+ \settowidth{\dtl@tmplength}{\dtl@thislabel}%
+ \ifdim\dtl@tmplength>\dtl@yticlabelwidth
+ \setlength{\dtl@yticlabelwidth}{\dtl@tmplength}%
+ \fi
+ }%
+ \else
+ \@for\dtl@thislabel:=\dtl@yticlabels\do{%
+ \settowidth{\dtl@tmplength}{\dtl@thislabel}%
+ \ifdim\dtl@tmplength>\dtl@yticlabelwidth
+ \setlength{\dtl@yticlabelwidth}{\dtl@tmplength}%
+ \fi
+ }%
+ \fi
\fi
\fi
- \begin{tikzpicture}
- \pgfsetxvec{\pgfpoint{\dtl@unit@x sp}{0pt}}%
- \pgfsetyvec{\pgfpoint{0pt}{\dtl@unit@y sp}}%
- \DTLplotatbegintikz
- \ifDTLbox
- \draw (\DTLminX,\DTLminY) -- (\DTLmaxX,\DTLminY) --
+ \begin{tikzpicture}
+ \pgfsetxvec{\pgfpoint{1pt}{0pt}}%
+ \pgfsetyvec{\pgfpoint{0pt}{1pt}}%
+ \begin{scope}
+ \pgftransformcm{\dtl@scale@x}{0}{0}{\dtl@scale@y}%
+ {\pgfpoint{\dtl@offset@x pt}{\dtl@offset@y pt}}%
+ \DTLplotatbegintikz
+ \ifDTLbox
+ \draw (\DTLminX,\DTLminY) -- (\DTLmaxX,\DTLminY) --
(\DTLmaxX,\DTLmaxY) -- (\DTLminX,\DTLmaxY) --
- cycle;
- \else
- \ifDTLxaxis
- \expandafter\draw\expandafter[\DTLXAxisStyle]
+ cycle;
+ \else
+ \ifDTLxaxis
+ \expandafter\draw\expandafter[\DTLXAxisStyle]
(\DTLminX,\DTLminY) -- (\DTLmaxX,\DTLminY);
- \fi
- \ifDTLyaxis
- \expandafter\draw\expandafter[\DTLYAxisStyle]
+ \fi
+ \ifDTLyaxis
+ \expandafter\draw\expandafter[\DTLYAxisStyle]
(\DTLminX,\DTLminY) -- (\DTLminX,\DTLmaxY);
- \fi
- \fi
- \ifDTLgrid
- \ifDTLxminortics
- \@for\dtl@thistick:=\dtl@xminorticlist\do{%
- \expandafter\draw\expandafter[\DTLminorgridstyle]
+ \fi
+ \fi
+ \ifDTLgrid
+ \ifDTLxminortics
+ \@for\dtl@thistick:=\dtl@xminorticlist\do{%
+ \expandafter\draw\expandafter[\DTLminorgridstyle]
(\dtl@thistick,\DTLminY) -- (\dtl@thistick,\DTLmaxY);
- }%
- \fi
- \ifDTLyminortics
- \@for\dtl@thistick:=\dtl@yminorticlist\do{%
- \expandafter\draw\expandafter[\DTLminorgridstyle]
+ }%
+ \fi
+ \ifDTLyminortics
+ \@for\dtl@thistick:=\dtl@yminorticlist\do{%
+ \expandafter\draw\expandafter[\DTLminorgridstyle]
(\DTLminX,\dtl@thistick) -- (\DTLmaxX,\dtl@thistick);
- }%
- \fi
- \@for\dtl@thistick:=\dtl@xticlist\do{%
- \expandafter\draw\expandafter[\DTLmajorgridstyle]
+ }%
+ \fi
+ \@for\dtl@thistick:=\dtl@xticlist\do{%
+ \expandafter\draw\expandafter[\DTLmajorgridstyle]
(\dtl@thistick,\DTLminY) -- (\dtl@thistick,\DTLmaxY);
- }%
- \@for\dtl@thistick:=\dtl@yticlist\do{%
- \expandafter\draw\expandafter[\DTLmajorgridstyle]
+ }%
+ \@for\dtl@thistick:=\dtl@yticlist\do{%
+ \expandafter\draw\expandafter[\DTLmajorgridstyle]
(\DTLminX,\dtl@thistick) -- (\DTLmaxX,\dtl@thistick);
- }%
- \fi
- \ifDTLxtics
- \addtolength\dtl@xticlabelheight{\DTLticklabeloffset}%
- \@for\dtl@thistick:=\dtl@xticlist\do{%
- \pgfpathmoveto{\pgfpointxy{\dtl@thistick}{\DTLminY}}
- \ifDTLxticsin
- \pgfpathlineto{
- \pgfpointadd{\pgfpointxy{\dtl@thistick}{\DTLminY}}
- {\pgfpoint{0pt}{\DTLticklength}}}
- \else
- \pgfpathlineto{
- \pgfpointadd{\pgfpointxy{\dtl@thistick}{\DTLminY}}
- {\pgfpoint{0pt}{-\DTLticklength}}}
- \fi
- \ifDTLbox
- \pgfpathmoveto{\pgfpointxy{\dtl@thistick}{\DTLmaxY}}
- \ifDTLxticsin
- \pgfpathlineto{
- \pgfpointadd{\pgfpointxy{\dtl@thistick}{\DTLmaxY}}
- {\pgfpoint{0pt}{-\DTLticklength}}}
- \else
- \pgfpathlineto{
- \pgfpointadd{\pgfpointxy{\dtl@thistick}{\DTLmaxY}}
- {\pgfpoint{0pt}{\DTLticklength}}}
- \fi
- \fi
- \pgfusepath{stroke}%
- \ifx\dtl@xticlabels\relax
- \FPround{\dtl@thislabel}{\dtl@thistick}
+ }%
+ \fi
+ \ifDTLxtics
+ \dtlsub{\dtl@ticklength}{\number\DTLticklength}{-\dtl@offset@y}%
+ \dtldiv{\dtl@ticklength}{\dtl@ticklength}{\dtl@scale@y}%
+ \dtldiv{\dtl@ticklength}{\dtl@ticklength}{65536}%
+ \addtolength\dtl@xticlabelheight{\DTLticklabeloffset}%
+ \dtlsub{\dtl@ticlabeloffset}{\number\dtl@xticlabelheight}{-\dtl@offset@y}%
+ \dtldiv{\dtl@ticlabeloffset}{\dtl@ticlabeloffset}{\dtl@scale@y}%
+ \dtldiv{\dtl@ticlabeloffset}{\dtl@ticlabeloffset}{65536}%
+ \@for\dtl@thistick:=\dtl@xticlist\do{%
+ \let\dtl@thisticklabel\dtl@thistick
+ \ifx\dtl@xticlabels\relax
+ \dtlround{\dtl@thislabel}{\dtl@thistick}
{\c@DTLplotroundXvar}%
- \else
+ \else
\dtl@chopfirst\dtl@xticlabels\dtl@thislabel\dtl@rest
\let\dtl@xticlabels=\dtl@rest
- \fi
- \pgftext[base,center,at={\pgfpointadd
- {\pgfpointxy{\dtl@thistick}{\DTLminY}}
- {\pgfpoint{0pt}{-\dtl@xticlabelheight}}}]
- {\dtl@thislabel}
- }%
+ \fi
+ \ifDTLxticsin
+ \draw (\dtl@thistick,\DTLminY) -- ++(0,\dtl@ticklength);
+ \draw (\dtl@thistick,\DTLminY)
+ ++ (0,-\dtl@ticlabeloffset) node {\dtl@thislabel};
+ \else
+ \draw (\dtl@thistick,\DTLminY) -- ++(0,-\dtl@ticklength)
+ ++ (0,-\dtl@ticlabeloffset) node {\dtl@thislabel};
+ \fi
+ \ifDTLbox
+ \ifDTLxticsin
+ \draw (\dtl@thistick,\DTLmaxY) -- ++(0,-\dtl@ticklength);
+ \else
+ \draw (\dtl@thistick,\DTLmaxY) -- ++(0,\dtl@ticklength);
+ \fi
+ \fi
+ }%
+ \fi
+ \ifx\dtl@xlabel\relax
+ \else
+ \dtladd{\dtl@x}{\number\baselineskip}{\dtl@offset@y}%
+ \dtldiv{\dtl@x}{\dtl@x}{\dtl@scale@y}%
+ \dtldiv{\dtl@x}{\dtl@x}{65536}%
+ \dtladd{\dtl@ticlabeloffset}{\dtl@ticlabeloffset}{\dtl@x}%
+ \dtlmul{\dtl@x}{\dtl@dx}{0.5}%
+ \draw (\DTLminX,\DTLminY) ++(\dtl@x,-\dtl@ticlabeloffset)
+ node[anchor=north] {\dtl@xlabel};
\fi
- \ifx\dtl@xlabel\relax
- \else
- \addtolength{\dtl@xticlabelheight}{\baselineskip}%
- \setlength{\dtl@tmplength}{0.5\DTLplotwidth}
- \pgftext[base,center,at={\pgfpointadd
- {\pgfpointxy{\DTLminX}{\DTLminY}}%
- {\pgfpoint{\dtl@tmplength}{-\dtl@xticlabelheight}}}]{%
- \dtl@xlabel}
- \fi
- \ifDTLxminortics
- \@for\dtl@thistick:=\dtl@xminorticlist\do{%
- \pgfpathmoveto{\pgfpointxy{\dtl@thistick}{\DTLminY}}
- \ifDTLxticsin
- \pgfpathlineto{
- \pgfpointadd{\pgfpointxy{\dtl@thistick}{\DTLminY}}
- {\pgfpoint{0pt}{\DTLminorticklength}}}
- \else
- \pgfpathlineto{
- \pgfpointadd{\pgfpointxy{\dtl@thistick}{\DTLminY}}
- {\pgfpoint{0pt}{-\DTLminorticklength}}}
- \fi
- \ifDTLbox
- \pgfpathmoveto{\pgfpointxy{\dtl@thistick}{\DTLmaxY}}
- \ifDTLxticsin
- \pgfpathlineto{
- \pgfpointadd{\pgfpointxy{\dtl@thistick}{\DTLmaxY}}
- {\pgfpoint{0pt}{-\DTLminorticklength}}}
- \else
- \pgfpathlineto{
- \pgfpointadd{\pgfpointxy{\dtl@thistick}{\DTLmaxY}}
- {\pgfpoint{0pt}{\DTLminorticklength}}}
- \fi
- \fi
+ \ifDTLxminortics
+ \dtlsub{\dtl@ticklength}{\number\DTLminorticklength}{-\dtl@offset@y}%
+ \dtldiv{\dtl@ticklength}{\dtl@ticklength}{\dtl@scale@y}%
+ \dtldiv{\dtl@ticklength}{\dtl@ticklength}{65536}%
+ \@for\dtl@thistick:=\dtl@xminorticlist\do{%
+ \ifDTLxticsin
+ \draw (\dtl@thistick,\DTLminY) -- ++(0,\dtl@ticklength);
+ \draw (\dtl@thistick,\DTLminY)
+ ++ (0,-\dtl@ticlabeloffset) node[anchor=north] {\dtl@thislabel};
+ \else
+ \draw (\dtl@thistick,\DTLminY) -- ++(0,-\dtl@ticklength)
+ ++ (0,-\dtl@ticlabeloffset) node[anchor=north] {\dtl@thislabel};
+ \fi
+ \ifDTLbox
+ \ifDTLxticsin
+ \draw (\dtl@thistick,\DTLmaxY) -- ++(0,-\dtl@ticklength);
+ \else
+ \draw (\dtl@thistick,\DTLmaxY) -- ++(0,\dtl@ticklength);
+ \fi
+ \fi
}%
- \fi
+ \fi
\ifDTLytics
- \@for\dtl@thistick:=\dtl@yticlist\do{%
- \pgfpathmoveto{\pgfpointxy{\DTLminX}{\dtl@thistick}}
- \ifDTLyticsin
- \pgfpathlineto{
- \pgfpointadd{\pgfpointxy{\DTLminX}{\dtl@thistick}}
- {\pgfpoint{\DTLticklength}{0pt}}}
- \else
- \pgfpathlineto{
- \pgfpointadd{\pgfpointxy{\DTLminX}{\dtl@thistick}}
- {\pgfpoint{-\DTLticklength}{0pt}}}
- \fi
- \ifDTLbox
- \pgfpathmoveto{\pgfpointxy{\DTLmaxX}{\dtl@thistick}}
- \ifDTLyticsin
- \pgfpathlineto{
- \pgfpointadd{\pgfpointxy{\DTLmaxX}{\dtl@thistick}}
- {\pgfpoint{-\DTLticklength}{0pt}}}
- \else
- \pgfpathlineto{
- \pgfpointadd{\pgfpointxy{\DTLmaxX}{\dtl@thistick}}
- {\pgfpoint{\DTLticklength}{0pt}}}
- \fi
- \fi
- \pgfusepath{stroke}
- \ifx\dtl@yticlabels\relax
- \FPround{\dtl@thislabel}{\dtl@thistick}
- {\c@DTLplotroundYvar}%
- \else
+ \dtlsub{\dtl@ticklength}{\number\DTLticklength}{-\dtl@offset@x}%
+ \dtldiv{\dtl@ticklength}{\dtl@ticklength}{\dtl@scale@x}%
+ \dtldiv{\dtl@ticklength}{\dtl@ticklength}{65536}%
+ \dtladd{\dtl@ticlabeloffset}{\number\DTLticklabeloffset}{0}%
+ \dtlsub{\dtl@ticlabeloffset}{\number\DTLticklabeloffset}{-\dtl@offset@x}%
+ \dtldiv{\dtl@ticlabeloffset}{\dtl@ticlabeloffset}{\dtl@scale@x}%
+ \dtldiv{\dtl@ticlabeloffset}{\dtl@ticlabeloffset}{65536}%
+ \@for\dtl@thistick:=\dtl@yticlist\do{%
+ \let\dtl@thisticklabel\dtl@thistick
+ \ifx\dtl@yticlabels\relax
+ \dtlround{\dtl@thislabel}{\dtl@thistick}
+ {\c@DTLplotroundXvar}%
+ \else
\dtl@chopfirst\dtl@yticlabels\dtl@thislabel\dtl@rest
\let\dtl@yticlabels=\dtl@rest
- \fi
- \pgftext[right,at={\pgfpointadd
- {\pgfpointxy{\DTLminX}{\dtl@thistick}}
- {\pgfpoint{-\DTLticklabeloffset}{0pt}}}]
- {\dtl@thislabel}
- }%
+ \fi
+ \ifDTLyticsin
+ \draw (\DTLminX,\dtl@thistick) -- ++(\dtl@ticklength,0);
+ \draw (\DTLminX,\dtl@thistick)
+ ++ (-\dtl@ticlabeloffset,0) node[anchor=east] {\dtl@thislabel};
+ \else
+ \draw (\DTLminX,\dtl@thistick) -- ++(-\dtl@ticklength,0)
+ ++ (-\dtl@ticlabeloffset,0) node[anchor=east] {\dtl@thislabel};
+ \fi
+ \ifDTLbox
+ \ifDTLyticsin
+ \draw (\DTLmaxX,\dtl@thistick) -- ++(-\dtl@ticklength,0);
+ \else
+ \draw (\DTLmaxX,\dtl@thistick) -- ++(\dtl@ticklength,0);
+ \fi
+ \fi
+ }%
\fi
- \ifx\dtl@ylabel\relax
- \else
- \addtolength{\dtl@yticlabelwidth}{\baselineskip}%
- \setlength{\dtl@tmplength}{0.5\DTLplotheight}
- \pgftext[bottom,center,at={\pgfpointadd
- {\pgfpointxy{\DTLminX}{\DTLminY}}%
- {\pgfpoint{-\dtl@yticlabelwidth}{\dtl@tmplength}}},
- rotate=90]{%
- \dtl@ylabel}
- \fi
- \ifDTLyminortics
- \@for\dtl@thistick:=\dtl@yminorticlist\do{%
- \pgfpathmoveto{\pgfpointxy{\DTLminX}{\dtl@thistick}}
- \ifDTLyticsin
- \pgfpathlineto{
- \pgfpointadd{\pgfpointxy{\DTLminX}{\dtl@thistick}}
- {\pgfpoint{\DTLminorticklength}{0pt}}}
- \else
- \pgfpathlineto{
- \pgfpointadd{\pgfpointxy{\DTLminX}{\dtl@thistick}}
- {\pgfpoint{-\DTLminorticklength}{0pt}}}
- \fi
- \ifDTLbox
- \pgfpathmoveto{\pgfpointxy{\DTLmaxX}{\dtl@thistick}}
- \ifDTLyticsin
- \pgfpathlineto{
- \pgfpointadd{\pgfpointxy{\DTLmaxX}{\dtl@thistick}}
- {\pgfpoint{-\DTLminorticklength}{0pt}}}
- \else
- \pgfpathlineto{
- \pgfpointadd{\pgfpointxy{\DTLmaxX}{\dtl@thistick}}
- {\pgfpoint{\DTLminorticklength}{0pt}}}
- \fi
- \fi
- \pgfusepath{stroke}
+ \ifx\dtl@ylabel\relax
+ \else
+ \setlength{\dtl@tmplength}{\baselineskip}%
+ \addtolength{\dtl@tmplength}{\dtl@yticlabelwidth}%
+ \addtolength{\dtl@tmplength}{\DTLticklabeloffset}%
+ \dtlsub{\dtl@ticlabeloffset}{\number\dtl@tmplength}{-\dtl@offset@x}%
+ \dtldiv{\dtl@ticlabeloffset}{\dtl@ticlabeloffset}{\dtl@scale@x}%
+ \dtldiv{\dtl@ticlabeloffset}{\dtl@ticlabeloffset}{65536}%
+ \dtlmul{\dtl@y}{\dtl@dy}{0.5}%
+ \draw (\DTLminX,\DTLminY) ++(-\dtl@ticlabeloffset,\dtl@y)
+ node[rotate=90,anchor=south] {\dtl@ylabel};
+ \fi
+ \ifDTLyminortics
+ \dtlsub{\dtl@ticklength}{\number\DTLminorticklength}{-\dtl@offset@x}%
+ \dtldiv{\dtl@ticklength}{\dtl@ticklength}{\dtl@scale@x}%
+ \dtldiv{\dtl@ticklength}{\dtl@ticklength}{65536}%
+ \@for\dtl@thistick:=\dtl@yminorticlist\do{%
+ \ifDTLyticsin
+ \draw (\DTLminX,\dtl@thistick) -- ++(\dtl@ticklength,0);
+ \else
+ \draw (\DTLminX,\dtl@thistick) -- ++(-\dtl@ticklength,0);
+ \fi
+ \ifDTLbox
+ \ifDTLyticsin
+ \draw (\DTLmaxX,\dtl@thistick) -- ++(-\dtl@ticklength,0);
+ \else
+ \draw (\DTLmaxX,\dtl@thistick) -- ++(\dtl@ticklength,0);
+ \fi
+ \fi
}%
- \fi
- \@for\dtl@thisdb:=#2\do{%
- \ifx\dtl@plotmarkcolorlist\@empty
- \let\dtl@plotmarkcolorlist=\DTLplotmarkcolors
- \fi
- \dtl@chopfirst\dtl@plotmarkcolorlist\dtl@thisplotmarkcolor
- \dtl@remainder
- \let\dtl@plotmarkcolorlist=\dtl@remainder
- \ifDTLshowmarkers
- \ifx\dtl@plotmarklist\@empty
- \let\dtl@plotmarklist=\DTLplotmarks
+ \fi
+ \end{scope}
+ \@for\dtl@thisdb:=#2\do{%
+ \ifx\dtl@plotmarkcolorlist\@empty
+ \let\dtl@plotmarkcolorlist=\DTLplotmarkcolors
\fi
- \dtl@chopfirst\dtl@plotmarklist\dtl@thisplotmark
+ \dtl@chopfirst\dtl@plotmarkcolorlist\dtl@thisplotmarkcolor
\dtl@remainder
- \let\dtl@plotmarklist=\dtl@remainder
- \ifx\dtl@thisplotmark\relax
- \let\dtl@mark=\relax
- \else
- \expandafter\toks@\expandafter{\dtl@thisplotmark}%
- \ifx\dtl@thisplotmarkcolor\@empty
- \edef\dtl@mark{\the\toks@}%
+ \let\dtl@plotmarkcolorlist=\dtl@remainder
+ \ifDTLshowmarkers
+ \ifx\dtl@plotmarklist\@empty
+ \let\dtl@plotmarklist=\DTLplotmarks
+ \fi
+ \dtl@chopfirst\dtl@plotmarklist\dtl@thisplotmark
+ \dtl@remainder
+ \let\dtl@plotmarklist=\dtl@remainder
+ \ifx\dtl@thisplotmark\relax
+ \let\dtl@mark=\relax
\else
- \edef\dtl@mark{%
- \noexpand\color{\dtl@thisplotmarkcolor}%
- \the\toks@}%
+ \expandafter\toks@\expandafter{\dtl@thisplotmark}%
+ \ifx\dtl@thisplotmarkcolor\@empty
+ \edef\dtl@mark{\the\toks@}%
+ \else
+ \edef\dtl@mark{%
+ \noexpand\color{\dtl@thisplotmarkcolor}%
+ \the\toks@}%
+ \fi
\fi
+ \else
+ \let\dtl@mark=\relax
\fi
- \else
- \let\dtl@mark=\relax
- \fi
- \ifx\dtl@plotlinecolorlist\@empty
- \let\dtl@plotlinecolorlist=\DTLplotlinecolors
- \fi
- \dtl@chopfirst\dtl@plotlinecolorlist\dtl@thisplotlinecolor
- \dtl@remainder
- \let\dtl@plotlinecolorlist=\dtl@remainder
- \ifDTLshowlines
- \ifx\dtl@plotlinelist\@empty
- \let\dtl@plotlinelist=\DTLplotlines
+ \ifx\dtl@plotlinecolorlist\@empty
+ \let\dtl@plotlinecolorlist=\DTLplotlinecolors
\fi
- \dtl@chopfirst\dtl@plotlinelist\dtl@thisplotline
+ \dtl@chopfirst\dtl@plotlinecolorlist\dtl@thisplotlinecolor
\dtl@remainder
- \let\dtl@plotlinelist=\dtl@remainder
- \expandafter\ifx\dtl@thisplotline\relax
+ \let\dtl@plotlinecolorlist=\dtl@remainder
+ \ifDTLshowlines
+ \ifx\dtl@plotlinelist\@empty
+ \let\dtl@plotlinelist=\DTLplotlines
+ \fi
+ \dtl@chopfirst\dtl@plotlinelist\dtl@thisplotline
+ \dtl@remainder
+ \let\dtl@plotlinelist=\dtl@remainder
+ \expandafter\ifx\dtl@thisplotline\relax
\let\dtl@linestyle=\relax
\else
\expandafter\toks@\expandafter{\dtl@thisplotline}%
@@ -661,11 +662,18 @@ east,southeast,south,southwest,west,northwest}[northeast]{%
\DTLisclosedbetween{\dtl@x}{\DTLminX}{\DTLmaxX}%
\and
\DTLisclosedbetween{\dtl@y}{\DTLminY}{\DTLmaxY}%
- }{%
- \expandafter\toks@\expandafter{\dtl@stream}%
- \edef\dtl@stream{\the\toks@
- \noexpand\pgfplotstreampoint
- {\noexpand\pgfpointxy{\dtl@decx}{\dtl@decy}}}%
+ }%
+ {%
+ \expandafter\toks@\expandafter{\dtl@stream}%
+ \dtlmul{\dtl@decx}{\dtl@decx}{\dtl@scale@x}%
+ \dtladd{\dtl@decx}{\dtl@decx}{\dtl@offset@x}%
+ \dtlround{\dtl@decx}{\dtl@decx}{1}%
+ \dtlmul{\dtl@decy}{\dtl@decy}{\dtl@scale@y}%
+ \dtladd{\dtl@decy}{\dtl@decy}{\dtl@offset@y}%
+ \dtlround{\dtl@decy}{\dtl@decy}{1}%
+ \edef\dtl@stream{\the\toks@
+ \noexpand\pgfplotstreampoint
+ {\noexpand\pgfpointxy{\dtl@decx}{\dtl@decy}}}%
}{}%
}%
\expandafter\toks@\expandafter{\dtl@stream}%
@@ -687,185 +695,219 @@ east,southeast,south,southwest,west,northwest}[northeast]{%
\pgfusepath{stroke}
\end{scope}
\fi
- }%
- \ifcase\dtl@legendsetting
+ }%
+ \ifcase\dtl@legendsetting
% none
- \or % north
- \pgftext[top,center,at={\pgfpointadd
- {\pgfpointxy{\DTLminX}{\DTLmaxY}}
- {\pgfpoint{0.5\DTLplotwidth}{-\DTLlegendyoffset}}}]
- {\DTLformatlegend
- {\begin{tabular}{cl}\dtl@legend\end{tabular}}}
- \or % north east
- \pgftext[top,right,at={\pgfpointadd
- {\pgfpointxy{\DTLmaxX}{\DTLmaxY}}
- {\pgfpoint{-\DTLlegendxoffset}{-\DTLlegendyoffset}}}]
- {\DTLformatlegend
- {\begin{tabular}{cl}\dtl@legend\end{tabular}}}
- \or % east
- \pgftext[center,right,at={\pgfpointadd
- {\pgfpointxy{\DTLmaxX}{\DTLminY}}
- {\pgfpoint{-\DTLlegendxoffset}{0.5\DTLplotheight}}}]
- {\DTLformatlegend
- {\begin{tabular}{cl}\dtl@legend\end{tabular}}}
- \or % south east
- \pgftext[bottom,right,at={\pgfpointadd
- {\pgfpointxy{\DTLmaxX}{\DTLminY}}
- {\pgfpoint{-\DTLlegendxoffset}{\DTLlegendyoffset}}}]
- {\DTLformatlegend
- {\begin{tabular}{cl}\dtl@legend\end{tabular}}}
- \or % south
- \pgftext[center,bottom,at={\pgfpointadd
- {\pgfpointxy{\DTLminX}{\DTLminY}}
- {\pgfpoint{0.5\DTLplotwidth}{\DTLlegendyoffset}}}]
- {\DTLformatlegend
- {\begin{tabular}{cl}\dtl@legend\end{tabular}}}
- \or % south west
- \pgftext[bottom,left,at={\pgfpointadd
- {\pgfpointxy{\DTLminX}{\DTLminY}}
- {\pgfpoint{\DTLlegendxoffset}{\DTLlegendyoffset}}}]
- {\DTLformatlegend
- {\begin{tabular}{cl}\dtl@legend\end{tabular}}}
- \or % west
- \pgftext[center,left,at={\pgfpointadd
- {\pgfpointxy{\DTLminX}{\DTLminY}}
- {\pgfpoint{\DTLlegendxoffset}{0.5\DTLplotheight}}}]
- {\DTLformatlegend
- {\begin{tabular}{cl}\dtl@legend\end{tabular}}}
- \or % north west
- \pgftext[top,left,at={\pgfpointadd
- {\pgfpointxy{\DTLminX}{\DTLmaxY}}
- {\pgfpoint{\DTLlegendxoffset}{-\DTLlegendyoffset}}}]
- {\DTLformatlegend
- {\begin{tabular}{cl}\dtl@legend\end{tabular}}}
- \fi
- \DTLplotatendtikz
- \end{tikzpicture}
+ \or % north
+ \dtlmul{\dtl@decx}{\dtl@dx}{0.5}%
+ \dtladd{\dtl@decx}{\DTLminX}{\dtl@decx}%
+ \dtlmul{\dtl@decx}{\dtl@decx}{\dtl@scale@x}%
+ \dtladd{\dtl@decx}{\dtl@decx}{\dtl@offset@x}%
+ \dtlmul{\dtl@decy}{\DTLmaxY}{\dtl@scale@y}%
+ \dtladd{\dtl@decy}{\dtl@decy}{\dtl@offset@y}%
+ \draw (\dtl@decx,\dtl@decy) ++(0,-\DTLlegendyoffset)
+ node[anchor=north]
+ {\DTLformatlegend
+ {\begin{tabular}{cl}\dtl@legend\end{tabular}}%
+ };
+ \or % north east
+ \dtlmul{\dtl@decx}{\DTLmaxX}{\dtl@scale@x}%
+ \dtladd{\dtl@decx}{\dtl@decx}{\dtl@offset@x}%
+ \dtlmul{\dtl@decy}{\DTLmaxY}{\dtl@scale@y}%
+ \dtladd{\dtl@decy}{\dtl@decy}{\dtl@offset@y}%
+ \draw (\dtl@decx,\dtl@decy) ++(-\DTLlegendxoffset,-\DTLlegendyoffset)
+ node[anchor=north east]
+ {\DTLformatlegend
+ {\begin{tabular}{cl}\dtl@legend\end{tabular}}%
+ };
+ \or % east
+ \dtlmul{\dtl@decy}{\dtl@dy}{0.5}%
+ \dtladd{\dtl@decy}{\DTLminY}{\dtl@decy}%
+ \dtlmul{\dtl@decy}{\dtl@decy}{\dtl@scale@y}%
+ \dtladd{\dtl@decy}{\dtl@decy}{\dtl@offset@y}%
+ \dtlmul{\dtl@decx}{\DTLmaxX}{\dtl@scale@x}%
+ \dtladd{\dtl@decx}{\dtl@decx}{\dtl@offset@x}%
+ \draw (\dtl@decx,\dtl@decy) ++(-\DTLlegendxoffset,0)
+ node[anchor=east]
+ {\DTLformatlegend
+ {\begin{tabular}{cl}\dtl@legend\end{tabular}}%
+ };
+ \or % south east
+ \dtlmul{\dtl@decx}{\DTLmaxX}{\dtl@scale@x}%
+ \dtladd{\dtl@decx}{\dtl@decx}{\dtl@offset@x}%
+ \dtlmul{\dtl@decy}{\DTLminY}{\dtl@scale@y}%
+ \dtladd{\dtl@decy}{\dtl@decy}{\dtl@offset@y}%
+ \draw (\dtl@decx,\dtl@decy) ++(-\DTLlegendxoffset,\DTLlegendyoffset)
+ node[anchor=south east]
+ {\DTLformatlegend
+ {\begin{tabular}{cl}\dtl@legend\end{tabular}}%
+ };
+ \or % south
+ \dtlmul{\dtl@decx}{\dtl@dx}{0.5}%
+ \dtladd{\dtl@decx}{\DTLminX}{\dtl@decx}%
+ \dtlmul{\dtl@decx}{\dtl@decx}{\dtl@scale@x}%
+ \dtladd{\dtl@decx}{\dtl@decx}{\dtl@offset@x}%
+ \dtlmul{\dtl@decy}{\DTLminY}{\dtl@scale@y}%
+ \dtladd{\dtl@decy}{\dtl@decy}{\dtl@offset@y}%
+ \draw (\dtl@decx,\dtl@decy) ++(0,\DTLlegendyoffset)
+ node[anchor=south]
+ {\DTLformatlegend
+ {\begin{tabular}{cl}\dtl@legend\end{tabular}}%
+ };
+ \or % south west
+ \dtlmul{\dtl@decx}{\DTLminX}{\dtl@scale@x}%
+ \dtladd{\dtl@decx}{\dtl@decx}{\dtl@offset@x}%
+ \dtlmul{\dtl@decy}{\DTLminY}{\dtl@scale@y}%
+ \dtladd{\dtl@decy}{\dtl@decy}{\dtl@offset@y}%
+ \draw (\dtl@decx,\dtl@decy) ++(\DTLlegendxoffset,\DTLlegendyoffset)
+ node[anchor=south west]
+ {\DTLformatlegend
+ {\begin{tabular}{cl}\dtl@legend\end{tabular}}%
+ };
+ \or % west
+ \dtlmul{\dtl@decy}{\dtl@dy}{0.5}%
+ \dtladd{\dtl@decy}{\DTLminY}{\dtl@decy}%
+ \dtlmul{\dtl@decy}{\dtl@decy}{\dtl@scale@y}%
+ \dtladd{\dtl@decy}{\dtl@decy}{\dtl@offset@y}%
+ \dtlmul{\dtl@decx}{\DTLminX}{\dtl@scale@x}%
+ \dtladd{\dtl@decx}{\dtl@decx}{\dtl@offset@x}%
+ \draw (\dtl@decx,\dtl@decy) ++(\DTLlegendxoffset,0)
+ node[anchor=west]
+ {\DTLformatlegend
+ {\begin{tabular}{cl}\dtl@legend\end{tabular}}%
+ };
+ \or % north west
+ \dtlmul{\dtl@decx}{\DTLminX}{\dtl@scale@x}%
+ \dtladd{\dtl@decx}{\dtl@decx}{\dtl@offset@x}%
+ \dtlmul{\dtl@decy}{\DTLmaxY}{\dtl@scale@y}%
+ \dtladd{\dtl@decy}{\dtl@decy}{\dtl@offset@y}%
+ \draw (\dtl@decx,\dtl@decy) ++(\DTLlegendxoffset,-\DTLlegendyoffset)
+ node[anchor=north west]
+ {\DTLformatlegend
+ {\begin{tabular}{cl}\dtl@legend\end{tabular}}%
+ };
+ \fi
+ \pgftransformcm{\dtl@scale@x}{0}{0}{\dtl@scale@y}%
+ {\pgfpoint{\dtl@offset@x pt}{\dtl@offset@y pt}}%
+ \DTLplotatendtikz
+ \end{tikzpicture}
\fi
\fi
-\fi
-}}
+\egroup
+}
\def\dtl@getbounds#1,#2,#3,#4\@nil{%
\def\DTLminX{#1}%
\def\DTLminY{#2}%
\def\DTLmaxX{#3}%
\def\DTLmaxY{#4}%
-\FPifgt{\DTLminX}{\DTLmaxX}
+\dtlifnumgt{\DTLminX}{\DTLmaxX}
+{%
\PackageError{dataplot}{Min X > Max X in bounds #1,#2,#3,#4}{%
The bounds must be specified as minX,minY,maxX,maxY}%
-\fi
-\FPifgt{\DTLminY}{\DTLmaxY}
+}{}%
+\dtlifnumgt{\DTLminY}{\DTLmaxY}
+{%
\PackageError{dataplot}{Min Y > Max Y in bounds #1,#2,#3,#4}{%
The bounds must be specified as minX,minY,maxX,maxY}%
-\fi
+}{}%
}
\newcommand*{\dtl@constructticklist}[4]{%
-\DTLifFPopenbetween{0}{#1}{#2}{%
- \FPsub{\@dtl@width}{0}{#1}%
- \FPmul{\@dtl@width}{\@dtl@width}{#3}%
- \FPdiv{\@dtl@neggap}{\@dtl@width}{10}%
- \setlength\dtl@tmplength{\@dtl@neggap sp}%
- \ifdim\dtl@tmplength<\DTLmintickgap
- \FPdiv{\@dtl@neggap}{\@dtl@width}{4}%
- \setlength\dtl@tmplength{\@dtl@neggap sp}%
- \ifdim\dtl@tmplength<\DTLmintickgap
- \FPdiv{\@dtl@neggap}{\@dtl@width}{2}%
- \setlength\dtl@tmplength{\@dtl@neggap sp}%
- \ifdim\dtl@tmplength<\DTLmintickgap
- \let\@dtl@neggap=\@dtl@width
- \fi
- \fi
- \fi
- \FPmul{\@dtl@width}{#2}{#3}%
- \FPdiv{\@dtl@posgap}{\@dtl@width}{10}%
- \setlength\dtl@tmplength{\@dtl@posgap sp}%
- \ifdim\dtl@tmplength<\DTLmintickgap
- \FPdiv{\@dtl@posgap}{\@dtl@width}{4}%
- \setlength\dtl@tmplength{\@dtl@posgap sp}%
- \ifdim\dtl@tmplength<\DTLmintickgap
- \FPdiv{\@dtl@posgap}{\@dtl@width}{2}%
- \setlength\dtl@tmplength{\@dtl@posgap sp}%
- \ifdim\dtl@tmplength<\DTLmintickgap
- \let\@dtl@posgap=\@dtl@width
- \fi
- \fi
- \fi
- \FPmax{\@dtl@gap}{\@dtl@neggap}{\@dtl@posgap}%
- \FPdiv{\@dtl@gap}{\@dtl@gap}{#3}%
- \dtl@constructticklistwithgapz{#1}{#2}{#4}{\@dtl@gap}%
-}{%
- \FPsub{\@dtl@width}{#2}{#1}%
- \FPmul{\@dtl@width}{\@dtl@width}{#3}%
- \FPdiv{\@dtl@gap}{\@dtl@width}{10}%
- \setlength\dtl@tmplength{\@dtl@gap sp}%
- \ifdim\dtl@tmplength<\DTLmintickgap
- \FPdiv{\@dtl@gap}{\@dtl@width}{4}%
- \setlength\dtl@tmplength{\@dtl@gap sp}%
- \ifdim\dtl@tmplength<\DTLmintickgap
- \FPdiv{\@dtl@gap}{\@dtl@width}{2}%
- \setlength\dtl@tmplength{\@dtl@gap sp}%
- \ifdim\dtl@tmplength<\DTLmintickgap
- \let\@dtl@gap=\@dtl@width
- \fi
- \fi
- \fi
- \FPdiv{\@dtl@gap}{\@dtl@gap}{#3}%
- \dtl@constructticklistwithgap{#1}{#2}{#4}{\@dtl@gap}%
-}%
+ \DTLifFPopenbetween{0}{#1}{#2}%
+ {%
+ \dtlsub{\@dtl@width}{0}{#1}%
+ \dtldiv{\@dtl@neggap}{\@dtl@width}{10}%
+ \dtlifnumlt{\@dtl@neggap}{#3}%
+ {%
+ \edef\@dtl@neggap{#3}%
+ }%
+ {}%
+ \dtldiv{\@dtl@posgap}{#2}{10}%
+ \dtlifnumlt{\@dtl@posgap}{#3}%
+ {%
+ \edef\@dtl@posgap{#3}%
+ }%
+ {}%
+ \dtlmax{\@dtl@gap}{\@dtl@neggap}{\@dtl@posgap}%
+ \dtlifnumgt{\@dtl@gap}{\@dtl@width}%
+ {}%
+ {%
+ \dtl@constructticklistwithgapz{#1}{#2}{#4}{\@dtl@gap}%
+ }%
+ }%
+ {%
+ \dtlsub{\@dtl@width}{#2}{#1}%
+ \dtldiv{\@dtl@gap}{\@dtl@width}{10}%
+ \dtlifnumlt{\@dtl@gap}{#3}%
+ {%
+ \dtlifnumgt{#3}{\@dtl@width}%
+ {%
+ \def#4{#1,#2}%
+ }%
+ {%
+ \dtl@constructticklistwithgap{#1}{#2}{#4}{#3}%
+ }
+ }%
+ {%
+ \dtl@constructticklistwithgap{#1}{#2}{#4}{\@dtl@gap}%
+ }%
+ }%
}
\newcommand*{\dtl@constructticklistwithgap}[4]{%
\edef\@dtl@thistick{#1}%
\edef#3{#1}%
-\FPadd{\@dtl@thistick}{\@dtl@thistick}{#4}%
+\dtladd{\@dtl@thistick}{\@dtl@thistick}{#4}%
\whiledo{\DTLisFPopenbetween{\@dtl@thistick}{#1}{#2}}{%
\expandafter\toks@\expandafter{\@dtl@thistick}%
\edef#3{#3,\the\toks@}%
- \FPadd{\@dtl@thistick}{\@dtl@thistick}{#4}%
+ \dtladd{\@dtl@thistick}{\@dtl@thistick}{#4}%
}%
\expandafter\toks@\expandafter{#2}%
\edef#3{#3,\the\toks@}%
}
\newcommand*{\dtl@constructticklistwithgapz}[4]{%
-\edef\@dtl@thistick{0}%
-\edef#3{0}%
-\FPadd{\@dtl@thistick}{\@dtl@thistick}{#4}%
-\whiledo{\DTLisFPopenbetween{\@dtl@thistick}{0}{#2}}{%
- \expandafter\toks@\expandafter{\@dtl@thistick}%
- \edef#3{#3,\the\toks@}%
- \FPadd{\@dtl@thistick}{\@dtl@thistick}{#4}%
-}%
-\expandafter\toks@\expandafter{#2}%
-\edef#3{#3,\the\toks@}%
-\FPifeq{#1}{0}%
-\else
-\edef\@dtl@thistick{0}%
- \FPsub{\@dtl@thistick}{\@dtl@thistick}{#4}%
- \whiledo{\DTLisFPopenbetween{\@dtl@thistick}{#1}{0}}{%
+ \edef\@dtl@thistick{0}%
+ \edef#3{0}%
+ \dtladd{\@dtl@thistick}{\@dtl@thistick}{#4}%
+ \whiledo{\DTLisFPopenbetween{\@dtl@thistick}{0}{#2}}%
+ {%
\expandafter\toks@\expandafter{\@dtl@thistick}%
+ \edef#3{#3,\the\toks@}%
+ \dtladd{\@dtl@thistick}{\@dtl@thistick}{#4}%
+ }%
+ \expandafter\toks@\expandafter{#2}%
+ \edef#3{#3,\the\toks@}%
+ \dtlifnumeq{#1}{0}%
+ {}%
+ {%
+ \edef\@dtl@thistick{0}%
+ \dtlsub{\@dtl@thistick}{\@dtl@thistick}{#4}%
+ \whiledo{\DTLisFPopenbetween{\@dtl@thistick}{#1}{0}}%
+ {%
+ \expandafter\toks@\expandafter{\@dtl@thistick}%
+ \edef#3{\the\toks@,#3}%
+ \dtlsub{\@dtl@thistick}{\@dtl@thistick}{#4}%
+ }%
+ \expandafter\toks@\expandafter{#1}%
\edef#3{\the\toks@,#3}%
- \FPsub{\@dtl@thistick}{\@dtl@thistick}{#4}%
}%
- \expandafter\toks@\expandafter{#1}%
- \edef#3{\the\toks@,#3}%
-\fi
}
\newcommand*{\dtl@constructminorticklist}[4]{%
- \FPsub{\@dtl@width}{#2}{#1}%
- \FPmul{\@dtl@width}{\@dtl@width}{#3}%
- \FPdiv{\@dtl@gap}{\@dtl@width}{10}%
+ \dtlsub{\@dtl@width}{#2}{#1}%
+ \dtlmul{\@dtl@width}{\@dtl@width}{#3}%
+ \dtldiv{\@dtl@gap}{\@dtl@width}{10}%
\setlength\dtl@tmplength{\@dtl@gap sp}%
\ifdim\dtl@tmplength<\DTLminminortickgap
- \FPdiv{\@dtl@gap}{\@dtl@width}{4}%
+ \dtldiv{\@dtl@gap}{\@dtl@width}{4}%
\setlength\dtl@tmplength{\@dtl@gap sp}%
\ifdim\dtl@tmplength<\DTLminminortickgap
- \FPdiv{\@dtl@gap}{\@dtl@width}{2}%
+ \dtldiv{\@dtl@gap}{\@dtl@width}{2}%
\setlength\dtl@tmplength{\@dtl@gap sp}%
\ifdim\dtl@tmplength<\DTLminminortickgap
\let\@dtl@gap=\@dtl@width
\fi
\fi
\fi
- \FPdiv{\@dtl@gap}{\@dtl@gap}{#3}%
+ \dtldiv{\@dtl@gap}{\@dtl@gap}{#3}%
\dtl@constructticklistwithgapex{#1}{#2}{\dtl@tmp}{\@dtl@gap}%
\ifx#4\@empty
\let#4=\dtl@tmp
@@ -877,7 +919,7 @@ east,southeast,south,southwest,west,northwest}[northeast]{%
\newcommand*{\dtl@constructticklistwithgapex}[4]{%
\edef\@dtl@thistick{#1}%
\let#3=\@empty
-\FPadd{\@dtl@thistick}{\@dtl@thistick}{#4}%
+\dtladd{\@dtl@thistick}{\@dtl@thistick}{#4}%
\whiledo{\DTLisFPopenbetween{\@dtl@thistick}{#1}{#2}}{%
\expandafter\toks@\expandafter{\@dtl@thistick}%
\ifx#3\@empty
@@ -885,7 +927,7 @@ east,southeast,south,southwest,west,northwest}[northeast]{%
\else
\edef#3{#3,\the\toks@}%
\fi
- \FPadd{\@dtl@thistick}{\@dtl@thistick}{#4}%
+ \dtladd{\@dtl@thistick}{\@dtl@thistick}{#4}%
}%
}
\newcommand*{\DTLaddtoplotlegend}[3]{%