ResidentMario / geoplot

High-level geospatial data visualization library for Python.
https://residentmario.github.io/geoplot/index.html
MIT License
1.14k stars 95 forks source link

Legends in Geoplot 0.4.4 #263

Closed romainovs closed 2 years ago

romainovs commented 2 years ago

Dear All,

Thanks for this very nice and useful project. However, I have an issue with legends.

I'm running this basic example :

<import geoplot as gplt
import geoplot.crs as gcrs
import geopandas as gpd

cities = gpd.read_file(gplt.datasets.get_path('usa_cities'))
contiguous_usa = gpd.read_file(gplt.datasets.get_path('contiguous_usa'))
import mapclassify as mc

scheme = mc.FisherJenks(contiguous_usa['population'], k=5)
gplt.choropleth(
    contiguous_usa, hue='population', projection=gcrs.AlbersEqualArea(),
    edgecolor='white', linewidth=1,
    cmap='Greens', legend=False,
    scheme=scheme,
)

I works very fine until I change legend to True. Then, It crashes Spyder without any error message.

My system :

Do you have any idea how to solve this issue ? Thank you in advance for your support Best regards Romain

ResidentMario commented 2 years ago

Hi,

Unfortunately I can't repro this:

image

The legend you are attaching is extremely simple, which leads me to believe that this is a compatibility problem with the libraries you have installed, which causes the Python kernel to die. Can you install geoplot using conda in a completely clean conda environment and retry?

Closing for now as "can't repro".