How to interpret colorbar values in geodensityplot?
7 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I am using Geographic Density Plot to analyze cyclone track data.
I am successful in implementing and using the code. I essentially used the sample code in the documentation for geodensityplot.
geodensityplot([latall{:}],[lonall{:}],'FaceColor','interp');
This is the result with the colorbar.

I understand that a higher number indicates a higher density but I do not know what the values on the colorbar exactly represent. The colorbar limits range from 0 to ~2.8x10^-9. Is this the number of points per unit area or some other measurement?
1 Commento
Sebastián Inzunza
il 28 Giu 2022
Hi Luke!
Finally, do you have an idea about interpret the colorbar values? I have the same problem.
Risposte (1)
Douglas
il 18 Ago 2023
Modificato: Douglas
il 18 Ago 2023
This took some trial and error, but I was trying to solve the same problem. There is no documentation for this which is highly annoying! The values are weighted by R^2 (not pi*R^2). No pi. It says radius, but leg or width would be more discriptive. In your case, it should be the number of occurences in area.
If you can pre-calculate your weights or know the radius of influence:
% radius of influence (see geodensityplot docs) in meters
R = 10e3;
gx = geodensityplot(lat, lon, gWeights*R^2, 'FaceColor','interp', 'radius', R)
cbh = colorbar;
It will be properly weighted by gWeights.
If you do NOT know the weights, you can still calculate the number of events in an area.
% for the maximum value
cbh.Limits(2)*gx.Radius^2
or
% for all of the tick marks
cbh.Ticks*gx.Radius^2
7 Commenti
Shiyuan
il 16 Set 2023
Thank you very much for your answer! I will try to modify the question about color transparency.
Also, regarding the physical meaning of the colorbar, as mentioned before, it should represent "events", but after modifying the weights, the value field of the colorbar will change. In the example mentioned in the last comment, should the number of times a hurricane passes through the high frequency region be 1600 or 160? Though the image remains the same, the value domain of colorbar changes after the setting of weights is changed, I don't know what the real number of times is actually. Thanks!
Shiyuan
il 16 Set 2023
Interestingly, I've tried colormap(jet(7)), colormap(jet(9)), etc. before, and found that the color scale [0.0,0.5,1.0], which represents the low-value area, doesn't seem to distort the colors as much when using colormap(jet(5)). Sorry, these are the only very simple methods I can think of at the moment.
h = geodensityplot(allLat, allLon,weights*R*R, 'FaceColor', 'interp','Radius',R);
alphamap(normalize((1:64).^0.1,'range'));
geobasemap none
colormap(jet(5));
Vedere anche
Categorie
Scopri di più su Color and Styling 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!
