[R-sig-Geo] Constraining z axis for 2-study period plot of smoothed surface
afischbach
afischbach at usgs.gov
Mon May 23 18:24:18 CEST 2011
Many geographical studies sample across a landscape, create a smoothed
surface from the sampling stations, then repeat the sampling and smoothing
across study periods.
I wish to produce paired plots of two-study periods with sampling station
values plotted over their smoothed surfaces. In the plot I wish to impose
the same z-axis limits for the paired plots.
I have tried to do this using the image function in the graphics package,
but am running into problems of using the zlim and breaks options with a
spatialPixelDataframe.
(please see attached draft plot and code snippet with error messages below).
Please advise if you have handled this problem before and if you have any
suggestions.
Kind Regards,
Tony Fischbach
code snippet & error messages:
I have tried this using the zlim parameter:
> image(SpatialDataObj, col=tim.colors(n=64), zlim=zr) #zr is a vector of
> min and max values
Warning message: In plot.window(xlim = xlim, ylim = ylim, asp = asp, ...) :
"zlim" is not a graphical parameter
http://r-sig-geo.2731867.n2.nabble.com/file/n6395143/BivalvesNuculanidae.png
I then approached it using the breaks parameter:
>zmax <- zr[2] #Takes maximum value from the zr vector
>b<- (0:64)*zmax/64 #specify the breakpoints for the image plot
> image(SpatialDataObj, col=tim.colors(n=64), breaks=b)
Warning message: In plot.window(xlim = xlim, ylim = ylim, asp = asp, ...) :
"breaks" is not a graphical parameter
-----
Tony Fischbach, Wildlife Biologist
Walrus Research Program
Alaska Science Center
U.S. Geological Survey
4210 University Drive
Anchorage, AK 99508-4650
AFischbach at usgs.gov
http://alaska.usgs.gov/science/biology/walrus
--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/Constraining-z-axis-for-2-study-period-plot-of-smoothed-surface-tp6395143p6395143.html
Sent from the R-sig-geo mailing list archive at Nabble.com.
More information about the R-sig-Geo
mailing list