[vtkusers] using strings for axis tick labels.

Eric E. Monson emonson at cs.duke.edu
Tue Dec 28 17:19:10 EST 2010


Hey Jenya,

I don't see a way to do it with vtkCubeAxesActor (although I've never used it myself), but with vtkChartXY you can access the axes with chart->GetAxis(int index) and set the tick labels with strings through a vtkStringArray and axis->SetTickLabels(vtkStringArray *). To get the axis to not set the tick positions automatically you'll have to use axis->SetBehavior(vtkAxis::CUSTOM) and axis->SetTickPositions(vtkDoubleArray *) along with the tick labels.

-Eric

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


On Dec 28, 2010, at 4:40 PM, Jenya Burstein wrote:

> Hello,
>  
> Is there a way to use strings for axis tick labels both in vtkChartXY based plots as well as with vtkCubeAxesActor?
>  
> Best Regards,
> Jenya
> _______________________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers




More information about the vtkusers mailing list