Viewing contents of file '../idllib/deutsch/local/netplot.pro'
pro netplot,netfile
;+
; NAME:
;   NETPLOT
; PURPOSE:
;   This program plots up some data from the output of a network throughput
;   checking script.
; CALLING SEQEUNCE:
;   netplot,netfile
;-

  if (n_params(0) ne 1) then begin
    print,'Call> netplot,statistics_file'
    print,"e.g.> setps,/land"
    print,"e.g.> netplot,'netstats.950423'"
    print,"e.g.> psclose,auto='apache'"
    return
    endif

  openr,1,netfile
  lin=''
  datstr='Date Unknown'
  comment=''

  while (strmid(lin,0,1) ne '-') do begin
    readf,1,lin
    if (strupcase(strmid(lin,0,5)) eq 'DATE=') then datstr=strmid(lin,5,99)
    if (strupcase(strmid(lin,0,8)) eq 'COMMENT=') then comment=strmid(lin,8,99)
    endwhile

  tmp=[0.0,0.0]
  stats=fltarr(2,1000)
  i=0

  on_ioerror,CONT1

  while not EOF(1) do begin
    readf,1,tmp
    if (tmp(0) ne 0) then begin
      stats(*,i)=tmp
      i=i+1
      endif
    endwhile

CONT1:
  stats=stats(*,0:i-1)
  close,1

  if (!d.name eq 'PS') then !p.font=0 else !p.font=-1

  plot,stats(0,*),stats(1,*),xtitle='Seattle Time',ytitle='kbytes/sec',$
    psym=-4,title='Transfer speed from APO - '+datstr

  xyouts,min(stats(0,*))+.5,5,/data,comment,charsize=1.2



  return

end