;------------------------------------------------------------ ;------------------------------------------------------------ ;------------------------------------------------------------ ;+ ; NAME:addaxe ; ; PURPOSE:ajoute un axe qd on fait une section oblique ds pltz, pltt ; ou plt1d ; ; CATEGORY:autour de pltz, pltt et plt1d ; ; CALLING SEQUENCE:addaxe, type, posfenetre ; ; INPUTS:endpoints:coordonnees des extremites de ;a section ; type: un string de 2 characteres specifiant qule type de plot ; on fait. ; posfenetre: ler vecteur !p.posotion correspondant a ;a ; position du cadre de la partie dessin du plot. ; ; KEYWORD PARAMETERS: ; ; OUTPUTS: ; ; COMMON BLOCKS:common.pro ; ; SIDE EFFECTS: ; ; RESTRICTIONS: ; ; EXAMPLE: ; ; MODIFICATION HISTORY:Sebastien Masson (smasson@lodyc.jussieu.fr) ; ;- ;------------------------------------------------------------ ;------------------------------------------------------------ ;------------------------------------------------------------ PRO addaxe, endpoints, type, posfenetre, _EXTRA = ex @common ;--------------------------------------- IF strpos(type, 'x') NE -1 THEN BEGIN IF endpoints[1] EQ endpoints[3] THEN return IF key_onearth THEN BEGIN formeaxe0 = 'lonaxe' formeaxe1 = 'lataxe' titreaxe = 'latitude' ENDIF ELSE BEGIN formeaxe0 = '' formeaxe1 = '' titreaxe = 'j index' ENDELSE range = [endpoints[1], endpoints[3]] if endpoints[2] LT endpoints[0] THEN range = reverse(range) ENDIF ELSE BEGIN IF endpoints[0] EQ endpoints[2] THEN return IF key_onearth THEN BEGIN formeaxe0 = 'lataxe' formeaxe1 = 'lonaxe' titreaxe = 'longitude' ENDIF ELSE BEGIN formeaxe0 = '' formeaxe1 = '' titreaxe = 'i index' ENDELSE range = [endpoints[0], endpoints[2]] if endpoints[3] LT endpoints[1] THEN range = reverse(range) ENDELSE if type EQ 'yt' then BEGIN axis,yaxis=0,ytickformat=formeaxe0,color=0,ystyle = 1, _EXTRA = ex axis,yaxis=1,ytickformat=formeaxe1,color=0,ystyle = 1,ytitle=titreaxe, yrange = range, _EXTRA = ex ENDIF ELSE BEGIN axis,xaxis=0,xtickformat=formeaxe0,color=0,xstyle = 1,_EXTRA = ex axis,xaxis=1,xtickformat=formeaxe1,color=0,xstyle = 1,xtitle=titreaxe, xrange = range, _EXTRA = ex ENDELSE ;--------------------------------------- return end