[2] | 1 | ;------------------------------------------------------------ |
---|
| 2 | ;------------------------------------------------------------ |
---|
| 3 | ;------------------------------------------------------------ |
---|
| 4 | ;+ |
---|
| 5 | ; NAME:addaxe |
---|
| 6 | ; |
---|
| 7 | ; PURPOSE:ajoute un axe qd on fait une section oblique ds pltz, pltt |
---|
| 8 | ; ou plt1d |
---|
| 9 | ; |
---|
| 10 | ; CATEGORY:autour de pltz, pltt et plt1d |
---|
| 11 | ; |
---|
| 12 | ; CALLING SEQUENCE:addaxe, type, posfenetre |
---|
| 13 | ; |
---|
| 14 | ; INPUTS:endpoints:coordonnees des extremites de ;a section |
---|
| 15 | ; type: un string de 2 characteres specifiant qule type de plot |
---|
| 16 | ; on fait. |
---|
| 17 | ; posfenetre: ler vecteur !p.posotion correspondant a ;a |
---|
| 18 | ; position du cadre de la partie dessin du plot. |
---|
| 19 | ; |
---|
| 20 | ; KEYWORD PARAMETERS: |
---|
| 21 | ; |
---|
| 22 | ; OUTPUTS: |
---|
| 23 | ; |
---|
| 24 | ; COMMON BLOCKS:common.pro |
---|
| 25 | ; |
---|
| 26 | ; SIDE EFFECTS: |
---|
| 27 | ; |
---|
| 28 | ; RESTRICTIONS: |
---|
| 29 | ; |
---|
| 30 | ; EXAMPLE: |
---|
| 31 | ; |
---|
| 32 | ; MODIFICATION HISTORY:Sebastien Masson (smasson@lodyc.jussieu.fr) |
---|
| 33 | ; |
---|
| 34 | ;- |
---|
| 35 | ;------------------------------------------------------------ |
---|
| 36 | ;------------------------------------------------------------ |
---|
| 37 | ;------------------------------------------------------------ |
---|
| 38 | PRO addaxe, endpoints, type, posfenetre, _EXTRA = ex |
---|
| 39 | @common |
---|
| 40 | ;--------------------------------------- |
---|
| 41 | IF strpos(type, 'x') NE -1 THEN BEGIN |
---|
| 42 | IF endpoints[1] EQ endpoints[3] THEN return |
---|
| 43 | formeaxe0 = 'lonaxe' |
---|
| 44 | formeaxe1 = 'lataxe' |
---|
| 45 | titreaxe = 'latitude' |
---|
| 46 | range = [endpoints[1], endpoints[3]] |
---|
| 47 | ENDIF ELSE BEGIN |
---|
| 48 | IF endpoints[0] EQ endpoints[2] THEN return |
---|
| 49 | formeaxe0 = 'lataxe' |
---|
| 50 | formeaxe1 = 'lonaxe' |
---|
| 51 | titreaxe = 'longitude' |
---|
| 52 | range = [endpoints[0], endpoints[2]] |
---|
| 53 | if endpoints[3] LT endpoints[1] THEN range = reverse(range) |
---|
| 54 | ENDELSE |
---|
| 55 | if type EQ 'yt' then BEGIN |
---|
| 56 | axis,yaxis=0,ytickformat=formeaxe0,color=0,ystyle = 1, _EXTRA = ex |
---|
| 57 | axis,yaxis=1,ytickformat=formeaxe1,color=0,ystyle = 1,ytitle=titreaxe, yrange = range, _EXTRA = ex |
---|
| 58 | ENDIF ELSE BEGIN |
---|
| 59 | axis,xaxis=0,xtickformat=formeaxe0,color=0,xstyle = 1,_EXTRA = ex |
---|
| 60 | axis,xaxis=1,xtickformat=formeaxe1,color=0,xstyle = 1,xtitle=titreaxe, xrange = range, _EXTRA = ex |
---|
| 61 | ENDELSE |
---|
| 62 | |
---|
| 63 | ;--------------------------------------- |
---|
| 64 | return |
---|
| 65 | end |
---|