Closed santisoler closed 3 months ago
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
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.
I was adding a hidden cell that sets this globally for each page. But this deserves a fix in PyGMT.
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.