and time point 2
TP2=[
15 3 5
10 11 2
4 2 10
5 10 10]
and a similar matrix at time point 2.
I can get a stacked plot (i.e. 3 values for each patient) by doing
bar(TP1,'stacked') and bar(TP2,'stacked') separately.
but I want to plot them together and grouped
i.e. I want to see how the each row changes from TP1 to TP2.
and would like each of the two stacked bars for each patient close
together i.e.
TP1a TP2a TP1b TP2b TP1c TP2c TP1d TP2d
Can someone please help
Lee
Elli
>This may be a very roundabout way...but adding to the method described above...
x1 coordinates: [0.5 1.5 2.5];
x2 coordinates: [1 2 3];
y1 = [10,20;10,5;30,10];
h1 = bar(x1,y1,'stacked') % this should make a stacked bar graph located at the x1 coordinates
set(gca,'nextplot','add') %add on to the current graph
y2 = [5,5;10,10;20,20];
h2 = bar(x2,y2) %this adds another set of bar graphs on the same plot next to it to make two %series with stacked bar graphs
%You can then control the properties of each bar graph using the handles h1 and h2 (like %face color)