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

Redesign the display mechanism by Leo #528

Closed
wants to merge 4 commits into from
Closed

Redesign the display mechanism by Leo #528

wants to merge 4 commits into from

Conversation

seisman
Copy link
Member

@seisman seisman commented Jul 15, 2020

Description of proposed changes

In #269, @leouieda proposed a new design of the PyGMT display mechanism. The core idea of #269 is to have a uniform Figure.show() function to open images using external viewer and show images in Jupyter notebook.

This is a draft implementation by @leouieda. It was done a year ago, but never finished. This is how the Figure.show() function in this PR behaves (the behaviors are controlled by the variable SHOW_CONFIG):

  • By default, Figure.show() open images using an external viewer and don't show the image in notebooks
  • Users have to call pygmt.enable_notebook() to disable external viewer and enable inline images in notebooks
  • Setting environmental variable PYGMT_EXTERNAL_VIEWER to false can also disable external viewer, useful when building documentations.

Recently, I'm also trying a new design (see PR #529). To me, my new design is better and more reasonable. Here, I just open this PR for more comparisons and discussions.

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 adding new functionality, add an example to docstrings or tutorials.

@seisman
Copy link
Member Author

seisman commented Apr 10, 2021

Implemented in #529. Closed.

@seisman seisman closed this Apr 10, 2021
@seisman seisman deleted the display branch April 10, 2021 03: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