From: Adam Chapman on
On Jul 26, 2:31 pm, "Steven_Lord" <sl...(a)mathworks.com> wrote:
> "Adam Chapman" <adamchapman1...(a)hotmail.co.uk> wrote in message
>
> news:2a284dba-ef2b-44c2-93e3-4aa70bc88899(a)t10g2000yqg.googlegroups.com...
>
> > I've gone into the clabel function and put the following code
> > immediately below the main function code, in an attempt to stop labels
> > displaying if they correspond to a value > 4000 on the x-axis:
>
> > rect=get(h,'Extent');
> > for i=1:size(rect,1)
> >    xywh=rect{i};
> >    if xywh(1)>4000
> >        set(h(i),'HandleVisibility','off')
> >    end
> > end
>
> > However, this hasn't worked.
>
> Oh, it's worked.  It hasn't done what you expect because the
> HandleVisibility property doesn't do what you think it does.
>
> http://www.mathworks.com/access/helpdesk/help/techdoc/ref/text_props....
>
> It really only affects in what scope the handle can be "found" by searching.
>
> The property you want to change to make it so the label is no longer
> displayed is Visible.
>
> http://www.mathworks.com/access/helpdesk/help/techdoc/ref/text_props....
>
> And yes, in a perfect world those two properties would use the same form,
> either both Visible or both Visibility.
>
> > I've checked that the handle visibility property has been switched
> > from 'on' to 'off' on some label handles, but they are all still being
> > displayed on my figure.
>
> > Can anyone expalin this?
>
> --
> Steve Lord
> sl...(a)mathworks.com
> comp.soft-sys.matlab (CSSM) FAQ:http://matlabwiki.mathworks.com/MATLAB_FAQ
> To contact Technical Support use the Contact Us link onhttp://www.mathworks.com

Sorry for the klate reply, big computer problems at work yesterday.

The "Visible" property when switched off does turn the labels off.

Thankyou all for your help

Adam