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

Add shapes argument to geo_im_from_array() in climada.util.plot #805

Merged
merged 4 commits into from
Nov 17, 2023

Conversation

yklpaul0902
Copy link
Collaborator

@yklpaul0902 yklpaul0902 commented Nov 15, 2023

Changes proposed in this PR:

This PR fixes geo_im_from_array#

PR Author Checklist

PR Reviewer Checklist

Comment on lines +275 to +277
shapes : bool, optional
Overlay Earth's countries coastlines to matplotlib.pyplot axis.
The default is True
Copy link
Member

Choose a reason for hiding this comment

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

I would call this coastlines instead of shapes. Much clearer.

Copy link
Collaborator Author

@yklpaul0902 yklpaul0902 Nov 15, 2023

Choose a reason for hiding this comment

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

Since other functioms like geo_bin_from_array(), geo_scatter_from_array(), etc, they all name them as shapes for turning on/off the plotting of coastline, I would suggest either having it as shapes in geo_im_from_array(), or renaming all relevant shapes as coastlines, to make it more consistent.

Copy link
Member

Choose a reason for hiding this comment

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

Ok, let it be shapes then. It is a very bad name, but consistency of code is probably more important.

@chahank
Copy link
Member

chahank commented Nov 16, 2023

Can you please update the changelog?

And could you post a picture of a plot without the shapes just to see that it is working?

@yklpaul0902
Copy link
Collaborator Author

shapes=true (by default)
Screenshot 2023-11-16 at 3 01 37 PM

shapes=False
Screenshot 2023-11-16 at 3 00 40 PM

@chahank
Copy link
Member

chahank commented Nov 16, 2023

Perfect. Then, please just update the CHANGELOG.md file.

@emanuel-schmid
Copy link
Collaborator

@yklpaul0902 : many thanks for the contribution! 😃 The failing compatibility test is unrelated and due to a (hopefully) temporary unavailability of the ECMWF ftp server. Hence: ready to merge.

@emanuel-schmid emanuel-schmid merged commit 158b1d8 into develop Nov 17, 2023
9 of 10 checks passed
@emanuel-schmid emanuel-schmid deleted the feature/kamlamyeung_addshape branch November 17, 2023 07:30
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.

3 participants