How can I use plotm from the mapping toolbox in AppDesigner

조회 수: 3 (최근 30일)
Scott
Scott 2017년 10월 24일
댓글: Adam Danz 2019년 8월 9일
Looking to include Map data how can I include a plotm in a AppDesigner app?

답변 (1개)

Cam Salzberger
Cam Salzberger 2017년 10월 24일
Hello Scott,
I do not believe that map axes can be used with uifigures (which is the type of figure used in App Designer). A map axes is simply a regular axes with extra metadata, and only uiaxes are usable with uifigures. As a result of this, plotm cannot be used, since it requires a map axes to function.
You won't have the same projection options, but you can simply plot latitude and longitude as y and x values on a uiaxes. Alternatively, you can open up a separate figure from within your app to display the map information.
-Cam
  댓글 수: 2
babak ashory
babak ashory 2018년 12월 15일
편집: babak ashory 2018년 12월 15일
How can I plot latitude and longitude values ​​as y and x in Uiaxes?
Adam Danz
Adam Danz 2019년 8월 9일
You can try creating the map figure and then copying it to your GUI axes. Here's a working demo (r2019a)
h = worldmap('World'); % Store the output handle
hCopy = copyobj(h.Children, app.UIAxes); % Copy all of the axis' children to your app axis
delete(h.Parent) % get rid of the figure created by worldmap()

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

카테고리

Help CenterFile Exchange에서 Develop uifigure-Based Apps에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by