World map scatterm legend issue
조회 수: 4(최근 30일)
I'm trying to plot a range of location (deposits) on a world map through scatterm.
The size of the circle is proportionnal to 'Tonnage" and the color depends on "Type"
I managed to get the plot I want except that the legend is only showing one entry!
I get the following warning:
Warning: Ignoring extra legend entries.
> In legend>process_inputs (line 566)
In legend>make_legend (line 310)
In legend (line 261)
In Map (line 32)
[num, txt]= xlsread( 'Map.xlsx');
geoshow('landareas.shp', 'FaceColor', [0.9 0.9 0.9]);
[Types, ~, idx] = unique(Type);
num_groups = size(Types, 1);
cmap = jet(num_groups);
I couldn't find a quick solution. If Iremove the handle "h" then the legend display the lines from the world map.
Amy Haskins 2019년 3월 20일
If you don't need a specific projection or additional overlays, I would recommend giving geobubble a try instead (introduced in R2017b). It's made for exactly this type of chart and will construct nice legends for you.
I think the alternative would be to filter your data set by type and generate the scatter plot for each type individually.