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

adding option to pass existing axes to map_geodataframe_column function + corresponding test #54

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

mjgleason
Copy link
Collaborator

This is a small PR that enables using the map_geodataframe_column() function to accept an existing axes instead of always plotting on a new axes. This is helpful in cases where you want to create a multipanel figure with multiple maps.

Copy link
Collaborator

@ppinchuk ppinchuk left a comment

Choose a reason for hiding this comment

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

Looks simple enough!
One thing you might consider doing, especially since it seems like the new ax option is for allowing users to create their own plots, is to add a **kwargs option to map_geodataframe_column that passes the kwargs right into gplt.polyplot. I like doing this for wrappers on plotting functions, so that you don't have to go back and change your code when users want to control customization (i.e. changing the polygon facecolor or something). Just an idea though.

@mjgleason
Copy link
Collaborator Author

Thanks @ppinchuk. That's a good suggestion, but I'm not going to take it on right now just for expediency. Will keep it on the radar for the future though!

@mjgleason mjgleason merged commit 4c01c2c into main Nov 15, 2023
7 checks passed
@mjgleason mjgleason deleted the map_to_ax branch November 15, 2023 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants