|
Re: Orientation of IDLgrAxis Tick Labels [message #37474 is a reply to message #37469] |
Fri, 26 December 2003 06:07  |
btt
Messages: 345 Registered: December 2000
|
Senior Member |
|
|
Lesa Williams wrote:
> I was wondering if anyone knows of a way to orient IDLgrAxis tick
> labels at a 45-degree angle. I've been playing with the TEXTBASELINE
> and TEXTUPDIR keywords, but I haven't been able to figure out how to
> change the direction of the text other than in the horizontal/vertical
> directions. By making TEXTBASELINE=[0,-1,0] and TEXTUPDIR=[1,0,0],
> I've been able to position the tick labels vertically, but I would
> like (if possible) to display them at an angle for easier reading.
> Any help would be appreciated!
>
Hello,
The baseline values maybe specified with floating point values, so you
are not confined to orthogonal directions. Below is a little routine
that will step through 10 different baseline angles.
Cheers,
Ben
*********BEGIN CODE
PRO RotateTextExample, text
if n_elements(text) EQ 0 then Text = 'Peace on Earth'
otext = OBJ_NEW('IDLgrText', text, baseline = [0.5,0.0,0.0])
model = OBJ_NEW('IDLgrModel')
model->Add, oText
xObjView, model, tlb = tlb
For i = 0,9 Do Begin
baseline = [1.0, 0.1, 0.0]*[1.0, i, 1.0]
oText->SetProperty, baseline = baseline
xObjView, model, refresh = tlb
Print, 'Baseline = ', baseline
Wait, 1
EndFor
Widget_Control, tlb, /destroy
Obj_Destroy, model
END;
*********END CODE
|
|
|