How to set color of scatterplot bars?
Mostrar comentarios más antiguos
I was trying to have the bars in my scatterhist plot be of the same color as the markers:
x = randn(1,20);
y = randn(1,20);
myColour = [1 0 0]; % red
scatterhist(x, y, 'Color', myColour);
mygca = get(gca,'children');
set(mygca,'markerfacecolor', myColour);
However, the bars are of a slightly different color, namely a reddish hue, [249 96 96]:

The Scatterhist documentation seems to suggest bar colors just follow the marker color, which in this case does not happen.
How can I control color of scatterhist bars, on Matlab 2016a?
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Data Distribution Plots en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!