Skip to content

Add an example for different line styles #604

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

Merged
merged 2 commits into from
Sep 14, 2020
Merged

Add an example for different line styles #604

merged 2 commits into from
Sep 14, 2020

Conversation

seisman
Copy link
Member

@seisman seisman commented Sep 13, 2020

Description of proposed changes

Add an example showing lines with different styles:

image

Preview: https://pygmt-crbc9dplm.vercel.app/gallery/line/linestyles.html

Address #493.

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.

@seisman seisman added the documentation Improvements or additions to documentation label Sep 13, 2020
Copy link
Member

@weiji14 weiji14 left a comment

Choose a reason for hiding this comment

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

Looks great! Just had to look up how to plot dashed lines yesterday, and this would have been a super useful reference!

@seisman
Copy link
Member Author

seisman commented Sep 14, 2020

How do I set the milestone and project? Is it for 0.2.x or 0.3.x?

@weiji14
Copy link
Member

weiji14 commented Sep 14, 2020

Go for 0.2.x, there's some bug fixes left to do and we'll most likely need a 0.2.1 release.

@seisman seisman added this to the 0.2.x milestone Sep 14, 2020
@seisman seisman merged commit 1a56da1 into master Sep 14, 2020
@seisman seisman deleted the gallery/linestyle branch September 14, 2020 00:18
@seisman seisman modified the milestones: 0.2.0, 0.2.1 Sep 17, 2020
@seisman
Copy link
Member Author

seisman commented Oct 16, 2020

Here is a similar plot from matplotlib.
image

In the matplotlib example, it's much easier to see the line style and the corresponding parameters. I plan to improve our "line styles" example, following the matplotlib one, with the parameters (e.g., 1p,red,-) annotated for lines. Please let me know what you think before I work on the improvements.

@weiji14
Copy link
Member

weiji14 commented Oct 16, 2020

Sounds like a good plan. We probably don't need 16 line examples though, just keep it minimal.

Also, was just looking at the GMT.jl AGU gallery examples at https://www.generic-mapping-tools.org/GMT.jl/latest/gallery/tables/, looks like there's a lot of decorated arrows/curved line examples we can follow.

image

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.

2 participants