[R-sig-Geo] Plotting with stplot, mode="xy"

Edzer Pebesma edzer.pebesma at uni-muenster.de
Tue May 29 12:28:21 CEST 2012


Hi Barry, the following should have worked:

library(spacetime)
loadMeuse()
d = as.data.frame(meuse)[c("cadmium", "copper", "lead", "zinc")]
x = STFDF(meuse, Sys.time()+1:4, stack(d))
stplot(x, animate=1, col.regions=bpy.colors(),
   cuts=c(1,10,100,1000,10000))

but doesn't fix the legend with current spacetime on CRAN, as the 'cuts'
argument was not passed on to spplot.

spacetime 0.7-1 in subversion has this fixed.

the 'col' argument needs to be called 'col.regions'.

On 05/28/2012 06:34 PM, Rawlins, Barry G. wrote:
> Hello
>  
> I am trying to plot some space-time data which encompasses 3654 time
> intervals (15 mins each) at 84 sites.
>  
> I would like to animate these data and so I have used the following code
> and my STFDF object is “sp_time”:
>  
> colors.ten<-rainbow(10,start=0.0,end=0.66) # rainbow color scale
> stplot(sp_time, mode="xy", animate=1, cuts=10, at=seq(5,55,5),
> auto.key=T,col=colors.ten)
>  
> The first plot I see is this where the points are plotted in the correct
> locations:
>  
> But, I wanted some bespoke rainbow colors which do not appear and I know
> the z-range of the data is wider than that shown – the range is actually
> between 6 and 44. When I run the animation the scale changes each time
> but I would like it to be fixed so that each time slice has the same
> scale. Any advice on how I can solve this? I have tried reading the help
> pages on levelplot but to no avail.
>  
> Thanks, Barry
>  
>  
>  
>  
> 
> -- 
> This message (and any attachments) is for the recipient only. NERC
> is subject to the Freedom of Information Act 2000 and the contents
> of this email and any reply you make may be disclosed by NERC unless
> it is exempt from release under the Act. Any material supplied to
> NERC may be stored in an electronic records management system.
> 
> 
> _______________________________________________
> 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