colormap does not work on histogram2
Show older comments
Hello, I have created a custom colormap which is just turbo but with more indices, and the first entry is white.
cmapturbo=turbo(25600);
cmapturbo(1, 1) = 1;
cmapturbo(1, 2) = 1;
cmapturbo(1, 3) = 1;
I try to implement this custom colormap to a histogram2:
histogram2(x, y, [10, 10], 'normalization', 'probability', 'DisplayStyle','bar3', 'FaceColor','flat')
colorbar
colormap(cmapturbo)
However, it results in a figure as shown in histogram2.jpg. I am hoping to make it so that it can look like something in hist3.jpg.
The reason why I am not using hist3 to graph my data is because hist3 does not support graphing the frequency as a probability.
Thank you.
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!