How to interpret colorbar values in geodensityplot?
7 次查看(过去 30 天)
显示 更早的评论
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 个评论
Sebastián Inzunza
2022-6-28
Hi Luke!
Finally, do you have an idea about interpret the colorbar values? I have the same problem.
回答(1 个)
Douglas
2023-8-18
编辑:Douglas
2023-8-18
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 个评论
Shiyuan
2023-9-16
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
2023-9-16
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));
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Color and Styling 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
