## Not run:
# data("nuts2006")
# spdf <- nuts0.spdf[nuts0.spdf$id=="IT",]
#
# ## PNG export
# # get figure dimension
# sizes <- getFigDim(spdf = spdf, width = 450, mar = c(0,0,1.2,0))
# # export the map
# png(filename = "Italy.png", width = sizes[1], height = sizes[2])
# par(mar = c(0,0,1.2,0))
# plot(spdf, col = NA, border=NA, bg = "#A6CAE0")
# plot(world.spdf, col = "#E3DEBF", border = NA, add = TRUE)
# plot(spdf, col = "#D1914D", border = "white", add = TRUE)
# layoutLayer(title = "Map of Italy")
# dev.off()
#
# ## PDF export
# # get figure dimension
# sizes <- getFigDim(spdf = spdf, width = 450, mar = c(1,1,2.2,1))
# # export the map
# pdf(file = "Italy.pdf", width = sizes[1]/72, height = sizes[2]/72)
# par(mar = c(1,1,2.2,1))
# plot(spdf, col = NA, border = NA, bg = "#A6CAE0")
# plot(world.spdf, col = "#E3DEBF", border = NA, add = TRUE)
# plot(spdf, col = "#D1914D", border = "white", add = TRUE)
# layoutLayer(title = "Map of Italy")
# dev.off()
# ## End(Not run)
Run the code above in your browser using DataLab