comparison scripts/plot/fplot.m @ 8145:7ef5b1b4e029

fplot.m: call axis after plot
author John W. Eaton <jwe@octave.org>
date Wed, 24 Sep 2008 16:48:29 -0400
parents 96f86c256ca0
children cadc73247d65 a08f22ff5ba1
comparison
equal deleted inserted replaced
8144:01fac748b680 8145:7ef5b1b4e029
96 else 96 else
97 x = linspace (limits(1), limits(2), n)'; 97 x = linspace (limits(1), limits(2), n)';
98 y = feval (fn, x); 98 y = feval (fn, x);
99 endif 99 endif
100 100
101 if (length (limits) > 2)
102 axis (limits);
103 endif
104
105 if (have_linespec) 101 if (have_linespec)
106 plot (x, y, linespec); 102 plot (x, y, linespec);
107 else 103 else
108 plot (x, y); 104 plot (x, y);
109 endif 105 endif
106
107 if (length (limits) > 2)
108 axis (limits);
109 endif
110
110 if (isvector(y)) 111 if (isvector(y))
111 legend (nam); 112 legend (nam);
112 else 113 else
113 for i=1:columns(y) 114 for i=1:columns(y)
114 nams{i} = sprintf ("%s(:,%i)", nam, i); 115 nams{i} = sprintf ("%s(:,%i)", nam, i);