避免 scaletikz 缩放子图的文本

避免 scaletikz 缩放子图的文本

假设我有以下内容tikzfigure,其中包含 3 个子图(使用创建matlab2tikz),这太大了,无法放在一页上。

\begin{tikzpicture}

\begin{axis}[%
width=3.878in,
height=4.754in,
at={(2.966in,0.642in)},
scale only axis,
xmin=1,
xmax=7,
xlabel={xlabel},
ymin=-30,
ymax=-12,
ylabel={ylabel},
axis x line*=bottom,
axis y line*=left,
]

\addplot [color=blue,solid]
  table[row sep=crcr]{%
1   -12.8649565461571\\
2   -13.7476049223822\\
3   -14.6302532986073\\
4   -15.5129016748325\\ 
5   -16.3955500510576\\
};
\end{axis}

\begin{axis}[%
width=3.878in,
height=4.754in,
at={(8.563in,0.642in)},
scale only axis,
xmin=1,
xmax=7,
xlabel={xlabel},
ymin=-16,
ymax=-8,
ylabel={ylabel},
axis x line*=bottom,
axis y line*=left,
]

\addplot [color=blue,solid]
  table[row sep=crcr]{%
1   -8.77653300904041\\
2   -10.3274635147801\\
3   -11.8783940205199\\
4   -13.4293245262596\\
5   -14.9802550319994\\
};
\end{axis}

\begin{axis}[
width=3.878in,
height=4.754in,
at={(14.159in,0.642in)},
scale only axis,
axis equal,
xlabel={xlabel},
ylabel={ylabel},
axis x line*=bottom,
axis y line*=left,
]
\addplot [color=blue,solid,mark=asterisk,mark options={solid}]
  table[row sep=crcr]{%
-9.96578428466209   -3.29101293572018\\
-10.9657842846621   -3.52562937598178\\
-12.2877123795494   -3.92228491362964\\
-13.2877123795494   -3.58191482601903\\
};
\end{axis}
\end{tikzpicture}

为了缩小它我尝试使用scaletikz,如:

\documentclass[11pt,a4paper]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[danish]{babel}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\usepackage{tikzscale}
\usepackage{graphicx}
\begin{document}
\includegraphics[width=\textwidth]{test.tikz}
\end{document}

根据其文档应该尊重文本大小,但如果我们与未缩放的版本进行比较

\input{test.tikz}

很明显,标签已被缩放。我该如何避免这种情况?我知道解决\begin{tikzpicture}[scale=0.2]方案,但是,由于文件数量庞大,我宁愿想要一个可以从文档端应用的自动化解决方案(我已经应用了\includegrapics),而且使用scale会使它很难完全适合页面宽度。

相关内容