function [h,out] = datarawplot(wavin, varargin)
%[h,out] =datarawplot(data,'minx',-1, 'maxx',-1,'color','k','against',-1);


[miny,maxy,minx,maxx,color,against,unused]=process_options(varargin,...
   'miny',-1,'maxy',-1,'minx',-1,'maxx',-1,'color','k','against',-1);
out= wavin;


m=min(wavin);
ma=max(wavin);
add=(ma-m)*0.1;
if miny ==-1
    miny=m-add;
end
if maxy==-1
    maxy=ma+add;
end
    
wavlens=length(wavin);

if against==-1
    h=plot(out,color);
else
    h=plot(against,out,color);
end

if minx ==-1
    minx=0;
    if against ~=-1
         minx=min(against);
    end
end
if maxx==-1
    maxx=wavlens;
    if against ~=-1
         maxx=max(against);
    end
end
axis([minx maxx miny maxy]);
set(gca,'FontSize',8);
h=get(0,'CurrentFigure');
axis xy;
xlabel('Time[samples]','FontSize',8)
%ylabel('Amplitude','FontSize',8)
