Displaying Histograms with decreasing bar heigths
Show older comments
Hello,
My data: is a 1000x1 duration array, which I'd like to display within histograms ... with decreasing bar heights.
What I did so far is following:
- I defined my categories
- I created individual histograms
- And displayed those within one figure
%Defining the time periods I'd like to visualize
a=({'03:00:00'}>data_inm);
b={'06:00:00'}>data_inm;
b1=b-a;
c={'12:00:00'}>data_inm;
c1=c-b;
C=categorical(a,[1],{'0-3'});
C1=categorical(b1,[1],{'3-6'});
C2=categorical(c1,[1],{'6-12'});
%Visualization
figure('Name','My Categories');
hold;
histogram(C,'Normalization','probability','BarWidth',0.5);
histogram(C1,'Normalization','probability','BarWidth',0.5);
histogram(C2,'Normalization','probability','BarWidth',0.5);
Besides having more than 3 categories, I guess the way I tried to solve my task so far is not too effective.
... do you have an idea on how to display my histograms with decreasing bar heights? Or on how I could realize a more effective code? I'd be glad to hear your ideas!
Best regards! And thanks a lot in advance!
Accepted Answer
More Answers (0)
Categories
Find more on Data Distribution Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!