忽然发现该网站更为清楚
https://matplotlib.org/stable/api/markers_api.html
https://www.cnblogs.com/ShineLeBlog/p/16283685.html

| 字符 | 类型 | 字符 | 类型 |
|---|---|---|---|
'-' | 实线 | '--' | 虚线 |
'-.' | 虚点线 | ':' | 点线 |
'.' | 点 | ',' | 像素点 |
'o' | 圆点 | 'v' | 下三角点 |
'^' | 上三角点 | '<' | 左三角点 |
'>' | 右三角点 | '1' | 下三叉点 |
'2' | 上三叉点 | '3' | 左三叉点 |
'4' | 右三叉点 | 's' | 正方点 |
'p' | 五角点 | '*' | 星形点 |
'h' | 六边形点1 | 'H' | 六边形点2 |
'+' | 加号点 | 'x' | 乘号点 |
'D' | 实心菱形点 | 'd' | 瘦菱形点 |
'_' | 横线点 |
点

部分线性失效
for ith,linesyle in enumerate(['-','-.','.','o','^','>','2','4','p','h','+','D','_','--',':',',','v','<','1','3','s','*','H','x','d']):
plt.plot(ith+0.25,0.5,linesyle,color=color)
plt.text(ith,0.49,linesyle)
plt.tight_layout()
plt.show()
线
50个点

50个点

100个点

200 个点就看不清楚了

for ith,linesyle in enumerate(['-','-.','.','o','^','>','2','4','p','h','+','D','_','--',':',',','v','<','1','3','s','*','H','x','d']):
plt.plot([i for i in range(1000)],[ith]*1000,linesyle,color=color)
plt.text(-0.3,ith,linesyle)
plt.xlim(-0.5,200)
plt.tight_layout()
plt.show()
这篇博客详细介绍了Matplotlib库中用于创建图表的各种线条样式和点型,包括实线、虚线、点线等,并通过代码示例展示了不同线条和点型在不同数量点上的显示效果。内容涵盖了从简单的线性到复杂的点型,对于数据可视化的实践非常有帮助。
6508

被折叠的 条评论
为什么被折叠?



