Red Amber Green sequential palette for treemap in R

亡梦爱人 提交于 2019-12-25 18:36:46

问题


is there a color scale palette that can give sequential RAG color for a treemap. I tried "RgYlGn" but due to the range being less over 28 unique values, the colors come out as all Green or Yellow. What I want is the least value being red and median being yellow and max being green with a sequential color gradient from red to green


回答1:


The function colorRampPalette might be useful to you.

colorRampPalette(c("red", "yellow", "green"))


来源:https://stackoverflow.com/questions/34517031/red-amber-green-sequential-palette-for-treemap-in-r

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!