I have just uploaded a SVG version to Wikimedia Commons. On that page there is a link to the data source on Robbie Andrew's website and the background to the data and it's use in a publication.
The scaled vector graphic looks like this when the suggested template from Wikimedia is used.
And I have uploaded the R script I wrote to Google Drive. And here it is below via a Github Gist.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Download Robbie Andrew;s data from http://folk.uio.no/roberan/learnmore/data/NZGHGhistory_data.csv | |
#Save to your working folder | |
#For backgorund read this http://folk.uio.no/roberan/learnmore/more_NZGHGhistory.shtml | |
#Read data into R | |
h <- read.csv("NZGHGhistory_data.csv", skip = 3,header=TRUE, sep=",", na.strings=" ", dec=".", strip.white=TRUE) | |
#create png format graph 650 pixels wide and 487 pixels height (1.333:1 ratio w to h) | |
png("NZGHGhistory_data-650by487-1861-2012.png", width=650, height=487, pointsize = 16) | |
par(mar=c(2.7,2.7,1,1)+0.1) | |
with(h,plot(Year,Ghgs/1000,ylim=c(0,78), tck=0.01,axes=FALSE,ann=FALSE, type="n",las=1)) | |
axis(side=1, las=0, lwd = 1, at = c(1860,1880,1900,1920,1940,1960,1980,2000), labels = c(1860,1880,1900,1920,1940,1960,1980,2000), tick = TRUE) | |
axis(side=2, tck=0.01, las=2, line = NA,lwd = 1, at = c(0,10,20,30,40,50,60,70), labels = c(0,10,20,30,40,50,60,70),tick = TRUE) | |
axis(side=3, tck=0.01, at = c(1860,1880,1900,1920,1940,1960,1980,2000), labels = FALSE, tick = TRUE) | |
axis(side=4, tck=0.01, at = c(0,10,20,30,40,50,60,70), labels = FALSE, tick = TRUE) | |
with(h,lines(Year,Ghgs/1000,col="#CC0000",lwd=2)) | |
mtext(side=3,cex=1.8, line=-4.25,expression(paste("New Zealand Gross Greenhouse Gas \nEmissions 1861 to 2012")) ) | |
mtext(side=1,cex=1.1, line=-1.5,"Data: Robbie Andrew \nhttp://folk.uio.no/roberan/learnmore/more_NZGHGhistory.shtml") | |
mtext(side=2,cex=1.1, line=-1.95,expression(paste("million tonnes of C", O[2], "-e"))) | |
box(lwd=1) | |
dev.off() |
No comments:
Post a Comment