You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
(Incomplete) inline code examples of pygmt.Figure class #2084
Maybe the inline code examples for the pygmt.Figure class are incomplete:
fig=Figure()
fig.basemap(region=[0, 360, -90, 90], projection="W7i", frame=True)
fig.savefig("my-figure.png")
# Make sure the figure file is generated and clean it upimportosos.path.exists("my-figure.png")
os.remove("my-figure.png")
fig=Figure()
fig.basemap(region="JP", projection="M3i", frame=True)
# The fig.region attribute shows the WESN bounding box for the figureprint(", ".join(f"{i:.2f}"foriinfig.region))
From my understanding, these examples should be directly executable. In case this is correct, I feel these two examples can be improved:
I think you're right. These codes work well as doctests because Figure is already imported in the Python codes, but they're incomplete as inline code examples.
Activity
seisman commentedon Aug 27, 2022
I think you're right. These codes work well as doctests because
Figureis already imported in the Python codes, but they're incomplete as inline code examples.