
私はファイルからのデータを使って pgfplots でプロットを作成しています。ファイルからの値を正しく取得しますが、PDF をコンパイルすると、レポートを書いているテキストと同じ寸法のラベルが印刷されます。もっと小さくしたいです。プリアンブルのプロット設定のコードは次のようになります。
\usepackage{pgfplots}
\usepgfplotslibrary{groupplots}
\pgfplotsset{every tick label/.append style={font=\tiny},label style=
{font=\tiny},width=6.5cm,height=5.5cm,compat=1.3}
文書には次の内容が記載されています:
\begin{figure}[!ht]
\centering
\subfloat[Andamento nel tempo di pressione e temperatura]{
\begin{tikzpicture}
\begin{axis}[xmin=0, xmax=90,axis y line*=left,ymin=8.62,ymax=8.69, xlabel=
{Tempo (ore)}, ylabel={Pressione (bar)}]
\addplot[thick,black] table[x=tempo,y=P_mean]
{capitolo4/grafici/t_meanVSp_mean2.txt};
\end{axis}
\begin{axis}[xmin=0, xmax=90,axis y line*=right,ymin=20.5,ymax=23.0,
ylabel=Temperatura (°C)]
\addplot[dashed,black] table[x=tempo,y=T_mean]
{capitolo4/grafici/t_meanVSp_mean2.txt};
\end{axis}
\end{tikzpicture}
}
\subfloat[Confronto tra la pressione misurata sperimentalmente e la
pressione calcolata con il modello di gas perfetto]{
\begin{tikzpicture}
\begin{axis}[xmin=0, xmax=90,ymin=8.55,ymax=8.75,xlabel=Tempo (ore),
ylabel=Pressione (bar)]
\addplot[only marks,mark=o] table[x=tempo,y=p_sp]
{capitolo4/grafici/t_meanVSp_mean3.txt};
\addplot[thick,black] table[x=tempo,y=p_id]
{capitolo4/grafici/t_meanVSp_mean3.txt};
\end{axis}
\end{tikzpicture}
}
\end{figure}
このコードで取得したグラフも添付します。十分に理解できたと思います。ありがとう。
答え1
compat
前にオプションを設定しますlabel style
:
\documentclass{article}
\usepackage{pgfplots}
\pgfplotsset{
compat=1.3,
tick label style={font=\tiny},
label style={font=\tiny},
width=6.5cm,
height=5.5cm}
\begin{document}
Normal text
\begin{figure}[!ht]
\centering
\begin{tikzpicture}
\begin{axis}[xmin=0, xmax=90,axis y line*=left,ymin=8.62,ymax=8.69, xlabel=
{Tempo (ore)}, ylabel={Pressione (bar)}]
\end{axis}
\end{tikzpicture}
\end{figure}
\end{document}
結果: