我必须改变我的情节中的标记大小(使它们更大).如何更改错误栏的宽度呢?我正在使用matplotlib.谢谢.
plot=ax.errorbar(x,y, yerr=[y1,y2], color='red', fmt='.', markersize='10', ecolor='red',capsize=4)
Run Code Online (Sandbox Code Playgroud)
您可以通过elinewidth在调用errorbar(x,y,...)errorbar文档中设置属性来使错误栏更粗.但错误栏的长度是您的数据:您无法更改长度而不更改它所代表的错误.
import matplotlib.pyplot as plt
# define x,y, y1,y2 here ...
plt.figure()
plt.errorbar(x,y, yerr=[y1,y2], color='red', fmt='.', markersize='10', ecolor='red',capsize=4, elinewidth=2)
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
18775 次 |
| 最近记录: |