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

WIP: Add tutorial showing the "error_bar" parameter of "pygmt.Figure.plot" #2429

Draft
wants to merge 28 commits into
base: main
Choose a base branch
from

Conversation

yvonnefroehlich
Copy link
Member

@yvonnefroehlich yvonnefroehlich commented Mar 15, 2023

Description of proposed changes

This PR is converted to draft as a high-level method is planned for plotting errorbars

This PR aims to add an example showing how to add error bars to data points using the error_bar parameter of pygmt.Figure.plot:

  • Decide whether this will be a gallery example or a tutorial
  • Write documentation for general syntax
  • Set up different code examples for general syntax
    • showing symmetric and unsymmetric errors (+a)
    • adjusting bars and caps
    • showing either x or y errors
    • using low and high bounds (+A)
    • using box-and-whisker (or stem-and-leaf) symbols
  • Add comments to the code examples

Preview: https://pygmt-dev--2429.org.readthedocs.build/en/2429/tutorials/advanced/errorbars.html

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 wrapping a new module, open a 'Wrap new GMT module' issue and submit reasonably-sized PRs.
  • If adding new functionality, add an example to docstrings or tutorials.
  • Use underscores (not hyphens) in names of Python files and directories.

Slash Commands

You can write slash commands (/command) in the first line of a comment to perform
specific operations. Supported slash commands are:

  • /format: automatically format and lint the code
  • /test-gmt-dev: run full tests on the latest GMT development version

@yvonnefroehlich yvonnefroehlich added the documentation Improvements or additions to documentation label Mar 15, 2023
@yvonnefroehlich yvonnefroehlich self-assigned this Mar 15, 2023
@yvonnefroehlich yvonnefroehlich marked this pull request as draft March 15, 2023 21:49
@yvonnefroehlich yvonnefroehlich changed the title Add a gallery example or tutorial showing how to use the "error_bar" parameter of "pygmt.Figure.plot" WIP: Add a gallery example or tutorial showing how to use the "error_bar" parameter of "pygmt.Figure.plot" Mar 15, 2023
@yvonnefroehlich
Copy link
Member Author

/format

@yvonnefroehlich
Copy link
Member Author

/format

@yvonnefroehlich yvonnefroehlich changed the title WIP: Add a gallery example or tutorial showing how to use the "error_bar" parameter of "pygmt.Figure.plot" WIP: Add tutorial showing how to use the "error_bar" parameter of "pygmt.Figure.plot" Mar 18, 2023
@seisman seisman added this to the 0.10.0 milestone Mar 22, 2023
@yvonnefroehlich
Copy link
Member Author

/format

@seisman
Copy link
Member

seisman commented Apr 10, 2023

Maybe we should add a standalone Figure.errorbar() method, like https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.errorbar.html.

@yvonnefroehlich yvonnefroehlich changed the title WIP: Add tutorial showing how to use the "error_bar" parameter of "pygmt.Figure.plot" WIP: Add tutorial showing the "error_bar" parameter of "pygmt.Figure.plot" Apr 16, 2023
@yvonnefroehlich
Copy link
Member Author

Maybe we should add a standalone Figure.errorbar() method, like https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.errorbar.html.

From a Python perspective as well as regarding user-friendliness, a standalone method for errobars seems to be a good idea.

@yvonnefroehlich
Copy link
Member Author

Maybe we should add a standalone Figure.errorbar() method, like https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.errorbar.html.

From a Python perspective as well as regarding user-friendliness, a standalone method for errobars seems to be a good idea.

Ping @GenericMappingTools/pygmt-maintainers for comments, please. How do we want to continue here? In case we add a standalone pygmt.Figure.errobar() method, this tutorial is not needed in the current form anymore. Should we close this PR and open an issue with a feature request for implementing a pygmt.Figure.errobar() method? Afterwards, I am open to write a gallery example or tutorial for this new method.

@seisman
Copy link
Member

seisman commented Apr 23, 2023

Maybe we should add a standalone Figure.errorbar() method, like https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.errorbar.html.

From a Python perspective as well as regarding user-friendliness, a standalone method for errobars seems to be a good idea.

Ping @GenericMappingTools/pygmt-maintainers for comments, please. How do we want to continue here? In case we add a standalone pygmt.Figure.errobar() method, this tutorial is not needed in the current form anymore. Should we close this PR and open an issue with a feature request for implementing a pygmt.Figure.errobar() method? Afterwards, I am open to write a gallery example or tutorial for this new method.

Could you please open a feature request first, and also keep the PR open for a while?

@yvonnefroehlich
Copy link
Member Author

Maybe we should add a standalone Figure.errorbar() method, like https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.errorbar.html.

From a Python perspective as well as regarding user-friendliness, a standalone method for errobars seems to be a good idea.

Ping @GenericMappingTools/pygmt-maintainers for comments, please. How do we want to continue here? In case we add a standalone pygmt.Figure.errobar() method, this tutorial is not needed in the current form anymore. Should we close this PR and open an issue with a feature request for implementing a pygmt.Figure.errobar() method? Afterwards, I am open to write a gallery example or tutorial for this new method.

Could you please open a feature request first, and also keep the PR open for a while?

Yep, sure. I opened an issue at #2513 and will leave this PR as is 🙂.

@yvonnefroehlich yvonnefroehlich modified the milestones: 0.10.0, 0.11.0 Aug 8, 2023
@seisman seisman added this to the 0.13.0 milestone Apr 19, 2024
@seisman seisman removed this from the 0.13.0 milestone Apr 29, 2024
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.

3 participants