!
! @ p_show_polar Step [Scale1 Scale2]
! Support for MAP_POLAR command in "Show" mode (no /COMPUTE option)
!
define real o_scale[2] step
let step &1
let o_scale scale
if (pro%narg.eq.3) then
  let scale &2 &3
endif
define log doc
let doc do_contour
let do_contour NO
!
gtvl\clear directory
let PopupName MAP
let header_name_type 'POLAR_HEAD'
!!let header_name_type "(&1)" /Upper
symbol HAS_CHANGED NO
let verify sic%verify /new log
sic verify off
@ p_lmv_map POLAR_BACK  0 ! Effective drawing (also set Scaling and Levels)
symbol drawn POLAR_BACK% 
if verify sic verify on
!
let scale o_scale
let do_contour 'doc'
!
define double leng pa /like polar_vector[1]
define double scale mpol
define integer nd
!
! The maximum length should be about STEP pixels, allow actually STEP*Sqrt(1.5)
!   but it has to be in Paper units ...
let scale = (box_xmax-box_xmin)/abs(user_xmax-user_xmin)*step*abs(polar_back%convert[3,1])*sqrt(1.5)
compute mpol max polar_vector[3]
let leng = scale*polar_vector[3]/mpol
let pa = polar_vector[4]*180/pi+90   ! North toward East convention, while ARROW is trigonometric
!
let scale marker_size
let nd marker_sides
set mark 0 * 0 *
greg\arrow polar_vector[1] polar_vector[2] leng pa
set mark nd * scale
!
