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 figures are not being showed in the latest docs #473

Closed
santisoler opened this issue Mar 12, 2024 · 3 comments · Fixed by #474
Closed

PyGMT figures are not being showed in the latest docs #473

santisoler opened this issue Mar 12, 2024 · 3 comments · Fixed by #474
Labels
bug Report a problem that needs to be fixed documentation Improvements or additions to documentation
Milestone

Comments

@santisoler
Copy link
Member

Page that contains the error or needs to be improved (paste link):

The PyGMT figures we generate while building the docs are not being correctly added to the dev versions of the Harmonica docs.

For example, compare the Gravity Disturbance page in:

I suspect the issue might come from a combination of PyGMT and jupyter-sphinx.

@santisoler santisoler added bug Report a problem that needs to be fixed documentation Improvements or additions to documentation labels Mar 12, 2024
@santisoler santisoler added this to the v0.7.0 milestone Mar 12, 2024
@leouieda
Copy link
Member

Ah yes, I recently came across this and forgot to fix it here. The problem is that PyGMT tries to guess if we're in a notebook and sets the display of images only if it things we're in one. But since we set the external display to off when running the gallery, it turned off all displays. This is the offending line https://github.com/GenericMappingTools/pygmt/blob/main/pygmt/figure.py#L47

@santisoler
Copy link
Member Author

Thanks for pointing to that line @leouieda. I've created a patch for this by explicitly setting method="notebook" in the user guide (#474). But maybe we can set this through a env var? Or maybe this deserves opening an issue in PyGMT adding an envvar to control this.

@leouieda
Copy link
Member

I was adding a hidden cell that sets this globally for each page. But this deserves a fix in PyGMT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Report a problem that needs to be fixed documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants