Closed neilpanchal closed 7 years ago
You mentioned ggthemr(my_palette, set_theme = FALSE)
command returned an error, but I don't see any errors in the output. Can you clarify?
@sainathadapa Sorry, by error I meant erroneous output. I can't imagine a several page output as an expected outcome, am I doing something wrong?
If you want to apply the ggthemr theme using the custom palette you have defined, use ggthemr(my_palette, set_theme = TRUE)
. Instead if you want to update only specific components, save the object from tmp <- ggthemr(my_palette, set_theme = FALSE)
, and update the required component manually. e.g.: ggplot(...) + geom_point(...) + tmp$scales$scale_fill_discrete()
. Refer to this part of the README for more details.
@sainathadapa Thank you. I've attempted to follow the instructions with no success. Please take a look here:
https://github.com/neilpanchal/ggthemr-test/blob/master/ggthemr-test.ipynb
Colors for geom_point are managed by the 'color' parameter, and not 'fill' parameter in ggplot. You wrote 'color' in geom_point, and not 'fill' here (rightly so) ggplot(data = mpg) + geom_point(mapping = aes(x = displ, y = hwy, color = class), size=2)
. But you haven't used the right scale. Use dust_theme$scales$scale_colour_discrete()
and not dust_theme$scales$scale_fill_discrete()
@sainathadapa Thank you so much. I am starting to understand the underlying mechanisms 😃
Objective: To only update the palette with custom colors, nothing else.
Tried:
Returns an error and a large printed text (a portion of it shown below).
Full printed output: https://gist.github.com/neilpanchal/685c02fe19b796adbb3c8692690d33ed
My session information:
How can I update a custom palette, and leave everything else unchanged?