Skip to content

Figure.grdimage: Expand docstring for "nan_transparent" parameter - #2461

Merged
seisman merged 9 commits into
mainfrom
improve-docs-grdimage-Q
Mar 30, 2023
Merged

seisman merged 9 commits into
mainfrom
improve-docs-grdimage-Q

Conversation

@yvonnefroehlich

@yvonnefroehlich yvonnefroehlich commented Mar 26, 2023 •

Copy link
Copy Markdown
Member

Description of proposed changes

This PR aims to expand the docstring for the nan_transparent parameter of pygmt.Figure.grdimage, based on the upstream GMT documentation for Q.

Somehow / Maybe related to this forum post: https://forum.generic-mapping-tools.org/t/how-to-not-plot-value-zero-on-grid/3783/5

Preview at https://pygmt-dev--2461.org.readthedocs.build/en/2461/api/generated/pygmt.Figure.grdimage.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 documentation Improvements or additions to documentation skip-changelog Skip adding Pull Request to changelog labels Mar 26, 2023
@yvonnefroehlich yvonnefroehlich added this to the 0.9.0 milestone Mar 26, 2023
@yvonnefroehlich yvonnefroehlich self-assigned this Mar 26, 2023
Comment thread pygmt/src/grdimage.py
nan_transparent : bool
nan_transparent : bool or str
[**+z**\ *value*][*color*]
Make grid nodes with z = NaN transparent, using the color-masking

@seisman seisman Mar 26, 2023 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using the color-masking feature in PostScript Level 3 (the PS device must support PS Level 3).

@PaulWessel A question for you: PostScript Level 3 was released in 1997. Is it safe to assume that all PS devices (i.e., printers as I understand it) support PS Level 3 now? Or do we care about PS Level 3 if we always convert PS to PDF and then view/print?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ping @PaulWessel just in case he missed this comment.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's fine to merge this keeping the warning

@yvonnefroehlich yvonnefroehlich mentioned this pull request Mar 28, 2023
31 of 36 tasks

@maxrjones maxrjones left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@seisman
seisman merged commit 7ed595d into main Mar 30, 2023
@seisman
seisman deleted the improve-docs-grdimage-Q branch March 30, 2023 02:55
@seisman seisman changed the title "pygmt.Figure.grdimage": Expand docstring for "nan_transparent" parameter Figure.grdimage: Expand docstring for "nan_transparent" parameter Mar 30, 2023
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 skip-changelog Skip adding Pull Request to changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants