[vtkusers] vtkChartXY with inverted vtkAxis labels

Marcus D. Hanwell marcus.hanwell at kitware.com
Mon Jan 31 23:20:54 EST 2011


On Mon, Jan 31, 2011 at 12:33 PM, Joseph Melnyk <JMelnyk at pile.com> wrote:
> I’m interested in displaying a vtkChartXY where the vtkAxis for the Y axis
> has decreasing/inverted labels.  That is, the plot corner is 3 (axes on left
> and top), the X axis is increasing from left to right and the Y axis is
> increasing from top to bottom (0 at the top).
>
Did you take a look at the TestScientificPlot code in VTK? This test
shows an inverted Y-axis.
>
> I’ve tried a few approaches to this but ultimately, it seems as though
> setting my min and max correctly should work.  For example, if I want 0 at
> the top of the Y axis and 50 at the bottom, I would do
> vtkAxis->SetMaximum(0) along with vtkAxis->SetMinimum(50).  Is this facility
> simply not allowed for within the vtkAxis in the 5.6.1 release?  Or is there
> another method of achieving this?
>
I am not sure I had this working (or tested) in the 5.6 series, but it
is working in what will soon be released as 5.8. I would advise that
you try VTK from master, and let me know if you hit any issues.

Thanks,

Marcus



More information about the vtkusers mailing list