[R-sig-Geo] Constraining z axis for 2-study period plot of smoothed surface
Edzer Pebesma
edzer.pebesma at uni-muenster.de
Mon May 23 19:46:08 CEST 2011
Tony, please try:
image(SpatialDataObj, col=tim.colors(n=64), zlim=zr,
useRasterImage=FALSE)
you can ignore the warning message.
On 05/23/2011 06:24 PM, afischbach wrote:
> 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.
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
--
Edzer Pebesma
Institute for Geoinformatics (ifgi), University of Münster
Weseler Straße 253, 48151 Münster, Germany. Phone: +49 251
8333081, Fax: +49 251 8339763 http://ifgi.uni-muenster.de
http://www.52north.org/geostatistics e.pebesma at wwu.de
More information about the R-sig-Geo
mailing list