pgfplots画图中mark的颜色怎么修改?

发布于 2021-06-14 20:44:25

捕获.JPG
如图所示,我想将(0,0)坐标处的点颜色全部改为红色,以下为代码:

\documentclass{standalone}


\usepackage{pgfplots}
\pgfplotsset{compat = newest}


\begin{document}
    \begin{tikzpicture}
        \begin{axis}
            \addplot+[color = red, mark color = red] (0,0) -- (1,1);
        \end{axis}
    \end{tikzpicture}
\end{document}

查看更多

关注者
0
被浏览
1.8k
越来越少
越来越少 2021-06-14
这家伙很懒,什么也没写!
 \addplot+[color = red, mark options={draw=blue,fill=orange}] (0,0) -- (1,1);

关于 mark 的这几个选项都是 TikZ 选项。

2 个回答
LaTeXStudio
LaTeXStudio 2021-06-14
这家伙很懒,什么也没写!

看手册,没什么难度:

\documentclass{standalone}


\usepackage{pgfplots}
\pgfplotsset{compat = newest}


\begin{document}
    \begin{tikzpicture}
        \begin{axis}
            \addplot[color = red, mark=*, mark color = red] (0,0) -- (1,1);
        \end{axis}
    \end{tikzpicture}
\end{document}

image.png

撰写答案

请登录后再发布答案,点击登录

发布
问题

分享
好友

手机
浏览

扫码手机浏览