samer@0: % vplotter - Arrow for doing variable length plots. samer@0: % samer@0: % vplotter :: options { samer@0: % ylim :: [[_]->nonneg] / [] ~'passed to ylim if not empty'; samer@0: % xlim :: [[_]->nonneg] / [] ~'passed to xlim if not empty'; samer@0: % xlabel :: [[_]->nonneg] / [] ~'passed to xlabel if not empty'; samer@0: % ylabel :: [[_]->nonneg] / [] ~'passed to ylabel if not empty'; samer@0: % plotfn :: plotfn / @plot ~'function to create image'; samer@0: % args :: {[_]} / {} ~'extra arguments for plotfn' samer@0: % } -> arrow({[[N,M]]}, {}, empty) ~'arrow from 2D arrays'. samer@0: % samer@0: % vplotter is an arrow which displays each input array as line plots samer@0: % using plot by default. The essential thing about plotter is that samer@0: % the graphics must be updated by setting the 'YData' property of samer@0: % the handle graphics object returned by the plotting function. samer@0: samer@0: function o=vplotter(varargin) samer@37: s.opts=options('ylim',[],'xlim',[],'plotfn',@plot,'args',{},varargin{:}); samer@0: o=class(s,'vplotter',agraph(1,s.opts)); samer@0: end samer@0: