Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
rescale() works with Date, POSIXct and POSIXlt objects. #75
This pull request deals with #74 as discussed.
Thanks for your time. Feel free to tell me if there is anything that does not convince you.
2 times, most recently
Mar 1, 2016
Current coverage is 61.71% (diff: 100%)
@@ master #75 diff @@ ========================================== Files 26 26 Lines 803 815 +12 Methods 0 0 Messages 0 0 Branches 0 0 ========================================== + Hits 491 503 +12 Misses 312 312 Partials 0 0
This would be useful for some of the scales stuff I'm working on for ggplot2 – it would allow scaling alpha with datetimes, for one. But I think we need a way to go back to datetimes after the conversion, otherwise you get legends that look like this:
dat <- data.frame( x = sample(1:10, 10), y = (1:10)^2, dt = seq( as.POSIXct("2017-06-01 15:28:44 PDT"), as.POSIXct("2017-06-12 15:28:44 PDT"), length.out = 10 ) ) ggplot(dat, aes(x, y)) + geom_point(aes(alpha = dt))
@karawoo Thanks for reviewing this. I believe that what you are asking for fits better in the
Here is your example, with a draft of what the
Link to the relevant ggplot2 issue: tidyverse/ggplot2#1526