Adjust the legend of choropleth in a worldmap (Python)

Viewed 116

I am not able to remove the "(" and "[" symbols in the legend of the worldmap below. They are not supposed to be shown.

How can I change that? Is there a way to manually adjust the legend so that I can name the legend in the following format: = 0, = 1, < 5, etc...

   ax = merge_worldwide.plot(column='Total per country',
                    cmap='PuBu',
                    figsize=(10,10),
                    legend=True,
                    scheme='user_defined',
                    classification_kwds = {'bins': [0, 1, 5, 10, 20, 50, 100, 500, 1000, 2000]},
                    edgecolor='black',
                    linewidth=0.4)

ax.set_xticks([])
ax.set_yticks([])
ax.get_legend().set_bbox_to_anchor((1.3, 0.9))

Worldmap

Thanks in advance!

0 Answers
Related