Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check.class argument to ggsave #970

Closed
wants to merge 1 commit into from
Closed

check.class argument to ggsave #970

wants to merge 1 commit into from

Conversation

@baptiste
Copy link
Contributor

@baptiste baptiste commented Jun 2, 2014

optional by-pass of ggsave checks that an object of class ggplot is being recorded.
In addition, a grid.draw method is defined, rather than calling print()
directly, to allow other grobs such as modified gtables to be saved to a device with the same convenience.

optional by-pass of ggsave checks that an object of class ggplot is being recorded. 
In addition, a grid.draw method is defined, rather than calling print()
directly, to allow other grobs such as modified gtables to be saved.
@hadley
Copy link
Member

@hadley hadley commented Jun 11, 2015

Hmmm, I don't really like adding an additional argument. Any thoughts on alternative ways to check if it's saveable? Maybe we could have?

is_gridable <- function(x) UseMethod("is_gridable")
is_gridable.ggplot <- function(x) TRUE
is_gridable.grob <- function(x) TRUE
is_gridable.default <- function(x) FALSE

?

@hadley
Copy link
Member

@hadley hadley commented Jun 18, 2015

Done in 7387d39

@hadley hadley closed this Jun 18, 2015
@baptiste
Copy link
Contributor Author

@baptiste baptiste commented Jun 19, 2015

Thanks! Any particular reason to have grid.draw.ggplot() calling print.ggplot(), and not the opposite?

@hadley
Copy link
Member

@hadley hadley commented Jun 20, 2015

You're the one who wrote that ;) it probably should be the other way around but it required a bit too much thinking

@lock
Copy link

@lock lock bot commented Jan 18, 2019

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/

@lock lock bot locked and limited conversation to collaborators Jan 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants