[vtkusers] How to get output of vtkChartXY on existing render window?

Jothybasu Selvaraj jothybasu at gmail.com
Fri Mar 2 04:25:37 EST 2012


I think you could use vtkCharts::ClearPlots() to clear the render window.

Jothy



On Fri, Mar 2, 2012 at 6:11 AM, rakesh patil <prakeshofficial at gmail.com>wrote:

> Thanks Jothy and Marcus,
>
> It is working fine now. It was crashing because after setting render
> window, I was setting existing renderer to the view object. Once I
> commented it it is working fine. Is it that this is the natural behavior?
> One more thing I observed is that, after viewing the chart when I clear
> the renderwindow, the interactor style stops funcitoning. No zoom effect is
> shown when mouse is scrolled. No panning and rotating is also possible.
>
> Any idea why is this happening?
>
> Thanks
>
> On Thu, Mar 1, 2012 at 10:46 PM, Marcus D. Hanwell <
> marcus.hanwell at kitware.com> wrote:
>
>> You may want to take a look at the Charts/Testing/Cxx directory for
>> some more ideas. You can use vtkContextView as a convenience, but it
>> is possible to just use vtkContextActor and set things up more
>> manually (the 3D example gives some of the detail).
>>
>> Marcus
>>
>> On Thu, Mar 1, 2012 at 6:00 AM, Jothybasu Selvaraj <jothybasu at gmail.com>
>> wrote:
>> > Yes, it works for me.
>> >
>> > Along with that, did you setup the interactor as well?
>> >
>> > Have a look at this presentation by Marcus on vtkCharts (on pages
>> 21,22).
>> >
>> > www.na-mic.org/Wiki/images/1/18/NA-MIC-VTK-Charts-2011.pdf
>> >
>> > Jothy
>> >
>> > On Thu, Mar 1, 2012 at 10:47 AM, rakesh patil <
>> prakeshofficial at gmail.com>
>> > wrote:
>> >>
>> >> Hi Jothy,
>> >>
>> >> I tried doing that yesterday. But the application was crashing and
>> closing
>> >> on its own. Are you sure that is the way it has to be done? I mean
>> have you
>> >> worked on it?
>> >>
>> >> Thanks
>> >>
>> >> On Thu, Mar 1, 2012 at 2:54 PM, Jothybasu Selvaraj <
>> jothybasu at gmail.com>
>> >> wrote:
>> >>>
>> >>> Create vtkContextView, then add chart to the contextView with AddItem.
>> >>> Set the rnderWindow to the contextView.
>> >>>
>> >>> Jothy
>> >>>
>> >>> On Thu, Mar 1, 2012 at 4:43 AM, rakesh patil <
>> prakeshofficial at gmail.com>
>> >>> wrote:
>> >>>>
>> >>>> Hello,
>> >>>>
>> >>>> I am trying to plot XY plots using vtkChartXY example shown here
>> >>>>
>> >>>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Plotting/LinePlot
>> >>>>
>> >>>> When I run XY plotting code it shows proper output but the plot
>> comes in
>> >>>> another window. Is it possible to redirect the output to the existing
>> >>>> renderer, renderwindow and interactor? If it is possible, please
>> guide to do
>> >>>> it.
>> >>>>
>> >>>> Thanks
>> >>>>
>> >>>> Regards
>> >>>> Rakesh Patil
>> >>>>
>> >>>> _______________________________________________
>> >>>> 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
>> >>>
>> >>
>> >
>> >
>> >
>> > --
>> > Jothy
>> >
>> >
>> > _______________________________________________
>> > 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120302/2d653bdb/attachment.htm>


More information about the vtkusers mailing list