summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pgfplots/pgfplots.scaling.code.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgfplots/pgfplots.scaling.code.tex')
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/pgfplots.scaling.code.tex33
1 files changed, 27 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/generic/pgfplots/pgfplots.scaling.code.tex b/Master/texmf-dist/tex/generic/pgfplots/pgfplots.scaling.code.tex
index 79a4e5a11de..2560d084fef 100644
--- a/Master/texmf-dist/tex/generic/pgfplots/pgfplots.scaling.code.tex
+++ b/Master/texmf-dist/tex/generic/pgfplots/pgfplots.scaling.code.tex
@@ -93,22 +93,36 @@
\pgfplots@initsizes@setunitvector{x}{0}{1}{\pgfplots@tmp@xisaxisparallel}%
\pgfplots@initsizes@setunitvector{y}{1}{1}{\pgfplots@tmp@yisaxisparallel}%
\pgfplots@initsizes@setunitvector{z}{2}{\pgfplots@tmp@Zscale}{\pgfplots@loc@TMPc}%
+ %
+ \pgfplots@scaling@changewidthheight@for@enlargelimits@by@dimension%
+ %
\pgfplots@scale@plotbox@to@widthheight
- \ifpgfplots@threedim
- \pgfplotsgetnormalforcurrentview
- \fi
\else
% 3D case by `view':
\let\pgfplots@x=\pgfutil@empty
\let\pgfplots@y=\pgfutil@empty
\let\pgfplots@z=\pgfutil@empty
\pgfplotssetaxesfromazel{\pgfplots@view@az}{\pgfplots@view@el}{\pgfplots@tmp@xisaxisparallel}%
+ %
+ \pgfplots@scaling@changewidthheight@for@enlargelimits@by@dimension%
+ %
\pgfplots@scale@plotbox@to@widthheight
\if1\pgfplots@tmp@xisaxisparallel%
\def\pgfplots@tmp@yisaxisparallel{1}%
\fi
\fi
-%\message{Pgfplots debug: initialised unit vectors to x=(\the\pgf@xx,\the\pgf@xy), y=(\the\pgf@yx,\the\pgf@yy), z=(\the\pgf@zx,\the\pgf@zy), n = (\pgfplots@view@dir@threedim).^^J }%
+ \pgfplots@computeunitvectorlengths
+ %
+ \pgfplots@scaling@apply@enlargelimits@by@dimension{x}%
+ \pgfplots@scaling@apply@enlargelimits@by@dimension{y}%
+ \ifpgfplots@threedim
+ \pgfplots@scaling@apply@enlargelimits@by@dimension{z}%
+ \fi
+ %
+ \ifpgfplots@threedim
+ \pgfplotsgetnormalforcurrentview
+ \fi
+%\message{Pgfplots debug: initialised unit vectors to x=(\the\pgf@xx,\the\pgf@xy), y=(\the\pgf@yx,\the\pgf@yy), z=(\the\pgf@zx,\the\pgf@zy), n = (\pgfplots@view@dir@threedim). Limits are x=\pgfplots@xmin:\pgfplots@xmax, y=\pgfplots@ymin:\pgfplots@ymax^^J }%
%
\let\pgfplotsmathfloatviewdepthxyz@=\pgfplotsmathfloatviewdepthxyz@infigure
\let\pgfplotsmathviewdepthxyz@=\pgfplotsmathviewdepthxyz@infigure
@@ -381,10 +395,11 @@
\def\pgfplots@scale@mode@choice{2}% stretch to fill
\fi
\pgfplots@scaleaxes@to@BB@{#1}{#2}%
- \pgfplots@computeunitvectorlengths
- \pgfplots@rescale@view@dir
+ % NOTE: we have not yet computed the lengths of unit vectors. In
+ % addition, we have not yet updated the normal vector.
}%
+% DEPRECATED:
\def\pgfplots@rescale@view@dir{%
\expandafter\ifx\csname pgfplots@view@dir@threedim\endcsname\relax
\else
@@ -531,6 +546,7 @@
\fi
}
+
\def\pgfplots@scaleaxes@to@BB@#1#2{%
\begingroup
%
@@ -613,6 +629,7 @@
\ifpgfplots@threedim
\pgfplots@axis@apply@post@scale{z}%
\fi
+ %
% and finally, resize limits appropriately and add all cumulative limit compensations:
\xdef\pgfplots@glob@TMPa{%
%
@@ -790,6 +807,10 @@
% #4: the scale to be applied to y unit
% #5: the scale to be applied to z unit
\def\pgfplots@scaling@compute@final@scales#1#2#3#4#5{%
+ % ##1: the axis (x,y,or z)
+ % ##2: the horizontal scale
+ % ##3: the vertical scale
+ % ##4: the inverse unit scale for this axis
\def\pgfplots@loc@TMPa##1##2##3##4{%
\pgfplotscoordmath{\pgfplots@compat@scaling@coordmath}{parsenumber}{##2}%
\let\xscale@@=\pgfmathresult