comparison scripts/plot/axis.m @ 10226:2884758e265b

Replace dataaspectratio props with plotboxaspectratio props.
author Ben Abbott <bpabbott@mac.com>
date Fri, 29 Jan 2010 21:52:53 -0500
parents 7b74a7fd4761
children 568c7c041fac
comparison
equal deleted inserted replaced
10225:477d05b0a739 10226:2884758e265b
163 elseif (strcmpi (ax, "image")) 163 elseif (strcmpi (ax, "image"))
164 __axis__ (ca, "equal") 164 __axis__ (ca, "equal")
165 __do_tight_option__ (ca); 165 __do_tight_option__ (ca);
166 elseif (strcmpi (ax, "square")) 166 elseif (strcmpi (ax, "square"))
167 if (__gnuplot_has_feature__ ("screen_coordinates_for_{lrtb}margin")) 167 if (__gnuplot_has_feature__ ("screen_coordinates_for_{lrtb}margin"))
168 set (ca, "dataaspectratio", [1, 1, 1]); 168 set (ca, "plotboxaspectratio", [1, 1, 1]);
169 else 169 else
170 x = xlim; 170 x = xlim;
171 y = ylim; 171 y = ylim;
172 set (ca, "dataaspectratio", [(y(2)-y(1)), (x(2)-x(1)), 1]); 172 set (ca, "plotboxaspectratio", [(y(2)-y(1)), (x(2)-x(1)), 1]);
173 endif 173 endif
174 elseif (strcmp (ax, "equal")) 174 elseif (strcmp (ax, "equal"))
175 if (__gnuplot_has_feature__ ("screen_coordinates_for_{lrtb}margin")) 175 if (__gnuplot_has_feature__ ("screen_coordinates_for_{lrtb}margin"))
176 x = xlim; 176 x = xlim;
177 y = ylim; 177 y = ylim;
178 set (ca, "dataaspectratio", [(x(2)-x(1)), (y(2)-y(1)), 1]); 178 set (ca, "plotboxaspectratio", [(x(2)-x(1)), (y(2)-y(1)), 1]);
179 else 179 else
180 set (ca, "dataaspectratio", [1, 1, 1]); 180 set (ca, "plotboxaspectratio", [1, 1, 1]);
181 endif 181 endif
182 elseif (strcmpi (ax, "normal")) 182 elseif (strcmpi (ax, "normal"))
183 set (ca, "dataaspectratiomode", "auto"); 183 set (ca, "plotboxaspectratiomode", "auto");
184 184
185 ## axis limits 185 ## axis limits
186 elseif (len >= 4 && strcmpi (ax(1:4), "auto")) 186 elseif (len >= 4 && strcmpi (ax(1:4), "auto"))
187 if (len > 4) 187 if (len > 4)
188 if (any (ax == "x")) 188 if (any (ax == "x"))