PRO compass,az_string,barlength,fac,psres csz=0.75*fac nflag=isnumber(az_string,azimuth) IF nflag NE 0 THEN BEGIN ; if the camera azimuth is known, azrad=!DTOR*azimuth ; plot arrows showing the azimuth leftend=7*csz*!D.X_CH_SIZE maxlen=(leftend-scl(res=psres,1.5*csz*!D.X_CH_SIZE)) $ /scl(res=psres,(COS(azrad)+SIN(azrad))*csz*!D.Y_CH_SIZE) arlen=MIN([FIX(maxlen),5])*csz*!D.Y_CH_SIZE tailx=REPLICATE(scl(res=psres,0.5*csz*!D.X_CH_SIZE+SIN(azrad)*arlen),2) taily=REPLICATE(scl(res=psres,barlength),2) headx=[tailx(0)-scl(res=psres,arlen*SIN(azrad)), $ tailx(1)+scl(res=psres,arlen*COS(azrad))] heady=[scl(res=psres,barlength+arlen*COS(azrad)), $ scl(res=psres,barlength+arlen*SIN(azrad))] arrow,tailx,taily,headx,heady,/device,hsize=-0.2 XYOUTS,headx(0)+scl(res=psres,csz*!D.X_CH_SIZE) $ ,MIN([heady(0),scl(res=psres,!D.Y_SIZE-csz*!D.Y_CH_SIZE)]) $ ,'N' $ ,ALIGNMENT=0,/DEVICE,CHARSIZE=csz,CHARTHICK=csz XYOUTS,headx(1)+scl(res=psres,csz*!D.X_CH_SIZE) $ ,heady(1) $ ,'E' $ ,ALIGNMENT=0.5,/DEVICE,CHARSIZE=csz,CHARTHICK=csz ENDIF ELSE BEGIN ; otherwise show cardinal directions XYOUTS,scl(res=psres,3*csz*!D.X_CH_SIZE) $ ,scl(res=psres,!D.Y_SIZE-csz*!D.Y_CH_SIZE) $ ,'N' $ ,/DEVICE,ALIGNMENT=0.5,CHARSIZE=csz,CHARTHICK=csz XYOUTS,scl(res=psres,csz*!D.X_CH_SIZE) $ ,scl(res=psres,!D.Y_SIZE-2.5*csz*!D.Y_CH_SIZE) $ ,'W' $ ,/DEVICE,ALIGNMENT=0.5,CHARSIZE=csz,CHARTHICK=csz XYOUTS,scl(res=psres,5*csz*!D.X_CH_SIZE) $ ,scl(res=psres,!D.Y_SIZE-2.5*csz*!D.Y_CH_SIZE) $ ,'E' $ ,/DEVICE,ALIGNMENT=0.5,CHARSIZE=csz,CHARTHICK=csz XYOUTS,scl(res=psres,3*csz*!D.X_CH_SIZE) $ ,scl(res=psres,!D.Y_SIZE-4*csz*!D.Y_CH_SIZE) $ ,'S' $ ,/DEVICE,ALIGNMENT=0.5,CHARSIZE=csz,CHARTHICK=csz ENDELSE RETURN END