How to Plot a Barh Chart from Matrix Element Distribution
1 次查看(过去 30 天)
显示 更早的评论
Hello
How to Plot a barh chart from a matrix elements distribution?
for example if I have this Matrix named B B=[0 1 1 0 2 2 0 0 0 0 0 0 0 0 0;0 0 0 0 0 0 0 1 1 0 0 2 2 2 0] where rows represent locations and columns represent units of time, and the elements inside the matrix represent part Id that exists in that specific location and time.
It is possible to convert this matrix into sort of barh chart (gantt chart) just from the way the elements inside the matrix B are distributed?
So we have on the horizontal axis the units of time, and the vertical axis the locations, and the bars are named or/and colored based on the part Id. the results should be something thing close to the one shown in the picture.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/162749/image.jpeg)
This only a very simple matrix, I am working with a much bigger matrix with a size of (59*61200) and 53 parts.
Best Regards Alaa
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Bar Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!