You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Figure.grdcontour: improve the documentation of the pen parameter #2704
Please describe what could be improved about this page or the typo/mistake that you found:
"pen (str) – Set pen attributes for lines or the outline of symbols."
should be:
"pen (str, list) – Set pen attributes for lines or the outline of symbols."
Because we can set pen attributes for contour lines with and without annotations separately.
Example: pen=['a0.75p,white', 'c0.25p,white'].
👋 Thanks for opening your first issue here! Please make sure you filled out the template with as much detail as possible. You might also want to take a look at our contributing guidelines and code of conduct.
For these two methods, I feel we should not only update the allowed input types for the pen parameter but also improve the docstring following the upstream GMT documentation instead of using the general formulation defined in thedecorators.py file:
If you'd like to work on these updates, feel free to submit a pull request. For details on how contributing to PyGMT works, you may want to take a look at our Contributors Guide. Please ask any questions you have.
changed the title [-]Suggested improvement for api/generated/pygmt.Figure.grdcontour[/-][+]Figure.grdcontour: Suggested improvement for api/generated/pygmt.Figure.grdcontour[/+]on Oct 9, 2023
changed the title [-]Figure.grdcontour: Suggested improvement for api/generated/pygmt.Figure.grdcontour[/-][+]Figure.grdcontour: improve the documentation of the pen parameter[/+]on Mar 4, 2024
What is the status on this issue? Would it be fine if I submit a PR for improving the docstring for the pen parameter for both Figure.grdcontour and Figure.contour?
Activity
welcome commentedon Sep 30, 2023
👋 Thanks for opening your first issue here! Please make sure you filled out the template with as much detail as possible. You might also want to take a look at our contributing guidelines and code of conduct.
yvonnefroehlich commentedon Sep 30, 2023
Thanks @HouseJaay for pointing out this limitation of the docstrings 🙂!
Actually this is not only relevant for
Figure.grdcontour, but also forFigure.contour.For these two methods, I feel we should not only update the allowed input types for the
penparameter but also improve the docstring following the upstream GMT documentation instead of using the general formulation defined in thedecorators.pyfile:grdcontour: https://docs.generic-mapping-tools.org/6.4/grdcontour.html#wFigure.grdcontour:pygmt/pygmt/src/grdcontour.py
Line 83 in f21119b
contour: https://docs.generic-mapping-tools.org/6.4/contour.html#wFigure.contour:pygmt/pygmt/src/contour.py
Line 96 in f21119b
If you'd like to work on these updates, feel free to submit a pull request. For details on how contributing to PyGMT works, you may want to take a look at our Contributors Guide. Please ask any questions you have.
[-]Suggested improvement for api/generated/pygmt.Figure.grdcontour[/-][+]Figure.grdcontour: Suggested improvement for api/generated/pygmt.Figure.grdcontour[/+][-]Figure.grdcontour: Suggested improvement for api/generated/pygmt.Figure.grdcontour[/-][+]Figure.grdcontour: improve the documentation of the pen parameter[/+]yvonnefroehlich commentedon Apr 28, 2024
What is the status on this issue? Would it be fine if I submit a PR for improving the docstring for the
penparameter for bothFigure.grdcontourandFigure.contour?seisman commentedon Apr 29, 2024
Yes, please improve the docstrings following the GMT docs.
yvonnefroehlich commentedon Apr 29, 2024
Submitted PR #3210 for this.