comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Vertical text orientation?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Vertical text orientation? [message #91086] Wed, 03 June 2015 02:42 Go to next message
rjp23 is currently offline  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 Go to previous messageGo to next message
Helder Marchetto is currently offline  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 #91091 is a reply to message #91089] Wed, 03 June 2015 03:17 Go to previous messageGo to next message
David B is currently offline  David B
Messages: 18
Registered: January 2015
Junior Member
I cannot remember how I did this exactly, but some PS fonts give out vertical text as a by-product. It's a little sad if you want to use a specific font, but I have done this many times with may Y axis title when I didn't wish to. I remember being startled by 'Declination' being stood up the first time it happened.

I think the above approach is best in a generalised manner and just enclose it within its own procedure.

David
Re: Vertical text orientation? [message #91097 is a reply to message #91086] Wed, 03 June 2015 05:55 Go to previous messageGo to next message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
On Wednesday, June 3, 2015 at 5:43:01 AM UTC-4, 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

Try using the '!C' embedded graphics code.

'THIS' ;; becomes
'T!C' + 'H!C' + 'I!C' + 'S!C'

It's an exercise for the reader to make an IDL procedure which does this automatically... :-)

Craig
Re: Vertical text orientation? [message #91115 is a reply to message #91086] Thu, 04 June 2015 22:20 Go to previous message
vaibhavpant55 is currently offline  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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: How to supress output from going to new line
Next Topic: help with cgDrawVectors in write_gif procedure

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 07:24:15 PDT 2025

Total time taken to generate the page: 0.00482 seconds