comparison +anim/setup_1d_plot.m @ 113:a4e1608ae980

1d plot: Made it possible to have automatix axes.
author Jonatan Werpers <jonatan@werpers.com>
date Fri, 11 Dec 2015 09:31:46 +0100
parents f87003695677
children 484b48e95c83
comparison
equal deleted inserted replaced
112:b7f40a0c6476 113:a4e1608ae980
25 axis_handle = gca; 25 axis_handle = gca;
26 26
27 xlabel('x') 27 xlabel('x')
28 ylabel('y') 28 ylabel('y')
29 xlim([x(1) x(end)]); 29 xlim([x(1) x(end)]);
30 ylim(y_lim); 30
31 if ~isempty(y_lim)
32 ylim(y_lim);
33 end
31 34
32 function update(t,varargin) 35 function update(t,varargin)
33 if ishandle(figure_handle) && ishandle(axis_handle) 36 if ishandle(figure_handle) && ishandle(axis_handle)
34 for i = 1:length(yfun) 37 for i = 1:length(yfun)
35 set(plot_handles(i),'YData',yfun{i}(varargin{:})); 38 set(plot_handles(i),'YData',yfun{i}(varargin{:}));