# how to do a graph with tree different colors??

7 messages
Open this post in threaded view
|
Report Content as Inappropriate

## 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 :http://www.appinsys.com/globalwarming/enso.htmthanks !!!!! denisse
Open this post in threaded view
|
Report Content as Inappropriate

## Re: how to do a graph with tree different colors??

 Try using polygon() or grid.polygon() from the grid package.   You can find code example on the R project title page. Go to http://r-project.org and click on the plot (the example plot showing PCA, clustering and factors, lower left are two graphs, similar to what you want). This will bring you to the source code, generating this plot. Search for "Factor 1" on the page will show that this plot was produced with the function plotdens(). Search for "plotdens" will show its body and will discover, that it calls polygon() function.
Open this post in threaded view
|
Report Content as Inappropriate

## Re: how to do a graph with tree different colors??

 In reply to this post by denissearchundia R Graph Gallery contains lots of plot examples with source code: http://addictedtor.free.fr/graphiques/
Open this post in threaded view
|
Report Content as Inappropriate

## Re: how to do a graph with tree different colors??

 In reply to this post by denissearchundia 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: [hidden email] > Sent: Mon, 2 Jul 2012 14:04:53 -0700 (PDT) > To: [hidden email] > 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 :http://www.appinsys.com/globalwarming/enso.htm> > thanks !!!!! > > denisse > > -- > View this message in context: > http://r.789695.n4.nabble.com/how-to-do-a-graph-with-tree-different-colors-tp4635206.html> Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > [hidden email] 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. ____________________________________________________________ FREE ONLINE PHOTOSHARING - Share your photos online with your friends and family! Visit http://www.inbox.com/photosharing to find out more! ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.
Open this post in threaded view
|
Report Content as Inappropriate

## Re: how to do a graph with tree different colors??

Open this post in threaded view
|
Report Content as Inappropriate