Closed jebyrnes closed 10 months ago
Seems to be because we assign names to the values in barbie_theme_colors
so they can be referenced like barbie_theme_colors["text"]
See what happens here:
How to get around this, I do not know!
Yeah, this is a function of ggplot2's design, which allows you to use the names within scale_manual to indicate the colors for each. Easiest thing is to just use unname()
around it first. Best practice is normally to create a vector that has the names from your data as the names of the colors in the vector.
I've run into a funny problem where the color vectors don't work in combination with
scale_color_manual()
and its values argument, unless you againas.character()
them. Below are three plots with palmerpenguins. The middle, however, has grey colors, when it should not. What's going on here? The class of the color vector is character, so.....Created on 2023-09-15 with reprex v2.0.2