Hi I am using a mixed notation labelling system (scientific+non-scientific). Due to this the exponent of the scientific notation is causing certain labels to be misaligned. Here is the MWE
\documentclass{standalone}
\usepackage{pgfplots}
\usepackage{filecontents}
\usepackage{tikz}
\pgfplotsset{compat=1.9, every tick label/.append style={font=\normalsize}}
\begin{filecontents}{data.dat}
Keff PCCR
48.49 1000
38.52 300
25 100
19 50
7.4 10
0.844 2
\end{filecontents}
\begin{document}
\pgfplotstableread{data.dat}{\2}
\begin{tikzpicture}
\begin{axis}[
title={Some title},
enlarge x limits=-1,
symbolic x coords={1000,300,100,50,10,2},
xlabel={X-axis},
xtick={1000,300,100,50,10,2},
xticklabels={$\mathrm{1\times10^3}$,$\mathrm{3\times10^2}$,$100$,$50$,$10$,$2$},
scaled ticks=true,
ymin=0.5, ymax=50,
ylabel={Y-axis},
]
\addplot table [x={PCCR}, y={Keff}] {\2};
\end{axis}
\end{tikzpicture}%
\end{document}
Best Answer
There is the option
typeset ticklabels with strut
to align the ticklabels. Just add it to theaxis
environment options.