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

Figure.savefig: Clarify that 'transparent' also works for the PNG file associated with the KML format #3579

Merged
merged 1 commit into from
Nov 6, 2024

Conversation

seisman
Copy link
Member

@seisman seisman commented Nov 5, 2024

Changes

  1. Clarify that transparent works for .kml format and add a test for it
  2. Refactor the codes to make it more compact and readable.

@seisman seisman added the documentation Improvements or additions to documentation label Nov 5, 2024
@seisman seisman added this to the 0.14.0 milestone Nov 5, 2024
@seisman seisman force-pushed the savefig/transparency branch from d0a0cfb to 94f9f14 Compare November 5, 2024 03:43
raise GMTInvalidInput(msg)
fmt = fmt.upper()
Copy link
Member Author

Choose a reason for hiding this comment

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

Changes to something like "png": "G" if transparent is True else "g" at line #210.

raise GMTInvalidInput(msg)
fmt = fmt.upper()

if transparent and ext not in {"kml", "png"}:
Copy link
Member Author

Choose a reason for hiding this comment

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

Instead of checking fmt != "g", here we explicitly check if ext not in {"kml", "png"}

@seisman seisman added the needs review This PR has higher priority and needs review. label Nov 5, 2024
@michaelgrund michaelgrund added final review call This PR requires final review and approval from a second reviewer and removed needs review This PR has higher priority and needs review. labels Nov 5, 2024
@seisman seisman removed the final review call This PR requires final review and approval from a second reviewer label Nov 6, 2024
@seisman seisman merged commit 40edcf7 into main Nov 6, 2024
25 checks passed
@seisman seisman deleted the savefig/transparency branch November 6, 2024 03:39
seisman added a commit that referenced this pull request Nov 6, 2024
seisman added a commit that referenced this pull request Nov 18, 2024
seisman added a commit that referenced this pull request Nov 18, 2024
seisman added a commit that referenced this pull request Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants