The command plotyy is handy, but the implementation (superposing two plots on top of each other) present some problems. One of them is zooming, which does apply to only the uppermost plot (see screenshot, second plot).
This issue is know, and has no solution according to Mathworks (see refs below).
To address this, plotyy2 is a simple hack that adds a resize custom function to the figure generated by plotyy. On resize, the two x axis will be synchronized (see third plot on screenshot).
This is a non-automatic workaround, as manually resizing the figure is required after a zoom...
Reference to problem:
Solution Number: 1-15WA9
http://www.mathworks.com/support/solutions/data/1-15WA9.html
Citar como
Laurent Cavin (2024). plotyy2 (https://www.mathworks.com/matlabcentral/fileexchange/7540-plotyy2), MATLAB Central File Exchange. Recuperado .
Compatibilidad con la versión de MATLAB
Compatibilidad con las plataformas
Windows macOS LinuxCategorías
- MATLAB > Graphics > Formatting and Annotation > Axes Appearance > Combine Multiple Plots >
- MATLAB > Graphics > 2-D and 3-D Plots > Line Plots > Two y-axis >
Etiquetas
Agradecimientos
Inspiración para: Manchester
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Descubra Live Editor
Cree scripts con código, salida y texto formateado en un documento ejecutable.
Versión | Publicado | Notas de la versión | |
---|---|---|---|
1.0.0.0 |