[vtkusers] Ticks and custom labels at _only_ 0 and 1 on a vtkAxis

Elvis Stansvik elvis.stansvik at orexplore.com
Wed Feb 8 01:55:52 EST 2017


2017-02-08 7:54 GMT+01:00 Elvis Stansvik <elvis.stansvik at orexplore.com>:

> 2017-02-08 7:52 GMT+01:00 Elvis Stansvik <elvis.stansvik at orexplore.com>:
>
>> Hi all,
>>
>> I have a somewhat strange requirement: I have a vtkChartXY, and along one
>> of its axes I need to enable ticks at *only* positions 0 and 1. The tick at
>> 0 should be labeled "0", while the tick at 1 should be labeled "Al"
>> (Aluminum).
>>
>> I've been looking at the API of vtkChartXY and vtkAxis, but haven't found
>> anything promising. Is it impossible?
>>
>
> Forgive me, I realize now that I probably want ticks all along the axis.
> But labels only at 0 and 1. So perhaps it's easier to accomplish this?
>

And forgive me again, I now found vtkAxis::SetCustomTickPositions which
looks exactly like what I need.

Sorry for the noise.

Elvis


> Elvis
>
>
>>
>> Thanks in advance,
>> Elvis
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170208/7ed1a84c/attachment.html>


More information about the vtkusers mailing list