comparison scripts/plot/appearance/axis.m @ 19915:f25fe5369022

Don't assume axes parent is a figure (bug #44394) * axis.m: use "ancestor (ca, "figure")" in place of "get (ca, "parent")" * legend.m: use "ancestor (ca, "figure")" in place of "get (ca, "parent")" * colorbar.m: use "ancestor (ca, "figure")" in place of "get (ca, "parent")" * copyobj.m: use "ancestor (ca, "figure")" in place of "get (ca, "parent")" * hold.m: use "ancestor (ca, "figure")" in place of "get (ca, "parent")" * ishold.m: use "ancestor (ca, "figure")" in place of "get (ca, "parent")"
author Pantxo Diribarne <pantxo.diribarne@gmail.com>
date Sun, 01 Mar 2015 15:10:28 +0100
parents 4197fc428c7d
children 777f26aa8e3e
comparison
equal deleted inserted replaced
19914:2350fc8ba960 19915:f25fe5369022
191 __do_tight_option__ (ca); 191 __do_tight_option__ (ca);
192 elseif (strcmpi (ax, "square")) 192 elseif (strcmpi (ax, "square"))
193 set (ca, "dataaspectratiomode", "auto", 193 set (ca, "dataaspectratiomode", "auto",
194 "plotboxaspectratio", [1, 1, 1]); 194 "plotboxaspectratio", [1, 1, 1]);
195 elseif (strcmp (ax, "equal")) 195 elseif (strcmp (ax, "equal"))
196 if (strcmp (get (get (ca, "parent"), "__graphics_toolkit__"), "gnuplot")) 196 if (strcmp (get (ancestor (ca, "figure"), "__graphics_toolkit__"), "gnuplot"))
197 ## FIXME: gnuplot applies the aspect ratio activepostionproperty. 197 ## FIXME: gnuplot applies the aspect ratio activepostionproperty.
198 set (ca, "activepositionproperty", "position"); 198 set (ca, "activepositionproperty", "position");
199 ## The following line is a trick used to trigger the recalculation of 199 ## The following line is a trick used to trigger the recalculation of
200 ## aspect related magnitudes even if the aspect ratio is the same 200 ## aspect related magnitudes even if the aspect ratio is the same
201 ## (useful with the x11 gnuplot terminal after a window resize) 201 ## (useful with the x11 gnuplot terminal after a window resize)