[Paraview] Blog: matplotlib View coming in ParaView 4.1
Cory Quammen
cory.quammen at kitware.com
Tue Dec 17 10:29:22 EST 2013
Auré Lien,
Thanks for the feedback,
The Python View could certainly consume output from a
ProgrammableFilter. Did you have another way in mind to use matplotlib
from within a programmable filter? I don't think anything would stop
you from doing so, but to have any matplotlib plots show up in a
ParaView window, you would need to have your matplotlib code in the
Python View script.
You can access the Python View from the Python shell, but it might be
a little awkward. You would have to set the script in the Python View
as a string, e.g.
>>> view =paraview.simple.CreateView("PythonView")
>>> view.Script = """
... def setup_data(view):
... print "setup_data"
...
... def render(view, figure):
... print "render"
... """
You could imagine loading a matplotlib script this way, perhaps.
Best,
Cory
On Tue, Dec 17, 2013 at 10:08 AM, Aurélien Marsan <aur.marsan at gmail.com> wrote:
> Wow ! So great ! A very popular python feature that was missing in Paraview.
>
> Juste one question : will matplotlib also be directly accessible from a
> ProgrammableFilter or from the python console ?
>
> Many thanks,
>
> A. Marsan
More information about the ParaView
mailing list