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

pygmt.set_display: Do nothing when the display method is set to 'none' #2450

Merged
merged 1 commit into from
Mar 23, 2023

Conversation

seisman
Copy link
Member

@seisman seisman commented Mar 21, 2023

Description of proposed changes

Fixes #2447.

Reminders

  • Run make format and make check to make sure the code follows the style guide.
  • Add tests for new features or tests that would have caught the bug that you're fixing.
  • Add new public functions/methods/classes to doc/api/index.rst.
  • Write detailed docstrings for all functions/methods.
  • If wrapping a new module, open a 'Wrap new GMT module' issue and submit reasonably-sized PRs.
  • If adding new functionality, add an example to docstrings or tutorials.
  • Use underscores (not hyphens) in names of Python files and directories.

Slash Commands

You can write slash commands (/command) in the first line of a comment to perform
specific operations. Supported slash commands are:

  • /format: automatically format and lint the code
  • /test-gmt-dev: run full tests on the latest GMT development version

@seisman seisman added the bug Something isn't working label Mar 21, 2023
@@ -200,7 +200,6 @@ def coast(self, **kwargs):
... )
>>> # Show the plot
>>> fig.show()
<IPython.core.display.Image object>
Copy link
Member Author

@seisman seisman Mar 21, 2023

Choose a reason for hiding this comment

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

<IPython.core.display.Image object> also need to be removed because Figure.show() returns nothing.

@willschlitzer willschlitzer added the final review call This PR requires final review and approval from a second reviewer label Mar 22, 2023
@@ -393,7 +393,7 @@ def show(self, dpi=300, width=500, method=None, waiting=0.5, **kwargs):
)
)

if method in ["notebook", "none"]:
if method == "notebook":
Copy link
Member

Choose a reason for hiding this comment

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

Note to self that None != "none". Probably should call "none" "disable", but let's not break backwards compatibility.

@seisman seisman added this to the 0.9.0 milestone Mar 23, 2023
@seisman seisman merged commit 8501f5d into main Mar 23, 2023
@seisman seisman deleted the set-display-none branch March 23, 2023 09:14
@seisman seisman removed the final review call This PR requires final review and approval from a second reviewer label Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

set_display(method="none") still displays the images
4 participants