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

Closed
alistaire47 opened this issue Sep 15, 2016 · 0 comments
Closed

scale compatibility with hms class #1752

alistaire47 opened this issue Sep 15, 2016 · 0 comments
Labels
feature a feature request or enhancement
Milestone

Comments

@alistaire47
Copy link
Contributor

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()

warns

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

but plots

rplot

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 a feature request or enhancement label Oct 5, 2016
@hadley hadley added this to the v2.2.0 milestone Oct 5, 2016
@hadley hadley closed this as completed 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.
Labels
feature a feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants