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

Home » Public Forums » archive » Re: Vertical text alignment in postscript
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Vertical text alignment in postscript [message #54852 is a reply to message #54846] Tue, 17 July 2007 08:21 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
I'm not sure what you were expecting this program to produce. For me,
it produces the words "Testing 123" with two horizontal lines. There
is some vertical space between the top of the "T" and the top line,
but this is expected for the Helvetica font.

Alignment of text on plots was just discussed in the past few days in
this newsgroup. Maybe the tips presented there could help you.

Good luck,
Craig



Andy Heaps <a.j.heaps@reading.ac.uk> writes:
> I'm trying to align text vertically in postscript but have some extra
> space
> above where the text finishes.Using !D.Y_CH_SIZE/2.0 as the mid-point
> means that the text is now not vertically aligned.
>
> Has anyone an explanation/solution for this problem?
> Attached is a small program to show the problem.
>
> Many thanks
> Andy
>
>
> PRO ll
>
> SET_PLOT, 'ps'
> DEVICE, FILE='ll.ps', XSIZE=8.27, YSIZE=11.69, $
> XOFFSET=0.5, YOFFSET=0.5, /INCHES, /COLOR
> !P.COLOR=1
> !P.FONT=0
> !P.POSITION=[0.1,0.3,0.9,0.6]
> r = [255,0]
> g = [255,0]
> b = [255,0]
> TVLCT,r,g,b
>
> mysize=6.0 ;Size of our text
> ypix=!D.Y_CH_SIZE*mysize ;Height of text in pixels
> xstart=1000 ;X start of plotting
> xfinish=20000 ;X finish of plotting
> ystart=5000 ;Y start of plotting
>
> XYOUTS, xstart, ystart, CHARSIZE=mysize, 'Testing 123', /DEVICE
> PLOTS, [xstart, xfinish], [ystart, ystart], /DEVICE ;Bottom of text
> PLOTS, [xstart, xfinish], [ystart+ypix, ystart+ypix], /DEVICE ;Top of text
>
> DEVICE, /CLOSE
>
> END

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@REMOVEcow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
[Message index]
 
Read Message
Read Message
Previous Topic: Re: about the currentrecord()
Next Topic: error in demo

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

Current Time: Sun Oct 12 07:08:01 PDT 2025

Total time taken to generate the page: 1.36114 seconds