本文介绍了R中树图的红色琥珀绿色顺序调色板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有色阶调色板可以为树形图提供连续的 RAG 颜色.我尝试了RgYlGn",但由于范围少于 28 个唯一值,颜色全部显示为绿色或黄色.我想要的是最小值为红色,中值为黄色,最大值为绿色,具有从红色到绿色的连续颜色渐变
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
推荐答案
colorRampPalette 函数可能对你有用.
The function colorRampPalette might be useful to you.
colorRampPalette(c("red", "yellow", "green"))
这篇关于R中树图的红色琥珀绿色顺序调色板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!