Me gusta usar tikz
nodos para colocar parcelas una al lado de la otra. Sin embargo, en el siguiente MWE el eje parece estar desplazado hacia la izquierda.
\documentclass{book}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\node[text width=.4\linewidth] (A) {%
\begin{tikzpicture}
\begin{axis}
\addplot {x^2 - x +4};
\end{axis}
\end{tikzpicture}
};
\node[text width=.4\linewidth,anchor = north] (B) at (A.south) {%
\begin{tikzpicture}
\begin{axis}
\addplot {x^2 - x +4};
\end{axis}
\end{tikzpicture}
};
\end{tikzpicture}
\end{document}
¿Cómo puedo arreglar esto?
Respuesta1
Respuesta2
Cada uno tikzpicture
se considera como uno único char
y no es necesario incluirlos en externo tikzpictures
para colocarlos, puede usar una tabluar
línea simple o simplemente una línea vacía como en el siguiente ejemplo.
Si necesita arreglar las dimensiones de la trama, width
también height axis'
lo ayudará.
\documentclass{book}
\usepackage{pgfplots}
\begin{document}
\begin{center}
\begin{tikzpicture}
\begin{axis}[width=.4\linewidth]
\addplot {x^2 - x +4};
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
\begin{axis}[width=.4\linewidth]
\addplot {x^2 - x +4};
\end{axis}
\end{tikzpicture}
\end{center}
\end{document}