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

scale compatibility with hms class #1752

alistaire47 opened this issue Sep 15, 2016 · 0 comments

scale compatibility with hms class #1752

alistaire47 opened this issue Sep 15, 2016 · 0 comments


Copy link

@alistaire47 alistaire47 commented Sep 15, 2016

As hms has officially become part of the tidyverse, could we get a scale_x_time (and similar) so it can be plotted directly instead of hacking it through POSIXct?

For example, right now

ggplot(data.frame(time = hms::as.hms('11:11:11'), y = 1), aes(time, y)) + geom_point()


Don't know how to automatically pick scale for object of type hms/difftime. Defaulting to continuous.

but plots


chron::times similarly defaults to continuous, albeit with different numbers (due to the way the data is stored, I assume). While both can be hacked through as datetimes or relabeled, the advent of hms seems to indicate the time has come for a proper set of scale_*_time functions.

@hadley hadley added the feature label Oct 5, 2016
@hadley hadley added this to the v2.2.0 milestone Oct 5, 2016
@hadley hadley closed this in b87df24 Oct 5, 2016
@lock lock bot locked as resolved and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants