我正在尝试将3张图片排成一行,但是最后一张看上去是正方形,这使得每张图片看起来都受到挤压。
library(ggplot2)
library(gridExtra)
p1<-qplot(Boston$crim, binwidth=5 , xlab = "Crime rate",
ylab="Number of Suburbs" )
p2<-qplot(Boston$tax, binwidth=50 , xlab = "Full-value property-tax
rate per $10,000", ylab="Number of Suburbs")
p3<-qplot(Boston$ptratio, binwidth=5, xlab ="Pupil-teacher ratio by
town", ylab="Number of Suburbs")
grid.arrange(p1,p2,p3,ncol=3)
这就是我得到的:
blob:https://stackoverflow.com/9102bbec-5108-4558-a320-e25014de5e4d
我想知道是否有任何办法将它们放置在图片中,以保证不会挤压图像。