Mercurial > hg > octave-nkf
comparison scripts/plot/util/linkprop.m @ 18894:d1750be79dee
linkaxes.m: Implement new function linkaxes.
* scripts/plot/util/linkaxes.m: New function
* scripts/plot/util/module.mk: Add function to build system.
* NEWS: Announce new function
* plot.txi: Add function to manual.
* __unimplemented__.m: Remove from unimplemented list.
* linkprop.m: Use same style for demo as linkaxes.
author | Willem Atsma <willem.atsma@tanglebridge.com> |
---|---|
date | Tue, 18 Mar 2014 13:05:40 -0700 |
parents | e68788478aa1 |
children | db92e7e28e1f |
comparison
equal
deleted
inserted
replaced
18892:868dcab453bd | 18894:d1750be79dee |
---|---|
119 | 119 |
120 %!demo | 120 %!demo |
121 %! clf; | 121 %! clf; |
122 %! x = 0:0.1:10; | 122 %! x = 0:0.1:10; |
123 %! subplot (1,2,1); | 123 %! subplot (1,2,1); |
124 %! h1 = plot (x, sin (x), "r"); | 124 %! h1 = plot (x, sin (x), 'r'); |
125 %! subplot (1,2,2); | 125 %! subplot (1,2,2); |
126 %! h2 = plot (x, cos (x), "b"); | 126 %! h2 = plot (x, cos (x), 'b'); |
127 %! input ("Type <RETURN> to link plots"); | 127 %! input ('Type <RETURN> to link plots'); |
128 %! hlink = linkprop ([h1, h2], {"color", "linestyle"}); | 128 %! hlink = linkprop ([h1, h2], {'color', 'linestyle'}); |
129 %! input ("Type <RETURN> to change color"); | 129 %! input ('Type <RETURN> to change color'); |
130 %! set (h1, "color", "green"); | 130 %! set (h1, 'color', 'green'); |
131 %! input ("Type <RETURN> to change linestyle"); | 131 %! input ('Type <RETURN> to change linestyle'); |
132 %! set (h2, "linestyle", "--"); | 132 %! set (h2, 'linestyle', '--'); |
133 | 133 |
134 %!test | 134 %!test |
135 %! hf1 = figure ("visible", "off"); | 135 %! hf1 = figure ("visible", "off"); |
136 %! hl1 = plot (1:10, "or"); | 136 %! hl1 = plot (1:10, "or"); |
137 %! hf2 = figure ("visible", "off"); | 137 %! hf2 = figure ("visible", "off"); |