4.66667

4.7 | 3 ratings Rate this file 28 downloads (last 30 days) File Size: 4.31 KB File ID: #17505

makeLineHighlightable

by Matthew Whitaker

 

13 Nov 2007 (Updated 13 Nov 2007)

No BSD License  

Makes lines or line children of axes highlightable

Download Now | Watch this File

File Information
Description

% 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

MATLAB release MATLAB 7.3 (R2006b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (5)
13 Nov 2007 Matthew Whitaker

Revision submitted to turn off other lines when highlighting a line

13 Nov 2007 Doug Hull

This file is the first winner of the LazyWeb challenge I posted on my Blog.

http://blogs.mathworks.com/pick/2007/11/13/lazyweb-on-the-file-exchange/

14 Nov 2007 V P

I have a naive question. If I open Figure Palette (ML R14) in figure window, I get any line object highlighted if I click it. This is reasonable, because it allows to see gco. Apparently, in the submission discussed here the highlighting has some other meaning. Which one?

Another question is for Doug. If I open uicontextmenu for gco with right button, I see option CUT, but there are no important options MOVE, BLOW UP/DOWN (both implemented in RECTANGLE AND ELLIPSE), and ROTATE (strangely, Rotate3D button in main toolbar cannot rotate single objects within fixed 2D axis). Of course, one can modify uicontextmenu, but such options are very general, why not yet implemented?

Furthermore, if I have a line object within RECTANGLE or ELLIPSE brought into axis from Annotations,instead of that object only RECTANGLE or ELLIPSE are always selected by clicking the line object. This seems to me inconsistent. What is the explanation for that? Apparently, RECTANGLE and ELLIPSE consider not only the perimiter, but also inner points as their own property. This is very inconvenient for users.

21 Nov 2007 saeed iqbal

i opened this site and i liked it very much.

16 Jan 2008 Aurélien QUEFFURUSt

Great job! It works perfectly with the current release (R2007b).

Please login to add a comment or rating.
Updates
13 Nov 2007

Revisions: 11/13/07- Other lines turn off when line is highlighted

13 Nov 2007

Make other lines turn off when clicking

Tag Activity for this File
Tag Applied By Date/Time
data exploration Matthew Whitaker 22 Oct 2008 09:35:02
gui Matthew Whitaker 22 Oct 2008 09:35:02
utility Matthew Whitaker 22 Oct 2008 09:35:02
highlightable Matthew Whitaker 22 Oct 2008 09:35:02
graphical data Matthew Whitaker 22 Oct 2008 09:35:02
children Matthew Whitaker 22 Oct 2008 09:35:02
graphics Matthew Whitaker 22 Oct 2008 09:35:02
line Matthew Whitaker 22 Oct 2008 09:35:02
data exploration Nicholas 17 Jul 2009 17:33:18
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com