if (.not.exist(fields)) return
if (fields%n.eq.0) return
!
clear
define integer nf
let nf abs(fields%n)
define real xoff[nf] yoff[nf] inum[nf] semi
let xoff fields%offsets[1,]
let yoff fields%offsets[2,]
let inum[i] i
let semi fields%primary/2
LIM /VAR xoff yoff
limi user_xmax+semi user_xmin-semi user_ymin-semi user_ymax+semi
set box match
box /unit sec
ellipse semi  /user xoff yoff
!
if (exist(fields%n_select)) then
  ! Highligh in Red the selected fields
  pen 1 /we 2
  define integer i
  for j 1 to fields%n_select
    let i fields%selected[j]
    ellipse fields%primary/2 /user 'fields%offsets[1,i]' 'fields%offsets[2,i]'
  next
  pen 0
  ellipse fields%primary/16 /user xoff yoff /fill 7 ! Fill with Background
  pen /we 3
  draw text xoff yoff inum 5 /user
  pen 1 /we 4
  for j 1 to fields%n_select
    let i fields%selected[j]
    draw text 'fields%offsets[1,i]' 'fields%offsets[2,i]' 'i' 5 /user
  next
  pen 0 /we 3
  delete /var i
else
  !
  ! Overlay the field numbers at center
  ellipse fields%primary/16 /user xoff yoff /fill 7 
  pen /we 3
  draw text xoff yoff inum 5 /user
endif
! for i 1 to fields%n
!  ellipse fields%primary /user 'fields%offsets[1,i]' 'fields%offsets[2,i]'
!next
label "R.A. Offset (`)" /X
label "Dec. Offset (`)" /Y
pen /we 1
!
