12.07.2015 Views

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Text PropertiesWhen a handle is not visible in its parent’s list of children, it cannot be returnedby functions that obtain handles by searching the object hierarchy or queryinghandle properties. This includes get, findobj, gca, gcf, gco, newplot, cla, clf,and close.When a handle’s visibility is restricted using callback or off, the object’shandle does not appear in its parent’s Children property, figures do not appearin the root’s CurrentFigure property, objects do not appear in the root’sCallbackObject property or in the figure’s CurrentObject property, and axesdo not appear in their parent’s CurrentAxes property.You can set the root ShowHiddenHandles property to on to make all handlesvisible, regardless of their HandleVisibility settings (this does not affect thevalues of the HandleVisibility properties).Handles that are hidden are still valid. If you know an object’s handle, you canset and get its properties, and pass it to any function that operates on handles.HitTest{on} | offSelectable by mouse click. HitTest determines if the text can become thecurrent object (as returned by the gco command and the figure CurrentObjectproperty) as a result of a mouse click on the text. If HiTest is off, clicking onthe text selects the object below it (which is usually the axes containing it).For example, suppose you define the button down function of an image (see theButtonDownFcn property) to display text at the location you click on with themouse.First define the callback routine.function bd_functionpt = get(gca,'CurrentPoint');text(pt(1,1),pt(1,2),pt(1,3),...'{\fontsize{20}\oplus} The spot to label',...'HitTest','off')Now display an image, setting its ButtonDownFcn property to the callbackroutine.load earthimage(X,'ButtonDownFcn','bd_function'); colormap(map)2-515

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!