if pro%narg.eq.0 then
  SAY " "
  SAY "Usage:  @ p_show_position Name"
  SAY "       where "
  SAY "     Name is the name of the File containing the positions (with its"
  SAY "       extension). The adequate file is created by the find-flux-pos.ima"
  SAY "       script, associated to the SED tools in the SED widget".
  return error
endif
!
if .not.file("&1") then
  message E SED "File &1 does not exist"
  let mapping_error yes
  return base
endif
!
greg1\pencil 0 /WE 2
gtvl\clear
set box 6 22 3 19
!
define logical color
let color pro%narg.gt.1
define integer icol
!
if (color) then
  greg1\column x 2 y 4 z 6 /file &1
  define double yy cc /like z
  define double cmax
  let cc z
  compute cmax max cc
  define char*16 ana /like z
  define integer n
  !
  greg1\colu x 2 y 4 z 3
  accept * * * * * * ana /col &1
else
  greg1\colu x 2 y 4 z 3 /file &1
endif
!
limits 
box
!
!! limits sec -sec -sec sec
!
for nloop 1 2
  if (color) then
    for i 0 to cmax
      let icol = mod(i,8)
      if icol.eq.7
        pencil /colour  GREY
      else
        GREG1\PENCIL /COLOUR mod(i,8)
      endif
      SIC\LET yy y
      SIC\LET yy -10 /WHERE cc.ne.i
      if (nloop.eq.2) then
        error y x yy z
      else
        points x yy
        error x x yy z
      endif
    SIC\NEXT
    pen /col 0
    !
  else
    if (nloop.eq.2) then
      error Y x y z
    else
      points x y
      error x x y z
    endif
    pen /col 0
  endif
  !
  column x 2 y 4 z 5
next
!
if (color) then
  create directory ident
  change directory ident
  define char*16 bna['cmax+1']
  !
  for i 1 to nxy
    let n cc[i]+1
    let bna[n] 'ana[i]'
  next
  delete /var yy cc
  let n 0
  for i 0 to cmax
    let icol mod(i,8)
    if icol.eq.7
      pencil /colour  GREY
    else
      GREG1\PENCIL /COLOUR mod(i,8)
    endif
    let n i+1
    draw text 1 -n 'bna[n]' /char 9
  next
  change directory ..
  !
  pen /col 0
endif
!
pen /weigh 2
greg1\box
greg1\label "R.A. Offset (`)" /X
greg1\label "Dec. Offset (`)" /Y
!
greg1\pencil 0 /WEIGHT 1
