Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
I would quickly look up at two particular co-workers. We all had that same rolling of the eyes look. When you have color-challenged issues, that red line does not clearly demonstrate anything to us. (And yes, the three of us knew we all had color issues.)
I wrote the R code for this graph. But I used a random number to decide which line is red and which is green, so I don’t know which line is which.
I am not color-blind. I am color-challenged. I see some colors, but probably not as many as most people see. I don’t distinguish between red and green well. I also don’t distinguish between blue and purple well because of the red element of purple, and similarly for other combinations.
In my earliest elementary school years I had a box of 8 Crayola crayons, and I did just fine. My problems began when Crayola started adding more and more colors including combinations like green yellow and yellow green. Here are the original eight colors, which I still identify just fine. (There is no meaning to the heights of the bars.)
One source suggests approximately 1 in 12 men have color issues, but only 1 in 200 women.
Color-challenged people often have coping strategies. I can see when the top traffic light is on, so I will stop my car. But in my heart, I don’t think it is red, but more of an orange. Similarly I can see when the bottom traffic light is on, but I think it is more of an off-white than green. As long as no one flips the positions, I am fine. A single flashing light is a probllem though.
When I see an 8-sided stop sign, that’s what I consider red. And I recognize Taylor Swift wears what I consider a very red lipstick, but I assume she wears more than one shade and I cannot distinguish among them.
The speaker with the two-line graph could have used the different shapes, or different graph line types dashes and dots, in the talk. Or the speaker could have used color-blind friendly color palettes. If you are creating visualizations for others, please think about these things.
And ladies, that purple lipstick looks very nie on you. Oh, it’s not purple … ?
The R code is as follows:
# Two lines with random colors
x <- seq(1:5)
y <- seq(1:5)
z <- seq(5,1, by = -1)
color_1 <- "#00B050"
color_2 <- "#FF0000"
r <- runif(1,0,1)
r
if (r < .5){
col_y <- color_1
col_z <- color_2
} else{
col_y <- color_2
col_z <- color_1
}
plot(x,y, type="b", pch = 18, cex = 2.5, lwd = 2.5, col=col_y, ylab="", xlab="",
main="As the red line clearly demonstrates ...", cex.main = 1.5,
sub="If r
End
< >
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
