How do I draw with the geoaxes/geoplot function on the axes created with the tiledlayout function?

16 Ansichten (letzte 30 Tage)
I created multiple axes by using the tiledlayout function.
After adding an additional Axes by using nexttile function, I tried to draw a map with the geoaxes/geoplot function.
However, it was overwritten on the first axes.
t = tiledlayout(1,2);
nexttile
plot(rand(1,10));
nexttile
geoaxes % overwrite on the first Axes
geoplot([47.62 61.20],[-122.33 -149.90],'g-*')

Akzeptierte Antwort

MathWorks Support Team
MathWorks Support Team am 8 Mär. 2022
This is an expected behavior, and geoaxes function is inserted into the first axes.
As a workaround, please set the layout manually for geoaxes.
t = tiledlayout(1,2);
nexttile
plot(rand(1,10));
nexttile
gax = geoaxes(t);
gax. Layout.Tile = 2; % tile location
geoplot(gax, [47.62 61.20],[-122.33 -149.90],'g-*')
The following URL pages also have relevant information:
- tiledlayout: create and set coordinate axes manually

Weitere Antworten (0)

Kategorien

Mehr zu Graphics Object Properties finden Sie in Help Center und File Exchange

Produkte


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by