[vtkusers] Update the data in vtk xy chart

Jothybasu Selvaraj jothybasu at gmail.com
Fri Mar 16 09:30:57 EDT 2012


What do you mean by "output"?

Jothy

On Fri, Mar 16, 2012 at 12:57 PM, Gishara Indeewarie <gish.777 at gmail.com>wrote:

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



-- 
Jothy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120316/cfee1f7d/attachment.htm>


More information about the vtkusers mailing list