[Paraview] Relative frequencies in Histogram plots

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Mon Jan 12 17:01:51 EST 2015


You could do this using a Python Programmable Filter.

Here's a script to use:

import numpy
sum = numpy.sum(inputs[0].RowData["bin_values"])
array = 1.0 * inputs[0].RowData["bin_values"]
array = 100.0*array/sum
output.RowData.append(array, "bin_values")
output.RowData.append(inputs[0].RowData["bin_extents"], "bin_extents")

Attached is a state file.

Utkarsh

On Wed, Jan 7, 2015 at 1:03 PM, Ethan Hereth <e.a.hereth at gmail.com> wrote:
> Good afternoon and happy new year!
>
> I have a colleague who would like to be able to plot the relative frequency
> of the histogram data instead of absolute bin count. I.e. instead of having
> the left axis say there are 100 things in bin one, he'd like for it to say
> that 5% of the things are in bin one.
>
> Is this possible?
>
> Thank you!
>
> --
> Ethan Alan Hereth
>
> _______________________________________________
> 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
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Example.pvsm
Type: application/octet-stream
Size: 59272 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/paraview/attachments/20150112/53e47521/attachment.obj>


More information about the ParaView mailing list