Vertical text orientation? [message #91086] |
Wed, 03 June 2015 02:42  |
rjp23
Messages: 97 Registered: June 2010
|
Member |
|
|
This one's driving me mad :-(
I'm sure I've done it before but I can't remember how to.
I want to put some text on a plot that runs vertically down the page.
I don't want to just rotate the text, I want all the characters to still be "upright" but one beneath the other.
L
I
K
E
T
H
I
S
(hopefully the above formatting is kept)
Anyone any ideas better than printing each individual character?
Cheers
Rob
|
|
|
Re: Vertical text orientation? [message #91089 is a reply to message #91086] |
Wed, 03 June 2015 03:01   |
Helder Marchetto
Messages: 520 Registered: November 2011
|
Senior Member |
|
|
On Wednesday, June 3, 2015 at 11:43:01 AM UTC+2, rj...@le.ac.uk wrote:
> This one's driving me mad :-(
>
> I'm sure I've done it before but I can't remember how to.
>
> I want to put some text on a plot that runs vertically down the page.
>
> I don't want to just rotate the text, I want all the characters to still be "upright" but one beneath the other.
>
> L
> I
> K
> E
>
> T
> H
> I
> S
>
> (hopefully the above formatting is kept)
>
> Anyone any ideas better than printing each individual character?
>
> Cheers
>
> Rob
Since you didn't say in which type of graphic enviroment you wanted this, I give you what I *can* do:
likeThis = byte('LIKE THIS')
nChars = n_elements(likeThis)
likeThisArray = strarr(nChars)
for i=0,nChars-1 do likeThisArray[i] = string(likeThis[i])
i = image(/test)
t = text(0.5,0.5,likeThisArray,color='red')
But I guess you wanted direct graphics...
Cheers,
Helder
|
|
|
|
|
Re: Vertical text orientation? [message #91115 is a reply to message #91086] |
Thu, 04 June 2015 22:20  |
vaibhavpant55
Messages: 10 Registered: December 2014
|
Junior Member |
|
|
On Wednesday, June 3, 2015 at 3:13:01 PM UTC+5:30, rj...@le.ac.uk wrote:
> This one's driving me mad :-(
>
> I'm sure I've done it before but I can't remember how to.
>
> I want to put some text on a plot that runs vertically down the page.
>
> I don't want to just rotate the text, I want all the characters to still be "upright" but one beneath the other.
>
> L
> I
> K
> E
>
> T
> H
> I
> S
>
> (hopefully the above formatting is kept)
>
> Anyone any ideas better than printing each individual character?
>
> Cheers
>
> Rob
use XYOUTS with ORIENTATION keyword. ORIENTATION keyword will rotate the string with given angle (in degrees).
str='LIKE THIS'
xyouts,10,10,str,orientation=270
Regards,
Vaibhav Pant
|
|
|