Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion R/geom-raster.R
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ GeomRaster <- ggproto("GeomRaster", Geom,

draw_panel = function(self, data, panel_params, coord, interpolate = FALSE,
hjust = 0.5, vjust = 0.5) {
if (!inherits(coord, "CoordCartesian")) {
if (!inherits(coord, "CoordCartesian") || !coord$is_linear()) {
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't it be enough to test coord$is_linear() and forget about the special case for CoordCartesian?

The message below also needs an update

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah good points, I agree

cli::cli_inform(c(
"{.fn {snake_class(self)}} only works with {.fn coord_cartesian}.",
i = "Falling back to drawing as {.fn {snake_class(GeomRect)}}."
Expand Down