matplotlib:使加号变粗 [英] matplotlib: make plus sign thicker
本文介绍了matplotlib:使加号变粗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在Matplotlib中,我想画一个粗加号(或一个十字),但是
In Matplotlib, I would like to draw a thick plus sign (or a cross), but the one provided in the marker set is too thin.
即使我增加了它的大小,它也不会变厚.
Even as I increase its size, it doesn't get any thicker.
For example: The lines of code drawing the red plus sign are:
# Draw median marker.
if plot_opts.get('bean_show_median', True):
ax.plot(pos, np.median(pos_data),
marker=plot_opts.get('bean_median_marker', '+'),
color=plot_opts.get('bean_median_color', 'r'))
如果我添加一个额外的参数markersize=20
,则标记只会拉伸.它会像以前一样薄.我可以把它厚吗?
If I add an extra parameter markersize=20
, the marker will only stretch. It will be as thin as before. Can I make it thick?
推荐答案
您可以使用markeredgewidth
(或mew
).您需要将其与markersize
结合使用,否则会得到粗大但很小的标记.
You can use markeredgewidth
(or mew
). You'll want to combine it with markersize
, otherwise you get thick but tiny markers.
例如:
plt.plot([2,4,6,1,3,5], '+', mew=10, ms=20)
这篇关于matplotlib:使加号变粗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文