Mercurial > octave-nkf
comparison libinterp/corefcn/graphics.cc @ 17081:86067af51d5e
Truly reset axes so that all properties are set to default.
* libinterp/corefcn/graphics.cc: Add missing defaults for some
properties when axis is reset.
* scripts/plot/cla.m: Redo docstring. Simplify code. Call __go_axes_init__ to
do resetting of axes. Add %!test block.
author | Rik <rik@octave.org> |
---|---|
date | Thu, 25 Jul 2013 11:24:03 -0700 |
parents | c358c6e7416b |
children | 786bcce466e9 |
comparison
equal
deleted
inserted
replaced
17080:58d3fba6df17 | 17081:86067af51d5e |
---|---|
4153 axes::properties::set_defaults (base_graphics_object& obj, | 4153 axes::properties::set_defaults (base_graphics_object& obj, |
4154 const std::string& mode) | 4154 const std::string& mode) |
4155 { | 4155 { |
4156 box = "on"; | 4156 box = "on"; |
4157 colororder = default_colororder (); | 4157 colororder = default_colororder (); |
4158 dataaspectratio = Matrix (1, 3, 1.0); | 4158 // Note: dataspectratio will be set through update_aspectratios |
4159 dataaspectratiomode = "auto"; | 4159 dataaspectratiomode = "auto"; |
4160 layer = "bottom"; | 4160 layer = "bottom"; |
4161 | 4161 |
4162 Matrix tlim (1, 2, 0.0); | 4162 Matrix tlim (1, 2, 0.0); |
4163 tlim(1) = 1; | 4163 tlim(1) = 1; |
4167 | 4167 |
4168 Matrix cl (1, 2, 0); | 4168 Matrix cl (1, 2, 0); |
4169 cl(1) = 1; | 4169 cl(1) = 1; |
4170 clim = cl; | 4170 clim = cl; |
4171 | 4171 |
4172 alim = tlim; | |
4173 | |
4172 xlimmode = "auto"; | 4174 xlimmode = "auto"; |
4173 ylimmode = "auto"; | 4175 ylimmode = "auto"; |
4174 zlimmode = "auto"; | 4176 zlimmode = "auto"; |
4175 climmode = "auto"; | 4177 climmode = "auto"; |
4178 alimmode = "auto"; | |
4176 | 4179 |
4177 xgrid = "off"; | 4180 xgrid = "off"; |
4178 ygrid = "off"; | 4181 ygrid = "off"; |
4179 zgrid = "off"; | 4182 zgrid = "off"; |
4180 xminorgrid = "off"; | 4183 xminorgrid = "off"; |
4184 ytick = Matrix (); | 4187 ytick = Matrix (); |
4185 ztick = Matrix (); | 4188 ztick = Matrix (); |
4186 xtickmode = "auto"; | 4189 xtickmode = "auto"; |
4187 ytickmode = "auto"; | 4190 ytickmode = "auto"; |
4188 ztickmode = "auto"; | 4191 ztickmode = "auto"; |
4192 xminortick = "off"; | |
4193 yminortick = "off"; | |
4194 zminortick = "off"; | |
4189 xticklabel = ""; | 4195 xticklabel = ""; |
4190 yticklabel = ""; | 4196 yticklabel = ""; |
4191 zticklabel = ""; | 4197 zticklabel = ""; |
4192 xticklabelmode = "auto"; | 4198 xticklabelmode = "auto"; |
4193 yticklabelmode = "auto"; | 4199 yticklabelmode = "auto"; |
4194 zticklabelmode = "auto"; | 4200 zticklabelmode = "auto"; |
4201 | |
4202 interpreter = "none"; | |
4203 | |
4195 color = color_values ("white"); | 4204 color = color_values ("white"); |
4196 xcolor = color_values ("black"); | 4205 xcolor = color_values ("black"); |
4197 ycolor = color_values ("black"); | 4206 ycolor = color_values ("black"); |
4198 zcolor = color_values ("black"); | 4207 zcolor = color_values ("black"); |
4199 xscale = "linear"; | 4208 xscale = "linear"; |
4203 ydir = "normal"; | 4212 ydir = "normal"; |
4204 zdir = "normal"; | 4213 zdir = "normal"; |
4205 yaxislocation = "left"; | 4214 yaxislocation = "left"; |
4206 xaxislocation = "bottom"; | 4215 xaxislocation = "bottom"; |
4207 | 4216 |
4208 // Note: camera properties will be set through update_transform | 4217 Matrix tview (1, 2, 0.0); |
4218 tview(1) = 90; | |
4219 view = tview; | |
4220 | |
4221 __hold_all__ = "off"; | |
4222 nextplot = "replace"; | |
4223 | |
4224 ambientlightcolor = Matrix (1, 3, 1.0); | |
4225 | |
4226 // Note: camera properties (not mode) will be set in update_transform | |
4209 camerapositionmode = "auto"; | 4227 camerapositionmode = "auto"; |
4210 cameratargetmode = "auto"; | 4228 cameratargetmode = "auto"; |
4211 cameraupvectormode = "auto"; | 4229 cameraupvectormode = "auto"; |
4212 cameraviewanglemode = "auto"; | 4230 cameraviewanglemode = "auto"; |
4213 plotboxaspectratio = Matrix (1, 3, 1.0); | 4231 |
4214 drawmode = "normal"; | 4232 drawmode = "normal"; |
4233 | |
4234 fontangle = "normal"; | |
4235 fontname = OCTAVE_DEFAULT_FONTNAME; | |
4236 fontsize = 10; | |
4237 fontunits = "points"; | |
4238 fontweight = "normal"; | |
4239 | |
4215 gridlinestyle = ":"; | 4240 gridlinestyle = ":"; |
4216 linestyleorder = "-"; | 4241 linestyleorder = "-"; |
4217 linewidth = 0.5; | 4242 linewidth = 0.5; |
4218 minorgridlinestyle = ":"; | 4243 minorgridlinestyle = ":"; |
4219 // Note: plotboxaspectratio will be set through update_aspectratiors | 4244 |
4245 // Note: plotboxaspectratio will be set through update_aspectratios | |
4220 plotboxaspectratiomode = "auto"; | 4246 plotboxaspectratiomode = "auto"; |
4221 projection = "orthographic"; | 4247 projection = "orthographic"; |
4248 | |
4222 tickdir = "in"; | 4249 tickdir = "in"; |
4223 tickdirmode = "auto"; | 4250 tickdirmode = "auto"; |
4224 ticklength = default_axes_ticklength (); | 4251 ticklength = default_axes_ticklength (); |
4252 | |
4225 tightinset = Matrix (1, 4, 0.0); | 4253 tightinset = Matrix (1, 4, 0.0); |
4226 | 4254 |
4227 sx = "linear"; | 4255 sx = "linear"; |
4228 sy = "linear"; | 4256 sy = "linear"; |
4229 sz = "linear"; | 4257 sz = "linear"; |
4230 | 4258 |
4231 Matrix tview (1, 2, 0.0); | |
4232 tview(1) = 90; | |
4233 view = tview; | |
4234 | |
4235 visible = "on"; | 4259 visible = "on"; |
4236 nextplot = "replace"; | 4260 |
4237 | 4261 // Replace preserves Position and Units properties |
4238 if (mode != "replace") | 4262 if (mode != "replace") |
4239 { | 4263 { |
4240 fontangle = "normal"; | |
4241 fontname = OCTAVE_DEFAULT_FONTNAME; | |
4242 fontsize = 10; | |
4243 fontunits = "points"; | |
4244 fontweight = "normal"; | |
4245 | |
4246 outerposition = default_axes_outerposition (); | 4264 outerposition = default_axes_outerposition (); |
4247 position = default_axes_position (); | 4265 position = default_axes_position (); |
4248 activepositionproperty = "outerposition"; | 4266 activepositionproperty = "outerposition"; |
4249 } | 4267 } |
4250 | 4268 |