I'm very new to R and I'm having issues with using ggplot2.
When I first tried to plot some points in my dataset I came out with an x and y axis that had way too many labels, as shown below:
But when I tried using scale_x_discrete, it wouldn't show all of the labels I specified.
Here is the code I used:
ggplot(schooldata, aes(Economic.Need.Index, Average.Math.Proficiency))
+ geom_point()
+ scale_x_discrete(name = "Economic Need Index", breaks = c("0", "0.2", "0.4", "0.6", "0.8", "1"), labels = c("0", "0.2", "0.4", "0.6", "0.8", "1"))
+ scale_y_discrete(name = "Average Math Proficiency", breaks = c("1", "2", "3", "4"), labels = c("1", "2", "3", "4"))
and here is my plot:
I know there's probably a very easy fix to this, I'm just pretty inexperienced and I don't know what else to try. Any help would be appreciated, thanks!