Repository navigation
Conversation
Conflicts: DESCRIPTION R/scales.r
This causes a change in the tests because rgb() truncates rather than rounding
Member
Author
|
Unfortunately this change makes x <- seq(0, 1, length = 1e5)
col <- c("red", "green", "blue")
bench::mark(
base = grDevices::rgb(colorRamp(col)(x), maxColorValue = 255)
)
#> # A tibble: 1 x 6
#> expression min median `itr/sec` mem_alloc `gc/sec`
#> <bch:expr> <bch:tm> <bch:tm> <dbl> <bch:byt> <dbl>
#> 1 base 17.2ms 21.9ms 45.3 19.4MB 34.0
bench::mark(
scales = scales::colour_ramp(col)(x)
)
#> # A tibble: 1 x 6
#> expression min median `itr/sec` mem_alloc `gc/sec`
#> <bch:expr> <bch:tm> <bch:tm> <dbl> <bch:byt> <dbl>
#> 1 scales 49.5ms 51.4ms 19.4 36.7MB 58.3Created on 2019-10-31 by the reprex package (v0.3.0) I did a little profiling and the bottleneck is primarily in the matrix manip in |
hadley
marked this pull request as ready for review
October 31, 2019 16:07
Member
Author
|
Oh it's also slower in R 3.5 with cran scales, so I don't think this is a new change, and I don't have any hesitation to merge this PR as is. |
thomasp85
approved these changes
Nov 4, 2019
thomasp85
left a comment
Member
There was a problem hiding this comment.
LGTM - should I prioritise farver to get it updated before scales submission?
Member
Author
|
@thomasp85 I don't think you need to prioritise it; if it happens, it happens. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #223
convertColor()callscol2hcl()color_ramp()vscolorRamp()