[Paraview] plot 2d curve

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Mon Mar 5 10:46:31 EST 2012


By argument, you mean as an input dataset? You'll have to create a
vtk-dataset (vtkTable) using the array. I believe there are examples
on the Wiki how to do that. Let me know if you cannot find them, and I
can fish them out for you.

Utkarsh

On Sat, Mar 3, 2012 at 10:32 AM, hicham mach <hicham.mach at gmail.com> wrote:
> Thank you Utkarsh for your answer. I used this solution to plot array data
> created with a python script  :
>
> run a python script with PV and generate array data
> write data in a file *.dat
> use "programmable filter" to read this file
> use "Plot Data" to plot.
>
> I have an other question : how can i use a python list as an argument for a
> "Programmable Filer" ?
>
> Thanks
>
>
>
> 2012/3/2 Utkarsh Ayachit <utkarsh.ayachit at kitware.com>
>>
>> If you're using Python scripting exclusively, then you can indeed
>> directly use matplotlib or any other Pyhton modules for generating
>> plots. However if you want those plots to be rendered in the ParaView
>> GUI or on tile-displays, etc. then you want to use ParaView's plots.
>> For that can use the Calculator or Python Calculator to compute the
>> derived quantity then apply the "Plot Data" filter to plot the arrays
>> in plots.
>>
>> Utkarsh
>>
>> On Thu, Mar 1, 2012 at 7:55 AM, hicham mach <hicham.mach at gmail.com> wrote:
>> > Hi all,
>> >
>> > I use PV with a python scripts and i want to plot a 2d curve (y = f(x)).
>> > my question is :  can i call matplotlib to plot a 2d curve in PV?
>> > If not, it have in PV  a filter that do this and which file format
>> > should be
>> > used ?
>> >
>> > thank you for your help.
>> >
>> > Hicham
>> >
>> > _______________________________________________
>> > 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
>> >
>> > Follow this link to subscribe/unsubscribe:
>> > http://www.paraview.org/mailman/listinfo/paraview
>> >
>
>


More information about the ParaView mailing list