프로젝트
GitHub에서 보기
clauswilke/colorblindr
소개
An R package to simulate colorblindness on R figures.
기타 프로젝트측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Originalcolorblindr
Simulate colorblindness in production-ready R figures. Written by Claire D. McWhite and Claus O. Wilke.
Try out simulations at http://hclwizard.org/cvdemulator/.
Installation
This package depends on the development versions of cowplot and colorspace. Please install those packages first:
remotes::install_github("wilkelab/cowplot")
install.packages("colorspace", repos = "http://R-Forge.R-project.org")
Then install colorblindr:
remotes::install_github("clauswilke/colorblindr")
Quick start
Make a figure:
library(ggplot2)
fig <- ggplot(iris, aes(Sepal.Length, fill = Species)) + geom_density(alpha = 0.7)
fig

Now look at it in various color-vision-deficiency simulations:
library(colorblindr)
cvd_grid(fig)

Then inspect it in the interactive app:
view_cvd(p) # starts the interactive app
To use a color scale that works somewhat better for people with color-vision deficiency, we recommend scale_color_OkabeIto and scale_fill_OkabeIto:
fig2 <- ggplot(iris, aes(Sepal.Length, fill = Species)) +
geom_density(alpha = 0.7) + scale_fill_OkabeIto()
fig2

That figure after color-vision-deficiency simulation:
cvd_grid(fig2)

관련 프로젝트 살펴보기
불러오는 중…