简体   繁体   中英

R : customize the pairs function to plot two different datasets

Here is my problem:

I have two methods that respectively output the variables X1,X2 and X3 and Y1,Y2 and Y3. I would like to visualise graphically the difference of correlation between (X1,X2 and X3) and (Y1,Y2 and Y3). For that I would like to create a "pairs plot" in which the upper part represents a pair plot between the (X_i) and the lower part a pair plot between the (Y_i).

I tried to use the function documentation to deal with this problem but do not managed to know how to do this. I will appreciate any hints.

Have you tried using par(mfrow=c(2,1)) ? It tells R to make place for two plots in one graphical device one above the other (2x1 matrix). Then simply plot both pairs graphs.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM