Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>In addition to the solution provided by Jonas, I think that it is also worth mentioning the lower-level function <a href="http://www.mathworks.com/help/matlab/ref/linkprop.html" rel="nofollow"><code>linkprop</code></a>, which is capable of linking seemingly arbitrary properties of graphics objects.</p> <p>For this particular question, the desired effect can be achieved via the following sequence of commands:</p> <pre><code>linkaxes([h1 h2 h3 h4], 'x'); lnkObj = linkprop([h1 h3], 'YLim'); </code></pre> <p>For demonstrative purposes (and because <code>linkprop</code> is new to me), this example is extremely simple. Please see the documentation for more details and a more complex example.</p> <p>It may also be worth mentioning here that <code>linkprop</code> returns a <a href="http://www.mathworks.com/help/matlab/ref/linkprop.html#f26-714788" rel="nofollow">link object</a>, which (according to the previous link) "must exist within the context where you want property linking to occur"; in particular, it seems to be the case that linking will cease if all references to the link object disappear, thus the reason for assigning the link object to a variable above. Moreover, a reference to the created link object is necessary for changing the details of how the corresponding graphics objects are linked (i.e., which objects' properties are linked by the given link object); see <a href="http://www.mathworks.com/help/matlab/ref/linkprop.html#f26-714797" rel="nofollow">Updating a Link Object</a> for more information (including a list of functions designed specifically for the purpose of performing such updates).</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload