magnifyrecttofig

Magnify contents of dragged rectangle to other figure.

您现在正在关注此提交

编者注: This file was a File Exchange Pick of the Week

Displays the contents of a displayed draggable rectangle on one axis of a source figure into an axis in a target figure. The difference in the screen size of the target axis and the size of the rectangle represents the magnification factor that the contents of the source rectangle will appear in the target figure.

Backwards compatible to R12.1 at least. Much smoother under R14x though.

Update of 3/29:
1) Put in arrow keys to have individual control over rectangle width and height
2) Saved size state of rectanglebetween drags and added 'r' key to restore default rectangle proportion (20% of axes)
3) Added 'm' key to toggle between maximizing target axis and having it be the original. Also, 'm' as argument to default to maximized vs orignal size.
4) Tried to fix wierd event timing bugs that would result in residual rectangles. The biggest fix came by disallowing the right mouse button.

引用格式

Andrew Diamond (2026). magnifyrecttofig (https://ww2.mathworks.cn/matlabcentral/fileexchange/7286-magnifyrecttofig), MATLAB Central File Exchange. 检索时间: .

致谢

参考作品: magnify

启发作品: On-figure magnifier, TACTICS Toolbox

类别

Help CenterMATLAB Answers 中查找有关 Data Exploration 的更多信息

一般信息

MATLAB 版本兼容性

  • 兼容任何版本

平台兼容性

  • Windows
  • macOS
  • Linux
版本 已发布 发行说明 Action
1.0.0.0

Bug fix to correct focus of window on first drag not being the source window which therefore didn't get keyboard input.
Added figurem.m to conviently install event handlers at "figure" time.