Huge white space on the side of the figure

Hello folks,
I’m producing a fix of try-gmt’s python-demo.ipynb specifically for COLAB, and interestingly everything worked fine until “today” when a huge whitespace appears next to the figure. Even changing the “width” of does not cause a change.

I believe it’s some jupyter notebook display configuration but so far I haven’t been able to figure out which one. Another option would be some pre-configuration of the PS driver. (Update. When I write an offset in pygmt with fig.shift_origin(xshift=“0.1c”), the map is showed perfect).

Has anyone had a similar problem? so I can direct my search for the solution.

I have similar problems using pure GMT. Can you share a MWE ?

Hello @PlanetGus, yes ! we can do it.

Try to put an offset in your “gmt figure” line (ex: “+o0.2c” or in your case use -Xc0.2) and check if it works (post here after you test).
I’m experimenting in different environments and it seems to me that it’s something from the PS_driver that doesn’t recognize the exact origin within the PS_MEDIA inside my notebook.

Can you share simple commands to reproduce the error ?

That’s what I thought :

Oh yes… It seems to me that this is connected with the way gmt_plot has to determine the first origin and then the shifts. Interestingly, when I switch from colab to my local jupyter it changes everything.

Let’s see if anyone else comes up with possible solutions/tests.