[Paraview] vtkTable and LineChart

Marcus D. Hanwell marcus.hanwell at kitware.com
Mon Nov 29 16:26:11 EST 2010


On Mon, Nov 29, 2010 at 1:41 PM, Michael Jackson
<mike.jackson at bluequartz.net> wrote:
> I have some XY data that I would like to plot in ParaView. I currently have
> a plugin that reads the data from our HDF5 file and into vtkTable objects.
> Along the lines of a "Line Chart 101" question how do I programmatically set
> the x-axis and y-axis columns?

There is a convenience function in the vtkPlot base class for this,

http://www.vtk.org/doc/nightly/html/classvtkPlot.html#ab2349981a5adb902a695e867ed15e1fc

You can set the table, along with the name of the x and y column for
the plot. The vtkPlotLine inherits from vtkPlotPoint, and both of them
respect this variable. It becomes a little murkier for parallel
coordinates, where I have to maintain a list of columns that should be
plotted.

Please let me know if it isn't clear, there are some tests such as
TestLinePlot.cxx that will take you through building up a table with
multiple columns, and plotting the points.

Marcus
--
Marcus D. Hanwell, Ph.D.
R&D Engineer, Kitware Inc.
(518) 881-4937


More information about the ParaView mailing list