Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
nklepeis opened this issue Dec 1, 2019 · 1 comment
Open

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

nklepeis opened this issue Dec 1, 2019 · 1 comment

Comments

@nklepeis
Copy link

nklepeis commented Dec 1, 2019

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

@nklepeis
Copy link
Author

nklepeis commented Dec 2, 2019

OK, I just read in the closed issues that there is a fixed 7*5 matrix and panels are wrapped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant