[英]How do I increase the thickness of a line and size of the marker head for a stem plot in Matplotlib?
我正在嘗試創建一個莖 plot。 我似乎找不到增加線條粗細和標記頭尺寸的方法。
請找到下面編寫的基本代碼。 任何幫助將不勝感激。
x = dataset['Month']
y = dataset['Total B']
plt.stem(x,y, linefmt='--')
plt.show()
我在這里找到了答案:
如何在 Matplotlib 中為莖 plot 增加線條的粗細和標記頭的大小?
標記線,主干線,基線,= ax.stem(x,y,linefmt='k-',markerfmt='ko',basefmt='k.') plt.setp(stemline, linewidth = 1.25) plt.setp(markerline , 標記大小 = 5)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.