opengeos / leafmap

A Python package for interactive mapping and geospatial analysis with minimal coding in a Jupyter environment
https://leafmap.org
MIT License
3.22k stars 386 forks source link

Setting color palette for the add_raster function no long works #363

Closed wdkang closed 1 year ago

wdkang commented 1 year ago

Environment Information

Description

Trying to to load a single-band local raster on leafmap following the code example from https://leafmap.org/notebooks/05_load_raster/#install-from-conda-forge . Using the 'colormap' parameter does not effectively change the color map (loads the image in the default gray colorway), while using the 'palette' parameter results in an error message (Screenshot attached below).

What I Did

Using the example code to load a local raster file: Map.add_raster(dem, colormap='terrain', layer_name='DEM') Could you let me know how to fix the issue and load the raster file with a proper color map?

wdkang commented 1 year ago

error

giswqs commented 1 year ago

Try updating matplotlib

pip install -U matplotlib

wdkang commented 1 year ago

This totally solved the problem. Thanks for your help and prompt reply!