Re: Postscript line thickness [message #35131] |
Tue, 20 May 2003 12:12 |
mchinand
Messages: 66 Registered: September 1996
|
Member |
|
|
In article <badlgm$gpc$1@houston.jhuapl.edu>,
Haje Korth <haje.korth@jhuapl.edu> wrote:
> David,
> Ken got it right. I loaded the postscript file into CorelDRAW and checked
> the properties of the line. The software gives you the thickness with 3
> digit precision. thick=1 gives you 0.283, thick=2 gives you 0.567, however.
> So you now the number is rounded/truncated. But the precision is accurate
> enough for the purpose. Does this satisfy your curiosity? :-)
>
> Haje
>
>
Looking at a IDL generated postscript file in a text editor, it looks like
it's 0.283465. Not that the extra precision matters much. I don't really
know much about postscript programming, just enough to change line
thickness and colors.
--Mike
|
|
|
Re: Postscript line thickness [message #35133 is a reply to message #35131] |
Tue, 20 May 2003 09:35  |
Haje Korth
Messages: 651 Registered: May 1997
|
Senior Member |
|
|
David,
Ken got it right. I loaded the postscript file into CorelDRAW and checked
the properties of the line. The software gives you the thickness with 3
digit precision. thick=1 gives you 0.283, thick=2 gives you 0.567, however.
So you now the number is rounded/truncated. But the precision is accurate
enough for the purpose. Does this satisfy your curiosity? :-)
Haje
"David Fanning" <david@dfanning.com> wrote in message
news:MPG.1933d88ba6f49739989ba4@news.frii.com...
> Haje Korth (haje.korth@jhuapl.edu) writes:
>
>> Actually, this was quite simple: do any plot with the thickness=1 and
find
>> the point size to be 0.283. The mapping is then the
"thickness=point/0.283".
>
> How did you do this? With a micrometer!?
>
> This is a good tip, but I would like to know how
> this relationship was established in more detail.
> Once my curiosity is satisfied, I'll write it up. :-)
>
> Cheers,
>
> David
>
> P.S. Let's just say I have a ruler marked in points,
> inches, and agate for laying out graphical designs,
> but either my eyes are really old or those points are
> very small. In either case, I don't think I can make
> out 0.283!!
>
> --
> David W. Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Phone: 970-221-0438, E-mail: david@dfanning.com
> Coyote's Guide to IDL Programming: http://www.dfanning.com/
> Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|
Re: Postscript line thickness [message #35144 is a reply to message #35133] |
Tue, 20 May 2003 06:33  |
K. Bowman
Messages: 330 Registered: May 2000
|
Senior Member |
|
|
In article <MPG.1933d88ba6f49739989ba4@news.frii.com>,
David Fanning <david@dfanning.com> wrote:
> Haje Korth (haje.korth@jhuapl.edu) writes:
>
>> Actually, this was quite simple: do any plot with the thickness=1 and find
>> the point size to be 0.283. The mapping is then the "thickness=point/0.283".
>
> How did you do this? With a micrometer!?
>
> This is a good tip, but I would like to know how
> this relationship was established in more detail.
> Once my curiosity is satisfied, I'll write it up. :-)
When you open a Postscript file in Illustrator and select a line, it
displays the properties of the line, including its width.
Ken
|
|
|
Re: Postscript line thickness [message #35145 is a reply to message #35144] |
Tue, 20 May 2003 06:16  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Haje Korth (haje.korth@jhuapl.edu) writes:
> Actually, this was quite simple: do any plot with the thickness=1 and find
> the point size to be 0.283. The mapping is then the "thickness=point/0.283".
How did you do this? With a micrometer!?
This is a good tip, but I would like to know how
this relationship was established in more detail.
Once my curiosity is satisfied, I'll write it up. :-)
Cheers,
David
P.S. Let's just say I have a ruler marked in points,
inches, and agate for laying out graphical designs,
but either my eyes are really old or those points are
very small. In either case, I don't think I can make
out 0.283!!
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|
Re: Postscript line thickness [message #35152 is a reply to message #35145] |
Mon, 19 May 2003 06:34  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Haje Korth (haje.korth@jhuapl.edu) writes:
> Does anyone know how the value of the line thickness keyword translates to
> points in the Postscript device. I am getting so tired of having to change
> all my graphics by hand for publication. Your help out of my misery is
> greatly appreciated!
I don't know anything about how thickness keywords
translate into points, but I do know that doing things
by hand is a bit passe in the computer world. :-)
A little bit of foresight goes a long way when writing
IDL programs. For example, if you know you have a graphics
display program that you are going to want to make a
PostScript file of (and aren't *all* of them this way?),
then something like this works well:
PRO NicePlot, data
IF !D.Name EQ 'PS' OR !D.Name EQ 'PRINTER' THEN BEGIN
psthick = 3
thick = !P.Thick
xthick = !X.Thick
ythick = !Y.Thick
zthick = !Z.Thick
font = !P.Font
!P.Thick = psthick
!X.Thick = psthick
!Y.Thick = psthick
!Z.Thick = psthick
!P.Font = 0 ; or 1, your choice
ENDIF
; Your normal graphics here. For example,
Plot, data
IF !D.Name EQ 'PS' OR !D.Name EQ 'PRINTER' THEN BEGIN
!P.Thick = thick
!X.Thick = xthick
!Y.Thick = ythick
!Z.Thick = zthick
!P.Font = font
ENDIF
END
If 3 is not the right value, then--at worst--you only
have to make a single change in your file. And you
could even put the value in as a keyword! :-)
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|