[vtkusers] Re: vtkXYPlot Interaction?

Scott J. Pearson scottjp at CLEMSON.EDU
Mon May 2 16:59:57 EDT 2005


VTK plots in two spaces, so to speak: 2-D space and 3-D space. The XYPlot is
in 2-D space. This means no cameras and thus no zooming.

However, if you become aggressive, you may be able to accomplish what you
want. You can set the top-left and bottom-right coordinates of vtk2DActors,
via the PositionCoordinate (top-left) and the Position2Coordinate
(bottom-right). Set these coordinates to values outside of your viewport
bounds and you simulate zooming in.

To do this, you need to have some event initiate it. You can create an
Observer on the interactor, have this Observer handle an event (e.g.,
double-click), and act upon it (which may include getting the coordinates of
the click).

If you need me to go into more detail for any of these, let me know.

Scott

---
Scott J. Pearson
Systems Programmer, Center for the Advanced Engineering of Fibers and Films
Clemson University     864.656.6389     scottjp at clemson.edu
10 Riggs Hall, Clemson, SC  29634
http://www.clemson.edu/caeff/





More information about the vtkusers mailing list