GenericMappingTools / pygmt

A Python interface for the Generic Mapping Tools.
https://www.pygmt.org
BSD 3-Clause "New" or "Revised" License
747 stars 216 forks source link

Add a tutorial for plotting vectors #892

Closed seisman closed 3 years ago

seisman commented 3 years ago

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 (#890)
  2. How to plot Cartesian, circular and geographic vectors/arrows (#950)

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

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.

willschlitzer commented 3 years ago

@GenericMappingTools/python Can we close this issue?

seisman commented 3 years ago

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 commented 3 years ago

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

cklima616 commented 3 years ago

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 commented 3 years ago

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

weiji14 commented 3 years ago

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 commented 3 years ago

@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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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.