Plotting a data set with a line.

Here I plot the bias signal computed from a CCD image using my command line image processing code for computing marginal distributions:

 

% clip_margdist.sh B.fits col  

Usage: clip_margdist.sh a.fits 10.0
arg1 - input FITS image
arg2 - column or row averaging (col,row) 

# A table file consisting of two files is made 

% cat margdist_col.table 
# col averaged marginal distribution 
# data
   1.0      405.6134       6.8315       0.2460      771.0
   2.0     -247.5314       3.7051       0.1334      771.0
   3.0     -179.9816      21.6218       0.7787      771.0
          ..... 
          ..... 
          ..... 
 769.0       23.5948       5.8612       0.2111      771.0
 770.0       38.7725      42.8013       1.5415      771.0
 771.0       52.8825       6.2277       0.2243      771.0

% cat margdist_col.parlab 
col   Column Number
mean  Mean signal value (adu) 
sig   Standard devistion (adu) 
me    Mean error about mean (adu) 
Npix  Number of pixels 

% ls  
margdist_col.parlab  margdist_col.table

%  xyplotter_auto margdist_col col mean 1 

------------------------------------------------------------
Enter plot title:Plot a point (P) or a line (L): 
Title = The Plot Title of my Choosing  
X: 1.00000 771.00000      Xtitle = Column Number  
Y: -247.53140 405.61340      Ytitle = Mean signal value (adu)  

To see the plot: 
pxy_SM_plot.py STYLE 1.00000 771.00000 -247.53140 405.61340 SHOW

View plot now? (Y/N) Y 

Plotting: XY.plot.1

Number of points = 771
------------------------------------------------------------

% ls  
Axes.1	figure_1.png  List.1  margdist_col.parlab  margdist_col.table 

 
Note that in the example above, I used the python show() module to create a hardcopy of the plot. This is the file named "figure_1.png". In the next example, we'll see how to modify the appearance of this plot and how to easily add other data sets.




Back