Skip to content

Figure: Defer figure activation until plotting arguments are prepared#4756

Open
seisman wants to merge 1 commit into
mainfrom
figure/activate
Open

Figure: Defer figure activation until plotting arguments are prepared#4756
seisman wants to merge 1 commit into
mainfrom
figure/activate

Conversation

@seisman

@seisman seisman commented Jul 23, 2026

Copy link
Copy Markdown
Member

Move self._activate_figure() later in plotting wrappers, immediately before the first GMT session call.

This lets PyGMT perform pure-Python operations and validations before activating a figure or changing GMT state. Invalid input now fails earlier without creating or modifying the figure state.

Figure.hlines and Figure.vlines retain earlier activation because they may need to retrieve the current plot region before delegating to Figure.plot.

@seisman seisman added this to the 0.20.0 milestone Jul 23, 2026
@seisman seisman added maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog needs review This PR has higher priority and needs review. labels Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Boring but important stuff for the core devs needs review This PR has higher priority and needs review. skip-changelog Skip adding Pull Request to changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant