Ngl.get_integer
Retrieves the value of a resource that uses an integer scalar.
Prototype
ival = Ngl.get_integer(plotid, resource_name)
Arguments
plotidThe identifier returned from Ngl.open_wks, or any PyNGL function that returns a PlotId.
resource_nameThe name of the resource whose value you want to retrieve.
Return value
ivalA Python variable of type 'int'.
Description
This function retrieves a scalar integer that is the value of a specified resource associated with a plot.
The first argument is a PlotId and the second argument is the resource whose value you want to retrieve.
Note that you need to be careful about which PlotId you use for the first argument. For example, if you create a contour plot over a map, what's returned is the map's PlotId, and hence you can't use this to retrieve contour resource information. To retrieve contour resource values, use the "contour" attribute of the map's PlotId, which is the PlotId for the contour plot created:
map = Ngl.contour_map(wks,data,res) label_string = Ngl.get_integer(map.contour,"cnFillColor")See the PlotId documentation for a full list of possible attributes.
See Also
Ngl.get_MDfloat_array, Ngl.get_MDinteger_array, Ngl.get_float, Ngl.get_float_array, Ngl.get_integer_array, Ngl.get_string, Ngl.get_string_array
Examples
See color2.py.