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
Directly copy the codes gives me the following codes:
>>># load the default grid (pixel-registered 01d grid)>>>grid=load_earth_relief()
>>># load the 30m grid with "gridline" registration>>>grid=load_earth_relief("30m", registration="gridline")
>>># load high-resolution grid for a specific region>>>grid=load_earth_relief(
... "05m", region=[120, 160, 30, 60], registration="gridline"
... )
which is not ready for use.
The sphinx-copybutton extension can add a copy button to code blocks so readers can copy the codes by clicking the button. It can also strip the prompts.
I think the extension would make the documentation easier to use. What do you think @GenericMappingTools/python.
Are you willing to help implement and maintain this feature? Yes
The text was updated successfully, but these errors were encountered:
Description of the desired feature
The examples in the docstring have Python prompt likes
>>>
and...
, which makes it difficult to copy. For example, https://www.pygmt.org/dev/api/generated/pygmt.datasets.load_earth_relief.html#pygmt.datasets.load_earth_relief.Directly copy the codes gives me the following codes:
which is not ready for use.
The
sphinx-copybutton
extension can add a copy button to code blocks so readers can copy the codes by clicking the button. It can also strip the prompts.I think the extension would make the documentation easier to use. What do you think @GenericMappingTools/python.
Are you willing to help implement and maintain this feature? Yes
The text was updated successfully, but these errors were encountered: