annotate arrows/@vplotter/vplotter.m @ 61:eff6bddf82e3 tip

Finally implemented perceptual brightness thing.
author samer
date Sun, 11 Oct 2015 10:20:42 +0100
parents beb8a3f4a345
children
rev   line source
samer@0 1 % vplotter - Arrow for doing variable length plots.
samer@0 2 %
samer@0 3 % vplotter :: options {
samer@0 4 % ylim :: [[_]->nonneg] / [] ~'passed to ylim if not empty';
samer@0 5 % xlim :: [[_]->nonneg] / [] ~'passed to xlim if not empty';
samer@0 6 % xlabel :: [[_]->nonneg] / [] ~'passed to xlabel if not empty';
samer@0 7 % ylabel :: [[_]->nonneg] / [] ~'passed to ylabel if not empty';
samer@0 8 % plotfn :: plotfn / @plot ~'function to create image';
samer@0 9 % args :: {[_]} / {} ~'extra arguments for plotfn'
samer@0 10 % } -> arrow({[[N,M]]}, {}, empty) ~'arrow from 2D arrays'.
samer@0 11 %
samer@0 12 % vplotter is an arrow which displays each input array as line plots
samer@0 13 % using plot by default. The essential thing about plotter is that
samer@0 14 % the graphics must be updated by setting the 'YData' property of
samer@0 15 % the handle graphics object returned by the plotting function.
samer@0 16
samer@0 17 function o=vplotter(varargin)
samer@37 18 s.opts=options('ylim',[],'xlim',[],'plotfn',@plot,'args',{},varargin{:});
samer@0 19 o=class(s,'vplotter',agraph(1,s.opts));
samer@0 20 end
samer@0 21