0

I'm currently trying to learn how to built a map on global mapping tool (pygmt), but whenever I try fig.show() nothing happens. I tried to change graphic backend in tools preferences. The code works because when I use fig.savefig('myfig.png') I have the picture. I'm using spyder 4, on windows 10. I want to mention that tkinter doesn't work either (spyder crashes). And I can't try it on jupyter because I can't find the gmt kernel on jupyter.

the code:

import pygmt as gmt 

fig = gmt.Figure() 
fig.coast(shorelines="1/0.5p", region=[-180, 180, -60, 60], projection="M10i") 

fig.show() 
fig.savefig('gmttest.png') 
Roshin Raphel
  • 2,612
  • 4
  • 22
  • 40
Saren
  • 1
  • 2

0 Answers0