How to reverse the order of bubble size in 'geobubble' function to represent 'bigger dots' for smaller data values and 'smaller dots' for bigger data values
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi,
I recently started using 'geobubble' function to plot data values at specific geographic locations described by Latitude and Longitude.
Is there a way to change the order of bubble size, where bigger dots represent smaller data values and smaller dots to represent bigger data values?
Code attached below:
counties = readtable('counties.xlsx');
gb = geobubble(counties,'Latitude','Longitude','SizeVariable','Cases2010');
geolimits(gb,[41 47],[-75 -66])
Thanks.
Respuestas (1)
Aymane ahajjam
el 18 de Nov. de 2023
The documentation has the solution:
Reorder Bubble Colors
Change the color indicating high severity to be red rather than yellow. To change the color order, you can change the ordering of either the categories or the colors listed in the BubbleColorList property. For example, initially the categories are ordered Low-Medium-High. Use the reordercats function to change the categories to High-Medium-Low. The categories change in the color legend.
neworder = {'High','Medium','Low'};
gb.SourceTable.Severity = reordercats(gb.SourceTable.Severity,neworder);
0 comentarios
Ver también
Categorías
Más información sobre Geographic Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!