Skip to content

"Dangling Monday" is plotted at top of calendar #17

Description

@nklepeis

Hi! Wonderful Package!

I noticed what may be a small bug where if there is a "dangling monday" for a given monthly calendar it seems to be plotted at the top of the calendar instead of at the bottom. See the attached example, in which Sept 30 is at the top instead of the bottom of the calendar.

My code:

alldata %>%
filter(Time.POSIX >= as_datetime("2019-09-01 00:00:00", tz="America/Los_Angeles"),
     Time.POSIX <= as_datetime("2019-10-01 00:00:00", tz="America/Los_Angeles"), 
     Response == "PM2.5_ATM_ug.m3") %>%  
mutate(Date = as_date(Time.POSIX),
     Time = 60*hour(Time.POSIX)+minute(Time.POSIX),
     Month = month(Time.POSIX, label = TRUE)) %>%  
ggplot(aes(x = Time, y = Value, color = Location)) +
geom_line() +
scale_x_continuous(breaks=c(0,360,780,1140), 
                 labels=c("12a","6a","12p","6p"),
                 limits=c(0,1440)) + 
labs(y = "PM2.5", x = "Time", title="Purple Air") +  
facet_calendar(~ Date, ncol=2) +
 theme_bw() +
theme(legend.position = "bottom")

Everything else I have plotted looks great,

Thanks, Neil

facet_calendar_PA

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions