define_pallette not working for colours
farhadsalimi opened this issue · comments
Farhad Salimi commented
library(ggthemr)
#> Loading required package: ggplot2
library(tidyverse)
#> Warning: package 'tidyr' was built under R version 4.1.2
#> Warning: package 'readr' was built under R version 4.1.2
#> Warning: package 'dplyr' was built under R version 4.1.2
set.seed(12345)
random_colours <- sample(colors()[-c(1, 253, 361)], 10L)
ugly <- define_palette(
swatch = random_colours,
gradient = c(lower = random_colours[1L], upper = random_colours[2L])
)
ggthemr(ugly)
mtcars %>%
ggplot(aes(x = disp,
y = mpg,
col = as.factor(gear))
) +
geom_point()
Created on 2022-04-11 by the reprex package (v2.0.1)
Mattias commented
I'm pretty sure this is the same as #44 (which is fixed in #52) could you test the matt-int/ggthemr@default_scales to see if this resolves the issue? You can install specific branches by running: devtools::install_github("matt-int/ggthemr@default_scales")
You can also add + scales_colour_ggthemr_d()
to your ggplot call and the new theme colours should be applied.
Gergely Daróczi commented
As per #52, this should be fixed now -- please reopen if the problem still persists.
Farhad Salimi commented
scales_colour_ggthemr_d()
works but I can't install that specific branch
devtools::install_github("matt-int/ggthemr@default_scales")
#> Downloading GitHub repo matt-int/ggthemr@default_scales
#> Error in utils::download.file(url, path, method = method, quiet = quiet, :
#> cannot open URL 'https://api.github.com/repos/matt-int/ggthemr/tarball/default_scales'
Created on 2022-04-12 by the reprex package (v2.0.1)
Mattias commented
Hey, that branch was merged with the main one, if you reinstall ggthemr from Mikata-Project it should work now.
…-------- Original Message --------
On 12 Apr 2022, 06:50, Farhad Salimi wrote:
scales_colour_ggthemr_d() works but I can't install that specific branch
devtools
::
install_github(
"
***@***.***_scales
"
)
#
> Downloading GitHub repo ***@***.***_scales
#
> Error in utils::download.file(url, path, method = method, quiet = quiet, :
#
> cannot open URL 'https://api.github.com/repos/matt-int/ggthemr/tarball/default_scales'
Created on 2022-04-12 by the [reprex package](https://reprex.tidyverse.org) (v2.0.1)
—
Reply to this email directly, [view it on GitHub](#54 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/AB5GGJEQ6MXJAFY5I4WQ4U3VEUFJ7ANCNFSM5TBUOAMQ).
You are receiving this because you commented.Message ID: ***@***.***>