Skip to content

Figure.grdview: Improve parameters plane/facade_fill/facade_pen to set the plane and facade - #4235

Merged
seisman merged 10 commits into
mainfrom
grdview/facade
Dec 12, 2025
Merged

Figure.grdview: Improve parameters plane/facade_fill/facade_pen to set the plane and facade#4235
seisman merged 10 commits into
mainfrom
grdview/facade

Conversation

@seisman

@seismanseisman commented Dec 2, 2025

Copy link
Copy Markdown
Member

This PR splits the -N option into two parameters, plane for setting the z-level and facade_fill for setting the fill for facade.

Preview: https://pygmt-dev--4235.org.readthedocs.build/en/4235/api/generated/pygmt.Figure.grdview.html#pygmt.Figure.grdview

Related to #4208

@seismanseisman added enhancement Improving an existing feature needs review This PR has higher priority and needs review. labels Dec 2, 2025
@seismanseisman added this to the 0.18.0 milestone Dec 2, 2025
Comment threadpygmt/src/grdview.py
@github-actions

github-actionsBot commented Dec 3, 2025

Copy link
Copy Markdown
Contributor

Summary of changed images

This is an auto-generated report of images that have changed on the DVC remote

StatusPath
addedpygmt/tests/baseline/test_grdview_facadepen_default_plane.png

Image diff(s)

Details

Added images

  • test_grdview_facadepen_default_plane.png

Modified images

PathOldNew

Report last updated at commit 178dd65

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR improves the Figure.grdview method by refactoring how plane and facade parameters are handled. It migrates facadepen to the new alias system and splits the GMT -N option into two separate parameters (plane and facadefill) for better API clarity.

Key changes:

  • Split the plane parameter into two distinct parameters: plane for z-level specification and facadefill for facade fill color
  • Migrated facadepen from the old @use_alias decorator to the new AliasSystem
  • Added automatic plane enabling when facadefill or facadepen is specified

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
FileDescription
pygmt/src/grdview.pyUpdated function signature with new parameters, migrated to AliasSystem for -N and -Wf options, added auto-enable logic for plane
pygmt/tests/test_grdview.pyUpdated existing test to use new API, added new test for facadepen with default plane
pygmt/tests/baseline/test_grdview_facadepen_default_plane.png.dvcAdded baseline image for new test case
examples/tutorials/advanced/draping_on_3d_surface.pyUpdated examples to use new facadefill parameter instead of plane="+g..." syntax
examples/tutorials/advanced/3d_perspective_image.pyUpdated examples and comments to use new facadefill parameter

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadpygmt/src/grdview.py Outdated
Comment threadpygmt/src/grdview.py Outdated
Comment threadexamples/tutorials/advanced/3d_perspective_image.py Outdated
Comment threadpygmt/tests/test_grdview.py
Comment threadpygmt/src/grdview.py Outdated
@seismanseisman added final review call This PR requires final review and approval from a second reviewer and removed needs review This PR has higher priority and needs review. labels Dec 4, 2025
@seisman

Copy link
Copy Markdown
MemberAuthor

Changes in this PR will affect our Figure 3, so ping @yvonnefroehlich for a review.

@seismanseisman removed the final review call This PR requires final review and approval from a second reviewer label Dec 6, 2025
@seisman
seisman marked this pull request as draft December 6, 2025 02:42
…e_pen, meshpen->mesh_pen (Will be removed in v0.20.0)
@seisman
seisman changed the base branch from main to grdview/facadepenDecember 9, 2025 08:53
@seisman
seismanforce-pushed the grdview/facade branch 2 times, most recently from 3a637e5 to 2c13607CompareDecember 9, 2025 08:56
@seismanseisman changed the title Figure.grdview: Improve parameters 'plane'/'facadefill'/'facadepen' to set the plane and facadeFigure.grdview: Improve parameters plane/facade_fill/facade_pen to set the plane and facadeDec 9, 2025
Base automatically changed from grdview/facadepen to mainDecember 10, 2025 02:21
@seisman
seisman marked this pull request as ready for review December 10, 2025 02:27
@seismanseisman added the needs review This PR has higher priority and needs review. label Dec 10, 2025
@seisman
seisman requested a review from a teamDecember 11, 2025 02:03
Comment threadpygmt/src/grdview.py
Comment threadpygmt/src/grdview.py Outdated
Comment threadexamples/tutorials/advanced/3d_perspective_image.py Outdated
seismanand others added 4 commits December 12, 2025 08:42
Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com>
Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com>
Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com>
@seismanseisman added final review call This PR requires final review and approval from a second reviewer and removed needs review This PR has higher priority and needs review. labels Dec 12, 2025
Comment threadpygmt/src/grdview.py Outdated
Co-authored-by: Michael Grund <23025878+michaelgrund@users.noreply.github.com>
@seisman
seisman merged commit 8caf8f5 into mainDec 12, 2025
24 checks passed
@seisman
seisman deleted the grdview/facade branch December 12, 2025 10:49
@seismanseisman removed the final review call This PR requires final review and approval from a second reviewer label Dec 12, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancementImproving an existing feature

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants

@seisman@michaelgrund@yvonnefroehlich