Cambiare colore degli Stati con il tool Basemap

3 次查看(过去 30 天)
"tsunamis" è il nome della variabile
tsunamis = readtable('file dati.xls');
gb = geobubble(tsunamis,'Latitudine','Longitudine','SizeVariable','Popolazione');
gb.Basemap = 'bluegreen';
% Ora scelgo i colori
% discretize(nomeVariabile.NomeColonnadiexcel, [range con cui confronta la colonna scelta, nell'esempio sotto ho 3 range: da 0 a 100000, da 100000 a 200000, da 200000 a 500000]
% 'categorical', {qui ci metti i nomi con cui vuoi categorizzare le informazioni in base ai range di sopra, sopra hai 3 range quindi anche qua devi avere 3 valori ecc.}
gb.SourceTable.Livelli = discretize(tsunamis.Popolazione,[0 100000 200000 500000 ],...
'categorical', {'Basso','Medio','Alto'});
gb.ColorVariable = 'Livelli';
% Qui vai a impostare la grandezza minima e massima per i pallini [grandezzaMinima, grandezzaMassima]
gb.BubbleWidthRange = [4 15];
default_width_range = gb.BubbleWidthRange;

回答(1 个)

Abhinaya Kennedy
Abhinaya Kennedy 2024-6-4
Hi Alessandro,
My translation might be off, but from what I can understand, you would like to change the colour of the geobubbles in your figure. You can do so by opening up the "Figure" window and then navigating to the "Property Inspector". Here you can find (or search for) the option "Bubble Color List" which contains the RGB triplets for all the bubbles. You can tweak this to get the desired results.
Here are some links that could help:
Hope this helps.

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!