Hi jothy,<div>I am doing the exact same way, but I don't get any output if I use
ClearPlots() .<br><br><div class="gmail_quote">On Fri, Mar 16, 2012 at 6:14 PM, Jothybasu Selvaraj <span dir="ltr"><<a href="mailto:jothybasu@gmail.com">jothybasu@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">First ClearPlots()<br><br>then use AddPlot() to add the new lines like<br><br><span style="color:#c0c0c0"> </span><span style="color:#800080">vtkPlot</span><span style="color:#c0c0c0"> </span><span style>*</span><span style>line</span><span style="color:#c0c0c0"> </span><span style>=</span><span style="color:#c0c0c0"> </span><span style="color:#808000">this</span><span style>-></span><span style="color:#800000">chart</span><span style>-></span><span style="font-style:italic">AddPlot</span><span style>(</span><span style="color:#800080">vtkChart</span><span style>::</span><span style="color:#800080">LINE</span><span style>);<br>
</span><span style="color:#c0c0c0"> </span><span style>line</span><span style>-></span><span style="font-style:italic">SetInput</span><span style>(</span><span style>table</span><span style>,</span><span style="color:#c0c0c0"> </span><span style="color:#000080">0</span><span style>,</span><span style="color:#c0c0c0"> </span><span style="color:#000080">1</span><span style>);<br>
<br>table contains your new value.<br><br>Then Render()<br><br>Jothy<br></span><div><div class="h5">
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style></span><span style></span></pre>
<br><br><div class="gmail_quote">On Fri, Mar 16, 2012 at 12:39 PM, Gishara Indeewarie <span dir="ltr"><<a href="mailto:gish.777@gmail.com" target="_blank">gish.777@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks a lot Jothy. But when I call
vtkChartXY::ClearPlots() , I dont get any output. <div>If I did not call it, I get a new window each time I update the data.</div><div>I am using vtk mfc renderer to render data.<div><div></div><div><br><br><div class="gmail_quote">
On Fri, Mar 16, 2012 at 6:05 PM, Jothybasu Selvaraj <span dir="ltr"><<a href="mailto:jothybasu@gmail.com" target="_blank">jothybasu@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">call vtkChartXY::ClearPlots() then Render() after adding new data.<br><br>Jothy<br><br><br><br><div class="gmail_quote">
<div><div>On Fri, Mar 16, 2012 at 12:25 PM, Gishara Indeewarie <span dir="ltr"><<a href="mailto:gish.777@gmail.com" target="_blank">gish.777@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>Hi all,
<div><br></div><div>I am using vtk xy chart example (<a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/Plotting/LinePlot" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/Cxx/Plotting/LinePlot</a>) to plot a graph.</div>
<div>I want to update the data inside the graph every time user presses a button.</div>
<div>(I am using different data sets)</div><div>I followed the following thread, but with no luck.</div><div><a href="http://vtk.1045678.n5.nabble.com/How-to-get-output-of-vtkChartXY-on-existing-render-window-td5526899.html" target="_blank">http://vtk.1045678.n5.nabble.com/How-to-get-output-of-vtkChartXY-on-existing-render-window-td5526899.html</a> .<br>
</div><div>As soon as I start the interactor the window get crashed when closing. </div><div>Please suggest me how can I achieve this.</div><div>Thanks a lot.</div>
<br></div></div>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><span><font color="#888888"><br><br clear="all"><br>-- <br><div dir="ltr">Jothy<br></div><br>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div></div></div><font color="#888888">-- <br><div></div><font color="#666666">Gish</font><br>
</font></div>
</blockquote></div><br><br clear="all"><br></div></div><span class="HOEnZb"><font color="#888888">-- <br><div dir="ltr">Jothy<br></div><br>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div></div><font color="#666666">Gish</font><br>
</div>