How to make two coordinate X axes in single plot

3 vues (au cours des 30 derniers jours)
Martin Hrabina
Martin Hrabina le 16 Mar 2016
Commenté : Dima Khaykin le 21 Juil 2020
Hello, I would like to have a single plot with 2 linked X axes with different scales. Currently, I have plot with 2 axes (first in time, second in samples) with significantly different scales, however with same number of points - see attached plot.
I want both axes to zoom simultaneously and proportionally, if I use linkaxes it changes scale on one of the axes, which is problem given the difference in scales. Can you recommend me any solution? Thanks

Réponse acceptée

Martin Hrabina
Martin Hrabina le 17 Mar 2016
Modifié(e) : Martin Hrabina le 17 Mar 2016
Okay, my problem was solved by creating quite simple auxiliary function. Detailed description can be found on
part Customizing the Zoom
  1 commentaire
Dima Khaykin
Dima Khaykin le 21 Juil 2020
Can you please share your solution?
And another question, how to make plot show double axis with all the points?

Connectez-vous pour commenter.

Plus de réponses (1)

Walter Roberson
Walter Roberson le 16 Mar 2016
plotxx() ?
  1 commentaire
Martin Hrabina
Martin Hrabina le 16 Mar 2016
Modifié(e) : Martin Hrabina le 16 Mar 2016
Thanks for quick response! However I don't see this as a solution, since this, just like my original solution (without linkaxes) zooms only one X axis, the other stays as it was. I would like to see, when zoomed, sample range and time range at the same time.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Visual Exploration dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by