A point for every hour, at its average temperature and humidity, colored by the hour of the day (night blue, morning orange, midday yellow, evening red), over a shaded box for the comfortable ranges. The title says how many of the hours were inside the box, and the corners name what lies that way: warm and dry, warm and humid, cool and dry, cool and humid.
Arguments
- temperature, humidity
Data frames from
get_hourly()of temperature and humidity.- mode
"light"or"dark", the mode of the app.- temperature_range, humidity_range
The comfortable ranges, the same as the green bands of the Current tab: 20 to 25 degrees Celsius and 40 to 60%.
Examples
hours <- expand.grid(hour = 0:23, date = as.Date("2026-10-01") + 0:6)
temperature <- transform(hours, value = 22 + 4 * sin((hour - 9) / 24 * 2 * pi))
humidity <- transform(hours, value = 45 - 8 * sin((hour - 9) / 24 * 2 * pi))
plot_comfort(temperature, humidity)
plot_comfort(temperature, humidity, mode = "dark")