Retrieves the value of a resource that uses a multi-dimensional integer array.
iarr = Ngl.get_MDinteger_array(plotid, resource_name)
The name of the resource whose value you want to retrieve.
A NumPy array having elements of type 'int'.
This function retrieves a multi-dimensioned 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 NumPy array of elements of type 'int' containing the current value of the specified resource.
Currently no resource takes a multi-dimensional integer array. The following example is totally artificial in that you would never really want to specify elements of a color map using integers, since the only recognized integers would be zero and one. But, just to show how Ngl.get_MDinteger_array would be called, you can run the following:
import Ngl,numpy cmap = numpy.array([[1,1,1],[0,0,0],[0,1,1]],'i') rlist = Ngl.Resources() rlist.wkColorMap = cmap wks_type = "ps" wks = Ngl.open_wks(wks_type,"iarr",rlist) print Ngl.get_MDinteger_array(wks,"wkColorMap") Ngl.end()