Ignore:
Timestamp:
03/17/10 11:30:06 (14 years ago)
Author:
smasson
Message:

improve ytitle gestion in xz and yz plots

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SRC/ToBeReviewed/PLOTS/DESSINE/pltz.pro

    r388 r428  
    479479; to write the ytitle... 
    480480;------------------------------------------------------------ 
    481   if !d.name EQ 'PS' then $ 
    482     xs = (max(page_size, min = mi)*(1-key_portrait) + mi*key_portrait)*!d.x_px_cm $ 
    483   ELSE xs = !d.x_size 
    484   if n_elements(ytitle) NE 0 then !y.title = ytitle 
    485   charsize = chkstru(ex, 'ycharsize', /extract) 
    486   if charsize EQ -1 then charsize = !p.charsize 
    487   IF chkstru(ex, 'charsize') THEN ex.charsize = charsize 
    488   if chkstru(ex, 'ytitle', /extract) NE '' then $ 
    489     decalage = string(format = '(e10.3)', profmax) 
    490   decalage = float(strmid(decalage, strpos(decalage, 'e')+1)) 
    491   posy = posfenetre[1]+1.*htotal/2 
    492   posx = posfenetre[0]-(decalage+3)*!d.x_ch_size*charsize/xs 
    493   xyouts, posx, posy, !y.title, /normal, orientation = 90, color = 0, ALIGNMENT = .5, charsize = charsize, _extra = ex 
    494  
     481  IF n_elements(ex) NE 0 THEN BEGIN 
     482    if (where(tag_names(ex) EQ 'YTICKS'))[0] NE -1 then ex.YTICKS = 1 
     483    if (where(tag_names(ex) EQ 'YTICKNAME'))[0] NE -1 then ex.YTICKNAME = [' ', ' '] 
     484    if (where(tag_names(ex) EQ 'YTITLE'))[0] NE -1 then ex.YTITLE = ytitle+'!C ' 
     485  ENDIF 
     486  !y.range =  [profmax, profmin]   ; We get back in physic coordinates! 
     487  plot, [0], [0], /nodata, /noerase, xstyle = 5, ystyle = 9 $ 
     488        , title = '', subtitle = '', xtitle = '', position = posfenetre $ 
     489        , yticks = 1, ytickname = [' ', ' '], ytitle = !y.title+'!C ', ythick = 0.01, _extra = ex 
    495490;------------------------------------------------------------ 
    496491; colorbar 
Note: See TracChangeset for help on using the changeset viewer.