% NAME: magnifyOnFigure
% AUTHOR: David Fernandez Prim (david.fernandez.prim@gmail.com)
% PURPOSE: Shows a functional zoom tool, suitable for publishing of zoomed
% images and 2D plots
%
% INPUT ARGUMENTS:
% figureHandle [double 1x1]: graphic handle of the target figure
% axesHandle [double 1x1]: graphic handle of the target axes.
%
% OUTPUT ARGUMENTS:
% none
%
% SINTAX:
% 1) magnifyOnFigure;
% $ Adds magnifier on the first axes of the current figure, with
% default behavior.
%
% 2) magnifyOnFigure( figureHandle );
% $ Adds magnifier on the first axes of the figure with handle
% 'figureHandle', with default behavior.
%
% 3) magnifyOnFigure( figureHandle, 'property1', value1,... );
% $ Adds magnifier on the first axes of the figure with handle
% 'figureHandle', with modified behavior.
%
% 4) magnifyOnFigure( axesHandle );
% $ Adds magnifier on the axes with handle 'axesHandle', with
% default behavior.
%
% 5) magnifyOnFigure( axesHandle, 'property1', value1,... );
% $ Adds magnifier on the axes with handle 'axesHandle', with
% modified behavior.
%
% 6) Consecutive calls to this function (in any of the syntaxes
% exposed above) produce multiple selectable magnifiers on the target axes.
%
% USAGE EXAMPLES: see script 'magnifyOnFigure_examples.m'
%
% PROPERTIES:
% 'magnifierShape': 'Shape of the magnifier ('rectangle' or 'ellipse' allowed, 'rectangle' as default)
% 'secondaryAxesFaceColor': ColorSpec
% 'edgeWidth' Color of the box surrounding the secondary
% axes, magnifier and link. Default 1
% 'edgeColor': Color of the box surrounding the secondary
% axes, magnifier and link. Default 'black'
% 'displayLinkStyle': Style of the link. 'none', 'straight' or
% 'edges', with 'straight' as default.
% 'mode': 'manual' or 'interactive' (allowing
% adjustments through mouse/keyboard). Default
% 'interactive'.
% 'units' Units in which the position vectors are
% given. Only 'pixels' currently supported
% 'initialPositionSecondaryAxes': Initial position vector ([left bottom width height])
% of secondary axes, in pixels
% 'initialPositionMagnifier': Initial position vector ([left bottom width height])
% of magnifier, in pixels
% 'secondaryAxesXLim': Initial XLim value of the secondary axes
% 'secondaryAxesYLim': Initial YLim value of the secondary axes
% 'frozenZoomAspectRatio': Specially useful for images, forces the use of the same zoom
% factor on both X and Y axes, in order to keep the aspect ratio
% ('on' or 'off' allowed, 'off' by default
%
% HOT KEYS (active if 'mode' set to 'interactive')
%
% -In a figure with multiple tool instances
% 'Tab': Switch the focus from one magnifier instance
% to the next one on the current figure.
% 'Mouse pointer on secondary axes or magnifier of a tool+double left click'
% Regain focus
%
% -On the focused magnifier instance
% 'up arrow': Moves magnifier 1 pixel upwards
% 'down arrow': Moves magnifier 1 pixel downwards
% 'left arrow': Moves magnifier 1 pixel to the left
% 'right arrow': Moves magnifier 1 pixel to the right
% 'Shift+up arrow': Expands magnifier 10% on the Y-axis
% 'Shift+down arrow': Compress magnifier 10% on the Y-axis
% 'Shift+left arrow': Compress magnifier 10% on the X-axis
% 'Shift+right arrow': Expands magnifier 10% on the X-axis
% 'Control+up arrow': Moves secondary axes 1 pixel upwards
% 'Control+down arrow': Moves secondary axes 1 pixel downwards
% 'Control+left arrow': Moves secondary axes 1 pixel to the left
% 'Control+right arrow': Moves secondary axes 1 pixel to the right
% 'Alt+up arrow': Expands secondary axes 10% on the Y-axis
% 'Alt+down arrow': Compress secondary axes 10% on the Y-axis
% 'Alt+left arrow': Compress secondary axes 10% on the X-axis
% 'Alt+right arrow': Expands secondary axes 10% on the X-axis
% 'PageUp': Increase additional zooming factor on X-axis
% 'PageDown': Decrease additional zooming factor on X-axis
% 'Shift+PageUp': Increase additional zooming factor on Y-axis
% 'Shift+PageDown': Decrease additional zooming factor on Y-axis
% 'Control+Q': Resets the additional zooming factors to 0
% 'Control+A': Displays position of secondary axes and
% magnifier in the command window
% 'Control+D': Deletes the focused tool
% 'Control+I': Shows/hides the tool identifier (red
% background color when the tool has the focus,
% black otherwise)
% 'Mouse pointer on magnifier+left click' Drag magnifier to any
% direction
% 'Mouse pointer on secondary axes+left click' Drag secondary axes in any
% direction
%
% TODO:
% - Use another axes copy as magnifier instead of rectangle (no ticks).
% - Adapt to work on 3D plots.
% - Add tip tool with interface description?.
%
% KNOWN ISSUES:
% - Secondary axes are not updated when the zoomming or panning tools of the figure are used.
% - Degraded performance for big data sets or big window sizes.
% - The size and position of the magnifier are modified for
% 'PaperPositionMode' equal to 'auto', when the figure is printed to file
% through 'print'
% CHANGE HISTORY:
function magnifyOnFigure( varargin )
clear global appDataStruct
global appDataStruct
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%CHECK OUTPUT ARGUMENTS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
switch nargout
case 0
%Correct
outputObjectExpected = false;
case 1
%tool object expected at the output
outputObjectExpected = false;
otherwise
error('Number of output arguments not supported.');
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%CHECK INPUT ARGUMENTS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if nargin == 0
%Initialize 'appDataStructuct' with default values
appDataStruct = initializeToolStruct();
%Set figure handle
appDataStruct.figureHandle = gcf;
% Get number of axes in the same figure
childHandle = get(appDataStruct.figureHandle, 'Children');
iAxes = find(strcmpi(get(childHandle, 'Type'), 'axes'));
% If no target axes specified, select the first found as mainAxes
appDataStruct.mainAxesHandle = childHandle( iAxes(end) );
elseif nargin > 0
if isstruct(varargin{1})
%Initialize 'appDataStructuct' with existent structure
没有合适的资源?快使用搜索试试~ 我知道了~
超美绘图软件画图更新07-29(2020以上GBK编码).zip
共91个文件
jpeg:48个
mat:15个
jpg:11个
需积分: 0 0 下载量 36 浏览量
2022-11-08
11:21:44
上传
评论
收藏 8.31MB ZIP 举报
温馨提示
超美绘图软件画图更新07-29(2020以上GBK编码).zip
资源推荐
资源详情
资源评论
收起资源包目录
超美绘图软件画图更新07_29(2020以上GBK编码).zip (91个子文件)
画图更新07_29
折线图复现数据.mat 394B
复现SCI柱状图数据.mat 186B
figure_youwant.p 2KB
数据
分段折线测试数据.xlsx 11KB
热力图测试数据.mat 9KB
分段折线_面积图测试数据.mat 2KB
统计图测试数据.mat 822B
双Y轴测试数据.mat 681B
柱状图测试数据.mat 412B
折线图测试数据.mat 590B
统计图测试数据.xlsx 9KB
三维曲面图测试数据.mat 2KB
数据3.xlsx 10KB
图片导入
折线图.jpg 143KB
热力图.jpg 142KB
三维柱状图.jpg 103KB
折线图导入
1.jpeg 92KB
5.jpeg 290KB
2.jpeg 104KB
6.jpeg 735KB
3.jpeg 105KB
4.jpeg 137KB
柱状图.jpg 110KB
统计图.jpg 94KB
水平柱状图.jpg 111KB
折线图1.jpg 122KB
主页.jpg 118KB
分段折线图.jpg 95KB
双Y图.jpg 130KB
柱状图.jpeg 15KB
11111.jpeg 52KB
三维曲面图.tif 494KB
三维曲面.jpg 142KB
热力图导入
26.jpeg 43KB
28.jpeg 735KB
31.jpeg 104KB
32.jpeg 127KB
1.jpeg 75KB
5.jpeg 61KB
16.jpeg 52KB
40.jpeg 74KB
36.jpeg 85KB
8.jpeg 37KB
15.jpeg 10KB
14.jpeg 56KB
18.jpeg 52KB
7.jpeg 230KB
2.jpeg 43KB
30.jpeg 55KB
27.jpeg 515KB
35.jpeg 40KB
11.jpeg 14KB
12.jpeg 24KB
39.jpeg 42KB
22.jpeg 137KB
25.jpeg 116KB
23.jpeg 105KB
34.jpeg 92KB
33.jpeg 35KB
10.jpeg 90KB
13.jpeg 67KB
29.jpeg 37KB
37.jpeg 107KB
19.jpeg 39KB
6.jpeg 65KB
21.jpeg 84KB
9.jpeg 101KB
17.jpeg 96KB
38.jpeg 63KB
3.jpeg 1.07MB
20.jpeg 38KB
24.jpeg 290KB
4.jpeg 44KB
示例数据3.mat 260B
示例数据2.mat 250B
数据4.xlsx 9KB
示例数据1.xlsx 18KB
color_list.mat 2KB
子块1
fenduan1_picture_plot.p 9KB
shuiping_zhuzuang_plot.p 8KB
sanwei_qumian_plot.p 10KB
picture_plot.p 9KB
tongji_picture_plot.p 8KB
sanwei_zhuzuang_plot.p 7KB
zhuzuang_plot.p 7KB
color_list.mat 2KB
magnifyOnFigure.m 95KB
shungY_picture_plot.p 10KB
reli_plot.p 6KB
color_cell.mat 1KB
color_cell.mat 1KB
共 91 条
- 1
资源评论
控制Mpc
- 粉丝: 67
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 背景音乐很好听,melodious, ethereal and celestial
- 基于Qt的UDP组播例程,UdpGroupSender、UdpGroupTalk,使用C++编写
- yolo开发这是一个来自yolo物体检测模型的人重新识别系统
- 机票预定系统黑盒测试报告
- AndroidStudio安装所需gradle离线配置资源
- 【matlab GUI仿真】说明:GUI界面设计,四旋翼飞机仿真 VR界面设计
- contact(1).dat
- 计算机储蓄系统详细设计
- vue开发基于 vue 和 vue-cli 搭建的整套开发底层,敏捷开发
- 基于SSM+MySql的超市管理系统源码+数据库+说明文档.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功