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 tutorial for plotting vectors #892

Closed
seisman opened this issue Feb 14, 2021 · 11 comments · Fixed by #1070
Closed

Add a tutorial for plotting vectors #892

seisman opened this issue Feb 14, 2021 · 11 comments · Fixed by #1070
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers help wanted Helping hands are appreciated

Comments

@seisman
Copy link
Member

seisman commented Feb 14, 2021

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.

@seisman seisman added documentation Improvements or additions to documentation help wanted Helping hands are appreciated labels Feb 14, 2021
@weiji14 weiji14 added the good first issue Good for newcomers label Feb 22, 2021
@willschlitzer
Copy link
Contributor

@GenericMappingTools/python Can we close this issue?

@seisman
Copy link
Member Author

seisman commented Mar 10, 2021

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.

@michaelgrund
Copy link
Member

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

@cklima616
Copy link
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

@seisman
Copy link
Member Author

seisman commented Mar 12, 2021

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

@weiji14
Copy link
Member

weiji14 commented Mar 13, 2021

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.

@noorbuchi
Copy link
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!

@noorbuchi
Copy link
Contributor

noorbuchi commented Mar 13, 2021

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.

@weiji14
Copy link
Member

weiji14 commented Mar 13, 2021

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.

@noorbuchi
Copy link
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.

@weiji14
Copy link
Member

weiji14 commented Mar 16, 2021

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
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers help wanted Helping hands are appreciated
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants