Re: gsn_csm_pres_hgt

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Mon Nov 21 2011 - 10:52:27 MST

Thanks for providing your script and data.

To turn off the height label, set:

res@gsnPresHgtHeightLabelOn = False

The problem with your X tickmarks is that you also need to set this resource:

      res@tmXBMode = "Explicit"

On your X axis, you have non-monotonic values. The start at 6,5,4,...1, 0 and then jump to 23,22,21,20, and so on. I assume these are supposed to be hourly values

You should fix these values so they are based not just on hours, but days too. I can't tell what your dates are supposed to be, but here's one way you can "fix" them, by turning these hours into fractions, and adding a day countdown:

;---Rough estimate of the number of days.
  ndays = num(SO2&TIME.eq.0)

  ntim = dimsizes(SO2&TIME)
;---"Fix" SO2&TIME
  do i=0,ntim-1
    if(SO2&TIME(i).eq.23) then
      ndays = ndays-1
    end if
    SO2&TIME(i) = ndays + SO2&TIME(i)/24.
  end do

You would then need to set tmXBValues with:

   res@tmXBValues = SO2&TIME(5::10)

Although I think you might want to start at index 6 instead of 5?


On Nov 20, 2011, at 10:18 AM, nlcheng wrote:

> I have upload my script and can run it in your directory using ncl VERTICAL1.ncl
> I have two questions ,why my setting
> res@tmXBValues = ispan(5,nrows+1,10)
> res@tmXBLabels = (/"04/11/05","04/10/19","04/10/09","04/09/23","04/09/13","04/09/03"/)
> did not work????
> how can i remove the <截图1.png> the right acxis title or how can i work out like this <截图2.png>
> below is my scipt put out :
> <截图3.png>
> and the errors:
> <截图4.png>
> thank you very much for your reply.hope for your help!!
> <><VERTICAL1.ncl>_______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:

ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
Received on Mon Nov 21 10:52:38 2011

This archive was generated by hypermail 2.1.8 : Tue Nov 22 2011 - 14:17:52 MST