[R] plotting the coordinates versus dates
Jim Lemon
jim at bitwrit.com.au
Wed Jan 27 11:41:43 CET 2010
On 01/27/2010 08:31 PM, Julia Tchernova wrote:
> Hello!
> I have a dataset with the dates and positions - Lat and Long columns
> How do I make a scatter plot?
> Do I have to cbind to combine the Lat and Long columns?
> Any suggestions will be much appreciated!
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
More information about the R-help
mailing list