필터 지우기
필터 지우기

adding more traces to geoplot

조회 수: 33 (최근 30일)
Massimo Satler
Massimo Satler 2021년 11월 23일
댓글: Massimo Satler 2021년 11월 26일
I would like to plot gps traces on map using geoplot function
My goal is to add traces to the plot without clearing the previous ones. Unfortunately hold on doesn't work for this kind of function.
the idea is the following one:
figure();
geoplot(lat1, long1);
hold on;
geoplot(lat2, long2);
and so on
is it possible?

답변 (1개)

Pranjal Kaura
Pranjal Kaura 2021년 11월 26일
Hey Massimo,
Please go through the examples mentioned in the 'geoplot' documentation to know more about adding multiple lines to a plot. Could you share more details regarding the issue you are facing because the 'hold' functionlaity seems to be working for me. Here's a code snippet that I ran:
latSeattle = 47.62;
lonSeattle = -122.33;
latAnchorage = 61.20;
lonAnchorage = -149.9;
geoplot([latSeattle latAnchorage],[lonSeattle lonAnchorage],'g-*')
geolimits([45 62],[-149 -123])
hold on
geoplot([latSeattle-4 latAnchorage],[lonSeattle lonAnchorage + 1],'r-+')
If you're using 'geoglobe' and 'geoplot3' functions, you can go through this link to know more about plotting multiple 3D plots.
Hope this helps!
  댓글 수: 1
Massimo Satler
Massimo Satler 2021년 11월 26일
You are right, thanks for yor reply.
My problem arises form the script I wrote. Before calling geoplot, I had a figure where I abilitated hold on and in that case geoplot fails.
thanks for your help

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

카테고리

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

태그

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by