I’m attempting to plot a large scatter plot that varies along a large number of dimensions.
Here’s my starting plot:
p <- ggplot(mtcars, aes(wt, mpg, shape=cyl, colour=gear, size=carb)) +
geom_point()

Using the mtcars dataset, I’m simply including various shapes, colours, and sizes. Now what i’d like to add to this is some distinguishing mark around all points with carb==8. For example, add in a big black circle around these points.
Doing
p + geom_point() + geom_point(colour="black", shape=1, size=5)
is close in that it gets the circles as I want, but all points get circles, I want to instead limit this to just some of the points.
I would greatly appreciate any suggestions for this problem.
Instead of initially putting your variables within the ggplot function, try to map your variables individually for every layer you add.