【发布时间】:2017-07-13 05:00:59
【问题描述】:
这个网站上已经有很多类似的问题:
MATLAB, Filling in the area between two sets of data, lines in one figure
MATLAB fill area between lines
但是,所有现有问题仅与两条曲线有关。如何填充由几条条相互重叠的曲线包围的区域?
一个粗略的例子是:
% Create sample data as column vectors.
x = [1 : 100]';
curve1 = x/10;
curve2 = log(x/2) + rand(length(x), 1) - 0.5;
curve3 = log(x) + rand(length(x), 1) + 0.5;
% Plot it.
plot(x, curve1, 'r', 'LineWidth', 2);
hold on;
plot(x, curve2, 'b', 'LineWidth', 2);
plot(x, curve3, 'k', 'LineWidth', 2);
对于阴影: 上限将是黑色曲线后跟红线。
下限是蓝色曲线(简短地),然后是红线,然后是蓝色曲线。
在我的实际数据集中,我有 10 条曲线需要类似的东西。
【问题讨论】:
标签: matlab plot curve region shading