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 ビュー (過去 30 日間)
古いコメントを表示
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.
回答 (1 件)
Aymane ahajjam
2023 年 11 月 18 日
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 件のコメント
参考
カテゴリ
Help Center および File Exchange で Geographic Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!