how to creat combined Area -scatter chart

2 次查看(过去 30 天)
Hi,
i want to create plot like the picture by matlab , can any one help me ?
the area in the graph have two bound, lower bound and upper bound . for each of bound i have some data.
for example my upper bound data are : (15 15 16 16 16 16 17 17 17 17 18 19)
and
my lower bound data are : (2 2 3 3 3 4 4 4 5 5 6 6)
between this two bound i want to be significant by color.
and my scatter chart data are : (10 10 12 13 13 13 14 14 14 15 15 15)
X lower bound upper bound data
1 2 15 10
2 2 15 10
3 3 16 12
4 3 16 13
5 3 16 13
6 4 16 13
7 4 17 14
8 4 17 14
9 5 17 14
10 5 17 15
11 6 18 15
12 6 19 15
as shown in picture . how can make this plot in matlab , is it possible at all? thank so much

采纳的回答

Star Strider
Star Strider 2014-10-5
This seems to approximate the figure in your Question:
D = [1 2 15 10
2 2 15 10
3 3 16 12
4 3 16 13
5 3 16 13
6 4 16 13
7 4 17 14
8 4 17 14
9 5 17 14
10 5 17 15
11 6 18 15
12 6 19 15];
figure(1)
h1 = area(D(:,1), D(:,[2 3]), 0.25)
set(h1(1), 'FaceColor', [1.0 1.0 1.0], 'EdgeColor', 'w')
set(h1(2), 'FaceColor', [0.9 0.9 0.9], 'EdgeColor', 'w')
hold on
plot(D(:,1), D(:,4), '^k', 'MarkerFaceColor','k')
hold off
axis([0 14 0 30])
set(gca, 'FontSize', 7)
producing:
  4 个评论
Star Strider
Star Strider 2014-10-6
My pleasure!
I haven’t worked with area plots in a while, so yours was a fun problem to solve.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Line Plots 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by