Re: getvalues

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Tue, 9 Sep 2008 09:33:52 -0600 (MDT)

Hi Marco,

The "plot" variable contains the map plot. In order to retrieve the
labelbar information, you need to use the contour plot part of the
overlay, which you can do with the "contour" attribute. You still
want to use "plot" for retrieving the plot size, however:

getvalues plot ; Get plot size for use in
   "vpHeightF" : vph ; creating labelbar.
   "vpWidthF" : vpw
end getvalues

getvalues plot_at_contour
   "cnMinLevelValF" : lb0 ; low label value
   "cnMinLevelValF" : lb1 ; high label value
   "cnLevelSpacingF" : spcF ;
   "lbLabelStride" : strd ;
end getvalues

You may not need to retrieve "lbLabelStride". You could instead, when
you create the labelbar, try setting "lbLabelAutoStride" to "True" in
order to get a nice spacing for your labels.

Good luck,

--Mary

On Tue, 9 Sep 2008, Marco Pastore wrote:

> Hi all.
>
> I need to duplicate the labelbar thath describes one surface velocity plot,
> but with values in knots.
> The plot is created using the gsn_csm_contour_map resource.
>
> To duplicate it (with gsn_create_labelbar) , i need to get some attributes
> from the map plot, as:
>
> -cnMinLevelValF
> -cnMaxLevelValF
> -cnLevelSpacingF
> -lbLabelStride
>
> Then i tried using these instructions:
>
> getvalues plot ; Get plot size for use in
> "vpHeightF" : vph ; creating labelbar.
> "vpWidthF" : vpw
> "cnMinLevelValF": lb0 ; low label value
> "cnMinLevelValF": lb1 ; high label value
> "cnLevelSpacingF": spcF ;
> "lbLabelStride": strd ;
> end getvalues
>
> The result is that i can not retrieve all plot attributes , and this is the
> error message:
>
> warning:lbLabelStride is not a valid resource in map.PlotManager at this time
> warning:NhlGetValues:Error retrieving lbLabelStride
> fatal:Execute: Error occurred at or near line 545 in file
> _LBL_regions_main.ncl
>
> The question is: which attributes are retrievable using getvalues ??
>
> Could you help me please ?
>
> Thanks to all,
>
> Ciao Marco
>
> --
> ### ### ### ### ###
>
> MARCO PASTORE
>
> Istituto Nazionale di Geofisica e Vulcanologia
> Gruppo Nazionale di Oceanografia Operativa
> Viale Aldo Moro 44
> 40128, Bologna
>
> Tel:(+39)051-3782649
> Cel:(+39)339 8273965
>
> Skype: mapas71
>
> ### ### ### ### ###
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Sep 09 2008 - 09:33:52 MDT

This archive was generated by hypermail 2.2.0 : Wed Sep 10 2008 - 07:38:41 MDT