Ngl.get_workspace_id
Returns a reference to the current Workspace object.
Prototype
wid = Ngl.get_workspace_id()
Return value
widAn integer workspace identifier.
Description
The Workspace object manages blocks of memory used by the PyNGL objects. This function returns a reference to the workspace object so the workspace array sizes may be configured by the user.
This function is especially is useful if you get an error message from PyNGL that looks like this:
fatal:ContourPlotPreDraw: Workspace reallocation would exceed maximum size 16777216 fatal:ContourPlotDraw: draw error warning:WorkstationDeactivate: workstation not active or not opened
See Also
Examples
The following code snippet shows how to use the Ngl.get_workspace_id function to increase the maximum workspace memory:
wks = Ngl.open_wks("x11","example") ws_id = Ngl.get_workspace_id() srlist = Ngl.Resources() srlist.wsMaximumSize = 33554432 Ngl.set_values(ws_id,srlist)