comparison scripts/plot/appearance/axis.m @ 28240:2fb684dc2ec2

axis.m: Implement "fill" option for Matlab compatibility. * axis.m: Document that "fill" is a synonym for "normal". Place "vis3d" option in documentation table for modes which affect aspect ratio. Add strcmpi (opt, "fill") to decode opt and executed the same behavior as "normal".
author Rik <rik@octave.org>
date Fri, 24 Apr 2020 13:16:09 -0700
parents 50d83252f867
children 0de38a6ef693
comparison
equal deleted inserted replaced
28239:d37b1dd3acc8 28240:2fb684dc2ec2
52 ## arguments may be used to specify various axis properties. 52 ## arguments may be used to specify various axis properties.
53 ## 53 ##
54 ## The following options control the aspect ratio of the axes. 54 ## The following options control the aspect ratio of the axes.
55 ## 55 ##
56 ## @table @asis 56 ## @table @asis
57 ## @item @qcode{"equal"}
58 ## Force x-axis unit distance to equal y-axis (and z-axis) unit distance.
59 ##
57 ## @item @qcode{"square"} 60 ## @item @qcode{"square"}
58 ## Force a square axis aspect ratio. 61 ## Force a square axis aspect ratio.
59 ## 62 ##
60 ## @item @qcode{"equal"} 63 ## @item @nospell{@qcode{"vis3d"}}
61 ## Force x-axis unit distance to equal y-axis (and z-axis) unit distance. 64 ## Set aspect ratio modes (@qcode{"DataAspectRatio"},
62 ## 65 ## @qcode{"PlotBoxAspectRatio"}) to @qcode{"manual"} for rotation without
63 ## @item @qcode{"normal"} 66 ## stretching.
64 ## Restore default aspect ratio. 67 ##
68 ## @item @qcode{"normal"}
69 ## @itemx @qcode{"fill"}
70 ## Restore default automatically computed aspect ratios.
65 ## @end table 71 ## @end table
66 ## 72 ##
67 ## @noindent 73 ## @noindent
68 ## The following options control the way axis limits are interpreted. 74 ## The following options control the way axis limits are interpreted.
69 ## 75 ##
81 ## Fix axes to the limits of the data. 87 ## Fix axes to the limits of the data.
82 ## 88 ##
83 ## @item @qcode{"image"} 89 ## @item @qcode{"image"}
84 ## Equivalent to @qcode{"tight"} and @qcode{"equal"}. 90 ## Equivalent to @qcode{"tight"} and @qcode{"equal"}.
85 ## 91 ##
86 ## @item @nospell{@qcode{"vis3d"}}
87 ## Set aspect ratio modes to @qcode{"manual"} for rotation without stretching.
88 ## @end table 92 ## @end table
89 ## 93 ##
90 ## @noindent 94 ## @noindent
91 ## The following options affect the appearance of tick marks. 95 ## The following options affect the appearance of tick marks.
92 ## 96 ##
248 endif 252 endif
249 elseif (strcmpi (opt, "vis3d")) 253 elseif (strcmpi (opt, "vis3d"))
250 ## Fix aspect ratio modes for rotation without stretching. 254 ## Fix aspect ratio modes for rotation without stretching.
251 set (ca, "dataaspectratiomode", "manual", 255 set (ca, "dataaspectratiomode", "manual",
252 "plotboxaspectratiomode", "manual"); 256 "plotboxaspectratiomode", "manual");
253 elseif (strcmpi (opt, "normal")) 257 elseif (strcmpi (opt, "normal") || strcmpi (opt, "fill"))
254 ## Set plotboxaspectratio to something obtuse so that switching 258 ## Set plotboxaspectratio to something obtuse so that switching
255 ## back to "auto" will force a re-calculation. 259 ## back to "auto" will force a re-calculation.
256 set (ca, "plotboxaspectratio", [3 2 1]); 260 set (ca, "plotboxaspectratio", [3 2 1]);
257 set (ca, "plotboxaspectratiomode", "auto", 261 set (ca, "plotboxaspectratiomode", "auto",
258 "dataaspectratiomode", "auto"); 262 "dataaspectratiomode", "auto");