필터 지우기
필터 지우기

how to creat combined Area -scatter chart

조회 수: 2 (최근 30일)
baran
baran 2014년 10월 5일
댓글: Star Strider 2014년 10월 6일
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
baran
baran 2014년 10월 6일
thanks so much.
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