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

Label formatting in transform_time() with zero-width limits #446

Closed
teunbrand opened this issue Aug 6, 2024 · 0 comments · Fixed by #455
Closed

Label formatting in transform_time() with zero-width limits #446

teunbrand opened this issue Aug 6, 2024 · 0 comments · Fixed by #455

Comments

@teunbrand
Copy link
Contributor

This isssue is a port from tidyverse/ggplot2#3475.

When you provide zero-width limits to transform_time(), the formatting of the labels does not resemble typical time formatting.

limits <- lubridate::as_datetime("2010-08-03 00:50:50")
limits <- c(limits, limits)

trans <- scales::transform_time()
breaks <- trans$breaks(limits)
labels <- trans$format(breaks)
labels
#> [1] "47" "48" "49" "50" "51" "52"

Created on 2024-08-06 with reprex v2.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant