Link Geoplot zoom to subplots

10 ビュー (過去 30 日間)
Dom
Dom 2021 年 11 月 7 日
回答済み: Adam Danz 2021 年 11 月 7 日
Hi,
this might be quie a tricky one. I got a geoplot showing a car route that consists of separate route elements(one segment between two gps points). I got a second plot, that plots the speed limit over the length of each route segment.
To insecpt a specific part of the route I want to connect the geoplot zoom to the speed limit plot-zoom. I therefore want to zoom into the speed limit plot so that it only show the speed limit of the visivle sections inside the (magnified) geplot.
My idea was to detect the visible sections in the zoomed geoplot and then adjust the x-axis of the speed plot accordingly. But I can't think of a function that would be able to do that. Do you have an alternative idea?
Thank you in advance!

回答 (1 件)

Adam Danz
Adam Danz 2021 年 11 月 7 日
Yes, this is complicated.
The goal would be to link the axis limits (linaxes) but ...
  1. Latitude in non-linear in geoaxes
  2. The actual limits chosen by geolimits are greater in extent than the requested limits.
This is explained and demonstrated in this answer.
One workaround is to use map axes instead of geoaxes.
Another workaround would be convert your speed data to geo units and plot the data on geoaxes so you can scale the axis limits using the same scale between the two plots.
Here is an answer that address a similar problem and achieve linked zooming for geo data and non-geo data
Here is an answer that assigns a listener to the geoaxes that responds to changes to the geoaxes
This comment may also be helpful to transform between map and geo axes

カテゴリ

Help Center および File ExchangeGeographic Plots についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by