Skip to content

Fix a bug in the "frames" tutorials - #1008

Merged
seisman merged 3 commits into
GenericMappingTools:masterfrom
core-man:frames-bug
Mar 5, 2021
Merged

Fix a bug in the "frames" tutorials#1008
seisman merged 3 commits into
GenericMappingTools:masterfrom
core-man:frames-bug

Conversation

@core-man

@core-man core-man commented Mar 5, 2021

Copy link
Copy Markdown
Member

Description of proposed changes
In https://www.pygmt.org/latest/tutorials/frames.html#axis-labels:

fig = pygmt.Figure()
fig.basemap(
    region=[0, 10, 0, 20],
    projection="X10c/8c",
    # Plot axis, tick marks, and axis labels on the west/left and south/bottom axes
    # Plot axis and tick marks on the north/top and east/right axes
    frame=["WSne", "x+lx-axis", "y+ly-axis"],
)
fig.show()

We don't have axis and tick marks on the left and right axes. See the output:
froma-2

We should add af to the frame to plot set the frame automatically.

frame=["af", "WSne", "x+lx-axis", "y+ly-axis"],

Screenshot from 2021-03-05 20-06-55

Reminders

  • Run make format and make check to make sure the code follows the style guide.
  • Add tests for new features or tests that would have caught the bug that you're fixing.
  • Add new public functions/methods/classes to doc/api/index.rst.
  • Write detailed docstrings for all functions/methods.
  • If adding new functionality, add an example to docstrings or tutorials.

Slash Commands

You can write slash commands (/command) in the first line of a comment to perform
specific operations. Supported slash commands are:

  • /format: automatically format and lint the code
  • /test-gmt-dev: run full tests on the latest GMT development version

@willschlitzer willschlitzer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

Comment thread examples/tutorials/frames.py Outdated
@seisman seisman changed the title Fix a bug in the guide for frames Fix a bug in the "frames" tutorials Mar 5, 2021
@seisman seisman added documentation Improvements or additions to documentation bug Something isn't working skip-changelog Skip adding Pull Request to changelog and removed bug Something isn't working labels Mar 5, 2021
@seisman seisman added this to the 0.3.1 milestone Mar 5, 2021
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
@core-man
core-man requested a review from seisman March 5, 2021 14:37
@seisman
seisman merged commit ffe0c2a into GenericMappingTools:master Mar 5, 2021
@core-man
core-man deleted the frames-bug branch March 14, 2021 09:08
sixy6e pushed a commit to sixy6e/pygmt that referenced this pull request Dec 21, 2022
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation skip-changelog Skip adding Pull Request to changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants