makeLineHighlightab​le

版本 1.0.0.0 (1.5 KB) 作者: Matthew Whitaker
Makes lines or line children of axes highlightable
1.5K 次下载
更新时间 2007/11/13

无许可证

% MAKELINEHIGHLIGHTABLE sets the ButtonDownFcn of lines or line children
% of axes so that when the line is clicked the line width is increased or
% decreased. when the line is clicked again the line width returns to the
% original value.
%
% MAKELINEHIGHLIGHTABLE(H,HIGHLIGHTPOINTS): H is a line or axes handle or a vector of line and/or axes handles
% HIGHLIGHTPOINTS(optional) is the number of points to
% increase (or decrease) the line width when the line is clicked. If not
% supplied the default value is 2.
%
% MAKELINEHIGHLIGHTABLE(H,0): turns off the highlightable ButtonDownFcn for the line handles in H.
% Examples:
% h = plot(1:10,rand(10));
% makeLineHighlightable(h) %increase line width by 2 when clicked
% a = get(h(1),'Parent');
% makeLineHighlightable(a,5); %increase by 5 all lines in the axes
% makeLineHighlightable(h(1:5),0); %turn off the first 5 lines highlighting
% makeLineHighlightable(a,0); %turn off all the lines highlighting

引用格式

Matthew Whitaker (2024). makeLineHighlightable (https://www.mathworks.com/matlabcentral/fileexchange/17505-makelinehighlightable), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2006b
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Interactive Control and Callbacks 的更多信息

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.0.0.0

Make other lines turn off when clicking