下图中,有大圆点标记。有办法去除它们吗?
我的图形代码是
\begin{figure}[H]
\begin{tikzpicture}
\begin{axis}[
height=9cm,
width=12cm,
grid=major,
xlabel={Levels},
ylabel={Speed},
legend style={
cells={anchor=east},
legend pos=outer north east,
}]
答案1
您pgfplots
可以使用:
mark=none
禁用标记mark=*
指定要使用的标记only marks
仅显示点
代码:
\documentclass{article}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}
\addplot [mark=none, red, ultra thick] coordinates { (1,6) (2,8) (3,10)}
node [midway, sloped, above] {mark=none};
\addplot [mark=*, brown, ultra thick] coordinates { (1,4) (2,6) (3,8)}
node [midway, sloped, above] {mark=*};
\addplot [only marks, blue, ultra thick] coordinates { (1,2) (2,4) (3,6)}
node [midway, sloped, below] {only marks};
\end{axis}
\end{tikzpicture}
\end{document}