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

Daniel Nüst d.nuest at 52north.org
Tue May 29 18:20:56 CEST 2012


Am 29.05.2012 18:07, schrieb Edzer Pebesma:
> On 05/29/2012 04:03 PM, Rawlins, Barry G. wrote:
>> I can see a series of folders+files on the svn area - can you just give me some direction on how I get the source code? Were you suggesting I just take the code under R/stplot.R? And build a function from this?
> I was thinking about building and installing the R package from source,
> but that might be a bridge too far if you're not used to doing that.
> 
> It might be easier to source the whole R/stplot.R file in your R session
> -- that should work as well.

The svn also has http access, so

source("https://svn.52north.org/svn/geostatistics/main/spacetime/R/stplot.R")

should do just that.

/Daniel

>> -----Original Message-----
>> From: Edzer Pebesma [mailto:edzer.pebesma at uni-muenster.de] 
>> Sent: 29 May 2012 13:23
>> To: Rawlins, Barry G.
>> Subject: Re: [R-sig-Geo] Plotting with stplot, mode="xy"
>>
>> svn co https://svn.52north.org/svn/geostatistics/main/spacetime/
>>
>> will give you the updated source. Let me know if it works, otherwise
>> we'll try the CRAN route (CRAN seems a bit over-worked, lately, for
>> clear reasons, throwing NOTEs if you're uploading too frequent).
>>
>> I just noticed that the package DESCRIPTION file does not contain this
>> URL -- will modify.
>>
>>
>> On 05/29/2012 01:28 PM, Rawlins, Barry G. wrote:
>>> Many thanks Edzer - it is superb to have your help on such occasions.
>>>
>>> Checking CRAN - the latest version of spacetime appears to be 0.7-0 - does that mean I need to wait for 0.7-1 (which you refer to) to be released?
>>>
>>> I did not copy to the list because I was not sure this question was relevant to my problem.
>>>
>>> Best wishes, Barry
>>>
>>>
>>> -----Original Message-----
>>> From: r-sig-geo-bounces at r-project.org [mailto:r-sig-geo-bounces at r-project.org] On Behalf Of Edzer Pebesma
>>> Sent: 29 May 2012 11:28
>>> To: r-sig-geo at r-project.org
>>> Subject: Re: [R-sig-Geo] Plotting with stplot, mode="xy"
>>>
>>> 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
>>>
>>
> 


-- 
Daniel Nüst
52° North Initiative for Geospatial Open Source Software GmbH
Martin-Luther-King-Weg 24
48155 Münster, Germany
E-Mail: d.nuest at 52north.org
Fon: +49-(0)-251–396371-36
Fax: +49-(0)-251–396371-11
http://52north.org/
General Managers: Dr. Albert Remke, Dr. Andreas Wytzisk
Local Court Muenster HRB 10849



More information about the R-sig-Geo mailing list