GenericMappingTools / pygmt

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

Figure.grdcontour: improve the documentation of the pen parameter #2704

Closed HouseJaay closed 6 months ago

HouseJaay commented 1 year ago

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'].

welcome[bot] commented 1 year ago

👋 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 commented 1 year ago

Thanks @HouseJaay for pointing out this limitation of the docstrings 🙂!

Actually this is not only relevant for Figure.grdcontour, but also for Figure.contour.

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 the decorators.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.

yvonnefroehlich commented 6 months ago

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?

seisman commented 6 months ago

Yes, please improve the docstrings following the GMT docs.

yvonnefroehlich commented 6 months ago

Yes, please improve the docstrings following the GMT docs.

Submitted PR #3210 for this.