Skip to content

Plotting with stplot, mode="xy"

1 message · Rawlins, Barry G.

#
Edzer

Here is the data attached as an object and code to run it below:

load(file="sp_time_slice.RData")

range(sp_time_slice at data$VMC) #[1] 20.7 36.8

# so with narrow ranges (20 to 37) - some symbols dropped

stplot(sp_time_slice, animate=1, col.regions=rainbow(10,start=0.0,end=0.66),cex=2,cuts=c(seq(20,37,1.7)))

# with wider ranges (18, 38) all symbols plot

stplot(sp_time_slice, animate=1, col.regions=rainbow(10,start=0.0,end=0.66),cex=2,cuts=c(seq(18,38,2)))

I am also struggling to get a title to plot using either

lattice.options=list(main="Sensor Net volumetric moisture content (%)"))
or 
main=list(label="Sensor Net volumetric moisture content (%)")

Error in trellis.skeleton(formula = y2 ~ x2, cond = list(c(1L, 1L, 1L,  : 
  formal argument "main" matched by multiple actual arguments
In addition: Warning message:
In seq.default(min(obj[[z]], na.rm = TRUE), max(obj[[z]], na.rm = TRUE),  :
  first element used of 'length.out' argument

What would you use?

Barry

-----Original Message-----
From: Edzer Pebesma [mailto:edzer.pebesma at uni-muenster.de] 
Sent: 30 May 2012 09:19
To: Rawlins, Barry G.
Subject: Re: [R-sig-Geo] Plotting with stplot, mode="xy"

Barry,

could you please provide me with a reproducible example that
demonstrates that min/max values passed as extremes of cuts discards
some points?

I cannot reproduce it with:
coordinates cadmium copper lead zinc  elev       dist   om ffreq soil
1 (181072, 333611)    11.7     85  299 1022 7.909 0.00135803 13.6     1    1
2 (181025, 333558)     8.6     81  277 1141 6.983 0.01222430 14.0     1    1
3 (181165, 333537)     6.5     68  199  640 7.800 0.10302900 13.0     1    1
4 (181298, 333484)     2.6     81  116  257 7.655 0.19009400  8.0     1    2
  lime landuse dist.m
1    1      Ah     50
2    1      Ah     30
3    1      Ah    150
4    0      Ga    270

        
On 05/30/2012 09:57 AM, Rawlins, Barry G. wrote: