Color Vision Deficiency (CVD) or color blindness affects 8 percent of men and 1 in 200 women
There are different types of CVD but most common is red-green color blindness
Therefore, don’t include red and green in the same chart!
Look for color blind safe palettes
Solution: Use a colorblind safe color scheme like viridis…
Use scale_color_viridis_d() in this case to specify the viridis color scheme…
# in this ggplot() call, we add a third dimension for line colorggplot(dem_waves_ctrs, aes(x = year, y = polyarchy, color = country)) +geom_line(linewidth =1) +# our geom is a line with a width of 1labs(x ="Year", y ="Polyarchy Score", title ='Democracy in countries representing three different "waves"', caption ="Source: V-Dem Institute", color ="Country"# make title of legend to upper case ) +scale_color_viridis_d(option ="mako", end = .8) # use viridis color palette
Better!
Your Turn!
See this reference to view different palettes and options
Also check out the paletteer package for easy access to many more palettes
Use scale_color_viridis_d() to specify a viridis color scheme