Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to control stem markers size in matplotlib?

In How to make thicker stem lines in matplolib there is a description of how to control the width of stem lines. But how to control the size of the stem markers?

like image 908
jason Avatar asked Mar 04 '23 06:03

jason


1 Answers

markerline, stemline, baseline, = ax.stem(x,y,linefmt='k-',markerfmt='ko',basefmt='k.')
plt.setp(stemline, linewidth = 1.25)
plt.setp(markerline, markersize = 5)

While the first two code lines are taken from the link in my question, the third code line changes the marker's size.

like image 162
jason Avatar answered May 16 '23 05:05

jason