[vtk-developers] vtkAxis bug?

Marcus D. Hanwell marcus.hanwell at kitware.com
Wed Nov 17 10:57:38 EST 2010


On Mon, Nov 15, 2010 at 2:02 PM, Ben Payne <ben.payne at kitware.com> wrote:
> Hi,
>
> I am trying to set up a bar chart using vtkChartXY with a fixed number
> of x-axis tick marks ( and labels ).  I have tried using
> vtkAxis::SetNumberOfTicks(), but that function doesn't seem to be
> hooked up to anything at the moment.

This did work once, and we should get it fixed up and tested. The
vtkAxis class has been one of the toughest to get right, in terms of
the flexibility required, rounding issues, autoscale, nice numbers.
>
> Does anyone know how I can accomplish this?  I would still like to use
> the auto-range functionality of the axis if possible.
>
As Eric noted, you could set the tick positions/labels manually. It
wouldn't take much to fix this up, and add a test for the axes and
some of these corner cases. Let me see if I can take a look at this
later.

Marcus
--
Marcus D. Hanwell, Ph.D.
R&D Engineer, Kitware Inc.
(518) 881-4937



More information about the vtk-developers mailing list