Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: pass list-like colors to Multi- geometry #1119

Merged
merged 10 commits into from Sep 17, 2019

Conversation

martinfleis
Copy link
Member

As reported earlier, passing a list-like of colors to gdf.plot() will not match rows if there are multipart geometries. That should be fixed now.

Fixes #1075, fixes #730

@codecov
Copy link

codecov bot commented Sep 4, 2019

Codecov Report

Merging #1119 into master will decrease coverage by 0.1%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1119      +/-   ##
==========================================
- Coverage   89.92%   89.82%   -0.11%     
==========================================
  Files          20       20              
  Lines        1935     1965      +30     
==========================================
+ Hits         1740     1765      +25     
- Misses        195      200       +5
Impacted Files Coverage Δ
geopandas/plotting.py 93.17% <100%> (-0.08%) ⬇️
geopandas/geoseries.py 94.01% <0%> (-2.24%) ⬇️
geopandas/tools/sjoin.py 97.36% <0%> (+0.44%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0f0556a...fc97251. Read the comment docs.

@BCamina
Copy link

BCamina commented Sep 8, 2019

As reported earlier, passing a list-like of colors to gdf.plot() will not match rows if there are multipart geometries. That should be fixed now.

Fixes #1075, fixes #730

I've replace the changed files (plotting.py and test_plotting.py) in the geopandas directory and it's still not working for me, I'm experiencing the same bug as before.

I'm currently using geopandas 0.5.1 with Anaconda and Python 3.7

@martinfleis
Copy link
Member Author

@BCamina can you try installing the whole branch using pip install git+git://github.com/martinfleis/geopandas.git@multipolycolor? Alternatively, can you provide reproducible example? Thanks

@BCamina
Copy link

BCamina commented Sep 8, 2019

@BCamina can you try installing the whole branch using pip install git+git://github.com/martinfleis/geopandas.git@multipolycolor? Alternatively, can you provide reproducible example? Thanks

I tried installing the whole branch using pip install and it worked!
Thank you very much, I spent a whole weekend trying to make it work.

Copy link
Member

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this! Looks good, I only have a remark on trying to reduce the calls to _flatten_multi_geoms

geopandas/plotting.py Outdated Show resolved Hide resolved
@martinfleis
Copy link
Member Author

Okay, I have also covered everything marked by codecov by additional tests. Should be ready to be merged once green.

geopandas/plotting.py Outdated Show resolved Hide resolved
geopandas/plotting.py Outdated Show resolved Hide resolved
geopandas/plotting.py Outdated Show resolved Hide resolved
@jorisvandenbossche jorisvandenbossche added this to the 0.6 milestone Sep 13, 2019
@martinfleis
Copy link
Member Author

Okay, seems to be ready now.

@jorisvandenbossche jorisvandenbossche merged commit fbbb166 into geopandas:master Sep 17, 2019
@jorisvandenbossche
Copy link
Member

@martinfleis Thanks! (and especially for your patience with my reviews!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants