BUG: explore() using cmap
instead of color
attribute for *list-like of colors* when if column
and categorical
is set
#3194
Labels
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of geopandas.
(optional) I have confirmed this bug exists on the main branch of geopandas.
Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.
Code Sample, a copy-pastable example
Problem description
I was trying to set colors for a categorical plot but was not able doing so with
colors
(list-like of colors) as the docs say.Instead, after inspecting the source code, I saw that it is possible passing the list as
cmap
. BUT, this is not in the docs (only says str, matplotlib.Colormap, branca.colormap or function)Recomendation
colors
cmap
: str, matplotlib.Colormap, branca.colormap, function or array-likeHappy to do a MR for both (whatever you choose). However, in my opinion
colors
would be more consistent and intuitive.Output of
geopandas.show_versions()
SYSTEM INFO
python : 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0]
executable : /usr/bin/python3
machine : Linux-6.1.58+-x86_64-with-glibc2.35
GEOS, GDAL, PROJ INFO
GEOS : 3.11.2
GEOS lib : None
GDAL : 3.6.4
GDAL data dir: /usr/local/lib/python3.10/dist-packages/fiona/gdal_data
PROJ : 9.3.0
PROJ data dir: /usr/local/lib/python3.10/dist-packages/pyproj/proj_dir/share/proj
PYTHON DEPENDENCIES
geopandas : 0.13.2
numpy : 1.25.2
pandas : 1.5.3
pyproj : 3.6.1
shapely : 2.0.2
fiona : 1.9.5
geoalchemy2: None
geopy : 2.3.0
matplotlib : 3.7.1
mapclassify: 2.6.1
pygeos : None
pyogrio : None
psycopg2 : 2.9.9 (dt dec pq3 ext lo64)
pyarrow : 10.0.1
rtree : None
The text was updated successfully, but these errors were encountered: