Particle Density Plot


I’m looking for a way to plot the particle density of a simulation along a single dimension. Basically a histogram of the y-coordinates. At a first glance the histogram filter looks just like the thing I need, however, it only lets me use the particle properties as input but not the particle coordinates. What do I have to do pass the y-coordinates to this filter? Or do I have to use a different one?

Here is a dummy version of my data files to show their layout:

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<VTKFile byte_order="LittleEndian" type="UnstructuredGrid" version="0.1">
    <Piece NumberOfCells="0" NumberOfPoints="2">
        <DataArray Name="PropA" NumberOfComponents="1" format="ascii" type="Int32">0 1</DataArray>
        <DataArray Name="PropB" NumberOfComponents="1" format="ascii" type="Int32">2 3</DataArray>
        <DataArray Name="points" NumberOfComponents="3" format="ascii" type="Float32">0.0 0.0 0.0 1.0 1.0 1.0</DataArray>
        <DataArray Name="types" NumberOfComponents="0" format="ascii" type="Float32"/>

Indeed, it is something missing …

You can work around with the calculator:

  • Load your data
  • Create a Calculator
  • Specify coordsY as formula
  • Create Histogram

The y-coordinate is now available as the Result Array.

It feels like the calculator step should not be necessary. Thanks for the quick help though!