-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Labels
Milestone
Description
When generating a figure with all zero values, scale_y_log10()
gives an error instead of an empty plot. I would have hoped for a figure with all the points along the bottom (ideally as it is similar to the typical result for log scales) or otherwise an empty plot (sub-optimal since it removes some information).
library(ggplot2)
p <-
ggplot(data.frame(x=0, y=0), aes(x=x, y=y)) +
geom_point()
p
p + scale_y_log10()
#> Warning: Transformation introduced infinite values in continuous y-axis
#> Error in seq.default(min, max, by = by): 'from' must be a finite number
Created on 2018-09-03 by the reprex package (v0.2.0).
Breza