kamula kamula - 7 months ago 51
R Question

get the axis to be the same in the pairs function


enter image description here

will produce a set of scatter plots relating the 4 variables to each other.
It will scale each axis differently depending on the range of each variable.

Is there a way that I can instead set the axes to be the same for every plot?


You can pass xlim and ylim arguments into pairs():

pairs(iris[,1:4], xlim=c(0,8), ylim=c(0,8))