Update of /cvsroot/octaviz/octaviz/Scripts
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23597
Modified Files:
vtk_axis.m
Log Message:
working on axis function
Index: vtk_axis.m
===================================================================
RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_axis.m,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- vtk_axis.m 21 Apr 2005 17:04:23 -0000 1.3
+++ vtk_axis.m 23 Apr 2005 23:31:20 -0000 1.4
@@ -15,7 +15,7 @@
## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
## -*- texinfo -*-
-## @deftypefn {Function File} {} vtk_axis(@var{bool})
+## @deftypefn {Function File} {} vtk_axis([@var{options}])
## Right now, this can only be used to turn the axes on and off.
## Eventually this function should allow setting the scaling and limits of the axes.
## @end deftypefn
@@ -23,15 +23,27 @@
## Author: Dragan Tubic
-function vtk_axis(visibility)
-
+function vtk_axis(varargin)
+
f = vtk_figure(0);
- if ( visibility == 0 )
- f.axes_on = 0;
- else
- f.axes_on = 1;
- end
+ for i=1:nargin
+ arg = varargin{i};
+ if isstr(arg)
+ if ( strcmp(arg, "on") )
+ f.axes_on = 1;
+ elseif ( strcmp(arg, "off") )
+ f.axes_on = 0;
+ elseif ( strcmp(arg, "equal") || strcmp(arg, "normal") ) ## defaults in vtk
+ f.renderer.GetProps.GetLastProp.SetScale(1,1,1)
+ f.axes.UseRangesOff
+ elseif ( strcmp(arg, "square") )
+ disp("square option not implemented yet")
+ endif
+ else
+ disp("manual setting of axis bounds not implemented yet")
+ endif
+ endfor
vtk_update(f);
|