clauswilke / colorblindr Goto Github PK
View Code? Open in Web Editor NEWAn R package to simulate colorblindness on R figures.
License: MIT License
An R package to simulate colorblindness on R figures.
License: MIT License
one currently needs to scroll down to see what it is about, just noticed that when sharing the link.
the package colorspace is not getting installed... Returning some error
ERROR: lazy loading failed for package 'colorblindr'
* removing 'C:/Users/.../R/win-library/3.6/colorblindr'
Error: Failed to install 'colorblindr' from GitHub:
(converted from warning) installation of package ‘C:/Users/.../colorblindr_0.1.0.tar.gz’ had non-zero exit status
Install via downloading zip and running devtools::install("")
seems to have worked.
Hi,
when I install the "colorbindr" package, I got the error: Does not appear to be an R package (no DESCRIPTION)
Hello,
I just wanted to give a short heads up about a minor issue I stumbled upon:
when playing around with this great package I just realized some unexpected behaviour with when using geom_label() in combination cvd_grid() - somehow the color of this particular geom stays untouched:
library(tidyverse)
library(colorblindr)
#> Loading required package: colorspace
p <- tibble(label = 'test') %>%
ggplot()+
geom_segment(aes(x = -1, xend = 1,y = 0, yend = 0, color = label))+
geom_label(aes(x=0,y=0,label = label, color = label))+
theme_void()
cvd_grid(p)
Created on 2019-08-27 by the reprex package (v0.3.0)
cheers,
Kosmas
Hello!
Do you think it would be possible to create individual functions for each of the colorblind types? I think that it is very useful to display them in a single grid, but it would also be nice to have some flexibility in how we present them.
Happy to help with a PR for this, and also with any help you might like in submitting this to CRAN - this is a super useful package!
Hi Claus,
When I try running cvd_grid(), I get the following error: "Error in desaturate(c, severity) : unused argument (severity)"
In the attached screenshot, I did the following:
Since I was running R v. 3.3.1, I decided to update R to the latest version. I then reinstalled the tidyverse and devtools packages, and then ran the code in the README. However, I still get the same error.
Let me know what further information I can provide to solve this issue. (Still very new at this!)
Thanks,
Irene
Could the package include a function that calculates some kind of a "colorblindness accessibility score" given a color (or palette)?
The code here http://mkweb.bcgsc.ca/colorblind/code.mhtml#page-container appears to be able to calculate correction (see getcorrection fcn) to provide "variants".
Given such a score, a color that is similar (in hue?) but better wrt colorblindness perception could be found and used to improve a specific set of colors?
Personally I'd like to use such functionality to improve the accessibility for colorblind perception of this specific color palette: https://github.com/KTH-Library/ktheme/blob/master/R/palette.R#L42-L81
Hi Claus,
I'm trying to install the colorblindr package with the following command on my windows computer with R version 3.4.2: devtools::install_github("clauswilke/colorblindr")
It looks like the installation is failing because it's not working correctly with colorspace. The error I get is:
preparing package for lazy loading
Error : object 'deutan' is not exported by 'namespace:colorspace'
ERROR: lazy loading failed for package 'colorblindr'
removing 'C:/Users/ClaraShaw/Documents/R/win-library/3.4/colorblindr'
Installation failed: Command failed (1)
I installed cowplot and colorspace today, so I'm not sure what's wrong, and I couldn't find much on troubleshooting this issue.
Thanks so much for your help!
-Clara
Hi. I previously had colorblindr working on my R studio setup, but not longer. So I reinstalled. This is what I'm getting.
I downloaded a fresh cowplot
and colorspace
.
I have R 3.5 on Mac OS and R Studio Version 1.1.463
on MacOS 13.3
─ preparing ‘colorblindr’:
✔ checking DESCRIPTION meta-information ...
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
─ building ‘colorblindr_0.1.0.tar.gz’
* installing *source* package ‘colorblindr’ ...
** R
** inst
** byte-compile and prepare package for lazy loading
Error : object ‘desaturate’ is not exported by 'namespace:colorspace'
ERROR: lazy loading failed for package ‘colorblindr’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/colorblindr’
Error in i.p(...) :
(converted from warning) installation of package ‘/var/folders/gx/mfdx8g856wvdtp0dw7k8h2s80000gn/T//Rtmps2mG9T/filec65216f0c535/colorblindr_0.1.0.tar.gz’ had non-zero exit status
Thanks for making this available, I would love (my colleagues) to use the information in http://serialmentor.com/dataviz/ to create better plots AND use colorblind-friendly colors. Is it possible to separate the actual color palettes from the colorblind simulation functionality? That way they can use those palettes without having to (know how to) use devtools
to install development packages.
> install.packages("colorblindr")
Warning in install.packages :
package ‘colorblindr’ is not available for this version of R
Love this package! I just had to upgrade to Beagle Scouts and it looks like it isn't yet available for this release. (You probably already knew, but I figured that I should create a GH issue, just in case!)
Let's say you have an image of three species of flower with an outline of each filled using the OkabeIto color scale. This way, when you view the colorblinr images you also see how colorblindness affects the accompanying visuals that use the same color scheme? Do you have a vignette for how to adding images to these plots before you export them to colorblindr?
Hi! Great 📦 !
I think setting last_plot()
as the default value for plot
in view_cvd()
, cvd_grid()
and edit_colors()
could make life easier for interactive use.
I juist wanted to confirm that this package doesn't support continuous scales? I'm not missing anything?
I successfully installed "cowplot" and "colorspace" as instructed, but failed to install 'colorblindr'. Very disappointed since I have bought the wonderful book "Fundamentals of Data Visualization" but am unable to produce same graphs. Error message is as below. Your help is needed. Thank you.
remotes::install_github("clauswilke/colorblindr")
Downloading GitHub repo clauswilke/colorblindr@master
Installing 7 packages: shiny, promises, later, httpuv, xtable, sourcetools, fastmap
Installing packages into ‘C:/Users/magpie/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
Error: Failed to install 'colorblindr' from GitHub:
(converted from warning) unable to access index for repository https://owi.usgs.gov/R/bin/windows/contrib/4.0:
cannot open URL 'https://owi.usgs.gov/R/bin/windows/contrib/4.0/PACKAGES'
R version 4.0.0
RStudio version 1.2.5001
colorspace version 1.4-1
cowplot version 1.0.0
We should prepare a proper release. What is still needed? Here are some things I can think about:
Something else?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.