How do I Plot density probability values over a histogram as colormap?
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Saeed Mohammadian
il 6 Giu 2018
Commentato: Saeed Mohammadian
il 6 Giu 2018
I have a histogram as follows:
![](/matlabcentral/answers/uploaded_files/120264/Histogram1.jpg)
First, I want to know how to plot probability density values as colormap over it.
second, is there any way I can retreive X_data versus corresponding normalized frequency as two separate vectors?
Thanks
0 Commenti
Risposta accettata
Image Analyst
il 6 Giu 2018
I don't know what "plot probability density values as colormap over it." means. Please attach a screenshot of what you'd like to see.
The histogram() function returns an object that has the x values (bin edges), as well as the y values (counts) and a whole bunch of other things. Look at is in the variable editor.
histObject = histogram(yourData)
2 Commenti
Image Analyst
il 6 Giu 2018
You can get the handle to each bar and change it's color. See attached demo.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/189308/image.png)
Più risposte (1)
Vedere anche
Categorie
Scopri di più su Data Distribution Plots in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!