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
引用格式
Laurent Cavin (2026). plotyy2 (https://ww2.mathworks.cn/matlabcentral/fileexchange/7540-plotyy2), MATLAB Central File Exchange. 检索时间: .
MATLAB 版本兼容性
平台兼容性
Windows macOS Linux类别
- MATLAB > Graphics > Labels and Styling > Axes Appearance > Combine Multiple Plots >
- MATLAB > Graphics > 2-D and 3-D Plots > Line Plots > Two y-axis >
标签
致谢
启发作品: Manchester
| 版本 | 已发布 | 发行说明 | |
|---|---|---|---|
| 1.0.0.0 |
