Hi all,
I am a complete noob regarding pygmt and just started. I would really really use your help. I am trying to understand how to do some basic operations with pygmt.
I am working on my code and am following tutorial on [1]. The main idea is that I have shapefile that I load in the GeoPandas df. Naturally, I have “geometries” column which stores objects such as Polygon and MultyPolygon. I would like to draw these geometries on my basemap, but it is not working. To be specific, when I do
fig.plot(data=world, pen="1p,black", close=True, color="+z", cmap=True, aspatial="Z=pop_est")
I get error "plot [ERROR]: OGR parsing incomplete (is file missing OGR statements?) - abort"
Now, in YT video the author of the tutorial [1] didn’t have any problems, but when you look at [1] you can see also there the same error.
The important snipped of my code is the next one:
fig = pygmt.Figure()
fig.basemap(region=region, projection="M15c", frame=True)
fig.coast(land="black", water="skyblue", borders="1/0.1p,white")
cmap_bounds = pygmt.info(data=shapefile2['Density'], per_column=True)
pygmt.makecpt(cmap="bilbao", series=cmap_bounds)
fig.plot(data = shapefile2, pen="1p,white", close=True, color="+z", aspatial="Z=Density", cmap=True)
fig.show()
If you could help I would be really grateful. Thanks in advance
[1] https://www.generic-mapping-tools.org/egu22pygmt/ecosystem.html