Re: X-axis error

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Mon May 16 2011 - 08:03:13 MDT

Dear Nee,

What do you mean that it cannot draw the correct one? Did you get a picture, but with the wrong values on the X axis? If you can include the image, that would help.

Also, given that the only difference between the two scripts is the "year" variable, it would help if you actually look at the values:

  print(year)

I noticed that you divided "year" by 100 twice:

> yyyymm = ut_calendar(eof_time,-2)/100
> year = yyyymm/100

Did you mean to do this?

--Mary

On May 14, 2011, at 11:38 AM, Tq wrote:

> Hi,
> I'm trying to draw a XYplot with the data of 174 months.
> When I use (line 142)
> year = ispan(1,174,1)
> do n=0,neof-1
> rts@gsnLeftString = "EOF "+(n+1)
> rts@gsnRightString = sprintf("%5.1f", eof@pcvar(n)) +"%"
> plot(n) = gsn_csm_xy (wks,year,eof_tsstd(n,:),rts)
> end do
> gsn_panel(wks,plot,(/neof,1/),rtsP)
> plot(n) = gsn_csm_xy (wks,year,eof_tsstd(n,:),rts)
> it can draw the correct picture.
>
> but when I use( line 138)
> eof_time = eof_tsstd&time
> yyyymm = ut_calendar(eof_time,-2)/100 &n bsp;
> year = yyyymm/100
> printVarSummary(year)
> do n=0,neof-1
> rts@gsnLeftString = "EOF "+(n+1)
> rts@gsnRightString = sprintf("%5.1f", eof@pcvar(n)) +"%"
> plot(n) = gsn_csm_xy (wks,year,eof_tsstd(n,:),rts)
> end do
> gsn_panel(wks,plot,(/neof,1/),rtsP)
> it cannot draw the correct one but there's no error message.
>
> PrintVarSummary(eof_tsstd):
> Variable: eof_tsstd
> Type: float
> Total Size: 696 bytes
> 174 values
> Dimensions and sizes: [evn | 1] x [time | 174]
> Coordinates:
> evn: [1..1]
> time: [17341704..17468112]
> Number Of Attributes: 5
> ts_mean : 3.105695
> matrix : covariance
> _FillValue : -9.96921e+36
> long_name : EOF: Amplitude: Wgt: Sea Level Pressure
> standardize_op_ncl : dim_standardize over dimension: time
>
> PrintVarSummary(year):
> Variable: year
> Type: integer
> Total Size: 696 bytes
> 174 values
> Number of Dimensions: 1
> Dimensions and sizes: [174]
> Coordinates:
>
> My script is attached.
> Could you plese help fix it?Thanks a lot!
> Nee
>
>
>
>
>
>
> <question.ncl>_______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon May 16 08:03:26 2011

This archive was generated by hypermail 2.1.8 : Tue May 17 2011 - 15:11:27 MDT