Skip to content

Faceting by POSIXct fails with uninformative error if timezone is UTC #4341

@hadley

Description

@hadley
library(ggplot2)
library(tibble)

df <- tibble(y = as.POSIXct("2018-01-01 00:00:00", tz = "UTC"), x = 110)
df %>% 
  ggplot(aes(x)) +
  geom_histogram() +
  facet_wrap(~y)
#> Error: `scale_id` must not be `NA`

df <- tibble(y = as.POSIXct("2018-01-01 00:00:00"), x = 110)
df %>% 
  ggplot(aes(x)) +
  geom_histogram() +
  facet_wrap(~y)
#> `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

Created on 2021-02-05 by the reprex package (v1.0.0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions