
그런데 포인트가 연결되지 않게 하려면 어떻게 해야 할까요?
\documentclass[12pt]{article}
\usepackage{pgfplots}
\usepackage{gensymb}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
title={Temperature dependence of CuSO$_4\cdot$5H$_2$O solubility},
xlabel={Temperature [\degree C]},
ylabel={Solubility [g per 100 g water]},
xmin=0, xmax=100,
ymin=0, ymax=120,
xtick={0,20,40,60,80,100},
ytick={0,20,40,60,80,100,120},
legend pos=north west,
ymajorgrids=true,
grid style=dashed,
]
\addplot[
color=blue,
mark=square,
]
coordinates {
(0,23.1)(10,27.5)(20,32)(30,37.8)(40,44.6)(60,61.8)(80,83.8)(100,114)
};
\legend{CuSO$_4\cdot$5H$_2$O}
\end{axis}
\end{tikzpicture}
\end{document}
답변1
내가 의견에서 제안한대로 : only marks
에 옵션을 추가하십시오 \addplot
.
\documentclass[12pt]{article}
\usepackage{pgfplots}
\pgfplotsset{compat=1.16}% recent is 1.18)
\usepackage{siunitx}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
title={Temperature dependence of CuSO$_4\cdot$5H$_2$O solubility},
xlabel={Temperature [\si{\degreeCelsius}]},
ylabel={Solubility [g per 100 g water]},
xmin=0, xmax=100,
ymin=0, ymax=120,
xtick={0,20,40,60,80,100},
ytick={0,20,40,60,80,100,120},
legend pos=north west,
ymajorgrids=true,
grid style=dashed,
]
\addplot[
color=blue,
mark=square,
only marks % <---
]
coordinates {
(0,23.1)(10,27.5)(20,32)(30,37.8)(40,44.6)(60,61.8)(80,83.8)(100,114)
};
\legend{CuSO$_4\cdot$5H$_2$O}
\end{axis}
\end{tikzpicture}
\end{document}
이것은 다음을 제공합니다: