[vtk-developers] vtkAxis bug?

Eric E. Monson emonson at cs.duke.edu
Tue Nov 16 09:26:15 EST 2010


Hey Ben,

Yes, right now the SetNumberOfTicks isn't really implemented. The way things are wired right now, if you want to fix the number of ticks you need to use SetTickPositions and SetTickLabels. Both of those set the Behavior == 2 (Custom), which then tells the Chart to not do the AutoScale for the axis range. So, with the way it's currently implemented you need to call Axis->SetRange(min,max) or SetMinimum, SetMaximum based on your data range once you've set the ticks.

Of course, patches are welcome! :)
-Eric

------------------------------------------------------
Eric E Monson
Duke Visualization Technology Group


On Nov 15, 2010, at 2:02 PM, Ben Payne 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.
> 
> Does anyone know how I can accomplish this?  I would still like to use
> the auto-range functionality of the axis if possible.
> 
> Thanks,
> Ben
> _______________________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
> 
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtk-developers




More information about the vtk-developers mailing list