Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 26 commits into from
Mar 12, 2021

Conversation

core-man
Copy link
Member

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

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
Co-authored-by: Dongdong Tian <[email protected]>
@core-man
Copy link
Member Author

core-man commented Mar 8, 2021

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.

Co-authored-by: Dongdong Tian <[email protected]>
@seisman seisman marked this pull request as draft March 10, 2021 17:08
@core-man
Copy link
Member Author

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

@seisman done in 29dfdaa.

@seisman
Copy link
Member

seisman commented Mar 12, 2021

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
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
Copy link
Member

@seisman seisman left a comment

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.

Copy link
Member

@michaelgrund michaelgrund left a comment

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!

Copy link
Member

@maxrjones maxrjones left a comment

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]>
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