Viewing contents of file '../idllib/astron/contrib/varosi/code/allpro/contour_axes.pro'
;+
; NAME:
; contour_axes
; PURPOSE:
; Draw the axes for pro contour_mosaic
; CALLING:
; contour_axes, image_spec, xtit, xtickv, xtickLab, xticm, $
; ytit, ytickv, ytickLab, yticm
; INPUTS:
; image_spec = structure containing coordinate specifications.
; xtit, ytit = title strings.
; xtickv, ytickv = float arrays.
; xtickLab, ytickLab = string arrays of tick Labels.
; xticm, yticm = # of minor tick marks.
; KEYWORDS:
; TICKLEN = optional, size of tick marks
; (default is the IDL default, negative means outward)
; PROCEDURE:
; Call axis and xyouts, depending on coord.-spec. case.
; HISTORY:
; Written: Frank Varosi NASA/GSFC 1990.
; F.V. 1991, adjusted postion of absolute R.A. and DEC. labels.
;-
pro contour_axes, image_spec, xtit, xtickv, xtickLab, xticm, $
ytit, ytickv, ytickLab, yticm, TICKLEN=ticklen
if (NOT image_spec.options.show_axes) then return
maxt = N_elements( !X.tickv )
!X.style = 1
!X.ticks = ( N_elements( xtickv ) < maxt )-1
!X.tickv = xtickv(0:!X.ticks)
!X.minor = xticm
!Y.style = 1
!Y.ticks = ( N_elements( ytickv ) < maxt )-1
!Y.tickv = ytickv(0:!Y.ticks)
!Y.minor = yticm
if N_elements( ticklen ) EQ 1 then begin
P_ticklen = !P.ticklen
!P.ticklen = ticklen
endif
charsize = 0.9 * image_spec.options.Char_Size
P_charsize = !P.charsize
!P.charsize = charsize
if !DEBUG then stop
if strupcase( image_spec.coord_spec(0) ) EQ "ABSOLUTE" then begin
axis,/NORM, XAX=0, XTICKNAM=xtickLab(0:!X.ticks), XTIT=""
axis,/NORM, XAX=1, XTICKNAM=replicate( " ", !X.ticks+1 )
axis,/NORM, YAX=0, YTICKNAM=ytickLab(0:!Y.ticks), YTIT=""
axis,/NORM, YAX=1, YTICKNAM=replicate( " ", !Y.ticks+1 )
if (!D.name EQ "SUN") OR (!D.name EQ "X") then begin
yxt = !Y.window(0)/2
xyt = !X.window(0)/2
endif else begin
yxt = !Y.window(0) - 0.05
xyt = !X.window(0) - 0.08
endelse
xxt = !X.window(0) + ( !X.window(1) - !X.window(0) )/2
yyt = !Y.window(0) + ( !Y.window(1) - !Y.window(0) )/2
if (image_spec.options.show_titles) then begin
xyouts, xxt, yxt, xtit,/NORM,ALIGN=0.5,SIZE=charsize
xyouts, xyt, yyt, ytit,/NORM,ALIGN=0.5,SIZE=charsize, $
ORIENT=90
endif
endif else $
if max( strupcase( image_spec.coord_spec(1) ) EQ $
["ARCSECONDS","ARCMINUTES","DEGREES"] ) then begin
if (image_spec.options.show_titles) then begin
axis,/NORM,XAX=0,XTICKNAM=xtickLab(0:!X.ticks),XTIT=xtit
axis,/NORM,YAX=0,YTICKNAM=ytickLab(0:!Y.ticks),YTIT=ytit
endif else begin
axis,/NORM, XAX=0, XTICKNAM=xtickLab(0:!X.ticks)
axis,/NORM, YAX=0, YTICKNAM=ytickLab(0:!Y.ticks)
endelse
axis,/NORM, XAX=1, XTICKNAM=xtickLab(0:!X.ticks)
axis,/NORM, YAX=1, YTICKNAM=ytickLab(0:!Y.ticks)
endif else begin
if (image_spec.options.show_titles) then begin
axis,/NORM, XAX=0, XTIT=xtit
axis,/NORM, YAX=0, YTIT=ytit
endif else begin
axis,/NORM, XAX=0
axis,/NORM, YAX=0
endelse
axis,/NORM, XAX=1
axis,/NORM, YAX=1
endelse
!X.style = 0
!Y.style = 0
!X.ticks = 0
!Y.ticks = 0
!X.minor = 0
!Y.minor = 0
!P.charsize = P_charsize
if N_elements( P_ticklen ) EQ 1 then !P.ticklen = P_ticklen
end