Re: Problem in creating a new LabelBar

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Mon Feb 10 2014 - 12:39:31 MST

Abhik,

The "plot@contour" should only be used if you created a contour over a map plot using something like gsn_csm_contour_map.

If you created the contour plot with gsn_csm_contour, then "plot" is already a contour plot, so you only need to use "plot":

> getvalues plot

--Mary

On Feb 10, 2014, at 3:57 AM, Abhik Santra <abhiksantra@tropmet.res.in> wrote:

>
> Dear NCL-user,
>
> I need to create a new labelbar with 4 manually placed panel plots in NCL 6.1.2.
> So, I am using a function "createLabelBar" after the plots, but before framing as follows:
>
> lbres = True
> lbres@lbOrientation = "Horizontal"
>
> lb = createLabelBar(wks,plot,lbres)
>
>
> undef("createLabelBar")
> function createLabelBar(wks: graphic, plot:graphic, lbres:logical)
> begin
>
> getvalues plot@contour
> "cnFillColors" : fill_colors
> "cnLevels" : lbstrings
> end getvalues
> lbres@lbFillColors = fill_colors
> lbid = gsn_create_labelbar(wks,dimsizes(lbstrings)+1,lbstrings,lbres)
>
> return(lbid)
> end
>
> It gives warning & error from "getvalues plot@contour":
> warning:Attempt to reference attribute (contour) which is undefined
>
> However, print( NhlClassName(plot) )shows "contourPlotClass".
> How can I solve this?
>
> Thanks in advance.
> Regards,
> Abhik
>
> ___________________________________________
>
> Abhik Santra
> CSIR Research Fellow,
> Indian Institute of Tropical Meteorology,
> Pune - 411008.
> India
> ___________________________________________
>
> _______________________________________________
> 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 Feb 10 12:39:35 2014

This archive was generated by hypermail 2.1.8 : Wed Feb 12 2014 - 09:35:52 MST