多个填充轮廓图

时间:2013-04-11 03:03:03

标签: r contour

我认为我的查询部分得到了回答:

Filled contour lines from a plot with color in R

我已经添加了对该帖子的回复,但是已经很老了,我想我可能会将其重新发布为一个新问题。如果你能帮助我,那就太好了!

我有一个矩阵(G),我需要在一个图上分成3个区域,除以两个轮廓(cutoff1和cutoff2)。

depth = seq(mindepth,maxdepth,part)
width = seq(minwidth,maxwidth,part)
G = matrix(0,length(width),length(depth))

# G filled in with values at each coordinate from depth/width.

filled.contour2(width,depth,G,levels=seq(0,cutoff1),col=colors()[374])
filled.contour2(width,depth,G,levels=seq(cutoff1,cutoff2),col=colors()[411])
filled.contour2(width,depth,G,levels=seq(cutoff2,max(G)),col=colors()[50])

这不起作用,因为连续的filled.contour2操作会覆盖以前的操作。我无法发布图片,因为我不想在这个网站上发布,但三个分隔的区域很简单,分离的轮廓不重叠。

它看起来像是:

plot(width,depth,G,cont=c(cutoff1), display="filled.contour2", col=colors()[411])

应该有效,但显然这不是调用情节的正确方法。

非常感谢任何帮助。干杯

0 个答案:

没有答案