Skip to content

restore xaxs/yaxs on.exit if necessary#546

Merged
vincentarelbundock merged 3 commits intomainfrom
axs-restore
Feb 4, 2026
Merged

restore xaxs/yaxs on.exit if necessary#546
vincentarelbundock merged 3 commits intomainfrom
axs-restore

Conversation

@zeileis
Copy link
Collaborator

@zeileis zeileis commented Feb 4, 2026

Fixes #545

If yaxs and/or xaxs are set in draw_facet_window() they are now retored to their previous values. This fixes the behavior of the examples from the issue.

tinyplot(~ species, data = penguins, type = type_barplot())
tinyplot(1:10, pch = 19, cex = 2)
tinyplot-axs1
tinyplot(species ~ island, data = penguins)
tinyplot(1:10, pch = 19, cex = 2)
tinyplot-axs2

Note that there is no clipping anymore of the first/last point in the scatterplot.

@vincentarelbundock
Copy link
Collaborator

Thanks!

I reviewed the changes and they are very clean and straightforward, so will merge now.

I just added a simple snapshot test with a title so we can easily know what to look for in the snapshot.

@vincentarelbundock
Copy link
Collaborator

and a news item

@vincentarelbundock vincentarelbundock merged commit 0966e7f into main Feb 4, 2026
3 checks passed
@zeileis
Copy link
Collaborator Author

zeileis commented Feb 4, 2026

Cool, Vincent, thanks a lot! 🚀 I was too tired yesterday...

@zeileis zeileis deleted the axs-restore branch February 4, 2026 12:06
@grantmcdermott
Copy link
Owner

Thanks both!

I know there are a couple of other new PRs to look at. I'm hoping to get time closer to the weekend.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

xaxs/yaxs not restored when set

3 participants