Thanks Dennise,
   Now I see what you have.  It was not obvious from the original data set that
   you posted that is is a time series.
   I am afraid my knowledge of time series is about zero but I am sure others
   here can help now that we have  a good idea of what the data really looks
   like.
   I'm sorry I cannot be of more immediate help.

   John Kane
   Kingston ON Canada

   -----Original Message-----
   From: [email protected]
   Sent: Fri, 6 Jul 2012 06:01:42 -0700 (PDT)
   To: [email protected]
   Subject: Re: [R] how to do a graph with tree different colors??

   hi!!

   here they are the data in the form you ask.
   thanks for your help!! DENISSE

    dput(serieONI)
   structure(c(-1.4, -1.3, -1.2, -1.2, -1.1, -0.9, -0.6, -0.5, -0.4,
   -0.5, -0.5, -0.7, -0.8, -0.6, -0.4, -0.2, 0, 0.4, 0.6, 1, 1.1,
   1.2, 1.1, 0.9, 0.6, 0.4, 0.3, 0.3, 0.3, 0.1, -0.1, 0, 0.2, 0.2,
   0.2, 0.3, 0.5, 0.6, 0.6, 0.7, 0.7, 0.7, 0.7, 0.7, 0.8, 0.8, 0.8,
   0.7, 0.7, 0.5, 0.1, -0.3, -0.5, -0.5, -0.6, -0.7, -0.8, -0.7,
   -0.7, -0.7, -0.7, -0.7, -0.7, -0.8, -0.8, -0.8, -0.8, -0.7, -1,
   -1.4, -1.7, -1.6, -1.1, -0.8, -0.6, -0.5, -0.5, -0.5, -0.5, -0.6,
   -0.5, -0.5, -0.5, -0.5, -0.3, 0, 0.4, 0.7, 0.9, 1, 1.1, 1.2,
   1.2, 1.3, 1.5, 1.8, 1.8, 1.6, 1.2, 0.9, 0.7, 0.6, 0.5, 0.3, 0.3,
   0.4, 0.5, 0.6, 0.6, 0.6, 0.5, 0.3, 0.2, -0.1, -0.2, -0.3, -0.1,
   0, 0.1, 0, -0.1, -0.2, -0.2, -0.1, -0.1, 0, 0.1, 0.2, 0.2, 0.1,
   0.1, 0.1, 0, 0, 0, 0.1, 0.3, 0.4, 0.2, -0.1, -0.3, -0.3, -0.2,
   -0.1, -0.2, -0.3, -0.3, -0.3, -0.2, -0.1, 0, -0.1, -0.2, -0.3,
   -0.4, -0.5, -0.4, -0.2, 0.1, 0.2, 0.3, 0.5, 0.8, 1.1, 1.2, 1.3,
   1.4, 1.3, 1.1, 0.6, 0.1, -0.3, -0.6, -0.6, -0.6, -0.7, -0.8,
   -0.8, -0.8, -0.8, -0.6, -0.3, 0, 0.2, 0.5, 0.8, 1.2, 1.4, 1.7,
   1.9, 1.9, 1.7, 1.4, 1.1, 0.9, 0.6, 0.4, 0.3, 0.2, 0.1, 0, -0.1,
   -0.1, -0.2, -0.3, -0.4, -0.5, -0.4, -0.2, 0.1, 0.1, -0.1, -0.3,
   -0.3, -0.3, -0.4, -0.6, -0.8, -0.7, -0.5, -0.2, 0.1, 0.4, 0.5,
   0.5, 0.6, 0.8, 1, 1.1, 1.1, 1, 0.9, 0.8, 0.6, 0.5, 0.5, 0.8,
   0.9, 0.9, 0.8, 0.6, 0.4, 0.4, 0.3, 0.1, -0.2, -0.5, -0.7, -0.7,
   -0.7, -0.8, -1, -1.2, -1.3, -1, -0.8, -0.7, -0.7, -0.7, -0.7,
   -0.7, -0.8, -0.9, -0.8, -0.6, -0.3, 0, 0.3, 0.6, 0.8, 1.1, 1.4,
   1.6, 1.9, 2.1, 2.1, 1.8, 1.2, 0.6, 0, -0.5, -0.8, -1, -1.2, -1.3,
   -1.6, -1.9, -2, -1.9, -1.6, -1.2, -1, -0.8, -0.7, -0.5, -0.4,
   -0.4, -0.6, -0.8, -0.7, -0.5, -0.5, -0.6, -0.6, -0.8, -1, -1.1,
   -1.2, -1.4, -1.5, -1.6, -1.7, -1.5, -1.1, -0.7, -0.5, -0.3, -0.1,
   0.2, 0.4, 0.6, 0.7, 0.8, 0.8, 0.6, 0.6, 0.3, 0.3, 0.3, 0.4, 0.4,
   0.4, 0.5, 0.7, 0.8, 0.8, 0.7, 0.5, 0.1, -0.2, -0.3, -0.3, -0.3,
   -0.4, -0.4, -0.3, -0.1, -0.1, -0.1, 0.1, 0.2, 0.3, 0.2, 0, 0,
   0.2, 0.3, 0.5, 0.5, 0.6, 0.5, 0.4, 0.3, 0.3, 0.4, 0.4, 0.2, 0,
   -0.1, 0, 0, -0.1, -0.4, -0.6, -0.5, -0.4, -0.3, -0.3, -0.4, -0.4,
   -0.3, -0.2, -0.2, -0.1, -0.1, 0, 0.1, 0.3, 0.5, 0.6, 0.7, 1,
   1.5, 1.9, 2.1, 2.2, 2.2, 1.9, 1.5, 1.2, 0.9, 0.6, 0.2, -0.2,
   -0.5, -0.8, -0.9, -0.8, -0.5, -0.3, -0.2, -0.4, -0.5, -0.5, -0.3,
   -0.2, -0.3, -0.6, -0.9, -1.1, -1, -0.9, -0.7, -0.7, -0.7, -0.6,
   -0.5, -0.5, -0.5, -0.4, -0.4, -0.4, -0.5, -0.4, -0.2, -0.2, -0.1,
   0, 0.3, 0.5, 0.7, 0.9, 1.1, 1.2, 1.2, 1.3, 1.2, 1.1, 1, 1.2,
   1.4, 1.6, 1.6, 1.5, 1.3, 1.1, 0.7, 0.5, 0.1, -0.2, -0.7, -1.2,
   -1.3, -1.2, -1.3, -1.6, -1.9, -1.9, -1.7, -1.5, -1.1, -0.8, -0.6,
   -0.4, -0.3, -0.3, -0.3, -0.3, -0.2, -0.1, 0.1, 0.2, 0.2, 0.2,
   0.2, 0.2, 0.3, 0.3, 0.3, 0.3, 0.3, 0.4, 0.3, 0.2, 0.2, 0.3, 0.5,
   0.7, 0.8, 0.7, 0.7, 0.8, 1.1, 1.4, 1.6, 1.5, 1.4, 1.2, 1, 0.7,
   0.3, 0, -0.2, -0.3, -0.2, 0, 0.2, 0.3, 0.5, 0.6, 0.6, 0.5, 0.3,
   0.2, 0.2, 0.2, 0.1, 0.1, 0.1, 0.1, 0.2, 0.3, 0.4, 0.4, 0.4, 0.4,
   0.5, 0.7, 1, 1.2, 1, 0.8, 0.6, 0.3, 0.2, 0, -0.1, -0.4, -0.7,
   -0.8, -0.9, -0.9, -0.9, -0.8, -0.6, -0.4, -0.3, -0.2, -0.2, -0.3,
   -0.3, -0.3, -0.4, -0.5, -0.5, -0.4, -0.1, 0.2, 0.7, 1.2, 1.5,
   1.8, 2.1, 2.3, 2.4, 2.3, 2.2, 1.8, 1.4, 0.9, 0.4, -0.2, -0.7,
   -1, -1.2, -1.2, -1.4, -1.5, -1.5, -1.3, -1, -0.9, -0.9, -1, -1,
   -1.1, -1.1, -1.3, -1.5, -1.7, -1.7, -1.5, -1.1, -0.9, -0.8, -0.7,
   -0.6, -0.5, -0.5, -0.6, -0.8, -0.8, -0.7, -0.6, -0.5, -0.3, -0.2,
   -0.1, 0, 0, -0.1, -0.2, -0.2, -0.3, -0.2, 0, 0.1, 0.3, 0.5, 0.7,
   0.8, 0.8, 0.9, 1.2, 1.3, 1.3, 1.1, 0.8, 0.4, 0, -0.2, -0.1, 0.2,
   0.4, 0.4, 0.4, 0.4, 0.3, 0.3, 0.2, 0.1, 0.1, 0.1, 0.3, 0.5, 0.7,
   0.7, 0.7, 0.7, 0.7, 0.6, 0.4, 0.3, 0.3, 0.3, 0.3, 0.2, 0.1, 0,
   -0.2, -0.5, -0.8, -0.9, -0.7, -0.5, -0.3, 0, 0.1, 0.2, 0.3, 0.5,
   0.8, 1, 1, 0.7, 0.3, -0.1, -0.2, -0.3, -0.3, -0.3, -0.6, -0.9,
   -1.1, -1.2, -1.4, -1.5, -1.5, -1.2, -0.9, -0.7, -0.5, -0.3, -0.2,
   -0.1, -0.2, -0.4, -0.7, -0.9, -0.8, -0.6, -0.2, 0.1, 0.4, 0.5,
   0.6, 0.7, 1, 1.4, 1.6, 1.6, 1.4, 1.1, 0.7, 0.2, -0.3, -0.8, -1.2,
   -1.4, -1.5, -1.5, -1.5, -1.4, -1.3, -1, -0.7, -0.4, -0.2, -0.2,
   -0.3, -0.6, -0.8, -1, -1), .Tsp = c(1950, 2011.91666666667, 12
   ), class = "ts")
   >
   De: John Kane <[email protected]>
   Para: Denisse Archundia <[email protected]>
   Enviado: Martes, 3 de julio, 2012 13:57:16
   Asunto: Re: [R] how to do a graph with tree different colors??
   Thank you for the data but it would be better to receive it in the form that
   dput() supplies.  If your dataset is called Mydata, then
   issue the command dput(Mydata) and copy the output into the email.
   At the moment I am not sure how go graph your data as it is not easy to get
   the months and years together.

   John Kane
   Kingston ON Canada

   -----Original Message-----
   From: [email protected]
   Sent: Tue, 3 Jul 2012 09:12:40 -0700 (PDT)
   To: [email protected]
   Subject: Re: [R] how to do a graph with tree different colors??

   i works with the oceanic niƱo index:

   YEAR A B C D E F G H I J K L
   1950 -1,4 -1,3 -1,2 -1,2 -1,1 -0,9 -0,6 -0,5 -0,4 -0,5 -0,5 -0,7
   1951 -0,8 -0,6 -0,4 -0,2 0 0,4 0,6 1 1,1 1,2 1,1 0,9
   1952 0,6 0,4 0,3 0,3 0,3 0,1 -0,1 0 0,2 0,2 0,2 0,3
   1953 0,5 0,6 0,6 0,7 0,7 0,7 0,7 0,7 0,8 0,8 0,8 0,7
   1954 0,7 0,5 0,1 -0,3 -0,5 -0,5 -0,6 -0,7 -0,8 -0,7 -0,7 -0,7
   1955 -0,7 -0,7 -0,7 -0,8 -0,8 -0,8 -0,8 -0,7 -1 -1,4 -1,7 -1,6
   1956 -1,1 -0,8 -0,6 -0,5 -0,5 -0,5 -0,5 -0,6 -0,5 -0,5 -0,5 -0,5
   1957 -0,3 0 0,4 0,7 0,9 1 1,1 1,2 1,2 1,3 1,5 1,8
   1958 1,8 1,6 1,2 0,9 0,7 0,6 0,5 0,3 0,3 0,4 0,5 0,6
   1959 0,6 0,6 0,5 0,3 0,2 -0,1 -0,2 -0,3 -0,1 0 0,1 0
   1960 -0,1 -0,2 -0,2 -0,1 -0,1 0 0,1 0,2 0,2 0,1 0,1 0,1
   1961 0 0 0 0,1 0,3 0,4 0,2 -0,1 -0,3 -0,3 -0,2 -0,1
   1962 -0,2 -0,3 -0,3 -0,3 -0,2 -0,1 0 -0,1 -0,2 -0,3 -0,4 -0,5
   1963 -0,4 -0,2 0,1 0,2 0,3 0,5 0,8 1,1 1,2 1,3 1,4 1,3
   1964 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 -0,6 -0,5 -0,5 -0,6 -0,8 -0,8
   2001 -0,7 -0,6 -0,5 -0,3 -0,2 -0,1 0 0 -0,1 -0,2 -0,2 -0,3
   2002 -0,2 0 0,1 0,3 0,5 0,7 0,8 0,8 0,9 1,2 1,3 1,3
   2003 1,1 0,8 0,4 0 -0,2 -0,1 0,2 0,4 0,4 0,4 0,4 0,3
   2004 0,3 0,2 0,1 0,1 0,1 0,3 0,5 0,7 0,7 0,7 0,7 0,7
   2005 0,6 0,4 0,3 0,3 0,3 0,3 0,2 0,1 0 -0,2 -0,5 -0,8
   2006 -0,9 -0,7 -0,5 -0,3 0 0,1 0,2 0,3 0,5 0,8 1 1
   2007 0,7 0,3 -0,1 -0,2 -0,3 -0,3 -0,3 -0,6 -0,9 -1,1 -1,2 -1,4
   2008 -1,5 -1,5 -1,2 -0,9 -0,7 -0,5 -0,3 -0,2 -0,1 -0,2 -0,4 -0,7
   2009 -0,9 -0,8 -0,6 -0,2 0,1 0,4 0,5 0,6 0,7 1 1,4 1,6
   2010 1,6 1,4 1,1 0,7 0,2 -0,3 -0,8 -1,2 -1,4 -1,5 -1,5 -1,5
   2011 -1,4 -1,3 -1 -0,7 -0,4 -0,2 -0,2 -0,3 -0,6 -0,8 -1 -1

   THANKS
   DENISSE
   De: John Kane <[email protected]>
   Para:denissearchundia<[email protected]>;[email protected]
   Enviado: Martes, 3 de julio, 2012 8:03:23
   Asunto: RE: [R] how to do a graph with tree different colors??
   Any  sample  data for us to work with?  See ?dput for a good method of
   supplying sample data.
   John Kane
   Kingston ON Canada
   > -----Original Message-----
   > From: [1][email protected]
   > Sent: Mon, 2 Jul 2012 14:04:53 -0700 (PDT)
   > To: [2][email protected]
   > Subject: [R] how to do a graph with tree different colors??
   >
   > hi
   >
   > i try to do a graph of a time series which shows in red the values >
   > -0.05,
   > in blue the values >0.05 and in white the values between -0.05 and 0.05
   >
   > for un exemple :[3]http://www.appinsys.com/globalwarming/enso.htm
   >
   > thanks !!!!!
   >
   > denisse
   >
   > --
   > View this message in context:
   >
   [4]http://r.789695.n4.nabble.com/how-to-do-a-graph-with-tree-different-color
   s-tp4635206.html
   > Sent from the R help mailing list archive at Nabble.com.
   >
   > ______________________________________________
   > [5][email protected] mailing list
   > [6]https://stat.ethz.ch/mailman/listinfo/r-help
   > PLEASE do read the posting guide
   > [7]http://www.R-project.org/posting-guide.html
   > and provide commented, minimal, self-contained, reproducible code.
   ____________________________________________________________
   FREE ONLINE PHOTOSHARING - Share your photos online with your friends and
   family!
   Visit [8]http://www.inbox.com/photosharing to find out more!

   Free Online Photosharing - Share your photos online with your friends and
   family!
   Visit [9]http://www.inbox.com/photosharing to find out more!
     _________________________________________________________________

   [10]3D Marine Aquarium Screensaver Preview 
   Free 3D Marine Aquarium Screensaver
   Watch  dolphins,  sharks  &  orcas  on  your  desktop! Check it out at
   [11]www.inbox.com/marineaquarium

References

   1. mailto:[email protected]
   2. mailto:[email protected]
   3. http://www.appinsys.com/globalwarming/enso.htm
   4. 
http://r.789695.n4.nabble.com/how-to-do-a-graph-with-tree-different-colors-tp4635206.html
   5. mailto:[email protected]
   6. https://stat.ethz.ch/mailman/listinfo/r-help
   7. http://www.r-project.org/posting-guide.html
   8. http://www.inbox.com/photosharing
   9. http://www.inbox.com/photosharing
  10. http://www.inbox.com/marineaquarium
  11. http://www.inbox.com/marineaquarium
______________________________________________
[email protected] 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