The documentation on matplotlib
markers here teaches me I can have several styles of the markers. For example, I may have '-o'
for circles on the line, '-*'
for stars on the line and '-s'
for square on the line.
However, they all appear to be too big for me. Like, when I do
axes.errorbar(x, y, yerr=ci, fmt='-o', color='k')
I get
To make them smaller, I tried
axes.errorbar(x, y, yerr=ci, fmt='-o', s=1, color='k')
but no luck.
How to make the markers on a line smaller?
The points in the scatter plot are by default small if the optional parameters in the syntax are not used. The optional parameter 's' is used to increase the size of scatter points in matplotlib.
The standard size of points in matplotlib is 72 points per inch (ppi) - 1 point is hence 1/72 inches.
You can use markersize
argument to change the size of the markers:
plt.errorbar(x, y, yerr=err, fmt='-o', markersize=2, color='k', label = 'size 2')
Like so
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With