登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
本帖最后由 asquidzair 于 2016-11-4 17:25 编辑
代码里我选择的是
res@cnFillPalette = "BlueYellowRed"
调色板,然而报错信息如下:
warning:ContourPlotSetValues: color index (255) exceeds size of palette, defaulting to foreground color for entry (7)
虽然是warning 但是确实影响 正常使用了(贴图)如下:
具体效果是,本应该是深橙色的对应色,变成了黑色。
奇怪的是,色标默认不都是256吗,根据字面理解就是超纲了。于是我尝试了一下另外的调色板。
res@cnFillPalette = "CBR_drywet"
图成了这样:
报错信息成了一批:
warning:ContourPlotSetValues: color index (38) exceeds size of palette, defaulting to foreground color for entry (1)
warning:ContourPlotSetValues: color index (74) exceeds size of palette, defaulting to foreground color for entry (2)
warning:ContourPlotSetValues: color index (110) exceeds size of palette, defaulting to foreground color for entry (3)
warning:ContourPlotSetValues: color index (147) exceeds size of palette, defaulting to foreground color for entry (4)
warning:ContourPlotSetValues: color index (183) exceeds size of palette, defaulting to foreground color for entry (5)
warning:ContourPlotSetValues: color index (219) exceeds size of palette, defaulting to foreground color for entry (6)
warning:ContourPlotSetValues: color index (255) exceeds size of palette, defaulting to foreground color for entry (7)
我的第一条猜测,255超纲显然就是错的了。
我尝试百度解决这个问题:得到了唯一符合且有用的信息:
[size=13.3333330154419px]You can now use [size=13.3333330154419px]cnFillPalette[size=13.3333330154419px] with [size=13.3333330154419px]wrf_contour[size=13.3333330154419px] without getting the following error:
[color=black !important]warning:ContourPlot SetValues: color index (255) exceeds size of palette, defaulting to foreground color for entry (11)
却还是没有解释其他调色板出现此类问题的原因。调色板在NCL脚本里均为报错,但是使用时却给了我黑色。简单来说,我想问的是,我知道调色板一般的作用原理RGB(0~255,0~255,0~255),NCL里通过什么目录下的什么文件相互对应?
我在本版块搜索此问题给了我一个链接下载
不知是哪位大神的杰作,简直是生病遇见送药的,十分佩服啊!
可是在下载之后打开,我发现了一堆.ps文件,我在NCL里找了半天并没有.ps的文件存在,猜来猜去猜不下去了。特来求助~如能找到本尊,也想拜服一下~
补全问题:1,我还是想用好看的调色板,如上黑色该如何解决
2,NCL里调色板是怎么和.ps文件联系起来产生作用的
|