annotate toolboxes/bioakustik_tools/visualisation/datarawplot.m @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
rev   line source
wolffd@0 1 function [h,out] = datarawplot(wavin, varargin)
wolffd@0 2 %[h,out] =datarawplot(data,'minx',-1, 'maxx',-1,'color','k','against',-1);
wolffd@0 3
wolffd@0 4
wolffd@0 5 [miny,maxy,minx,maxx,color,against,unused]=process_options(varargin,...
wolffd@0 6 'miny',-1,'maxy',-1,'minx',-1,'maxx',-1,'color','k','against',-1);
wolffd@0 7 out= wavin;
wolffd@0 8
wolffd@0 9
wolffd@0 10 m=min(wavin);
wolffd@0 11 ma=max(wavin);
wolffd@0 12 add=(ma-m)*0.1;
wolffd@0 13 if miny ==-1
wolffd@0 14 miny=m-add;
wolffd@0 15 end
wolffd@0 16 if maxy==-1
wolffd@0 17 maxy=ma+add;
wolffd@0 18 end
wolffd@0 19
wolffd@0 20 wavlens=length(wavin);
wolffd@0 21
wolffd@0 22 if against==-1
wolffd@0 23 h=plot(out,color);
wolffd@0 24 else
wolffd@0 25 h=plot(against,out,color);
wolffd@0 26 end
wolffd@0 27
wolffd@0 28 if minx ==-1
wolffd@0 29 minx=0;
wolffd@0 30 if against ~=-1
wolffd@0 31 minx=min(against);
wolffd@0 32 end
wolffd@0 33 end
wolffd@0 34 if maxx==-1
wolffd@0 35 maxx=wavlens;
wolffd@0 36 if against ~=-1
wolffd@0 37 maxx=max(against);
wolffd@0 38 end
wolffd@0 39 end
wolffd@0 40 axis([minx maxx miny maxy]);
wolffd@0 41 set(gca,'FontSize',8);
wolffd@0 42 h=get(0,'CurrentFigure');
wolffd@0 43 axis xy;
wolffd@0 44 xlabel('Time[samples]','FontSize',8)
wolffd@0 45 %ylabel('Amplitude','FontSize',8)