-
Notifications
You must be signed in to change notification settings - Fork 37
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
New scale_x_num() and scale_y_num() #404
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Dec 26, 2021
@lionel- @DavisVaughan @thomasp85: Any idea why this kicks in only after we attach pillar? (Look at the x and y scales.) CC @Enchufa2. data <- tibble::tibble(
x = pillar::num((1:10) / 100, fixed_exponent = -3, notation = "eng"),
y = pillar::num((1:10) / 100, scale = 100, label = "%"),
z = pillar::num(10^(-5:4), notation = "si")
)
data
#> # A tibble: 10 × 3
#> x y z
#> <eng> % <si>
#> 1 10e-3 1 10µ
#> 2 20e-3 2 100µ
#> 3 30e-3 3 1m
#> 4 40e-3 4 10m
#> 5 50e-3 5 100m
#> 6 60e-3 6 1
#> 7 70e-3 7 10
#> 8 80e-3 8 100
#> 9 90e-3 9 1k
#> 10 100e-3 10 10k
ggplot2::ggplot(data, ggplot2::aes(x, y)) +
ggplot2::geom_point() library(pillar)
ggplot2::ggplot(data, ggplot2::aes(x, y)) +
ggplot2::geom_point() Created on 2021-12-28 by the reprex package (v2.0.1) |
Of course this is because how the lookup of the scale functions work. Sorry for the noise. About to file an issue in ggplot2. |
6 tasks
krlmlr
force-pushed
the
f-400-ggplot2-num
branch
from
January 12, 2022 04:39
303a83d
to
5b517a3
Compare
krlmlr
changed the title
WIP: New scale_x_num() and scale_y_num()
New scale_x_num() and scale_y_num()
Jan 12, 2022
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Do we need to support more scales -- color, fill, size?
Need to document in tibble, implementation remains here.
Closes #400.
Created on 2021-12-26 by the reprex package (v2.0.1)