
저는 Sharelatex를 사용하여 논문을 작성해 왔으며 많은 pgfplot을 축적했습니다. 컴파일 시간이 초과되기 전에는 csv 파일에서 생성된 ~6pgfplot 이상을 포함할 수 없습니다. 나는 여러 개의 tex 파일로 플롯을 나누어 왔습니다. 결국 간단한 방식으로 모든 것을 결합할 수 있는 방법이 있습니까? 검색을 시도했는데 하나의 옵션이 pdf 파일을 png로 변환하고 플롯을 이미지로 추가하는 것 같았지만 그림의 품질과 선명도가 손실되었습니다(imagemagick을 시도했지만 출력이 만족스럽지 않았습니다). 내 옵션은 무엇입니까? 조언을 부탁드립니다. 감사해요.
다음은 많은 그룹 플롯 중 하나입니다(예:).
\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}
답변1
이건 테스트할 수 없어요귀하의 예제는 본질적으로 제가 가지고 있지 않은 파일에 의존하기 때문에 컴파일할 수 없기 때문입니다.. 그러나 플롯 파일이 다음과 같기를 원합니다.
\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}
그런 다음 기본 문서에 다음과 같은 플롯을 포함합니다.
\begin{figure}
\centering
\includegraphics{myfabulousplot}
\caption{My Fabulous Plot}
\label{fig:fabplot}
\end{figure}
figure
개별 플롯 파일의 환경을 사용하지 마십시오 .tex
. 예를 들어, 개별 환경을 원할 뿐입니다 tikzpicture
.
이 작업을 자동으로 수행할 수도 있습니다. 그러나 시간 초과를 방지하려는 경우 자동은 좋은 생각이 아닙니다.