Skip to content

Adds better support for plotting text in 3D at different heights - #4777

Open
landryza wants to merge 11 commits into
GenericMappingTools:mainfrom
landryza:main
Open

Adds better support for plotting text in 3D at different heights#4777
landryza wants to merge 11 commits into
GenericMappingTools:mainfrom
landryza:main

Conversation

@landryza

Copy link
Copy Markdown

Description of proposed changes

Adds a z parameter to Figure.text to explicitly expose support for 3D text placement in perspective plots. Previously, users could not provide z coordinates through the PyGMT API even though the underlying GMT module supports 3D text input.
 
This PR:
 

Reviewer feedback requested

 
I would especially appreciate guidance on tests for this feature. I ran the existing tests to make sure nothing was broken with this implementation, but I'm struggling to create tests that ensure this was implemented correctly.

Preview:

N/A

@yvonnefroehlich yvonnefroehlich added this to the 0.20.0 milestone Jul 29, 2026
@yvonnefroehlich yvonnefroehlich added the enhancement Improving an existing feature label Jul 29, 2026
Comment thread pygmt/src/text.py
data = {"x": x, "y": y}

if z is not None:
data["z"] = z

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.

Could you please ada a test to ensure it works?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Improving an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Better support for plotting text in 3D at different heights

3 participants