Skip to content

plotting the coordinates versus dates

3 messages · Julia Tchernova, Jim Lemon, Paul Hiemstra

#
On 01/27/2010 08:31 PM, Julia Tchernova wrote:
Hi Julia,
I depends greatly on what you want to plot. Let's assume that you want 
to plot the dates at the geographical positions (named "lat" and "lon"), 
and that the dates are character strings.

plot(lon,lat,main="Dates of the observations",
  xlab="Longitude",ylab="Latitude",type="n")
text(lon,lat,dates)

This assumes that you haven't got too many dates, and a fair bit of 
latitude (and longitude). It should give you an idea of one type of plot.

Jim
#
Julia Tchernova wrote:
If you cast your data into the spatial classes for R provided by the 
sp-pacakge, you can easily make nice plots. After installing sp from CRAN:

library(sp)
data(meuse)
meuse
summary(meuse)
coordinates(meuse) = ~x+y
?coordinates

spplot(meuse, "zinc")

The r-sig-geo mailing list is more suitable for this kind of question.

cheers,
Paul