[vtkusers] vtkChartXY and Pre-Existing Renderer
list user
quasilister at gmail.com
Tue Nov 15 14:07:33 EST 2011
Thanks! That did the trick. I am doing everything in Python...here's a
sketch of the working code
class VTKPlotInterface()
def __init__(self):
self.contextActor = vtk.vtkContextActor()
self.chart = vtk.vtkChartXY()
self.contextActor.GetScene().AddItem(self.chart)
....(other chart properties)
def addPoints()
def addPlot()
Then I attach to my pre-existing Renderer:
self.graphicsFrameWidget.ren.AddActor(chartXY.contextActor)
On Tue, Nov 15, 2011 at 9:56 AM, Marcus D. Hanwell <
marcus.hanwell at kitware.com> wrote:
> On Tue, Nov 15, 2011 at 9:24 AM, list user <quasilister at gmail.com> wrote:
> > Is there a way to attach a vtkChartXY object to an existing Renderer. A
> > similar issue has come up on the listerv where it was suggested to
> remove an
> > existing Renderer and attach the vtkChartXY to vtkContextView and use
> > vtkContextView's Renderer:
> > http://www.vtk.org/pipermail/vtkusers/2011-February/115121.html
> >
> > For my application, I am using the same Renderer to switch between
> different
> > "views" of actors (Cell View, Concentration View, etc) and actors are
> > removed and added. Is there away to accommodate my current setup of a
> > single Renderer?
> >
> > using vtk 5.8.0
>
> You can use the vtkContextActor, and would need to set up the
> interactor style etc in much the same way as vtkContextView does. The
> vtkContextActor has a scene that can then have a chart added to it.
>
> Marcus
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20111115/5a9f920d/attachment.htm>
More information about the vtkusers
mailing list