Skip to content

Commit a6fd43f

Browse files
committed
simplify case
1 parent 7cd3faa commit a6fd43f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

R/geom-raster.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,10 @@ GeomRaster <- ggproto("GeomRaster", Geom,
9090

9191
draw_panel = function(self, data, panel_params, coord, interpolate = FALSE,
9292
hjust = 0.5, vjust = 0.5) {
93-
if (!inherits(coord, "CoordCartesian") || !coord$is_linear()) {
93+
if (!coord$is_linear()) {
9494
cli::cli_inform(c(
95-
"{.fn {snake_class(self)}} only works with {.fn coord_cartesian}.",
95+
"{.fn {snake_class(self)}} only works with linear coordinate systems, \\
96+
not {.fn {snake_class(coord)}}.",
9697
i = "Falling back to drawing as {.fn {snake_class(GeomRect)}}."
9798
))
9899
data$linewidth <- 0.3 # preventing anti-aliasing artefacts

0 commit comments

Comments
 (0)