[Paraview] Cumulative Distribution Function

Moreland, Kenneth kmorel at sandia.gov
Thu Feb 19 19:12:35 EST 2015


LD,

I don't think there is any built in function in ParaView, but you can convert a histogram to a cumulative distribution by applying the Python Programmable Filter with the following script:


import numpy

inarray = inputs[0].RowData['bin_values']

cumdist = numpy.cumsum(inarray)

output.RowData.append(cumdist, 'cumulative_distribution')


I noticed that when you apply the filter, ParaView wants to show it in a spreadsheet view. However, it works if you make it visible in the bar chart view created for the histogram. You can also create a line chart view and display it there.

Hope that helps.

-Ken

From: Sandeep Jella <sandeepjella at gmail.com<mailto:sandeepjella at gmail.com>>
Date: Thursday, February 19, 2015 at 4:56 PM
To: "paraview at paraview.org<mailto:paraview at paraview.org>" <paraview at paraview.org<mailto:paraview at paraview.org>>
Subject: [EXTERNAL] [Paraview] Cumulative Distribution Function

Hello,

Is it possible to plot a cumulative distribution function  for the histogram data in Paraview? Am trying to generate an 'S' Curve and superimpose on top of the histogram data.

Thanks,

LD
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20150220/d332df1b/attachment.html>


More information about the ParaView mailing list