Home > matutils > skyplot.m

skyplot

PURPOSE ^

skyplot()

SYNOPSIS ^

function skyplot(option)

DESCRIPTION ^

 skyplot()

 Set image display astronomy style

 Optional cell array of string option arguments
 defaults to cross hair on
 Available options:
 xhair - green cross hairs are overplotted at zero
 sym - color axis is forced symettric about zero

 e.g.: skyplot({'xhair','sym'})

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function skyplot(option)
0002 % skyplot()
0003 %
0004 % Set image display astronomy style
0005 %
0006 % Optional cell array of string option arguments
0007 % defaults to cross hair on
0008 % Available options:
0009 % xhair - green cross hairs are overplotted at zero
0010 % sym - color axis is forced symettric about zero
0011 %
0012 % e.g.: skyplot({'xhair','sym'})
0013 
0014 if(~exist('option'))
0015   option{1}='xhair';
0016 end
0017 
0018 axis xy; axis equal; axis tight; set(gca,'XDir','reverse');
0019 
0020 if(any(strcmp(option,'xhair')))
0021   hold on
0022   x=xlim; y=ylim;
0023   line([0,0],y,'Color','g','LineStyle',':');
0024   line(x,[0,0],'Color','g','LineStyle',':');
0025   hold off
0026 end
0027 
0028 if(any(strcmp(option,'sym')))
0029   x=max(abs(caxis));
0030   caxis([-x,x]);
0031 end

Generated on Sun 14-Jun-2015 17:12:45 by m2html © 2005