Question: (Closed) Output the color code according to number
0
2012201024 • 20 wrote:
Hi,
I want to get a series of color code, like #0000FF, according to a list of number. I can set a color scale in R heatmap and draw a picture, but how to get the code list of color? Hope somebody help.
Thanks!
Many thanks for your reply.
Furthermor, if I input a list like "1 3.5 4.5 9 2", and want to output the corresponding color code, according to a scale, how should I operate?
Hi- If you have a string like "1 3.5 4.5 9 2", then you have to split it and convert to numeric:
Then use xn as above for listOfNum.
(By the way, for clarifications like this use the "add comment" feature instead of posting it as an answer).
Hello 2012201024!
We believe that this post does not fit the main topic of this site.
This is not a Bioinformatics question.
For this reason we have closed your question. This allows us to keep the site focused on the topics that the community can help with.
If you disagree please tell us why in a reply below, we'll be happy to talk about it.
Cheers!
OK, Thank you for your advice.
In fact, I'm using graphlan to draw a metagenome picture, because the software don't provid color code of heatmap, so I should get them through this method.
Sorry about that.