Is it possible to plot a matrix of scatter plots with ggplot2, using ggplot‘s nice features like mapping additional factors to color, shape etc. and adding smoother?
I am thinking about something similar to the base function pairs.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You might want to try plotmatrix:
to me mpg (first column in mtcars) should not be a factor. I haven’t checked it, but there’s no reason why it should be one. However I get a scatter plot 🙂
Note: For future reference, the
plotmatrix()function has been replaced by theggpairs()function from theGGallypackage as @naught101 suggests in another response below to this question.