<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-15">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7654.12">
<TITLE>vtkXYPlotActor Not Plotting All Points</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2>Hi Fellow VTK Users,<BR>
<BR>
<BR>
I am trying to create a simple 2-Dimensional Graph, but I can't seem to get all of the points to plot onto the graph. Only the first three points are plotting. I don't know if it's an issue with the vtk file I'm reading, or the code itself. I've included both below. Secondly, how do you determine dimensions in a vtk file? I haven't found a definition anywhere for it, not even in the VTK User's Guide. Thank you,<BR>
<BR>
Luzjadi<BR>
<BR>
----------------------------------------------------------------------<BR>
Code<BR>
----------------------------------------------------------------------<BR>
package require vtk<BR>
package require vtkinteraction<BR>
<BR>
vtkStructuredGridReader reader<BR>
reader SetFileName "points.vtk"<BR>
reader Update<BR>
vtkDataSetToDataObjectFilter dataObject<BR>
dataObject SetInputConnection [reader GetOutputPort]<BR>
dataObject Update<BR>
<BR>
vtkXYPlotActor plot<BR>
<BR>
plot AddDataObjectInput [dataObject GetOutput]<BR>
# plot SetXRange 0.0 32.0<BR>
# plot SetYRange 0.0 9.0<BR>
plot SetXValuesToArcLength<BR>
plot SetTitle "Graph"<BR>
plot SetXTitle "X"<BR>
plot SetYTitle "Y"<BR>
plot SetXValuesToValue<BR>
plot SetWidth 1.0<BR>
plot SetHeight 1.0<BR>
plot SetPosition 0.0 0.0<BR>
plot LegendOn<BR>
plot PickableOff<BR>
plot PlotLinesOff<BR>
plot PlotPointsOn<BR>
<BR>
plot SetDataObjectXComponent 0 0<BR>
plot SetDataObjectYComponent 0 1<BR>
plot SetPlotColor 0 1.0 0.0 0.0<BR>
plot SetPlotLabel 0 "The Label"<BR>
[plot GetProperty] SetColor 0.0 0.0 0.0<BR>
<BR>
vtkRenderer renderer<BR>
renderer SetBackground 1.0 1.0 1.0<BR>
renderer AddActor2D plot<BR>
<BR>
vtkRenderWindow renderWindow<BR>
renderWindow SetSize 550 450<BR>
renderWindow AddRenderer renderer<BR>
<BR>
vtkRenderWindowInteractor iren<BR>
iren SetRenderWindow renderWindow<BR>
<BR>
vtkXYPlotWidget grapher<BR>
grapher SetXYPlotActor plot<BR>
grapher SetInteractor iren<BR>
grapher SetEnabled 1<BR>
<BR>
renderWindow Render<BR>
<BR>
iren Start<BR>
<BR>
<BR>
<BR>
-----------------------------------------------------------------------<BR>
vtk file<BR>
-----------------------------------------------------------------------<BR>
<BR>
# vtk DataFile Version 3.0<BR>
MERIDIONAL DATA<BR>
ASCII<BR>
DATASET STRUCTURED_GRID<BR>
DIMENSIONS 10 1 1<BR>
POINTS 10 double<BR>
0 0 0<BR>
1 2 0<BR>
2 4 0<BR>
3 8 0<BR>
4 16 0<BR>
5 32 0<BR>
6 16 0<BR>
7 8 0<BR>
8 4 0<BR>
9 2 0</FONT>
</P>
</BODY>
</HTML>