Is it possible to make following contour plot using Matlab? Not only for filled buble but also for other markers such as filled three angles. Thank you for help.

 채택된 답변

Dave B
Dave B 2021년 10월 13일

0 개 추천

Yes this is possible.
I wouldn't call this a contour plot, it's really more like a bubble plot.
You can't make triangles with geobubble, but you can with geoscatter. geoscatter provides lots of the same functionality as geobubble, but you have to scale the markers yourself and you don't get a size legend (not sure what that might look like for triangles).
x=randi([20 50],50,1);
y=-randi([70 130],50,1);
s=rand(50,1)*300;
c=randi(8,50,1);
figure
geoscatter(x,y,s,c,'filled')
colormap(jet(8))
colorbar('location','southoutside','Ticks',linspace(1,8,9))
figure
geoscatter(x,y,s,c,'^','filled')
colormap(jet(8))
colorbar('location','southoutside','Ticks',linspace(1,8,9))

댓글 수: 4

Marzuki Marzuki
Marzuki Marzuki 2021년 10월 13일
Thank you very much @Dave B
Marzuki Marzuki
Marzuki Marzuki 2021년 10월 13일
Hi @Dave B, is not possible to use "s" for the colorbar? Hence, the data value (characteristics) can be seen from the color and buble size. I tried to plot simple data (attached file). I plot the coofficient correlation (CC) with geoscatter and I hope the CC can be seen from the buble size and color bar.
You can pass in the cc values for color and they will show up on the colorbar, and you can multiply them by some value to make them appropriate for size (or use the rescale button to choose the minimum and maximum size). There isn't a simple way to make a size legend.
t=readtable('data.xlsx');
geoscatter(t.Lat,t.Lon,rescale(t.CC,50,300),t.CC,'^','filled');
colormap(turbo)
c=colorbar('Location','southoutside');
xlabel(c,'Correlation Coefficient')
Marzuki Marzuki
Marzuki Marzuki 2021년 10월 13일
Thank you very much @Dave B

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Geographic Plots에 대해 자세히 알아보기

질문:

2021년 10월 13일

댓글:

2021년 10월 13일

Community Treasure Hunt

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

Start Hunting!

Translated by