Re: fixing the label range

From: Karin Meier-Fleischer <meier-fleischer_at_nyahnyahspammersnyahnyah>
Date: Tue Jun 24 2014 - 13:50:37 MDT

Hi Sun,

you can use the following resource settings to fix the contour values:

  res@cnLevelSelectionMode = "ManualLevels" ;-- set manual =
contouring levels on
  res@cnLevelSpacingF = 0.1 ;-- contouring =
interval
  res@cnMinLevelValF = 0.0 ;-- contouring =
minimum
  res@cnMaxLevelValF = 3.5 ;-- contouring =
maximum

Bye,
Karin

Am 24.06.2014 um 21:42 schrieb Sunmin Park <mireiyue@gmail.com>:

> Dear, NCL users
>
> I am a new user of ncl. I want to fix the range of label numbers (fix =
minimum and maximum values) in each plot. Each plot has different range =
of data for example, the plot for 2007 has the range between 0-2.8 and =
the plot for 2008 has between 0-3.5. I searched information but I =
couldn’t find it. How can I fix the numbers?
>
> Thank you for any help.
> Sun
>
>
> ;************************************************
> ; resources
> ;************************************************
> wks = gsn_open_wks("ps","calipso(0-1km)"+year+month(ii)) =
; open a ps file
> gsn_define_colormap(wks,"gui_default") ; choose colormap
>
> res = True ; plot mods desired
> res@cnFillOn = True ; turn on color
> res@gsnSpreadColors = True ; use full color map
> res@cnLinesOn = False ; no contour lines
> res@cnLineLabelsOn = False ; no line labels
>
> res@mpMaxLatF = 85 ; choose map range
> res@mpMinLatF = -85
>
> res@gsnDraw = False ; don't draw yet
> res@gsnFrame = False ; don't advance frame =
yet
>
> res@gsnAddCyclic = False
>
> res@cnLevelSelectionMode = "AutomaticLevels" ; AutomaticLevels
> ;res@cnMinLevelValF = 4 ; min level
> ;res@cnMaxLevelValF = 32 ; max level
> ;res@cnLevelSpacingF = 2 ; interval
>
> res@tmXBLabelFontHeightF = 0.014 ; adjust some font =
heights
> res@tmYLLabelFontHeightF = 0.014
> res@tiMainFontHeightF = 0.022
> res@txFontHeightF = 0.017
> res@lbLabelBarOn = False ; turn off label bar
> ;************************************************
> ; create plots
> ;************************************************
> plot = new(1,graphic)
> res@tiMainString = "CALIPSO(0-1km)"+year+"-"+month(ii)+""
> plot(0) = gsn_csm_contour_map_ce(wks,data3avg,res) ; create the =
plot
>
> ;printVarSummary(newsst)
>
> ; res@tiMainString = "Grid after linint2"
> ; plot(1) = gsn_csm_contour_map_ce(wks,newsst,res) ; create the =
plot
> ;************************************************
> ; create panel
> ;************************************************
> pres = True
> pres@gsnPanelLabelBar = True ; common label bar
> gsn_panel(wks,plot,(/1,1/),pres)
>
> <calipso(0-1km)200701.ps><calipso(0-1km)200801.ps>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________________________________
Dipl. Geophys. Karin Meier-Fleischer
Application Support, Visualization

Deutsches Klimarechenzentrum GmbH E-Mail:
meier-fleischer@dkrz.de

Bundesstrasse 45a Internet: http://www.dkrz.de/
20146 Hamburg Phone: +49 (0)40 460094 126
Germany Fax: +49 (0)40 460094 270

Geschäftsführer: Prof. Dr. Thomas Ludwig
Sitz der Gesellschaft: Hamburg
Amtsgericht Hamburg HRB 39784





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


Received on Tue Jun 24 07:51:13 2014

This archive was generated by hypermail 2.1.8 : Wed Jul 23 2014 - 15:33:46 MDT