How to control which plot is displayed above while using multiple plots in R?

r
datavisualization

#1

Hello,

I was using qplot function in R to plot some data ->

qplot(reorder(class, hwy), hwy, data = mpg, geom = c(“jitter”,“boxplot”))

and I get the output ->

I want to put the jittered points on top of the boxplots. how do I do it? What parameter to specify?

Thank you.


#2

Hello @Aditya_Sharma,

You would be amazed to see the simplicity of the ans,I guess that’s why the adage “Keep it simple”

qplot(reorder(class, hwy), hwy, data = mpg, geom = c("boxplot","jitter")) 

:smile: