Effacer les filtres
Effacer les filtres

Cambiare colore degli Stati con il tool Basemap

3 vues (au cours des 30 derniers jours)
Alessandro Mura
Alessandro Mura le 10 Déc 2021
"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 commentaires
Alessandro Mura
Alessandro Mura le 11 Déc 2021
Alessandro Mura
Alessandro Mura le 19 Déc 2021

Connectez-vous pour commenter.

Réponses (1)

Abhinaya Kennedy
Abhinaya Kennedy le 4 Juin 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.

Tags

Community Treasure Hunt

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

Start Hunting!