Filter löschen
Filter löschen

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 Ansichten (letzte 30 Tage)
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.

Antworten (1)

Aymane ahajjam
Aymane ahajjam am 18 Nov. 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);

Kategorien

Mehr zu Geographic Plots finden Sie in Help Center und File Exchange

Produkte


Version

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by