On 07/13/2011 10:08 PM, Kishorenalluri wrote:
Hi Jim,
         Saving is not a problem. I wanted to load/read the columns from the
file followed by plotting the area plot using ggplot2.

I am a basic user. I am trying to reproduce the plot similar to the example
given here.
http://processtrends.com/images/RClimate_NINO_34_latest.png

Hi Kishorenalluri,
How about this?

# download the data file from NOAA
# http://www.cpc.ncep.noaa.gov/data/indices/wksst.for
# make the columns match the header row with a global
# replace of "-" with " -" (add a space)
# then this seems to reproduce the plot you indicated
plot(as.Date(sst$Week,"%d%b%Y"),sst$SSTA1,type="h",
 col=2+2*(sst$SSTA1<0),
 main="Sea surface anomalies from NOAA",
 xlab="Year",ylab="Temperature anomaly")

Jim

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to