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

geom_raster silently breaks entire plot system #53

Open
csaluski opened this issue May 12, 2022 · 1 comment
Open

geom_raster silently breaks entire plot system #53

csaluski opened this issue May 12, 2022 · 1 comment

Comments

@csaluski
Copy link
Collaborator

While working with creating a tiled plot I tried using the geom_raster geometry, which documentation states is special case of geom_tile that is optimized for all tiles being the same size. However, upon adding the geometry to my list of plots it appears to break the entire plot system without any logs of errors, causing all the plots in a system to be blank. I tested this with the latest version of animint2 on CRAN, 2022.1.25.

My understanding is that this must be because the function has not been implemented in animint2 from the original ggplot2 code, so this is the behavior from that. This raises the question of if there are other geometries that also cause this issue, and if there are then this should probably be at least documented.

For compatibility with ggplots it might make sense to implement this function by just routing it to a normal call to geom_tile without worrying about the optimization, and to see if other unimplemented geometries have a similar logical fallback.

This Gist demonstrates an example of geom_raster breaking the plot system and an example of geom_tile working correctly.
https://gist.github.com/Csaluski/628e69c42e4ec3b23bc0f369d4fe8c7a

@csaluski csaluski changed the title geom_raster silently breaks entire plot geom_raster silently breaks entire plot system May 12, 2022
@tdhock
Copy link
Collaborator

tdhock commented May 18, 2022

Probably best to just remove geom_raster for simplicity, or replace it with an implentation like this:

geom_raster <- function(...)stop("geom_raster is not supported, try geom_tile instead")

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

No branches or pull requests

2 participants