Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem Setting Custom Color Palette #153

Open
kweinert opened this issue Apr 20, 2021 · 1 comment
Open

Problem Setting Custom Color Palette #153

kweinert opened this issue Apr 20, 2021 · 1 comment

Comments

@kweinert
Copy link

Hi, I have difficulities setting a custom palette. Here is what I tried:

pals <- esquisse:::default_pals()
pals$choices$Qualitative[["custom"]] <- c("#1F82BF", "#33B9CA", "#B1C800", "#E2001A", "#F29400", "#FFC800")
options(esquisse.palettes=pals)

If I start esquisser() (version 1.0.1) the new palette is shown. However, if I select it, the following error is displayed:

Error: 'arg' should be one of '“ggplot2”, “viridis”, “magma”, “inferno”, “plasma”, “cividis”, “BrBG”, “PiYG”, “PRGn”, “PuOr”, “RdBu”, “RdGy”, “RdYlBu”, “RdYlGn”, “Spectral”, “Accent”, “Dark2”, “Paired”, “Pastel1”, “Pastel2”, “Set1”, “Set2”, “Set3”, “Blues”, “BuGn”, “BuPu”, “GnBu”, “Greens”, “Greys”, “Oranges”, “OrRd”, “PuBu”, “PuBuGn”, “PuRd”, “Purples”, “RdPu”, “Reds”, “YlGn”, “YlGnBu”, “YlOrBr”, “YlOrRd”'

So somehow the new palette entry is not passed forward?

Kind regards,
Karsten

@pvictor
Copy link
Member

pvictor commented Apr 21, 2021

Hello,

Yes custom color palette weren't supported, should work now if you re-install from GitHub.

With a discrete scale it uses scale_fill/color_manual and with a continuous one scale_fill/color_gradientn.

Victor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants