You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, there many ways of displaying a PyGMT figure:
Calling Figure.show() in the notebook returns an IPython PNG display object for the jupyter notebook
Putting the Figure object at the end of a notebook cell displays the figure as PNG
Calling Figure.show(external=True) will open a preview in an external PDF viewer or the browser. The external viewer is non-blocking so this doesn't work for a script.
Calling Figure.savefig(..., show=True) will save the figure and open it on an external viewer
This is not ideal. It would be better to have:
Calling Figure.show() opens a preview of the figure and halts the Python process until the viewer is closed. It can also return self so that if it's called at the end of a notebook cell it would get displayed on the notebook as well.
Putting the Figure at the end of a notebook cell displays a PNG preview.
Having some way of tell Figure.show() to not open the viewer. This is required when using a notebook or when building the docs (we don't want windows opening when we build the gallery or tutorials). This can be done through a function pygmt.enable_notebook which would set a flag to tell show not to do anything and/or through an environment variable PYGMT_DISPLAY which can be set to none or other options that the user might want. Ideally, we should have both. The env variable will be useful when building the docs.
After #268 we'll need one notebook tutorial that shows how to use PyGMT with the notebook. This can be placed in doc and included in the toctree in doc/index.rst. It will be converted automatically with nbsphinx.
Activity
leouieda commentedon Jan 24, 2019
After #268 we'll need one notebook tutorial that shows how to use PyGMT with the notebook. This can be placed in
docand included in the toctree indoc/index.rst. It will be converted automatically with nbsphinx.Redesign the display mechanism
Redesign the display mechanism
Redesign the display mechanism
Redesign the display mechanism
Redesign the display mechanism
Redesign the display mechanism
Open images using the associated application on Windows
Open figures using the associated application on Windows (#952)
Open figures using the associated application on Windows (GenericMapp…