Borrar filtros
Borrar filtros

Cambiare colore degli Stati con il tool Basemap

3 visualizaciones (últimos 30 días)
Alessandro Mura
Alessandro Mura el 10 de Dic. de 2021
Respondida: Abhinaya Kennedy el 4 de Jun. de 2024
"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;
  3 comentarios

Iniciar sesión para comentar.

Respuestas (1)

Abhinaya Kennedy
Abhinaya Kennedy el 4 de Jun. de 2024
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.

Etiquetas

Community Treasure Hunt

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

Start Hunting!