1.颜色
plt.scatter(x,y,c=‘r’,marker=‘x’,label=‘cluster_1’)
b: blue
g: green
r: red
c: cyan
m: magenta
y: yellow
k: black
w: white
2.线条
plt.scatter(x,y,c=‘r’,marker=‘x’,label=‘cluster_1’)
plt.plot(range(10), linestyle=’–’, marker=‘o’, color=‘b’)
- | solid line style
-- | dashed line style
-. | dash-dot line style
: | dotted line style
. | point marker
, | pixel marker
o | circle marker
v | triangle_down marker
^ | triangle_up marker
< | triangle_left marker
> | triangle_right marker
1 | tri_down marker
2 | tri_up marker
3 | tri_left marker
4 | tri_right marker
s | square marker
p | pentagon marker
* | star marker
h | hexagon1 marker
H | hexagon2 marker
+ | plus marker
x | x marker
D | diamond marker
d | thin_diamond marker
| | vline marker
_ | hline marker
本文仅供自己学习使用,如有侵权,请告知我删除。初来乍到,请多多指教。
原文链接:https://blog.csdn.net/qq_41985019/article/details/105266661