I am running PyGMT through anaconda (in a separate environment as suggested in the installation guide) on Ubuntu 18.04 LTS.
As I am new to PyGMT and Python, I was going through some tutorials and I got stuck on a particular tutorial (Ocenia 2019 Tutorial on PyGMT). Below is the complete code that I am trying to run on Jupyter Notebook:
# Example 3: Oceania 2019 Tutorial for PyGMT...continued import pygmt # Digital Elevation Model Map in Color # Let's have a go at making a map of Oceania showing the ocean bathymetry and land elevation. # Create figure fig=pygmt.Figure() # We'll start by setting our basemap to focus on the Oceania region (=OC). # Our map frame will have tick marks at major and minor intervals (af), # and x and y axis labels on the 'W'est and 'S'outh sides only (WSne). # Creating basic map elements via basemap fig.basemap(region="=OC", frame=["af", "WSne"]) # GMT6 comes with a global Earth relief model (SRTM15+V2) that can be accessed # using special filenames like '@earth_relief_xxx'. Here, we'll plot the 1 arc minute grid # using fig.grdimage, and explicitly use the 'geo' colormap to colour the terrain. fig.grdimage(grid="@earth_relief_01m", cmap="geo") # We'll also add a colorbar for good measure. # The position is set to be outside the map frame (J), at the Middle Right (MR) side. # The colorbar will automatically pick up the last colormap we used above, # but we can force the units to be in kilometres instead of the default metres using cmap="+Uk". # We'll also use frame to add annotated tick marks at suitable intervals to the colorbar (af), # and set the label to be in units km (+lkm). fig.colorbar(position="JMR", cmap="+Uk", frame=["af", "y+lkm"]) # Show fig.show() # End of code
When I run this code, no image shows up as the tutorial suggests it should, no errors show up. All I see is that the kernel is busy. I have waited upto 20 minutes during a time when internet traffic is low (3 am my time) but nothing happens. I have checked the code with the original tutorial there is no discrepancy.
I ran the code from the jupyter notebook provided in the tutorial, I get the same issue described above.
It appears the program gets into some sort of issue when executing
Any help will be much appreciated.
I wanted to thank the GMT group for GMT 6 and PyGMT and for writing a clear installation guide. I was able to install PyGMT and GMT6 without any problems.