[vtkusers] vtkChartXY question

pof jd379252 at gmail.com
Tue Feb 22 04:41:18 EST 2011


Le 21/02/2011 15:54, Marcus D. Hanwell a écrit :
> On Tue, Feb 15, 2011 at 4:04 PM, pof<jd379252 at gmail.com>  wrote:
>> Hi all,
>> I need to draw 2 series on the same 2D plot:
>> - the 1st serie (linked to the left Y-axis) displayed as a bar chart (to
>> show a frequency histogram),
>> - the 2nd serie (linked to the right Y-axis) displayed as a line plot (to
>> show a cumulative distribution).
>> Is it currently possible with the vtkChartXY class (vtk5.6.1)?
>> If not, what would be the best class to do it?
> If you look in the documentation for vtkChartXY for 5.6.1,
>
> http://www.vtk.org/doc/release/5.6/html/a00290.html#d426053890b2bd4f15a4f2a29a8b3d17
>
> This is still present in VTK 5.8 (nightly),
>
> http://www.vtk.org/doc/nightly/html/classvtkChartXY.html#ad426053890b2bd4f15a4f2a29a8b3d17
>
> It allows you to set the corner a plot should be in, and is the same
> API that ParaView uses to accomplish this.
>
> Marcus
> --
> Marcus D. Hanwell, Ph.D.
> R&D Engineer, Kitware Inc.
> (518) 881-4937
I tried to set the Y axis using SetYaxis(), but I could not get it working.
However, the SetPlotCorner() method you mentionned just works fine.
Thanks for the tip.
JD



More information about the vtkusers mailing list