Easiest way to demonstrate correlation between 2 variables graphically is by showing a scatterplot and regression line as follows:
> ggplot(bwdf, aes(x=age, y=lwt))+ geom_point()+ geom_smooth(method='lm')
Spider or radar plots can also be used to show correlation of one variable with all other variables:
> spider(y=1, x=2:9, data=scale(birthwt), connect=F)
Blue lines indicate positive correlation while red lines indicate negative correlation.
The points can be connected to show a radar plot:
> spider(y=1, x=2:9, data=scale(birthwt), connect=T)
Comments & Feedback