- R Data Visualization Recipes
- Vitor Bianchi Lanzetta
- 77字
- 2021-07-02 23:33:35
Using more suitable colors for geom_dotplot
Speaking about ggplot2 dot plots, there is a sort of a hacking solution to avoid colored points to overlay one another: manually setting up a vector of colors. However, creating such a vector wouldn't be enough, it has to be ordered properly or else a very wrong result shall be outputted. This recipe sticks with the Salaries data set framework in order to demonstrate how dots can be colored this way.