Goal: Show legend

I've set legend=True and no difference was made.

for i in list(range(NUM_SLIDES)):
    d = {'col1': ['Foo', 'Bar', 'Sue'], 'geometry': [foo[i], bar[i], sue[i]]}
    gdf = gpd.GeoDataFrame(d, crs='EPSG:4326').plot(legend=True, alpha=0.5, color=list(mcolors.BASE_COLORS.values()), aspect=1);

First Plot:

enter image description here

1 Answer 1

gdf = gpd.GeoDataFrame(d, crs='EPSG:4326').plot(column='col1', legend=True, cmap='rainbow', alpha=0.5, aspect=1);

Swap color for cmap='rainbow'.

enter image description here



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.