Skip to content

Add a gallery example for a double y-axes graph - #1019

Merged
seisman merged 26 commits into
GenericMappingTools:masterfrom
core-man:double-yaxis
Mar 12, 2021
Merged

seisman merged 26 commits into
GenericMappingTools:masterfrom
core-man:double-yaxis

Conversation

@core-man

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

Copy link
Copy Markdown
Member

Description of proposed changes

This gallery plots two base maps with the same X-axis but different Y-axes, while it also plots data points and lines for the two corresponding Y values, separately.

Fixes #1009

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

@core-man
core-man requested a review from a team March 8, 2021 04:24
@seisman seisman added the documentation Improvements or additions to documentation label Mar 8, 2021
Comment thread examples/gallery/plot/double-y-axes.py Resolved
Co-authored-by: Dongdong Tian <[email protected]>
@core-man

core-man commented Mar 8, 2021 •

Copy link
Copy Markdown
Member Author

It's unnecessary to put arguments in separate lines, especially for lines no longer than 88 characters. What I usually do is writing all arguments in one single line, and let black (i.e., run make format) do the formatting automatically.

@seisman re-formated in 65f418b.

Comment thread examples/gallery/plot/double-y-axes.py Resolved
Comment thread examples/gallery/plot/double-y-axes.py Resolved
Comment thread examples/gallery/plot/double-y-axes.py Resolved
Comment thread examples/gallery/plot/double-y-axes.py Resolved
Comment thread examples/gallery/plot/double-y-axes.py Resolved
Co-authored-by: Dongdong Tian <[email protected]>
@seisman
seisman marked this pull request as draft March 10, 2021 17:08
@core-man

Copy link
Copy Markdown
Member Author

Maybe "basemaps" following the comment #876 (comment)

@seisman done in 29dfdaa.

@seisman

seisman commented Mar 12, 2021 •

Copy link
Copy Markdown
Member

Also need to add the new category to

"../examples/gallery/maps",
.

@seisman seisman changed the title Add a double y-axes gallery Add a gallery example for a double y-axes graph Mar 12, 2021
@core-man

Copy link
Copy Markdown
Member Author

Also need to add the new category to

"../examples/gallery/maps",

.

done in b58469b.

@seisman
seisman marked this pull request as ready for review March 12, 2021 15:06

@seisman seisman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This PR looks good to me.

Ping @meghanrjones @michaelgrund for final comments and approvals.

Please note that this example is added to a new category "Base maps". Do you think it's good? Also ping @willschlitzer @weiji14.

@michaelgrund michaelgrund left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Except the provided minor suggestions this PR looks good to me. The new category is suitable in my eyes. Good work!

@maxrjones maxrjones left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice! I just have one small recommendation to avoid confusion about stating that two basemaps should be plotted and then plotting three basemaps (common x, y1, y2).

@seisman
seisman merged commit ca1723b into GenericMappingTools:master Mar 12, 2021
@core-man
core-man deleted the double-yaxis branch March 12, 2021 18:56
sixy6e pushed a commit to sixy6e/pygmt that referenced this pull request Dec 21, 2022
…1019)

Also add a new category "Base maps".

Co-authored-by: Dongdong Tian <[email protected]>
Co-authored-by: Michael Grund <[email protected]>
Co-authored-by: Meghan Jones <[email protected]>

This branch was previously deployed

1 inactive deployment
Preview — c4bb24bb Deployed Mar 12, 2021 by vercel[bot]
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add an example for double Y-axis graph

4 participants