MATLAB: Is there a way to relate colorbar values to geodensityplot weight

cdatacolorbardensityfacecolorgeodensityplotheatmapinterpMATLAB

I am trying to relate the values of my geodensityplot to the colorbar.
The values in the colorbar range from 0 to 2.5 x 10^-8.
The weight values in my geodensityplot range from 1 – 11.
How can I make the colorbar values correspond to my weight values?
I know that I could replace the colorbar values with Tick Labels but I'm uncertain of the relationship between colorbar colors/values and my geodensityplot weight data.
Sample code.
%% GeoDensityPlot of GPS grid weighted by number of Cell Towers within Range
figure(1)
geodensityplot(inRangeGridAll(:,1),inRangeGridAll(:,2),inRangeGridAll(:,3),'FaceColor','interp');
geobasemap('darkwater')
colorbar
%Annotations
title("Cell Tower Signal Density Map")

Best Answer

hello
if you have the weights values , you can use them in the colorbar TickLabels
some example below :
figure(1)
n = 32;
map = colormap(jet(n)) ; %Create Colormap
cbh = colorbar ; %Create Colorbar
cbh.Ticks = linspace(0, 1, n) ; %Create n ticks from zero to 1
cbh.TickLabels = num2cell(round(logspace(log10(10),log10(1000),n))) ; %Replace the labels of these n ticks with the given numbers