Invert a histogram by emphasizing on the valleys
11 vues (au cours des 30 derniers jours)
Hello! I have a regular histogram, where I have my peaks at a certain frequencies. However, i want to emphasize on the valleys in my histogram rather than on the peaks. How do I make it so? I want my new histogram to display the peaks as the spaces with the biggest valleys in the initial plot. Like invert it, in a sense?
Yazan le 20 Août 2021
Modifié(e) : Yazan le 20 Août 2021
One way to do that probably is by subtracting the rate in each bin from the maximum rate. Below is an example with normal distribution. I'm not sure though if interpreting this result is very meaningful.
x = randn(1, 1000);
h1 = histcounts(x);
h2 = max(h1)-h1;
bar(h1, 'FaceAlpha', 0.5), hold on, bar(h2, 'r', 'FaceAlpha', 0.5);