[vtkusers] vtkChartXY - need help

Amitesh Kumar amiteshagarwal at gmail.com
Tue Jun 21 15:17:45 EDT 2011


I have a question about vtkChartXY and wonder if anybody would be willing to
answer it?
Currently as in the example shown in
http://www.vtk.org/Wiki/VTK/Examples/Cxx/Plotting/LinePlot the x-axis is
defined as

table->SetValue(i, 0, i * inc);

while the datasets are defined as

table->SetValue(i, 1, cos(i * inc));
table->SetValue(i, 2, sin(i * inc));

Which means that both plot 1 and plot 2 need to have exact same
correspondence with x-axis with same number of rows and x-axis values. Lets
say I have two sets of data, one in which x-axis starts from 1-10 and and
 another in which the x-axis starts from 5-20 and the number of points
(rows) on first set is different compared with that of the second set. I
clearly would need to have two tables in the current scheme of things. How
can this be plotted using vtkChartXY or any other methods in VTK. Is there
any chart which would support it? Are there any examples of the same? I am
using version 5.9  of VTK. I really need some help on this!

Thank You

Amitesh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110621/8ae707ed/attachment.htm>


More information about the vtkusers mailing list