I'm trying to visualize a single scatterplot using ggplot2 and adjust the colors to make the graph more visually appealing, however, the colors
and fill
functions are not populating the colors I want.
For reference I've looked through this very helpful link in addition to the tidyverse
cheatsheets for ggplot2, neither of which cover how to change the color of one single variable.
See below dummy data set with chart example below showing desired colors as the variable names:
dfRaw<- as.data.frame(cbind(var1= rnorm(10,11,3), var2= rnorm(10,12,2)))
rawPlot<- ggplot(dfRaw, aes(x= var1, y= var2, fill= 'skyblue', color= 'skyblue')) + geom_point()
> rawPlot
In the above, skyblue
is being desginated as the fill
and color
but is neither. This happens whether I use one or both designations. I'm looking for advice on how to fix this in addition to directions to a color list for ggplot2
.