[vtkusers] How to set range for axis in vtkCharts?

Marcus D. Hanwell marcus.hanwell at kitware.com
Sun Mar 11 14:00:32 EDT 2012


On Sat, Mar 10, 2012 at 12:55 AM, rakesh patil
<prakeshofficial at gmail.com> wrote:
> Hi,
>
> I am using vtkChartXY for plotting XY graphs. Everything is working fine.
>
> As of now, the ranges for X and Y axis as taken automatically based on the
> input data.
>
> Suppose the automatically computed range is say, (0 - 40), now user wishes
> to see the data between 20 to 25. How can I set this range? I tried using
> SetRange function. It doesn't show any changes.
>
> Is there any indirect way to do this other then feeding the input array with
> values between 20 to 25.??
>
The axis will be rescaled unless you set the behavior to fixed,
axis->SetBehavior(vtkAxis::FIXED).

Marcus



More information about the vtkusers mailing list