Scatter plot markers dont show colors of the colormap
11 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
.
2 Kommentare
dpb
am 12 Dez. 2020
scatter doesn't know about the density of location; it just draws a marker at the location.
You'll need to use histcounts2 to bin the data in XY coordinate space and then use that count array as the color variable.
Antworten (1)
Cris LaPierre
am 12 Dez. 2020
You could try using the syntax for scatter that includes color: scatter(x,y,sz,c)
You'd have to include a color for each marker.
2 Kommentare
dpb
am 12 Dez. 2020
Yeah, but how to obtain the color that is representative of the point density...be interesting if OP would attach the data file to play with; I've not tried such a thing that can think of having done.
A search uncovered that one of the mapping toolboxen has a topographical density plotting facility with it -- that would be a great addition to add to general graphics types.
Siehe auch
Kategorien
Mehr zu Scatter Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!