Interannual variation of OND rainfall Data: download #Read data b.data <- read.table(“timeseries.csv”, header=T,fill=T) # Scatterplot Matrices from the glus Package attach(mtcars) #library(gclus) library(scatterplot3d) attach(b.data) # TIMESERIES1 plot(Rainfall~Year, cex = 1, col = “blue”, type=”o”, pch=19, ylab=”Rainfall in mm”, main = “Oct-Dec rainfall variation from 1960 to 2000”)
Category Archives: Technical
Scatterplot 2D
Data:download R Script par(mar=c(5,6,4,3)+0.1) # set marigin b.data <- read.table(“3dscatterogram.csv”, header=T,fill=T) # read input data attach(b.data) plot(Rainfall, SOI_O, main=”Scatterplot Rainfall Vs SOI_O (1960-2000)”, xlab=”Rainfall in mm”, ylab=”SOI”, pch=19) # plot function # Fit planes abline(lm(Rainfall~SOI_O), col=”red”) # regression line (y~x) lines(lowess(Rainfall,SOI_O), col=”blue”) # lowess line (x,y)
Scatterogram 3D
Data: download #Read input data b.data <- read.table(“3dscatterogram.csv”, header=T,fill=T) # call scatterplot3d package library(scatterplot3d) attach(b.data) # simple 3d scatterplot scatterplot3d(SOI_O,Rainfall,SLP_O, main=”3D Scatterplot”) # 3d scatterplot with Fit planes s3d <-scatterplot3d(SOI_O,SLP_O,Rainfall, pch=16, highlight.3d=TRUE, type=”h”, main=”3D Scatterplot”) fit <- lm(Rainfall ~ SOI_O+SLP_O) s3d$plane3d(fit)
Scatterogram matrix
Data: Download R Script b.data <- read.table(“scatterogram.csv”, header=T,fill=T) # Scatterplot Matrices from the glus Package library(gclus) # call gclus package dta <- b.data[c(5,4,3,2)] # get data dta.r <- abs(cor(dta)) # get correlations dta.col <- dmat.color(dta.r) # get colors # reorder variables so those with highest correlation # are closest to the diagonal dta.o <- order.single(dta.r) […]
Box plots
Data: Download R Script #Read input data b.data <- read.table(“boxplot.csv”, header=T,fill=T) # Plot boxplot in single color #boxplot(b.data,ylab =”Rainfall in mm”, las = 2, at =c(1,2,3,4,5), names = c(“Trichy”,”Cuddalore”,”Mettur”,”Naga”,”Salem”)) # Plot boxplot in multi color boxplot(b.data,ylab =”Rainfall in mm”, col = c(“red”,”sienna”,”palevioletred1″,”royalblue2″,”orange”),las = 2, at =c(1,2,3,4,5), names = c(“Trichy”,”Cuddalore”,”Mettur”,”Naga”,”Salem”),boxwex = 0.5, notch = T) # Add […]
QQ Plots
QQ PLOTS & Regression line Data: download #Set margin par(mar=c(5,6,4,2)+0.1) b.data <- read.table(“qqplot.csv”, header=T,fill=T) library(car) fit <- lm(Cuddalore~Nagapattinam, data=b.data) qqPlot(fit, main=”QQ Plot – Cuddalore Vs Nagapattinam”)