Re: possible problem in panel_23.ncl example ...

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Thu Mar 31 2011 - 11:59:38 MDT

Hi Ufuk,

Once you use gsn_csm_contour_map, it returns a map object, and not a
contour object. You need to pass the contour object to the labelbar
code
by changing the "contour(0)" argument to "contour@contour".

It looks a little awkward having the map object called "contour", so
you could do this:

   map = new(nplots,graphic) ; Array to hold plots
. . .
; Create and draw contour plot
     map(i) = gsn_csm_contour(wks,data(i,:,:),res)

   end do

; Create and draw a labelbar and main title.
   lb = labelbar(wks,map@contour)
--Mary

On Mar 29, 2011, at 9:39 AM, u.utku.turuncoglu@be.itu.edu.tr wrote:

> Hi,
>
> I try to plot that is similar to following link,
>
> http://www.ncl.ucar.edu/Applications/Scripts/panel_23.ncl
>
> but in my case i am using gsn_csm_contour_map instead of
> gsn_csm_contour.
> The code gives following error in labelbar function.
>
> warning:cnFillColors is not a valid resource in map at this time
> warning:NhlGetValues:Error retrieving cnFillColors
> fatal:Execute: Error occurred at or near line 16 in file plot_vs.ncl
>
> fatal:Execute: Error occurred at or near line 239 in file plot_vs.ncl
>
> How can i solve it? I think that gsn_csm_contour_map causes this error
> because when i change it to gsn_csm_contour, it works without error.
>
> Thanks,
>
> --ufuk
>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
> _______________________________________________
> 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 Thu Mar 31 11:59:49 2011

This archive was generated by hypermail 2.1.8 : Tue Apr 05 2011 - 09:01:21 MDT