[vtkusers] Recommended way to create a 2D scatter plot
Ben Medina
ben.medina at gmail.com
Wed Jul 28 19:21:49 EDT 2010
Great! I'm a bit confused about why one uses a PolyDataMapper and
Actor, rather than a PolyDataMapper2D and Actor2D as I had been doing.
Now is there any way to add 2D axes to the plot?
Going forward, is this still the preferred way of creating 2D scatter
plots, or will the charts API take over?
Thanks,
Ben
On Wed, Jul 28, 2010 at 2:50 PM, David Doria <daviddoria+vtk at gmail.com> wrote:
> On Wed, Jul 28, 2010 at 5:21 PM, Ben Medina <ben.medina at gmail.com> wrote:
>> Hello all,
>>
>> I'm investigating the capabilities of VTK to create scatter plots of
>> data (using the latest VTK from the repository). I've been quite
>> successful creating 3D scatter plots using vtkGlyph3DMapper drawing
>> into a QVTKWidget. However, I'm unsure of the best way to create 2D
>> scatter plots. I've tried
>> vtkGlyphSource2D->vtkGlyph2D->vtkPolyDataMapper2D->vtkActor2D. I am
>> able to get a plot, but there is no interaction (e.g. panning,
>> zooming, etc.). Am I headed down the right path, or is there a better
>> way to go using the vtkQtChart stuff or the new vtkChart API?
>>
>> Thanks,
>> Ben
>
> I just updated this example:
>
> http://www.vtk.org/Wiki/VTK/Examples/Filters/vtkGlyph2D
>
> Does it do what you want?
>
> Thanks,
>
> David
>
More information about the vtkusers
mailing list