How to plot 2 geo plots together

조회 수: 7 (최근 30일)
Sangesh Pv
Sangesh Pv . 2023년 9월 24일
댓글: Dyuman Joshi . 2023년 9월 25일
I am plotting some geo points of some towers and its coverage area, i want to know how i can specify the color and size and shape of the main tower(as i have 8 towers to plot but on the same output) and area it covers with the same color.
  댓글 수: 4
Sangesh Pv
Sangesh Pv 2023년 9월 24일
the files are attached below

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

채택된 답변

Dyuman Joshi
Dyuman Joshi 2023년 9월 24일
The data you have generates the following map plot -
maint = readtable('main towers.csv');
subt = readtable('subtower.csv');
%% IDs of the towers
%Main towers
id = maint.tower;
%Sub towers
subid = subt.subtower;
str = ["Latitude" "Longitude"];
figure
%Plot the main towers
geoplot(maint.(str(1)),maint.(str(2)),'b.','MarkerSize',15)
%Adjusted limits of the geographic map
geolimits([41.83 41.87],[12.6 12.65])
hold on
%Plot the coverage area i.e. subtowers
for k = 1:numel(id)
index = ismember(subid,id(k));
if nnz(index)
%Get the unique combination of Lat and Long coordinates for the subtowers
vec = unique(subt{index,str},'rows','stable');
%Make convex hull of the data
z = convhull(vec);
%Corresponding geographic polyshope
g=geopolyshape(vec(z,1),vec(z,2));
%Plot the coverage area
pg = geoplot(g,'FaceColor',rand(1,3),'FaceAlpha',0.3);
end
end
  댓글 수: 4
Dyuman Joshi
Dyuman Joshi 2023년 9월 25일
Glad to have helped!
If my answer solved your problem, please consider accepting the answer.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Geographic Plots에 대해 자세히 알아보기

태그

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by