Retrieves the value of a resource that uses a one-dimensional string array.
sarr = Ngl.get_string_array(plotid, resource_name)
The name of the resource whose value you want to retrieve.
A Python list of strings.
This function retrieves a one-dimensional array 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. The function returns a Python list of strings. containing the current value of the specified resource.
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) line_labels = Ngl.get_string_array(map.contour,"cnLineLabelStrings")See the PlotId documentation for a full list of possible attributes.