Can HIST take parameters such as FaceColor and EdgeColor?
Ältere Kommentare anzeigen
HIST only allows me to input data and number of bins. I would also like to be able to specify the color of the histogram and the line colors of the histogram. Currently, I have to create my histogram and then use FINDOBJ to get the handles to the patch objects before setting their color.
For example:
x = -2.9:0.1:2.9;
y = randn(10000,1);
hist(y,x)
h = findobj(gca,'Type','patch');
set(h,'FaceColor','r','EdgeColor','w')
This becomes more problematic when I have multiple histogram plots in one axes and I want each to be its own color.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Data Distribution Plots finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!