
He estado usando Sharelatex para escribir mi tesis y he acumulado muchos diagramas de pgf. No puedo incluir más de ~6 pgfplots producidos por archivos csv antes de que se agote el tiempo de compilación. He estado dividiendo mis parcelas entre varios archivos tex. ¿Hay alguna manera de combinarlo todo al final de una manera simple? Intenté buscar y parece que una opción es convertir archivos pdf a png y agregar los gráficos como imágenes, pero pierdo la calidad y nitidez de la figura (probé imagemagick y no quedé satisfecho con el resultado). ¿Cuáles son mis opciones? Por favor avise. Gracias.
Aquí hay un diagrama de grupo entre muchos (como ejemplo):
\documentclass{standalone}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{floatrow}
\usepackage{tikz}
\usepackage{pgfplots}
\usepackage{fixltx2e}
\usepackage{siunitx}
\usepackage{lscape}
\usepackage{diagbox}
\usepackage{caption}
\usepackage{xcolor}
\usepackage[version=4]{mhchem}
\usepackage{subcaption}
\usepgfplotslibrary{groupplots}
\DeclareSIUnit{\molar}{M}
\pgfplotsset{compat=newest}
\begin{document}
\begin{figure}[h]
\setlength{\abovecaptionskip}{15pt plus 3pt minus 2pt}
\begin{minipage}{\columnwidth}
\centering
\begin{tikzpicture}[scale = .65, transform shape,trim left]
\begin{groupplot}[
group style={
group size=2 by 3,
horizontal sep=0pt,
vertical sep=50pt
},
scale only axis,
xlabel={nm},
ylabel={Abs},
xmin=385, xmax=565,
xtick pos=left,
ytick pos=left,
no marks,
max space between ticks=1000pt,
try min ticks=4,
xlabel={},
ylabel={}
]
\nextgroupplot[title=\textbf{(a)} $15:60$ (TPPS\textsubscript{4}-\ce{2Cl}:\Lig{1})]
\addplot table [col sep=comma, x=nm, y=10] {ST053 1560 Por SG.csv};\label{1560porsg1}
\addplot table [col sep=comma, x=nm, y=100] {ST053 1560 Por SG.csv};\label{1560porsg2}
\addplot table [col sep=comma, x=nm, y=200] {ST053 1560 Por SG.csv};\label{1560porsg3}
\nextgroupplot[title=\textbf{(e)} $60:15$ (TPPS\textsubscript{4}-\ce{2Cl}:\Lig{1})]
\addplot table [col sep=comma, x=nm, y=10] {ST053 6015 Por SG.csv};
\addplot table [col sep=comma, x=nm, y=100] {ST053 6015 Por SG.csv};
\addplot table [col sep=comma, x=nm, y=200] {ST053 6015 Por SG.csv};
\nextgroupplot[title=\textbf{(g)} $60:15$ (TPPS\textsubscript{4}-\ce{2Cl}:Buffer)]
\addplot table [col sep=comma, x=nm, y=10] {ST053 6015 Por blank SG.csv};
\addplot table [col sep=comma, x=nm, y=100] {ST053 6015 Por blank SG.csv};
\addplot table [col sep=comma, x=nm, y=200] {ST053 6015 Por blank SG.csv};
\end{groupplot}
\node at ($(group c1r2.west)!0.5!(group c1r2.west)$)[xshift=-1.5cm]{\rotatebox{90}{\large{Absorption}}};
\node at ($(group c1r3.south)!0.5!(group c2r3.south)$)[yshift=-1.5cm]{\large{Nanometer}};
\end{tikzpicture}
\end{minipage}
\caption{Caption}
\end{figure}
\end{document}
Respuesta1
No puedo probar estoporque no puedo compilar tu ejemplo ya que esencialmente depende de un archivo que no tengo. Sin embargo, desea que su archivo de trazado se vea así:
\documentclass[tikz]{standalone}
\usepackage[utf8]{inputenc}
\usepackage{pgfplots}
\usepackage{siunitx}
\usepackage{diagbox}
\usepackage[version=4]{mhchem}
\usepgfplotslibrary{groupplots}
\DeclareSIUnit{\molar}{M}
\pgfplotsset{compat=newest}
\begin{document}
\begin{tikzpicture}[scale = .65, transform shape, trim left]
\begin{groupplot}[
group style={
group size=2 by 3,
horizontal sep=0pt,
vertical sep=50pt
},
scale only axis,
xlabel={nm},
ylabel={Abs},
xmin=385, xmax=565,
xtick pos=left,
ytick pos=left,
no marks,
max space between ticks=1000pt,
try min ticks=4,
xlabel={},
ylabel={}
]
\nextgroupplot[title=\textbf{(a)} $15:60$ (TPPS\textsubscript{4}-\ce{2Cl}:\Lig{1})]
\addplot table [col sep=comma, x=nm, y=10] {ST053 1560 Por SG.csv};\label{1560porsg1}
\addplot table [col sep=comma, x=nm, y=100] {ST053 1560 Por SG.csv};\label{1560porsg2}
\addplot table [col sep=comma, x=nm, y=200] {ST053 1560 Por SG.csv};\label{1560porsg3}
\nextgroupplot[title=\textbf{(e)} $60:15$ (TPPS\textsubscript{4}-\ce{2Cl}:\Lig{1})]
\addplot table [col sep=comma, x=nm, y=10] {ST053 6015 Por SG.csv};
\addplot table [col sep=comma, x=nm, y=100] {ST053 6015 Por SG.csv};
\addplot table [col sep=comma, x=nm, y=200] {ST053 6015 Por SG.csv};
\nextgroupplot[title=\textbf{(g)} $60:15$ (TPPS\textsubscript{4}-\ce{2Cl}:Buffer)]
\addplot table [col sep=comma, x=nm, y=10] {ST053 6015 Por blank SG.csv};
\addplot table [col sep=comma, x=nm, y=100] {ST053 6015 Por blank SG.csv};
\addplot table [col sep=comma, x=nm, y=200] {ST053 6015 Por blank SG.csv};
\end{groupplot}
\node at ($(group c1r2.west)!0.5!(group c1r2.west)$)[xshift=-1.5cm]{\rotatebox{90}{\large{Absorption}}};
\node at ($(group c1r3.south)!0.5!(group c2r3.south)$)[yshift=-1.5cm]{\large{Nanometer}};
\end{tikzpicture}
\end{document}
En su documento principal, luego incluye la trama como esta:
\begin{figure}
\centering
\includegraphics{myfabulousplot}
\caption{My Fabulous Plot}
\label{fig:fabplot}
\end{figure}
No utilice el figure
entorno en el archivo de la trama individual .tex
. Lo único que desea es el tikzpicture
entorno individual, por ejemplo.
También puedes hacer esto automáticamente. Sin embargo, si intenta evitar los tiempos de espera, el modo automático no es una buena idea.