plot.Picture {DASplusR} | R Documentation |
'plot.Picture', 'plot.SpatialPointsPictureFrame' are two methods for the 'plot' generic. The are designed to visualize maps, imported to R with the function 'convertBackground'.
plot.SpatialPointsPictureFrame(x, add = FALSE, pch = 20, add.Range = 0, xlab = "", ylab = "", asp = 1, ...) plot.Picture(x, add = FALSE, xlab = "", ylab = "", asp = 1, ...)
x |
image object (class=Picture or class=SpatialPointsPictureFrame). |
add |
If set to TRUE, the map will be added to the current plot. |
xlab |
a label for the x axis. |
ylab |
a label for the y axis. |
asp |
the y/x aspect ratio, see 'plot.window'. |
pch |
a plotting character or symbol used for every pixel of the image: see 'points'. |
add.Range |
a vector of length 4 in the form c(left,bottom,top,right) defining the region, in which the image should be added |
A grid function for plotting objects of the class 'Picture' is also available.
Alexander Kowarik, TU Vienna, December 2007
### Background map from a Postscript-Image data(KOLA95_C2MM) filename <- paste(searchpaths()[grep("DASplusR",searchpaths())],"/data/background_vector.ps",sep="") convertBackground(filename,type="ps") .background<-fitBackground(image.coordinates=matrix(c(3989.78,4929.2,6076.16,876.59,5541.45,4835.05,4231.2,1257.51),ncol=2), data.coordinates=matrix(c(648300,726451,833075,372602,7810800,7742860,7694720,7403610),ncol=2), image=justDoIt(".background"),model.type="affine") .background<-fitBackground(image.coordinates=matrix(c(646586.58,729855.88,831447.08,372538.45,575359.19,731213.91,415292.18,7809156.35,7746126.23,7693158.37,7403549.04,7849896.69,7394969.41,7861480.49),ncol=2), data.coordinates=matrix(c(648300,726451,833075,372602,575250,728208,415550,7810800,7742860,7694720,7403610,7859150,7373050,7874700),ncol=2), image=justDoIt(".background"),model.type="affine") plot(.background) points(KOLA95_C2MM$YCOO~KOLA95_C2MM$XCOO) ### Background map from a PNM-Image data(KOLA95_C2MM) filename <- paste(searchpaths()[grep("DASplusR",searchpaths())],"/data/background_pixel.pnm",sep="") convertBackground(filename,type="pnm") .background<-fitBackground(image.coordinates=matrix(c(317.87,386.21,481.44,72.5,501.61,679.03,621.08,576.77,321.11,334.75),ncol=2), data.coordinates=matrix(c(648300,726451,833075,372602,853146,7810800,7742860,7694720,7403610,7421710),ncol=2), image=justDoIt(".background"),model.type="affine") plot(.background) points(KOLA95_C2MM$YCOO~KOLA95_C2MM$XCOO)