Skip to content

Conversation

@zeileis
Copy link
Collaborator

@zeileis zeileis commented Oct 6, 2025

Fixes #499

The .last_call of the tinyplot() generic is now determined by comparing the functions called in sys.calls() rather than their names as suggested by @FlorianSchwendinger.

This makes it compatible with usage in do.call() or when using a custom copy of the generic.

do.call(tinyplot, list(x = 1:5, y = sin(1:5)))
do.call(tinyplot_add, list(type = "h"))

myplot = tinyplot
myplot_add = tinyplot_add
myplot(x = 1:5, y = sin(1:5))
myplot_add(type = "h")
tinyplot-add

Copy link
Owner

@grantmcdermott grantmcdermott left a comment

Choose a reason for hiding this comment

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

Thanks @zeileis, this looks good to me. One minor nit and then we can can merge once #473 is shepherded through. (I want to wait for that, since it's a big change that will cause some adjustments across most of the codebase.)

@grantmcdermott grantmcdermott merged commit 4b81142 into main Nov 19, 2025
3 checks passed
@grantmcdermott grantmcdermott deleted the tinyplot_add_fix branch November 19, 2025 18:35
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.

do.call tinyplot_add

3 participants