Skip to content

Add a tutorial for plotting vectors #892

Closed

Description

@seisman

Description of the desired feature

@michaelgrund is working on one/two gallery examples about plotting different vectors in PR #890. The gallery examples will cover two topics:

  1. How to plot vectors with different arrow heads and tails (Add a gallery example showing different vector heads and tails #890)
  2. How to plot Cartesian, circular and geographic vectors/arrows (Add a gallery example for plotting Cartesian, circular and geographic vectors #950)

There are many different ways for plotting vectors in GMT and PyGMT. For example, we can:

  • give start and end coordinates
  • give start coordinate and angle/azimuth
  • maybe more?

Considering that vectors are a common feature in maps, I think we should provide a tutorial for plotting vectors. What topics the tutorial will cover should be discussed first.

Note: Tutorial is different from gallery examples. Please refer to the contributing guides if you don't know the differences).

Are you willing to help implement and maintain this feature? Volunteers are welcomed.

Activity

  1. added
    documentation
    help wanted
    on Feb 14, 2021
  2. willschlitzer commented on Mar 10, 2021

    @willschlitzer
    Contributor

    @GenericMappingTools/python Can we close this issue?

  3. seisman commented on Mar 10, 2021

    @seisman
    MemberAuthor

    There are many different ways for plotting vectors in GMT and PyGMT. For example, we can:

    • give start and end coordinates
    • give start coordinate and angle/azimuth
    • maybe more?

    Considering that vectors are a common feature in maps, I think we should provide a tutorial for plotting vectors. What topics the tutorial will cover should be discussed first.

    I think we still need a tutorial for vectors.

  4. michaelgrund commented on Mar 10, 2021

    @michaelgrund
    Member

    Yes a full tutorial is still missing, I only provided a gallery example.

  5. cklima616 commented on Mar 12, 2021

    @cklima616
    Contributor

    Hello! We’re a team of developers at Allegheny College seeking to contribute to open source communities as part of our Software Innovation course curriculum. We are happy to begin a “notebook” style tutorial, at least on plotting using the start/end and start/angle functions. @nathandloria @noorbuchi @munzekm

  6. seisman commented on Mar 12, 2021

    @seisman
    MemberAuthor

    @cklima616 Thanks for offering help. Let us know if you need help.

  7. weiji14 commented on Mar 13, 2021

    @weiji14
    Member

    Welcome @cklima616 and others! Always happy to get more students into open source, Have a look at the 'tutorial' section of CONTRIBUTING.md and also the tutorials under https://github.com/GenericMappingTools/pygmt/tree/master/examples/tutorials to get started.

    Also wanted to check on how long the course curriculum be? A week? A month? Just that we have a range of issues (with various levels of complexity) at https://github.com/GenericMappingTools/pygmt/contribute and wanted to make sure it's at a suitable level.

  8. noorbuchi commented on Mar 13, 2021

    @noorbuchi
    Contributor

    @weiji14 @seisman Thank you for welcoming us and for being a friendly open source community. We are looking forward to work on this project! This cycle of the course will last until March 26th and we'll be trying to make contributions to this issue as well as others if it's feasible. It's likely that other cycles will focus on other projects but we're unsure yet. We'll also take a look at your contribution guide and the example you sent to make sure that there are no problems, thanks for linking them here!

  9. noorbuchi commented on Mar 13, 2021

    @noorbuchi
    Contributor

    Hello @seisman! I recently started working on the tutorial and I was wondering about how I can preview the additions that I'm making. Since the tutorial files are in .py format, I can't open them using Jupyter to see how everything looks like. Any advice on this? Thanks!

    Update: I realize now that the docs are generated using Sphinx and I'm currently looking into installing it to preview them. Still, feel free to share any advice/tips.

  10. weiji14 commented on Mar 13, 2021

    @weiji14
    Member

    Jupytext might be a good option to convert between jupyter notebooks and regular python files when working locally on your computer. I.e. you could work on a Jupyter interface first, and then use jupytext to convert it to a .py script for the PR. Personally I use Hydrogen inside the Atom editor which is a much more interactive way to preview stuff inline.

    Oh, and we also have Continuous Documentation set up so every Pull Request push has an associated preview link online. Feel free to open a Pull Request whenever you get to an 'ok' enough state, will be easier to make detailed suggestions there later.

  11. noorbuchi commented on Mar 13, 2021

    @noorbuchi
    Contributor

    Thanks for linking these tools, I found Jupytext very helpful! I made a copy of lines.py and I've been trying to follow the formatting and structure to create examples for plotting vectors. I also finished one simple example so far and I wanted to check if it would be ok to create a work in progress pull request to keep track of our changes and get feedback.

  12. weiji14 commented on Mar 16, 2021

    @weiji14
    Member

    Thanks for linking these tools, I found Jupytext very helpful! I made a copy of lines.py and I've been trying to follow the formatting and structure to create examples for plotting vectors. I also finished one simple example so far and I wanted to check if it would be ok to create a work in progress pull request to keep track of our changes and get feedback.

    Sorry for the late reply, got a bit sidetracked with a recent release. Yep, it is totally ok to create a WIP Pull Request, and we'd actually encourage it! You can create a 'draft' Pull Request by following the instructions at https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork. Let us know if you need any help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationgood first issuehelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions