Dear All, I am interested in using the matplotlib library to plot the data filtered through "PlotOverLine" filter. I believe this is of type vtkMultiBlockDataSet with 1 child (vtkPolyData)
I am having issues with SetAttributeArrayStatus(...) for an array in vtkMultiBlockDataSet. Here is the script, I used: def setup_data(view): from paraview.numpy_support import vtk_to_numpy for i in xrange(view.GetNumberOfVisibleDataObjects()): dataObject = view.GetVisibleDataObjectForSetup(i).GetBlock(0) #Accessing the point data pressure = dataObject.GetPointData().GetArray("p") print vtk_to_numpy(pressure) # prints the pressure array view.DisableAllAttributeArrays() view.SetAttributeArrayStatus(i, vtkDataObject.POINT, "p", 1) # code breaks here! Could not pass the vtkDataObject.POINT array def render(view, width, height): from paraview.numpy_support import vtk_to_numpy from paraview import python_view figure = python_view.matplotlib_figure(width, height) for i in xrange(view.GetNumberOfVisibleDataObjects()): dataObject = view.GetVisibleDataObjectForRendering(i) .GetBlock(0) pressure = dataObject.GetPointData().GetArray("p") print vtk_to_numpy(pressure) Any help is much appreciated. Thanks, Jay
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView Search the list archives at: http://markmail.org/search/?q=ParaView Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/paraview