<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:14pt"><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 14pt; "><span><br></span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 14pt; ">Hi,</div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 14pt; "><br></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 14pt; ">Playing with&nbsp;vtkXYPlotActor in TCL i did this sample, but i can not choose OX with SetDataObjectXComponent, any idea?;</div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 14pt; "><br></div><div><div><span class="Apple-style-span" style="font-size: 19px;">package require vtk</span></div><div><span class="Apple-style-span" style="font-size: 19px;">package require vtkinteraction</span></div><div><span
 class="Apple-style-span" style="font-size: 19px;"><br></span></div><div><span class="Apple-style-span" style="font-size: 19px;">vtkMath math</span></div><div><span class="Apple-style-span" style="font-size: 19px;">vtkXYPlotActor xyplot</span></div><div><span class="Apple-style-span" style="font-size: 19px;">&nbsp;&nbsp; &nbsp;</span></div><div><span class="Apple-style-span" style="font-size: 19px;">&nbsp;&nbsp; &nbsp;</span></div><div><span class="Apple-style-span" style="font-size: 19px;">&nbsp;&nbsp; &nbsp;xyplot SetTitle "Pressure "</span></div><div><span class="Apple-style-span" style="font-size: 19px;">&nbsp;&nbsp; &nbsp;xyplot SetXTitle "test"</span></div><div><span class="Apple-style-span" style="font-size: 19px;">&nbsp;&nbsp; &nbsp;xyplot SetYTitle "P"</span></div><div><span class="Apple-style-span" style="font-size: 19px;">&nbsp;&nbsp;&nbsp;</span></div><div><span class="Apple-style-span" style="font-size:
 19px;">&nbsp;&nbsp;&nbsp;</span></div><div><span class="Apple-style-span" style="font-size: 19px;">&nbsp;&nbsp; &nbsp;xyplot SetPlotColor 0 1 0 0</span></div><div><span class="Apple-style-span" style="font-size: 19px;">&nbsp;&nbsp; &nbsp;xyplot SetPlotColor 1 0 1 0</span></div><div><span class="Apple-style-span" style="font-size: 19px;">&nbsp;&nbsp;&nbsp;</span></div><div><span class="Apple-style-span" style="font-size: 19px;">&nbsp;&nbsp; &nbsp;xyplot SetLabelFormat "%-#6.2f"</span></div><div><span class="Apple-style-span" style="font-size: 19px;"><br></span></div><div><span class="Apple-style-span" style="font-size: 19px;">vtkDoubleArray array_s</span></div><div><span class="Apple-style-span" style="font-size: 19px;">vtkDoubleArray array_x</span></div><div><span class="Apple-style-span" style="font-size: 19px;">vtkFieldData field</span></div><div><span class="Apple-style-span" style="font-size: 19px;">vtkDataObject data</span></div><div><span
 class="Apple-style-span" style="font-size: 19px;"><br></span></div><div><span class="Apple-style-span" style="font-size: 19px;">for { set i 1 } { $i &lt;= 10 } { incr i } {</span></div><div><span class="Apple-style-span" style="font-size: 19px;"><span class="Apple-tab-span" style="white-space:pre">        </span>set val [math Random 0 1]</span></div><div><span class="Apple-style-span" style="font-size: 19px;"><span class="Apple-tab-span" style="white-space:pre">        </span>puts $val</span></div><div><span class="Apple-style-span" style="font-size: 19px;"><span class="Apple-tab-span" style="white-space:pre">        </span>array_s InsertValue $i $val</span></div><div><span class="Apple-style-span" style="font-size: 19px;">set dumy [ expr $i + 10.0 ]</span></div><div><span class="Apple-style-span" style="font-size: 19px;">puts $dumy</span></div><div><span class="Apple-style-span" style="font-size: 19px;"><span class="Apple-tab-span" style="white-space:pre">        </span>array_x
 InsertValue $i $dumy</span></div><div><span class="Apple-style-span" style="font-size: 19px;">}</span></div><div><span class="Apple-style-span" style="font-size: 19px;">field AddArray array_x</span></div><div><span class="Apple-style-span" style="font-size: 19px;">field AddArray array_s</span></div><div><span class="Apple-style-span" style="font-size: 19px;"><br></span></div><div><span class="Apple-style-span" style="font-size: 19px;">data SetFieldData field</span></div><div><span class="Apple-style-span" style="font-size: 19px;">xyplot AddDataObjectInput data&nbsp;</span></div><div><span class="Apple-style-span" style="font-size: 19px;">xyplot SetDataObjectXComponent 0 0</span></div><div><span class="Apple-style-span" style="font-size: 19px;">xyplot SetDataObjectYComponent 0 1</span></div><div><span class="Apple-style-span" style="font-size: 19px;">xyplot PlotPointsOn</span></div><div><span class="Apple-style-span" style="font-size: 19px;">[xyplot
 GetProperty] SetPointSize 3</span></div><div><span class="Apple-style-span" style="font-size: 19px;"><br></span></div><div><span class="Apple-style-span" style="font-size: 19px;">vtkRenderer ren1</span></div><div><span class="Apple-style-span" style="font-size: 19px;">vtkRenderWindow renWin</span></div><div><span class="Apple-style-span" style="font-size: 19px;">&nbsp;&nbsp; &nbsp;renWin AddRenderer ren1</span></div><div><span class="Apple-style-span" style="font-size: 19px;">vtkRenderWindowInteractor iren</span></div><div><span class="Apple-style-span" style="font-size: 19px;">&nbsp;&nbsp; &nbsp;iren SetRenderWindow renWin</span></div><div><span class="Apple-style-span" style="font-size: 19px;"><br></span></div><div><span class="Apple-style-span" style="font-size: 19px;">ren1 AddActor2D xyplot</span></div><div><span class="Apple-style-span" style="font-size: 19px;"><br></span></div><div><span class="Apple-style-span" style="font-size: 19px;">renWin
 SetSize 600 600</span></div><div><span class="Apple-style-span" style="font-size: 19px;"><br></span></div><div><span class="Apple-style-span" style="font-size: 19px;">ren1 ResetCamera</span></div><div><span class="Apple-style-span" style="font-size: 19px;"><br></span></div><div><span class="Apple-style-span" style="font-size: 19px;"># Get handles to some useful objects</span></div><div><span class="Apple-style-span" style="font-size: 19px;">#</span></div><div><span class="Apple-style-span" style="font-size: 19px;">iren AddObserver UserEvent {wm deiconify .vtkInteract}</span></div><div><span class="Apple-style-span" style="font-size: 19px;">renWin Render</span></div><div><span class="Apple-style-span" style="font-size: 19px;"><br></span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 14pt; ">Advanced thanks</div></div>  </div></body></html>