From: May on
I am creating a GUI in Matlab.

Details:

1) All matrices are made up of 0s and 1s
2) First matrix is 1X20 and plots black bars
3) Arbitrary number of 1X20 matrices that plots red bars.
4) Arbitrary number of 1X20 matrices that plots blue bars.
5) All matrices are plotted on an axes defined from a GUI
6) When there is an overlap in any of the bars, the program should automatically divide the bar into the number of overlaps there are. (Like a stacked graph, but height of the whole bar is 1)
7) There should be a dividing line between the colors in the overlaps so you can tell how many overlaps there are.

I'm having trouble implementing this in Matlab and programming the GUI code, so if anyone can help, I'd greatly appreciate it.
From: us on
"May " <may.chum(a)gmail.com> wrote in message <hvojjo$5du$1(a)fred.mathworks.com>...
> I am creating a GUI in Matlab.
>
> Details:
>
> 1) All matrices are made up of 0s and 1s
> 2) First matrix is 1X20 and plots black bars
> 3) Arbitrary number of 1X20 matrices that plots red bars.
> 4) Arbitrary number of 1X20 matrices that plots blue bars.
> 5) All matrices are plotted on an axes defined from a GUI
> 6) When there is an overlap in any of the bars, the program should automatically divide the bar into the number of overlaps there are. (Like a stacked graph, but height of the whole bar is 1)
> 7) There should be a dividing line between the colors in the overlaps so you can tell how many overlaps there are.
>
> I'm having trouble implementing this in Matlab and programming the GUI code, so if anyone can help, I'd greatly appreciate it.

wow(!)... quite a task...
what have YOU done so far to solve YOUR particularly interesting problem(?)...

us
From: May on
Right now I have one matrix for the black bars. There is always only one matrix that plots black bars. Let's call that matrix A.

Matrix A is 1X20. It is only made up of 1s and 0s.

I accept two user entries. Let's say the user enters 5 and 4. (Let's say there are 5 good guys and 4 bad guys)

The 5 good guys and 4 bad guys all try to find a "white spot" (a 0 in Matrix A) at the same time. They randomly pick a white spot.

If anyone picks a white spot without colliding with another guy, then they can occupy the channel. When there is a collision (the overlap I was talking about in the earlier post), I want the bar to show the overlap.

Right now the program takes Matrix A and the matrices (each 1X20) for the 9 guys and make a bigger matrix (let's call it handles.p) and do bar(handles.axes1, handles.p) with a colormap.

The problem though is the program can show an overlap by increasing the bar height for each overlap there is. For example, if there are 3 good guys that try to take the same white spot, then the bar height for that tick would be 3 and every other bar height would be 1.

I want the bar heights to be all 1, but the each bar being able to subdivide into how many ever sections there are overlaps, with a dividing line so that the user can see how many overlaps there are.
From: us on
"May " <may.chum(a)gmail.com> wrote in message <hvr0sv$doq$1(a)fred.mathworks.com>...
> Right now I have one matrix for the black bars. There is always only one matrix that plots black bars. Let's call that matrix A.
>
> Matrix A is 1X20. It is only made up of 1s and 0s.
>
> I accept two user entries. Let's say the user enters 5 and 4. (Let's say there are 5 good guys and 4 bad guys)
>
> The 5 good guys and 4 bad guys all try to find a "white spot" (a 0 in Matrix A) at the same time. They randomly pick a white spot.
>
> If anyone picks a white spot without colliding with another guy, then they can occupy the channel. When there is a collision (the overlap I was talking about in the earlier post), I want the bar to show the overlap.
>
> Right now the program takes Matrix A and the matrices (each 1X20) for the 9 guys and make a bigger matrix (let's call it handles.p) and do bar(handles.axes1, handles.p) with a colormap.
>
> The problem though is the program can show an overlap by increasing the bar height for each overlap there is. For example, if there are 3 good guys that try to take the same white spot, then the bar height for that tick would be 3 and every other bar height would be 1.
>
> I want the bar heights to be all 1, but the each bar being able to subdivide into how many ever sections there are overlaps, with a dividing line so that the user can see how many overlaps there are.

words are great - ML code is better...
show CSSM your code that you came up with so far...

us
From: May on
Here's an image that shows what I have right now, but it is still a little funky.

http://img64.imageshack.us/img64/4441/screenshotmf.jpg

This is a bit like what I want (but the following was done in Java):

http://img195.imageshack.us/img195/1530/blehdh.png

I don't want there to be a gradient though. I want it to be the same color, but with a dividing line.