The map made is always blocked by color blocks

As shown in the figure below, the resulting figure always has color blocks, and there seems to be no problem with my code. I made it in pycharm, because it seems that the pygmt package always can’t be found in jupyterlab in my computer(macbook)

there is my code:

import pygmt
grid = pygmt.datasets.load_earth_relief(resolution="01m", region=[180, 310, -40, 30])
fig = pygmt.Figure()
fig.coast(
    region=[180, 310, -40, 30],
    projection="M10c",
    land="darkgray",
    water="white",
    borders="1/0.5p",
    shorelines="1/0.5p",
    frame="ag",
)
fig.grdimage(
    grid=grid,
    cmap="etopo1",
    projection="M10c",
    frame=True,
)

fig.colorbar(frame=["a2000", "x+lDepth", "y+lm"])
fig.savefig("fuyu.pdf")

Usually means that those tiles (in ~/.gmt/server/earth/earth_relief/ earth_relief_01m_p or possibly earth_relief_01m_g got corrupted during download or similar so they are junk. Solution is the either remove those specific tiles (they will then be auto-downloaded when you run your script again) or the whole directory if you cannot figure out which ones (e.g, N60W030.earth_relief_01m_p.jp2 is one name with coordinates referring to lower-left corner, for instance).

Please, wrap you code in triple backticks ```

Thank you! I removed the whole directory, then restarted the code and the green blocks disappeared.

Sorry about my irregular display, i have edited my post.