Closed lahvak closed 6 months ago
This is actually related to a response to the change in ggplot2. I've fixed this in github by first checking that "size" is a name before trying to remove that element of the list. (See # 4a6b01bed3fd14c0b160d830d8510d26d232bb32). It's unclear to me why
dots_for_lines[["size"]] <- NULL
fails here, since
x <- list(1, 2, a = 3, b = 4)
x
#> [[1]]
#> [1] 1
#>
#> [[2]]
#> [1] 2
#>
#> $a
#> [1] 3
#>
#> $b
#> [1] 4
x[["size"]] <- NULL
x
#> [[1]]
#> [1] 1
#>
#> [[2]]
#> [1] 2
#>
#> $a
#> [1] 3
#>
#> $b
#> [1] 4
Created on 2024-03-27 with reprex v2.0.2
Also note that the use of params
is optional.
ggformula::gf_dist("norm", mean = 2, sd = 1, color="red", linewidth = 5)
Created on 2024-03-27 with reprex v2.0.2
I am seeing a strange error when I try to use color in
gf_dist
:This works fine:
as does this:
However, this:
gives this error:
If I add a nonsensical parameter
size
, it works again:I know that year ago this worked fine, I suspect it has something to do with the renaming of things in ggplot2.