Sub-compilations of MWE
I will later create a final file which will show the problem (cf. Main compilation of MWE below), which will need the following input files:
test1.pdf, which can be compiled using the following code (when you save the code as test1.tex)
\documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{width=67cm,compat=1.8} \pgfkeys{ /pgf/number format/precision=0, /pgf/number format/fixed zerofill=true, /pgf/number format/fixed } \usepackage{pgfplotstable} \renewcommand*{\familydefault}{\sfdefault} \usepackage{sfmath} \begin{document} \begin{tikzpicture} \centering \begin{axis}[yticklabel style={ /pgf/number format/fixed, /pgf/number format/precision=0 }, scaled y ticks=false, ybar, axis on top, ticklabel style = {font=\Huge}, enlarge x limits = 0.04, height=15cm, width=67cm, bar width=3.5cm, ymajorgrids, tick align=inside, major grid style={draw=white}, enlarge y limits= 0.2, ymin=-15, ymax=18, axis x line*=bottom, axis y line*=right, y axis line style={opacity=0}, tickwidth=0pt, symbolic x coords={1998, 1999, 2000}, xtick=data, nodes near coords={ \pgfmathprintnumber[precision=2]{\pgfplotspointmeta} }, every node near coord/.append style={font=\Huge}, ] \addplot [draw=none,fill=yellow!100] coordinates { (1998, 8) (1999, 16) (2000, 3)}; \end{axis} \end{tikzpicture} \end{document}
test2.pdf, which can be compiled using the following code (when you save the code as test2.tex)
\documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{width=67cm,compat=1.8} \pgfkeys{ /pgf/number format/precision=0, /pgf/number format/fixed zerofill=true, /pgf/number format/fixed } \usepackage{pgfplotstable} \renewcommand*{\familydefault}{\sfdefault} \usepackage{sfmath} \begin{document} \begin{tikzpicture} \centering \begin{axis}[yticklabel style={ /pgf/number format/fixed, /pgf/number format/precision=0 }, scaled y ticks=false, ybar, axis on top, ticklabel style = {font=\Huge}, enlarge x limits = 0.04, height=15cm, width=67cm, bar width=3.5cm, ymajorgrids, tick align=inside, major grid style={draw=white}, enlarge y limits= 0.2, ymin=-13000, ymax=14500, axis x line*=bottom, axis y line*=right, y axis line style={opacity=0}, tickwidth=0pt, symbolic x coords={1998, 1999, 2000}, xtick=data, nodes near coords={ \pgfmathprintnumber[precision=2]{\pgfplotspointmeta} }, every node near coord/.append style={font=\Huge}, ] \addplot [draw=none,fill=yellow!100] coordinates { (1998, 3426) (1999, 4953) (2000, 1505)}; \addplot [draw=none, fill=green!100] coordinates { (1998, 2297) (1999, 4822) (2000, 921)}; \end{axis} \end{tikzpicture} \end{document}
test3.pdf, which can be compiled using the following code (when you save the code as test3.tex)
\documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{width=67cm,compat=1.8} \pgfkeys{ /pgf/number format/precision=0, /pgf/number format/fixed zerofill=true, /pgf/number format/fixed } \usepackage{pgfplotstable} \renewcommand*{\familydefault}{\sfdefault} \usepackage{sfmath} \begin{document} \begin{tikzpicture} \centering \begin{axis}[yticklabel style={ /pgf/number format/fixed, /pgf/number format/precision=0 }, scaled y ticks=false, ybar, axis on top, ticklabel style = {font=\Huge}, enlarge x limits = 0.04, height=15cm, width=67cm, bar width=3.5cm, ymajorgrids, tick align=inside, major grid style={draw=white}, enlarge y limits= 0.2, ymin=40000, ymax=270000, axis x line*=bottom, axis y line*=right, y axis line style={opacity=0}, tickwidth=0pt, symbolic x coords={1998, 1999, 2000}, xtick=data, nodes near coords={ \pgfmathprintnumber[precision=2]{\pgfplotspointmeta} }, every node near coord/.append style={font=\Huge}, ] \addplot [draw=none,fill=yellow!100] coordinates { (1998, 69939) (1999, 55986) (2000, 51422)}; \addplot [draw=none, fill=red!100] coordinates { (1998, 74916) (1999, 77029) (2000, 89716)}; \addplot [draw=none,fill=green!100] coordinates { (1998, 46452) (1999, 51274) (2000, 53092)}; \end{axis} \end{tikzpicture} \end{document}
Main compilation of MWE
\documentclass{article}
\usepackage[a4paper,margin=2cm]{geometry}
\usepackage{graphicx}
\begin{document}
\begin{figure}[h]
\centering
\includegraphics[width=1.0\textwidth]{test1.pdf}
\end{figure}
\begin{figure}[h]
\centering
\includegraphics[width=1.0\textwidth]{test2.pdf}
\end{figure}
\begin{figure}[h]
\centering
\includegraphics[width=1.0\textwidth]{test3.pdf}
\end{figure}
\end{document}
That yields something as such (without the blue-ish lines):
The blue-ish lines indicate the problem, namely that the dates (or values on the x-axis), e.g. the three instances of 1998, are not lined up vertically.
My question is: how to make them line up vertically, please?
Some comments
I think one of the issues at stake (from elaborate tweaking in a more detailed parent problem) are the values of ymin=...
and ymax=...
. If those values are very big, or very small, it makes a difference as with regards to the vertical line-up of the different x-axes.