edited axis titles
This commit is contained in:
parent
9812332051
commit
aaaa55186c
File diff suppressed because one or more lines are too long
@ -65,18 +65,24 @@ update_data <- function(){
|
|||||||
scale_y_discrete(breaks = entities$entity_id, labels = entities$name) +
|
scale_y_discrete(breaks = entities$entity_id, labels = entities$name) +
|
||||||
scale_x_datetime(date_breaks = "24 hours", date_labels = '%A', date_minor_breaks = "6 hours") +
|
scale_x_datetime(date_breaks = "24 hours", date_labels = '%A', date_minor_breaks = "6 hours") +
|
||||||
theme(axis.text.x = element_text(angle = 30, vjust = 0.5)) +
|
theme(axis.text.x = element_text(angle = 30, vjust = 0.5)) +
|
||||||
labs(title = "The past week")
|
labs(title = "The past week",
|
||||||
|
x = NULL,
|
||||||
|
y = NULL,
|
||||||
|
fill = NULL)
|
||||||
|
|
||||||
plot_1day <- ggplot(data = values %>% filter(time >= max(values$time) - hours(24))) +
|
plot_1day <- ggplot(data = values %>% filter(time >= max(values$end_time) - hours(24))) +
|
||||||
geom_tile(aes(x = time + seconds(round(as.numeric(difftime(end_time, time, unit = "secs")))/2),
|
geom_tile(aes(x = time + seconds(round(as.numeric(difftime(end_time, time, unit = "secs")))/2),
|
||||||
y = entity_id,
|
y = entity_id,
|
||||||
width = seconds(round(as.numeric(difftime(end_time, time, unit = "secs")))),
|
width = seconds(round(as.numeric(difftime(end_time, time, unit = "secs")))),
|
||||||
height = 0.5,
|
height = 0.5,
|
||||||
fill = status)) +
|
fill = status)) +
|
||||||
scale_y_discrete(breaks = entities$entity_id, labels = entities$name) +
|
scale_y_discrete(breaks = entities$entity_id, labels = entities$name) +
|
||||||
scale_x_datetime(breaks = seq(round_date(max(values$time), "4 hours") - hours(24), round_date(max(values$time), "4 hours"), by = "4 hours"), date_labels = '%I:%M %p', date_minor_breaks = "1 hours") +
|
scale_x_datetime(breaks = seq(round_date(max(values$end_time), "4 hours") - hours(24), round_date(max(values$end_time), "4 hours"), by = "4 hours"), date_labels = '%I:%M %p', date_minor_breaks = "1 hours") +
|
||||||
theme(axis.text.x = element_text(angle = 30, vjust = 0.5)) +
|
theme(axis.text.x = element_text(angle = 30, vjust = 0.5)) +
|
||||||
labs(title = "Last 24 hours")
|
labs(title = "Last 24 hours",
|
||||||
|
x = NULL,
|
||||||
|
y = NULL,
|
||||||
|
fill = NULL)
|
||||||
|
|
||||||
render("laundry_status.Rmd",
|
render("laundry_status.Rmd",
|
||||||
output_dir = "html",
|
output_dir = "html",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user