0

I'm failing at getting an acceptably positioned tick label multiplier in the following MWE of a 3D plot:

% !TeX program = lualatex
\RequirePackage{luatex85}
\documentclass[border=1pt]{standalone}

\usepackage{fontspec}


\usepackage{mathtools}
\usepackage{siunitx}

\usepackage{xcolor}

\usepackage{tikz}
\usetikzlibrary{
    pgfplots.groupplots,
    babel
}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\usepackage{pgfplotstable}

\usepackage[main=ngerman,english]{babel}

\begin{document}

\centering
\begin{tikzpicture}
    \begin{axis}[
        grid=both,
        clip=false,
        view={120}{45},
        xmin=0,
        xmax=0.01,
        ymode=log,
        ytick={0.01,0.1,1,10},
        ymin=0,
        ymax=100,
        zlabel={C},
    ]
    \addplot3 [surf,samples=4,domain=0:0.01, y domain=1:100] {x+y};
    \node at (rel axis cs:0.5,0,1) [above,sloped like x axis] {A};
    \node at (rel axis cs:0,0.5,1) [above,sloped like y axis] {B};
    \end{axis}
\end{tikzpicture}

\end{document}

Behold how extremely far the tick label multiplier 10^-2 is away from the axis;

enter image description here

I'd like to have it closer or even better, at the other end of the axis.

Stefan Pinnow
  • 29,535
Christoph90
  • 1,020

1 Answers1

2

If you want to change the position of the scale label, change the entries of every x tick scale label/.style as you need them. Here an example that might fit your needs.

% used PGFPlots v1.15
\documentclass[border=5pt]{standalone}
\usepackage{pgfplots}
    \pgfplotsset{
        compat=1.15,
    }
\begin{document}
\begin{tikzpicture}
    \begin{axis}[
        grid=both,
        clip=false,
        view={120}{45},
        xmin=0,
        xmax=0.01,
        ymode=log,
        ytick={0.01,0.1,1,10},
        ymin=0,
        ymax=100,
        zlabel={C},
        % ---------------------------------------------------------------------
        % added
        every x tick scale label/.style={
            at={(xticklabel* cs:-0.2)},
            anchor=near xticklabel,
            inner sep=0pt,
        },
        % ---------------------------------------------------------------------
    ]
        \addplot3 [surf,samples=4,domain=0:0.01, y domain=1:100] {x+y};

        \node at (rel axis cs:0.5,0,1) [above,sloped like x axis] {A};
        \node at (rel axis cs:0,0.5,1) [above,sloped like y axis] {B};
    \end{axis}
\end{tikzpicture}
\end{document}

image showing the result of above code

Stefan Pinnow
  • 29,535