Rounding the marker sizes to a given list of ranges

I have marker sizes varied based on a column in my geodataframe but I want the sizes in 5 groups. I don't want every value to have its own size, instead I'd like a range of values to have one marker size.

Here is the code:

fig, ax = mpl.pyplot.subplots(1, figsize = (10,10))

sns.scatterplot(
    data=fishpts_clip, x="Lon", y="Lat", color='Green', size='SpeciesCatch',
    sizes=(100, 300), legend="full"
)

plt.legend(loc='center left', bbox_to_anchor=(1.05, 0.5), ncol=1, title='Sizes')

This is what I got:

enter image description here

Instead, I'd like something like this:

enter image description here



Comments

Popular posts from this blog

Spring Elasticsearch Operations

Network Error and Timeout on Authorize.net JS

Object oriented programming concepts (OOPs)