У меня есть 2 графы, карта построена с ggplot2
, как это:R соединить традиционный сюжет и ggplot2
w<-ggplot()+
geom_polygon(data=dep_shp.df, aes(x=long,y=lat,group=group,fill=classJenks))+
# scale_fill_gradient(limits=c(40, 100))+
labs(title ="Classification de la proportion de producteurs par départements
\n par la methode de jenks (2008)")+
theme_bw()+
coord_equal()
и график как объект типа classIntervals
из classInt
библиотеки.
Я хотел бы собрать это 2 графика. Я пробовал:
vplayout <- function(x, y) viewport(layout.pos.row = x, layout.pos.col = y)
grid.newpage()
pushViewport(viewport(layout = grid.layout(1, 2)))
#creation
print(u, vp = vplayout(1, 1))
print(v, vp = vplayout(1, 2))
И что-то с grid.arrange
grid.arrange(plot1, plot2, ncol=2)
, но ни один из них не работает.
Полезно? http://stackoverflow.com/questions/14124373/combine-base-and-ggplot-graphics-in-r-figure-window – rawr
Да !!! Отличное сырье спасибо! – delaye