Borrar filtros
Borrar filtros

how to creat combined Area -scatter chart

2 visualizaciones (últimos 30 días)
baran
baran el 5 de Oct. de 2014
Comentada: Star Strider el 6 de Oct. de 2014
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

Respuesta aceptada

Star Strider
Star Strider el 5 de Oct. de 2014
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 comentarios
baran
baran el 6 de Oct. de 2014
thanks so much.
Star Strider
Star Strider el 6 de Oct. de 2014
My pleasure!
I haven’t worked with area plots in a while, so yours was a fun problem to solve.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Line Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by