An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20120820/f30fec7a/attachment.pl>
colorful plot
6 messages · PIKAL Petr, Jessica Streicher, nooshin bahar +1 more
Hi ?rainbow ?jet.colors ?RColorBrewer Regards Petr
-----Original Message----- From: r-help-bounces at r-project.org [mailto:r-help-bounces at r- project.org] On Behalf Of nooshin bahar Sent: Monday, August 20, 2012 3:53 PM To: r-help at r-project.org Subject: [R] colorful plot Hello guys, I want to increase contrast of colors in my matrix plot. I attached final plot with heatmap. How I could increase contrast with 9 kind of color. Thanks Nooshin [[alternative HTML version deleted]]
______________________________________________ R-help at 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.
Dear Nooshin, most attachments will not make it into the list. Please upload it somewhere and link to it instead. alternatively you could post reproducible code to generate your plot so far.
On 20.08.2012, at 15:53, nooshin bahar wrote:
Hello guys, I want to increase contrast of colors in my matrix plot. I attached final plot with heatmap. How I could increase contrast with 9 kind of color. Thanks Nooshin [[alternative HTML version deleted]]
______________________________________________ R-help at 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.
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20120821/e90e2c74/attachment.pl>
Hi Nooshin, Have you tried the RColorBrewer package? After loading the package, the following gives you the whole array of available colour palletes.
display.brewer.all(n=NULL, type="all", select=NULL, exact.n=TRUE)
Then, you can add to your code something like this (I'm using palette "Set3" just as an example):
nooshin.col = brewer.pal(12,"Set3")
And:
Nooshin_heatmap <- heatmap(Nooshin_matrix, Rowv=NA,
Colv=NA,scale="column", margins=c(5,10), col=nooshin.col) Hope this helps. Jos? Jos? Iparraguirre Chief Economist Age UK T 020 303 31482 E Jose.Iparraguirre at ageuk.org.uk Twitter @jose.iparraguirre at ageuk Tavis House, 1- 6 Tavistock Square London, WC1H 9NB www.ageuk.org.uk | ageukblog.org.uk | @ageukcampaigns For evidence and statistics on the older population, visit the Age UK Knowledge Hub http://www.ageuk.org.uk/professional-resources-home/knowledge-hub-evidence-statistics/ -----Original Message----- From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of nooshin bahar Sent: 21 August 2012 10:04 To: Jessica Streicher; r-help at r-project.org; petr.pikal at precheza.cz Subject: Re: [R] colorful plot
Hello guys, I want to increase contrast of colors in my matrix plot.
> Nooshin<- as.matrix(matrix(sample(c(0.02,0.01,0.003,0.001,0.0001,0.0005,0.0004,0.00013),2401,replace=TRUE),ncol=49), row.names=1, header=TRUE) > filled.contour(Nooshin, main="Permeability") > Nooshin_matrix <- data.matrix(Nooshin) > Nooshin_heatmap <- heatmap(Nooshin_matrix, Rowv=NA, Colv=NA,scale="column", margins=c(5,10))
How I could increase contrast with 8 kind of color.
my break is mybreaks <- c(0.02,0.01,0.003,0.001,0.0001,0.0005,0.0004,0.00013) with different color. heat map give me red-orang-yellow.I need 8 different colors. Best Regards Nooshin
Thanks Nooshin
[[alternative HTML version deleted]]
______________________________________________ R-help at 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.
______________________________________________ R-help at 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. Age UK and YouthNet are official charities for the Virgin London Marathon 2013 We need you to Run for it. Join the team and help raise vital funds to bring generations together to combat loneliness and isolation. Go to http://www.runforit.org.uk for more information or contact Helen Parson at helen.parsons at ageuk.org.uk or on 020 303 31369. Age UK and YouthNet. A lifeline, online. www.runforit.org.uk Age UK Improving later life www.ageuk.org.uk ------------------------------- Age UK is a registered charity and company limited by guarantee, (registered charity number 1128267, registered company number 6825798). Registered office: Tavis House, 1-6 Tavistock Square, London WC1H 9NA. For the purposes of promoting Age UK Insurance, Age UK is an Appointed Representative of Age UK Enterprises Limited, Age UK is an Introducer Appointed Representative of JLT Benefit Solutions Limited and Simplyhealth Access for the purposes of introducing potential annuity and health cash plans customers respectively. Age UK Enterprises Limited, JLT Benefit Solutions Limited and Simplyhealth Access are all authorised and regulated by the Financial Services Authority. ------------------------------ This email and any files transmitted with it are confide...{{dropped:28}}
filled.contour(Nooshin, main="Permeability",color.palette=rainbow) filled.contour(Nooshin, main="Permeability",color.palette=terrain.colors) filled.contour(Nooshin, main="Permeability",color.palette=topo.colors) not quite sure what to do with the heat map, but it has a "col" attribute.
On 21.08.2012, at 11:03, nooshin bahar wrote:
Hello guys, I want to increase contrast of colors in my matrix plot. > Nooshin<- as.matrix(matrix(sample(c(0.02,0.01,0.003,0.001,0.0001,0.0005,0.0004,0.00013),2401,replace=TRUE),ncol=49), row.names=1, header=TRUE) > filled.contour(Nooshin, main="Permeability") > Nooshin_matrix <- data.matrix(Nooshin) > Nooshin_heatmap <- heatmap(Nooshin_matrix, Rowv=NA, Colv=NA,scale="column", margins=c(5,10))
How I could increase contrast with 8 kind of color.
my break is mybreaks <- c(0.02,0.01,0.003,0.001,0.0001,0.0005,0.0004,0.00013) with different color. heat map give me red-orang-yellow.I need 8 different colors. Best Regards Nooshin
Thanks
Nooshin
[[alternative HTML version deleted]]
______________________________________________ R-help at 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.