28.12.2012 Views

Figure Properties - SERC

Figure Properties - SERC

Figure Properties - SERC

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

2linkprop<br />

Purpose Keep same value for corresponding properties<br />

linkprop<br />

Syntax hlink = linkprop(obj_handles,'PropertyName')<br />

hlink = linkprop(obj_handles,{'PropertyName1','PropertyName2',...})<br />

Description Use linkprop to maintain the same values for the corresponding properties of<br />

different objects.<br />

hlink = linkprop(obj_handles,'PropertyName') maintains the same value<br />

for the property PropertyName on all objects whose handles appear in<br />

obj_handles. linkprop returns the link object in hlink. See “Link Object” for<br />

more information.<br />

hlink =<br />

linkprop(obj_handles,{'PropertyName1','PropertyName2',...})<br />

maintains the same respective values for all properties passed as a cell array<br />

on all objects whose handles appear in obj_handles.<br />

Note that the linked properties of all linked objects are updated immediately<br />

when linkprop is called. The first object in the list (obj_handles) determines<br />

the property values for the rest of the objects.<br />

Link Object The mechanism to link the properties of different graphics objects is stored in<br />

the link object, which is returned by linkprop. Therefore, the link object must<br />

exist within the context where you want property linking to occur (such as in<br />

the base workspace if users are to interact with the objects from the command<br />

line or figure tools).<br />

Modifying Link<br />

Object<br />

The following list describes ways to maintain a reference to the link object.<br />

Return the link object as an output argument from a function and keep it in<br />

the base workspace while interacting with the linked objects.<br />

Make the hlink variable global.<br />

Store the hlink variable in an object’s UserData property or in application<br />

data. See the “Examples” section for an example that uses application data.<br />

If you want to change either the graphics objects or the properties that are<br />

linked, you need to use the link object methods designed for that purpose.<br />

2-1349

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

Saved successfully!

Ooh no, something went wrong!