I have 2 graphs, a map plotted with ggplot2
like this:
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()
and a graph as object of type classIntervals
from the classInt
library.
I would like to put together this 2 graphs. I have tried:
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))
And something with grid.arrange
grid.arrange(plot1, plot2, ncol=2)
but none of these work.