Labelbar Problem !!

From: louis Vonder <appopson_at_nyahnyahspammersnyahnyah>
Date: Fri, 8 May 2009 10:17:48 +0000 (GMT)

I am wondering why my label does not appear on my figure !!

Here the script I am using, inspired from ncl page

I also attached the figure produced

Regards

;************************************************
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" 
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
;************************************************

begin
;************************************************
; read in netCDF files
;************************************************
  a = addfile("XXXU_vect_025_253K.nc", "r")
  b = addfile("XXXV_vect_025_253K.nc", "r")
  c = addfile("mat_ampli_025_253K.nc", "r")

  u = a->u                           
  v = b->v
  fc = c->FC
  lat = a->lat
  lon = a->lon

;************************************************
; create plot
;************************************************
  wks = gsn_open_wks("eps", "vector_ampli_025_253K")                   ; open a ps file
  gsn_define_colormap(wks, "BlAqGrYeOrRevi200")  ; choose color map

  res                         = True             ; plot mods desired
  res_at_gsnFrame                = False            ; so we can draw time stamp

 ;********************************************
 ;**************** MAP SETTINGS  **********
 ;********************************************
    res_at_mpDataBaseVersion           = "Ncarg4_1"       ; use finer database
    res_at_pmTickMarkDisplayMode       = "Always"         ; turn on tickmarks
    res_at_mpGeophysicalLineThicknessF = 2.5          ; thickness of outlines
    res_at_mpNationalLineThicknessF    = 2.5
    res_at_mpOutlineBoundarySets       = "National"   ; turn on country boundaries
    res_at_gsnAddCyclic                = False            ; regional data, don't add pt
        res_at_mpPerimOn             = True
    res_at_mpFillOn              = False              ; turn off map fill
 
        res_at_mpMinLonF            =  min(lon)               ; select a subregion
        res_at_mpMaxLonF            =  max(lon)
        res_at_mpMinLatF            =  min(lat)
        res_at_mpMaxLatF            =  max(lat)

 ;********************************************
 ;**************** CONTOURS SETTINGS  ********
 ;********************************************

  res_at_cnFillOn             = True               ; turn on color for contours
  res_at_cnLinesOn            = False              ; turn off contour lines
  res_at_cnLineLabelsOn       = False              ; turn off contour line labels
  res_at_gsnScalarContour     = True               ; contours desired
  res_at_gsnSpreadColors      = True               ; use full color map
  res_at_gsnSpreadColorStart  = 17                 ; start at color 17
  res_at_gsnSpreadColorEnd    = 200                ; end at color 200

   res_at_lbLabelBarOn                = True
   res_at_lbOrientation            = "vertical"     ; vertical label bar
  res_at_pmLabelBarOrthogonalPosF = 0.05          ; move label bar closer
  ; res_at_lbLabelStride            = 4
  res_at_cnLevelSelectionMode = "AutomaticLevels"     ; set manual contour levels

 ;********************************************
 ;**************** VECTOR SETTINGS  **********
 ;********************************************
  res_at_vcRefAnnoOrthogonalPosF = -1.0             ; move ref vector up
  res_at_vcRefMagnitudeF         = 50.0             ; define vector ref mag
  res_at_vcRefLengthF            = 0.045            ; define length of vec ref
  res_at_vcMinDistanceF          = 0.015
  res_at_gsnAddCyclic            = False

  ;;*********  LABELS
  res_at_gsnLeftString   = " "              ; add the gsn titles
  res_at_gsnCenterString = " "
  res_at_gsnRightString  = " "
  res_at_gsnStringFont = " "            ; set gsnLeft/Center/RightString font
                                          ; to helvetica-bold from default
  res_at_gsnLeftStringFontHeightF   = 0.00        ; instead of using txFontHeightF or gsnStringFontHeightF
  res_at_gsnCenterStringFontHeightF = 0.00            ; to set the gsnLeft/Center/RightString font heights,
  res_at_gsnRightStringFontHeightF  = 0.00        ; individually set each string's font height.

  res_at_vpXF            = 0.1        
  res_at_vpWidthF        = 0.9       
  res_at_vpYF            = 0.9
  res_at_vpHeightF       = 0.8

  res_at_tmXBLabelFontHeightF = 0.02
  res_at_tmBorderThicknessF   = 3.0

  plot = gsn_csm_vector_scalar_map_ce(wks, u, v, fc, res)

  frame (wks) 
end

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

vector_ampli_025_253K.jpg
Received on Fri May 08 2009 - 04:17:48 MDT

This archive was generated by hypermail 2.2.0 : Fri May 08 2009 - 10:05:07 MDT