"No X column is set" in Plot Data filter

I’m attempting to make a simple line plot of PressureCoeff_AVG vs. Points_X using the data in the attached file.

avgTaps_2.vtp (11.2 KB)

  • Load data file
  • Add a Plot Data filter, hit Apply
  • Uncheck “Use Index For X Axis” and set X Array Name to Points_X

I get an error that says "[paraview ] vtkPlotPoints.cxx:560 ERR| vtkPlotLine (0xf320670): No X column is set (index 0).

I’ve seen this in both versions 6.0.1 and 6.1.0. The data I’m loading looks OK in the RenderView. Am I misusing this filter? The only workaround I’ve found is to insert a Python Calculator before the Plot Data filter that just copies points[:,0] to some other variable.

“Points” are not a true variable, which means it should not even be available, its a small bug.

You can work around it by adding the “Coordinates” filter before the PlotData.

I have a different data file containing the same geometry as the attached one, but with slightly different data. I do not run into this problem when plotting that data. I was puzzled about the difference between the two datasets, so I saved them as ascii to make comparison easier. The only difference I could see was that the “bad” data (the one I attached in my original post) has the points given as:

<DataArray type="Float64" Name="numpy_array" NumberOfComponents="3" format="ascii" RangeMin="85.5996210236873" RangeMax="90.13338330101483">

while the “good” data has the points given as:

<DataArray type="Float64" Name="Points" NumberOfComponents="3" format="ascii" RangeMin="85.5996210236873" RangeMax="90.13338330101483">

If I change “numpy_array” to “Points,” I can plot without a problem.

So then I was curious about what led to “Points” vs. “numpy_array.” Turns out, I had two versions of the same script. For the “good” data, I wrote the points using something like:

points = vtk.vtkPoints()
for i in range(n):
    points.InsertNextPoint(x[i], y[i], z[i])
poly = vtk.vtkPolyData()
poly.SetPoints(points)
...

For the “bad” data, I wrote the points using:

poly = dsa.WrapDataObject(vtk.vtkPolyData())
xyz = np.column_stack((x, y, z))
poly.SetPoints(xyz)