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

theme_ggEHD() color palette #14

Open
kevinwolz opened this issue Jan 17, 2017 · 5 comments
Open

theme_ggEHD() color palette #14

kevinwolz opened this issue Jan 17, 2017 · 5 comments

Comments

@kevinwolz
Copy link
Collaborator

The default color palette for ggplot2 is certainly pleasing to my eyes, but not so much so for my color-blind committee member. Consequently, I am consistently changing and color scales to the scale found here. You can see it below:

image

It might be good practice just to default to this, but I thought it was at least something to open for discussion.

And here's our favorite example plot with the new palette:
image

@infotroph
Copy link
Owner

One hazard of color palettes is that they often controlled by data mappings, so the place to set them might be in any of a dozen places (notably the scale_color* functions, but also fill, guides, etc). But we can certainly make it easier by providing one or several palette functions. Personally I've been using the palettes from package viridis, but they are definitely... intense. Perhaps, by analogy to the viridis approach, a scale_color_EHD that works by calling scale_color_manual(values = EHD_palette())?

@kevinwolz
Copy link
Collaborator Author

After thinking more about this, I agree that it is probably best to just supply color palettes manually. There are too many places to supply it and too many variations that come up. What I have been doing lately is having a "toolbox" script for whatever project I'm working on that I run whenever I first start R. It loads my standard packages, sets plot parameters, and creates common color palettes that I can then reference easily later.

@infotroph
Copy link
Owner

I may have overstated my case -- I agree fully that it'd be helpful to include a non-default palette, it just needs some thought to do it right. Even something like

EHD_palette = function{
	c(
		RGB(0, 0, 0),
		RGB(230, 159, 0),
		RGB(86, 180, 233),
		RGB(0, 158, 115),
		RGB(240, 228, 66),
		RGB(0, 114, 178),
		RGB(213, 94, 0),
		RGB(204, 121, 167)
        )
}

would simplify the other color mapping operations. I don 't mind if this stays open while we think on it more, but your call.

@kevinwolz kevinwolz reopened this Feb 9, 2017
@kevinwolz
Copy link
Collaborator Author

For sure. Still new to GitHub...sorry, learning how all these buttons work.

@infotroph
Copy link
Owner

Ah, gotcha. All good.

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

No branches or pull requests

2 participants