Closed HouseJaay closed 6 months 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.
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:
grdcontour
: https://docs.generic-mapping-tools.org/6.4/grdcontour.html#w
Figure.grdcontour
: https://github.com/GenericMappingTools/pygmt/blob/f21119b843eb2fa9369c25af59d485a76ed2e07b/pygmt/src/grdcontour.py#L83contour
: https://docs.generic-mapping-tools.org/6.4/contour.html#w
Figure.contour
:
https://github.com/GenericMappingTools/pygmt/blob/f21119b843eb2fa9369c25af59d485a76ed2e07b/pygmt/src/contour.py#L96If 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.
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
?
Yes, please improve the docstrings following the GMT docs.
Yes, please improve the docstrings following the GMT docs.
Submitted PR #3210 for this.
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'].