Skip to content

Add a tutorial for plotting features on a 3-D surface - #4466

Merged
seisman merged 37 commits into
mainfrom
topographic
Apr 1, 2026
Merged

seisman merged 37 commits into
mainfrom
topographic

Conversation

@Chuan1937

@Chuan1937 Chuan1937 commented Mar 21, 2026 •

Copy link
Copy Markdown
Member

@Chuan1937 Chuan1937 self-assigned this Mar 21, 2026
@Chuan1937 Chuan1937 added the documentation Improvements or additions to documentation label Mar 21, 2026
@Chuan1937 Chuan1937 added this to the 0.19.0 milestone Mar 21, 2026
@seisman
seisman requested a review from Copilot March 21, 2026 16:49

Copilot AI 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

Adds a new advanced PyGMT tutorial demonstrating how to overlay additional map features (coastlines, symbols, and text) on top of a 3-D topographic surface created with Figure.grdview, addressing the need described in Issue #3429.

Changes:

  • Introduces a new Sphinx-Gallery tutorial script with three examples: coastlines, plot3d symbols, and text annotations on a 3-D surface.
  • Uses Taiwan earth relief as the common dataset and consistent 3-D perspective settings across examples.
  • Sets a gallery thumbnail selection for the multi-figure tutorial output.

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

@Chuan1937

Copy link
Copy Markdown
Member Author
image Why is the color not the right color. I follow the example below: image

@seisman

@Esteban82

Copy link
Copy Markdown
Member

Just to confirm: PyGMT uses GMT under the hood for 3D plotting, so it behaves the same way.

It might be worth mentioning that 3D rendering relies on a painter’s algorithm (depth sorting). This means that in some cases the result may not be visually correct. For example, a city or road that should be hidden behind a mountain may still be visible from some viewpoints due to the painter’s algorithm (no true occlusion).

@Chuan1937

Copy link
Copy Markdown
Member Author

Just to confirm: PyGMT uses GMT under the hood for 3D plotting, so it behaves the same way.

It might be worth mentioning that 3D rendering relies on a painter’s algorithm (depth sorting). This means that in some cases the result may not be visually correct. For example, a city or road that should be hidden behind a mountain may still be visible from some viewpoints due to the painter’s algorithm (no true occlusion).

Thanks, I've add it.

@seisman

seisman commented Mar 24, 2026

Copy link
Copy Markdown
Member

Why is the color not the right color.

Try putting pygmt.makecpt after creating the Figure object.

@seisman seisman changed the title Tutorial:Plotting features on a 3-D surface Add a tutorial for plotting features on a 3-D surface Mar 29, 2026
@seisman
seisman requested a review from Copilot March 29, 2026 16:03
@seisman

seisman commented Mar 29, 2026

Copy link
Copy Markdown
Member

I feel this tutorial is already in a good shape. @yvonnefroehlich Could you please give this PR a final review?

Copilot AI 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

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


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

@seisman seisman added the final review call This PR requires final review and approval from a second reviewer label Mar 30, 2026
@seisman
seisman merged commit a56a4c4 into main Apr 1, 2026
9 of 10 checks passed
@seisman
seisman deleted the topographic branch April 1, 2026 08:50
@seisman seisman removed the final review call This PR requires final review and approval from a second reviewer label Apr 1, 2026
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tutorial: Plot additional features (coastlines, symbols, text) on top of a topographic surface

4 participants