Is there a way to set default marker size (s
) parameter for matplotlib plt.scatter()
(or likewise to set the shape of the marker)?
mpl.rcParams.keys()
has settings for the line plots, e.g.
import matplotlib as mpl
mpl.rcParams['lines.marker']='D'
... but they do not seem to relate to plt.scatter()
.
Thanks.
Clarification:
I'd like to use a configuration mechanism like mpl.rcParams()
, or some other reasonably civilized method. Locally modifying library code is not it.
On the other hand, if it cannot currently be done and somebody submits a patch to Matplotlib, that would be awesome.
Of course there is, it's all in the pyplot.py
A snippet from their code:
def scatter(x, y, s=20, c=None, marker='o', cmap=None, norm=None, vmin=None,
vmax=None, alpha=None, linewidths=None, verts=None, edgecolors=None,
hold=None, data=None, **kwargs):
The size is set to 20 s=20
and the marker shape is a circle marker='o'
which agrees with their documentation
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