My apologies if this was raised before, I haven't had the time to do a proper issue search.
The following code used to create a multicolor plot in geopandas 0.3.0 but not 0.4.0 (or master).
Here the file: clusters.tar.gz
import geopandas as gpd
import matplotlib.pyplot as plt
import matplotlib
print(gpd.__version__)
print(matplotlib.__version__)
df = gpd.read_file('tar://clusters.tar.gz')
df.plot(column='cluster_id', edgecolor='k', cmap='YlOrRd');
Outputs:
0.4.0
3.0.2
/home/mowglie/.pyvirtualenvs/py3/lib/python3.5/site-packages/numpy/core/_methods.py:32: RuntimeWarning: invalid value encountered in reduce
return umr_minimum(a, axis, None, out, keepdims, initial)
/home/mowglie/.pyvirtualenvs/py3/lib/python3.5/site-packages/numpy/core/_methods.py:28: RuntimeWarning: invalid value encountered in reduce
return umr_maximum(a, axis, None, out, keepdims, initial)
/home/mowglie/.pyvirtualenvs/py3/lib/python3.5/site-packages/matplotlib/colors.py:512: RuntimeWarning: invalid value encountered in less
xa[xa < 0] = -1

And in 0.3:
0.3.0
3.0.2
/home/mowglie/.pyvirtualenvs/py3/lib/python3.5/site-packages/matplotlib/colors.py:512: RuntimeWarning: invalid value encountered in less
xa[xa < 0] = -1

(note: also the warning is a bit annoying but this is maybe my data)
sorry for not seeing that, too much on my plate right now -> removing NaNs also solves the plot.
It used to be more robust in geopandas v0.3, though. Should I leave the issue open?
It is caused by changes in #770. Removing NaNs solves the issue only partially. In 0.3 you those shapes with NaNs were also plotted. I think they should be plotted, just with no value. Opinions?
I think they should be plotted, just with no value. Opinions?
I agree: like matplotlib's imshow or pcolormesh where NaNs are displayed with white (default) or any color specified by the user in cmap.set_bad()
Got it. mn = values.min() if vmin is None else vmin and mx = values.max() if vmax is None else vmax are both returning nan. That's why it does not plot colours - it is passing range from nan to nan.
Previous version was passing Series, which ignores NaNs in min() and max(). Now it is passing numpy array which returns NaN for min() and max(),
I'll make PR to fix it.