I try the tutorial here:
https://www.pygmt.org/latest/tutorials/basics/plot.html#sphx-glr-tutorials-basics-plot-py
But, instead of getting their already have example of japan_quakes
I create my own csv that can works for the first two examples. But won't work at the last example (the figure won't show up)
this is the problematic one:
import pygmt
import pandas as pd
data = pygmt.datasets.load_sample_data(name="japan_quakes")
fig = pygmt.Figure()
fig.basemap(region=region, projection="M15c", frame=True)
fig.coast(land="black", water="skyblue")
pygmt.makecpt(cmap="viridis", series=[data.depth_km.min(), data.depth_km.max()])
fig.plot(
x=data.longitude,
y=data.latitude,
size=0.02 * 2**data.magnitude,
fill=data.depth_km,
cmap=True,
style="cc",
pen="black",
)
fig.colorbar(frame="af+lDepth (km)")
fig.show()
I also want to ask:
How to create slider that can change the plots based on year? thus if the slide is on 1987 it will shows all the data of 1987