Change marker size in matplotlib

Can't resize marker in matplotlib?

from pylab import *    
x = [5,7,5,9,11,14]
y = [4,5,3,11,15,14]
scatter(x, y,color='green',marker='h')
show()
+4
source share
2 answers

Indicate using the keyword argument s:

scatter(x, y, s=500, color='green', marker='h')
#             ^^^^^

You can also specify an individual marker size by passing a list:

scatter(x, y, s=[5, 50, 500, 1000, 1500, 2000], color='green', marker='h')

See matplotlib.pyplot.scatter.

+4
source

Yes this:

scatter(x, y,color='green',marker='h', markersize=20)
-2
source

All Articles