[vtkusers] vtkXYPlotActor ReverseAxis

Trevor Irons trevorirons at gmail.com
Tue Jan 26 10:27:28 EST 2010


Sorry if this has been hashed over before, but I coudn't find it. I found
the same question years ago, but no resolution. I want to invert the axis of
a 2D plot, and corresponding plot. But the call to SetReverseYAxis(), just
inverts the labels and axis. The plots themselves remain uninverted, and now
no longer match the labels. This is not what I was expecting.

Is there a way to reverse the plots themselves? I could do a hack and just
reverse the order in the input data objects, but if they are not regularly
sampled, this will break (I have multiple inputs). It also seems strange to
have to do this. It seems to me that you should be able to do this at the
XYPlotActor level. Any ideas or insight?

Thanks,

-Trevor

    vtkXYPlotActor *_plot = vtkXYPlotActor::New();
        _plot->AddDataObjectInput(_dataObject);
        _plot->AddDataObjectInput(_dataObject2);
        _plot->SetXValuesToValue();
        _plot->SetReverseYAxis(1);  // Just flips axis, not plots
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100126/e5c90ab2/attachment.htm>


More information about the vtkusers mailing list