[Paraview] Python View Visualization

2017-08-01 Thread Nick French
Hi, I've created a ParaView plugin (.xml file) that takes an input .txt file and creates an image (similar to this example: https://www.paraview.org/Wiki/Python_Programmable_Filter#Gen erating_Data_.28Programmable_Source.29). Now I want add some script to my python code that will allow for matplo

Re: [Paraview] Python View + Matplotlib

2017-04-27 Thread Cory Quammen
Jay, I think I see the problem. Simply add import vtk to the top of your script and then change view.SetAttributeArrayStatus(i, vtkDataObject.POINT, "p", 1) to view.SetAttributeArrayStatus(i, vtk.vtkDataObject.POINT, "p", 1) That should do the trick. Cory On Thu, Apr 27, 2017 at 10:53 AM,

Re: [Paraview] Python View + Matplotlib

2017-04-27 Thread Cory Quammen
Arvind, Please explain how the code breaks at the line you cited. What error message are you seeing? Thanks, Cory On Wed, Apr 26, 2017 at 12:18 PM, Jayaprakash, Arvind wrote: > Dear All, > > > > I am interested in using the matplotlib library to plot the data filtered > through "PlotOverLine" f

[Paraview] Python View + Matplotlib

2017-04-26 Thread Jayaprakash, Arvind
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 th

Re: [Paraview] Python view

2015-04-17 Thread Ian Krukow
Wonderful, thanks! I don't work in client/server mode, so cannot say anything about it. Ian Am 17.04.2015 um 15:11 schrieb Cory Quammen: Ian, You should be able to access the point data in your "render" function with the following dataObject= view.GetVisibleDataObjectForRendering(i) dataO

Re: [Paraview] Python view

2015-04-17 Thread Cory Quammen
Ian, You should be able to access the point data in your "render" function with the following dataObject = view.GetVisibleDataObjectForRendering(i) dataObject.GetPoints() where i is the i-th visible object. This returns a vtkPoints object. I'm not 100% sure if this works in client/server mode,

Re: [Paraview] Python view

2015-04-15 Thread Adam Lyon
Great! Glad this is useful! -- A *--* *Adam L. Lyon* *Scientist; Associate Division Head for Systems for Scientific Applications* Scientific Computing Division & Muon g-2 Experiment Fermi National Accelerator Laboratory 630 840 5522 office www.fnal.gov l...@fnal.gov Connect with us! Newslet

Re: [Paraview] Python view

2015-04-15 Thread Cory Quammen
Thanks for the report, Adam. This is helpful. We'll look at getting it fixed. Cory On Tue, Apr 14, 2015 at 8:19 PM, Adam Lyon wrote: > Hi Cory - I tried your little script and got an interesting response... > > /Applications/paraview4.3.1.app/Contents/Python/matplotlib/__init__.pyc > > /Applica

Re: [Paraview] Python view

2015-04-14 Thread Adam Lyon
Hi Cory - I tried your little script and got an interesting response... /Applications/paraview4.3.1.app/Contents/Python/matplotlib/__init__.pyc /Applications/paraview4.3.1.app/Contents/Python/matplotlib/backends/__init__.pyc Traceback (most recent call last): File "", line 7, in File "/Applic

Re: [Paraview] Python view

2015-04-14 Thread Cory Quammen
Hi Adam, I am running the exact same version of ParaView (my About box has the same contents as yours), so this is a little bit puzzling. Could you try two things: 1). Run ParaView, create a Python View, then enter this script: import matplotlib print matplotlib.__file__ import matplotlib.ba

Re: [Paraview] Python view

2015-04-14 Thread Adam Lyon
Hi Cory and Utkarsh - So I never see a plot - just a black window. The error message I sent earlier repeats every time I move my mouse over the python view window. I'm using Paraview 4.3.1 downloaded from paraview.org. Paraview's "about" box is below. Do you have a simple matplotlib plot I can tr

Re: [Paraview] Python view

2015-04-14 Thread Ian Krukow
One more question: How can I access the point coordinates in the python view? Ian Am 14.04.2015 um 22:01 schrieb Ian Krukow: Hi Cory, thanks a lot! I was missing the import statements. Now it works fine. And I will remember the big Apply button :-). Ian Am 14.04.2015 um 15:09 schrieb Cor

Re: [Paraview] Python view

2015-04-14 Thread Ian Krukow
Hi Cory, thanks a lot! I was missing the import statements. Now it works fine. And I will remember the big Apply button :-). Ian Am 14.04.2015 um 15:09 schrieb Cory Quammen: Hi Ian, I'm glad to hear you are interested in the Python View. I want to try out the python view for the first

Re: [Paraview] Python view

2015-04-14 Thread Cory Quammen
Hi Adam, I am trying to reproduce this with ParaView 4.3.1 64-bit on a Mac with Yosemite 10.10.2, but haven't been able to. This is the latest Mac binary available for download on paraview.org. The matplotlib pot shows up as in the blog post. Is your ParaView binary from paraview.org? Thanks, Cor

Re: [Paraview] Python view

2015-04-14 Thread Utkarsh Ayachit
Can you try resizing the window or something like that? I wonder if its an update issue. On Tue, Apr 14, 2015 at 11:49 AM, Adam Lyon wrote: > Hi Cory - I wanted to try this -- I loaded the state file and the data file > (thanks for the link). But when the python view tries to render, I get, > > E

Re: [Paraview] Python view

2015-04-14 Thread Adam Lyon
Hi Cory - I wanted to try this -- I loaded the state file and the data file (thanks for the link). But when the python view tries to render, I get, Error: Cannot import matplotlib.backends.backend_agg.FigureCanvasAgg and nothing appears. I'm running Paraview 4.3.1 64-bit on my Mac with Yosemite.

Re: [Paraview] Python view

2015-04-14 Thread Cory Quammen
Hi Ian, I'm glad to hear you are interested in the Python View. I want to try out the python view for the first time, but I am not getting > anywhere. I have created a python view and defined the functions setup_data > and render. I tried the example script from the Kitware Blog ( > http://www.ki

[Paraview] Python view

2015-04-14 Thread Ian Krukow
Hi all, I want to try out the python view for the first time, but I am not getting anywhere. I have created a python view and defined the functions setup_data and render. I tried the example script from the Kitware Blog (http://www.kitware.com/blog/home/post/588), and I do get the memory size

Re: [Paraview] Python View

2014-05-18 Thread Cory Quammen
Thanks for letting us know that using a newer version of matplotlib worked. I really should add a matplotlib version check in the python view that reports the minimal supported version. You can find the versions of the dependencies that went into the prebuilt ParaView binaries here. http://www.pa

Re: [Paraview] Python View

2014-05-18 Thread Cory Quammen
Hi, I'm fairly certain that a newer matplotlib version is required as the print_to_buffer() method is not available in matplotlib.backends.backend_agg in version 0.99.1.2 [1]. Matplotlib version 1.1.1 is known to work and is what comes with ParaView binaries provided by Kitware. Could you try ins

[Paraview] Python View

2014-05-18 Thread w.hunter
when I try to start a "Python View" Layout in Paraview 4.1.0 I get the following error: *ERROR: In /home/william/OpenFOAM/ThirdParty-2.3.x/ParaView-4.1.0/ParaViewCore/ClientServerCore/Rendering/vtkMatplotlibUtilities.cxx, line 302* *vtkMatplotlibUtilities (0x3aaab10): Could not call 'dpiCanvas.pri