Skip to content

Add an example for different line styles - #604

Merged
seisman merged 2 commits into
masterfrom
gallery/linestyle
Sep 14, 2020
Merged

Add an example for different line styles#604
seisman merged 2 commits into
masterfrom
gallery/linestyle

Conversation

@seisman

@seismanseisman commented Sep 13, 2020

Copy link
Copy Markdown
Member

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.

@seismanseisman added the documentation Improvements or additions to documentation label Sep 13, 2020

@weiji14weiji14 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.

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

Comment threadexamples/gallery/line/linestyles.py Outdated
Comment threadexamples/gallery/line/linestyles.py Outdated
Comment threaddoc/conf.py
@seisman

Copy link
Copy Markdown
MemberAuthor

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

@weiji14

Copy link
Copy Markdown
Member

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

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

Copy link
Copy Markdown
MemberAuthor

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

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 freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@seisman@weiji14