Skip to content

Conversation

yvonnefroehlich
Copy link
Member

@yvonnefroehlich yvonnefroehlich commented Mar 19, 2025

Description of proposed changes

Related to the second part of comment #3856 (comment).

Update the gallery example for Figure.image to use another image (not the GMT logo).

Preview:

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.

Slash Commands

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

  • /format: automatically format and lint the code

@yvonnefroehlich yvonnefroehlich added documentation Improvements or additions to documentation skip-changelog Skip adding Pull Request to changelog labels Mar 19, 2025
@yvonnefroehlich yvonnefroehlich self-assigned this Mar 19, 2025
Path("gmt-logo.png").unlink()
# Place and center ("+jCM") an image provided by GMT to the position ("+g") 1/1 on the
# current plot, scaled up to be 8 cm wide ("+w") and draw a rectangular border around it
fig.image(imagefile="@needle.jpg", position="g1/1+w8c+jCM", box=True)
Copy link
Member

Choose a reason for hiding this comment

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

I prefer to use a URL to an image instead to show that PyGMT supports URLs.

fig.image(
imagefile="https://www.generic-mapping-tools.org/_static/gmt-logo.png",
position="g1/1+w3c+jCM",
imagefile="https://www.emirates247.com/polopoly_fs/1.569712.1452551297!/image/image.jpg",
Copy link
Member Author

Choose a reason for hiding this comment

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

I added a URL to this image. However, not sure how this is about the copyright and using this image in this gallery example.

Co-authored-by: Dongdong Tian <[email protected]>
@yvonnefroehlich yvonnefroehlich changed the title POC: DOC: Use other image (not the GMT logo) in the gallery example for Figure.image POC: DOC: Use other image (not the GMT logo) in the gallery example for Figure.image Mar 19, 2025
@seisman seisman added this to the 0.15.0 milestone Mar 19, 2025
@seisman seisman changed the title POC: DOC: Use other image (not the GMT logo) in the gallery example for Figure.image DOC: Use other image (not the GMT logo) in the gallery example for Figure.image Mar 19, 2025
@seisman seisman merged commit abf6f37 into main Mar 19, 2025
10 checks passed
@seisman seisman deleted the update-gallery-image branch March 19, 2025 15:50
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.

3 participants