; Creates p[ot of distribution of reference views
;
; SOURCE: plotview.spi 
;
; PURPOSE: Plots a summary of the number of particles for each 
;          projection view.  Summariezes all defocus groups.
;
; MASTER COPY: /net/bali/usr1/spider/docs/techs/recon/newprogs/
;
; I/O PARAMETERS AND FILES ARE SET HERE:
;
;  ------------ Input files ----------------------------------------

FR G
[howmany]how_many                     ; List of defocus groups

; --------------- Output files  -------------------------------------

FR G
[gnuplot_commands]plot_view           ; gnuplot command script

; -------------- END BATCH HEADER ---------------------------------- 


VM
\rm -f [gnuplot_commands].$DATEXT
 
VM 
echo #!/bin/sh > [gnuplot_commands].$DATEXT

VM 
echo ' 'set ylabel \"Particles\" >> [gnuplot_commands].$DATEXT
VM 
echo ' 'set xlabel \"View\" >> [gnuplot_commands].$DATEXT
VM 
echo ' 'set title \"Particles vs View\" >> [gnuplot_commands].$DATEXT
VM 
echo ' 'plot \'how_many.$DATEXT\' using 1:3 notitle  with boxes >> [gnuplot_commands].$DATEXT

VM                         
gnuplot -persist [gnuplot_commands].$DATEXT &

VM                                 
echo ' 'Histogram Plotted with: gnuplot script --------
VM                         
cat [gnuplot_commands].$DATEXT &
VM                                      
echo ' '-----------------------
VM                                      
echo ' '

EN D
 
;