library(marmap) library(rgdal) library(raster) Lon.range = c(122, 154) Lat.range = c(20, 46) dat<-read.bathy("marmap_coord_122;20;154;46_res_2.csv", header=TRUE) r1<-marmap::as.raster(dat) oce<-colorRampPalette(c(rgb(0,0,0),rgb(0,5/255,25/255),rgb(0,10/255,50/255),rgb(0,80/255,125/255),rgb(0,150/255,200/255), rgb(86/255,197/255,184/255),rgb(172/255,245/255,168/255),rgb(211/255,250/255,211/255),rgb(1,1,1))) land1 <- colorRampPalette(c("#467832","#786432")) land2 <- colorRampPalette(c("#786432","#927E3C")) land3 <- colorRampPalette(c("#927E3C","#C6B250")) land4 <- colorRampPalette(c("#C6B250","#FAE664")) land5 <- colorRampPalette(c("#FAE664","#FAEA7E")) breakpoints <- c(seq(-10000,0,10000/100),1 ,seq(50,500,50),seq(550,1000,50),seq(1100,2000,100),seq(2100,3000,100),seq(3500,8000,500)) colors <- c(oce(100),rgb(70/255,120/255,50/255),land1(10),land2(10),land3(10),land4(10),land5(10)) par(family="TakaoExMincho") plot(r1,breaks=breakpoints,col=colors, axis.args=list(at=c(-8000,-4000,0,4000,8000), labels=c(-8000,-4000,0,4000,8000)), legend.args=list(text=" height (m)", side=3, font=2, line=1.5, cex=0.8),las=1,axes=F,box=F) par(xpd=T) axes1<-seq(125,150,5) axes2<-seq(20,45,5) text(axes1,Lat.range[1],as.character(axes1),pos=1) text(Lon.range[1],axes2,as.character(axes2),pos=2) rect(Lon.range[1],Lat.range[1],Lon.range[2],Lat.range[2]) par(xpd=F) eq1=eq[eq$longitude>=122 & eq$longitude<=154 & eq$latitude>=20 & eq$latitude<=46 & eq$mag>=6.5,] points(x=eq1$longitude, y=eq1$latitude,cex=eq1$mag/6,pch=21,bg=eq1$col,col="gray20") in_service1=in_service[in_service$longitude>=122 & in_service$longitude<=154 & in_service$latitude>=20 & in_service$latitude<=46,] points(in_service1$longitude,in_service1$latitude,pch=24,cex =2, bg=rgb(0,0,0,0.2),col="black") title("震源分布(マグニチュード6.5以上)1923 ~ 2016/10/31[データ:気象庁]","(地図上の三角 : 原子力発電所)")
|