[vtkusers] R: Plot XY
David Doria
daviddoria+vtk at gmail.com
Sun Mar 28 17:24:58 EDT 2010
On Sun, Mar 28, 2010 at 5:11 PM, Darshan Pai <darshanpai at gmail.com> wrote:
> You can directly use vtkXYPlotActor to get a plot of 2 arrays .
>
> Here is a simple example to plot a array .
> vtkSmartPointer<vtkXYPlotActor> plot =
> vtkSmartPointer<vtkXYPlotActor>::New();
> plot->ExchangeAxesOff();
> plot->SetLabelFormat( "%g" );
> plot->SetXTitle( "Level" );
> plot->SetYTitle( "Frequency" );
> plot->SetXValuesToIndex();
>
>
Edoardo,
I turned Darshans code snippet (thanks!) into an example:
http://www.vtk.org/Wiki/VTK/Examples/Plotting/PlotLegacyMethod
Thanks,
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100328/a0ddb9b3/attachment.htm>
More information about the vtkusers
mailing list