view scripts_R/PlotOutliersCountry.R @ 70:cc028157502a branch-tests

scripts R
author Maria Panteli
date Fri, 22 Sep 2017 16:29:32 +0100
parents
children bde45ce0eeab
line wrap: on
line source
source("MetadataPlots.R")

PlotCountryOutliers(df=read.csv("data/global_outliers.csv",header=TRUE), output="data/global_outliers.pdf")
PlotCountryOutliers(df=read.csv("data/global_outliers_rhy.csv",header=TRUE), output="data/global_outliers_rhy.pdf")
PlotCountryOutliers(df=read.csv("data/global_outliers_mel.csv",header=TRUE), output="data/global_outliers_mel.pdf")
PlotCountryOutliers(df=read.csv("data/global_outliers_mfc.csv",header=TRUE), output="data/global_outliers_mfc.pdf")
PlotCountryOutliers(df=read.csv("data/global_outliers_chr.csv",header=TRUE), output="data/global_outliers_chr.pdf")
PlotCountryOutliers(df=read.csv("data/spatial_outliers.csv",header=TRUE), output="data/spatial_outliers.pdf")
#PlotCountryOutliers(df=read.csv("data/global_outliers_rhy_1band.csv",header=TRUE))

require(graphics)
par(mfrow=c(2,2))
g1<-PlotCountryOutliers(df=read.csv("data/global_outliers_rhy.csv",header=TRUE))
g2<-PlotCountryOutliers(df=read.csv("data/global_outliers_mel.csv",header=TRUE))
g3<-PlotCountryOutliers(df=read.csv("data/global_outliers_mfc.csv",header=TRUE))
g4<-PlotCountryOutliers(df=read.csv("data/global_outliers_chr.csv",header=TRUE))
#do.call(addMapLegend, c(g3,labelFontSize=0.7, legendWidth=0.5, tcl=0.3, legendMar = 7, legendLabels="all",horizontal=T, legendIntervals="page"))
#legend("bottomleft", legend = c(paste(seq(100,1,-10),'%'), 'missing countries'), fill = c(heat.colors(10, alpha = 1), 'grey'), cex = 0.56, bty = "n")
legend("right", legend = c(paste(seq(90,0,-10),'-',seq(100,10,-10),'%'), 'NA'), fill = c(heat.colors(10, alpha = 1), 'grey'), cex = 0.56, bty = "o",bg="white",box.lwd=0,box.col="white")