如何更改绘图中的颜色和形状

问题描述 投票:1回答:2

我正在使用tikz使用类似以下的结构绘制图形:

\draw plot [mark=ball] coordinates {(0,0) (1,1) ...};

但是我希望能够更改球的颜色和形状-它显示为蓝色圆圈。我没有找到(或不理解)该怎么做。一个简单的例子将不胜感激。

latex tikz
2个回答
2
投票
\documentclass[tikz,border=5mm]{standalone}
\pgfdeclareplotmark{ball}{\shade[draw=none,ball color=green] (0,0) circle (\pgfplotmarksize);}

\begin{document}
\begin{tikzpicture}
    \draw plot [mark=ball] coordinates {(0,0) (1,1)};
\end{tikzpicture}
\end{document}

不幸的是,来晚了,但是我们做到了!

无需说您需要的技巧是第2行(reference,比您的帖子更新。)>


1
投票

您可以尝试

© www.soinside.com 2019 - 2024. All rights reserved.