You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A geom to highlight boundaries, such as day and night or times with abnormal data, etc. It would be similar to geom_col() but not anchored on zero. It would use aesthetics ymin and ymax, with -Inf and Inf supported for edge to edge bands. geom_col() does not support -Inf mapped to y, and is based at zero. geom_area() seems to fail with POSIXct mapped to x. Ideally alpha should affect both fill and colour.
The example below was produced with two geom_col() layers.
Well, one can use geom_area() for this, easily if the time step in consistent. A statistics to compute the values for/night trnasitions could be useful, though.
I think one could build this geom as a wrapper on geom_rect() allowing arbitrary widths for the alternating zebra bands. One would need some way of setting the two colours and the leftmost colour for alternations. Something like two variables one for x.dawn and x.dusk.
A more general name for the variables such as switch.on and switch.off would be better than dawn and dusk, as the geom could be used for any cyclic or alternating states.
A geom to highlight boundaries, such as day and night or times with abnormal data, etc. It would be similar to geom_col() but not anchored on zero. It would use aesthetics ymin and ymax, with -Inf and Inf supported for edge to edge bands. geom_col() does not support -Inf mapped to y, and is based at zero. geom_area() seems to fail with POSIXct mapped to x. Ideally alpha should affect both fill and colour.
The example below was produced with two geom_col() layers.
The text was updated successfully, but these errors were encountered: