\ cancel mode verify	
!++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++!
! mp_line.jnl --  Plot data using a particular map projection.  For working
!                  with map projection scripts in Ferret v4.50
!		    		
! Jonathan Callahan
! 5/97

! Description:  Plots data using a predefined map projection. 
!
! This script presumes that following are predefined a projection script
! run previous to this script:
!
!	x_page	field describing transformation from lat/lon to X page coordinates
!	x_page	field describing transformation from lat/lon to Y page coordinates
!	mp_mask  mask for orthographic map projections
!
! Usage:          arg1     arg2  arg3
!  go mp_line plot_command xpos  ypos
!
! arg 1 - plot command (eg. "SHADE/VS/OVER")
! arg 2 - X position in user units (world longitude)
! arg 3 - Y position in user units (world latitude)
!
! Example:
!	  go mp_line plot/vs/over my_x my_y
!

query/ignore $1%<Specify all arguments: plot_command xpos ypos%
query/ignore $2%<Specify all arguments: plot_command xpos ypos%
query/ignore $3%<Specify all arguments: plot_command xpos ypos%

! Save the region and grid

define region/default save

let/quiet mp_central_meridian = `mp_central_meridian`
let/quiet mp_standard_parallel = `mp_standard_parallel`


! Cancel the region because the I index info is used to restrict
! the points to be plotted as a line.

can region/x/y

! Check to make sure the xpos and ypos arrays are one dimensional

let/quiet mp_xpos = $2
let/quiet mp_ypos = $3
define symbol mp_shape_x `mp_xpos,RESULT=SHAPE`
define symbol mp_shape_y `mp_ypos,RESULT=SHAPE`
query/ignore ($mp_shape_x%|X|Y|Z|T|<error: x position array must be 1-dimensional%)
query/ignore ($mp_shape_y%|X|Y|Z|T|<error: y position array must be 1-dimensional%)
can variable mp_xpos
can variable mp_ypos


! Alter the map projection equations to use xpos and ypos

let/quiet mp_x = $2
let/quiet mp_y = $3

$1 x_page*mp_mask, y_page*mp_mask


! Restore the region and map projection equations

set region save

let/quiet mp_x = x[g=($mp_grid_variable)]
let/quiet mp_y = y[g=($mp_grid_variable)]

!++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++!
set mode/last verify
