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

Home » Public Forums » archive » Re: Postscript problem
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
Re: Postscript problem [message #11940] Mon, 08 June 1998 00:00
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Oh, heck, I'm out of excuses. This is just not a good day
to be writing. :-(

I wrote this nonsense:

> Whoops, I just don't have it at all together today.
> I won some tennis matches this weekend and I'm still
> thinking about that beautiful cross-court running
> forehand instead of my job. :-)
>
> I wrote this:
>
>> Set_Plot, 'PS'
>> Device, XSize=5, YSize=3, /Inches, /Encap
>> TV, image, 0.1, 0.33, /Normal, XSize=1, YSize=1
>> TV, image, 0.4, 0.33, /Normal, XSize=1, YSize=1
>> TV, image, 0.7, 0.33, /Normal, XSize=1, YSize=1
>
> And I should have written this:
>
> Set_Plot, 'PS'
> Device, XSize=5, YSize=3, /Inches, /Encap
> TV, image, 0.1, 0.33, /Normal, XSize=0.25, YSize=0.25
> TV, image, 0.4, 0.33, /Normal, XSize=0.25, YSize=0.25
> TV, image, 0.7, 0.33, /Normal, XSize=0.25, YSize=0.25

And I should have written this:

Set_Plot, 'PS'
Device, XSize=5, YSize=3, /Inches, /Encap
TV, image, 0.1, 0.33, /Normal, XSize=0.20, YSize=0.33
TV, image, 0.4, 0.33, /Normal, XSize=0.20, YSize=0.33
TV, image, 0.7, 0.33, /Normal, XSize=0.20, YSize=0.33

Sheesh!

David
-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: Postscript problem [message #11941 is a reply to message #11940] Mon, 08 June 1998 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Whoops, I just don't have it at all together today.
I won some tennis matches this weekend and I'm still
thinking about that beautiful cross-court running
forehand instead of my job. :-)

I wrote this:

> Set_Plot, 'PS'
> Device, XSize=5, YSize=3, /Inches, /Encap
> TV, image, 0.1, 0.33, /Normal, XSize=1, YSize=1
> TV, image, 0.4, 0.33, /Normal, XSize=1, YSize=1
> TV, image, 0.7, 0.33, /Normal, XSize=1, YSize=1

And I should have written this:

Set_Plot, 'PS'
Device, XSize=5, YSize=3, /Inches, /Encap
TV, image, 0.1, 0.33, /Normal, XSize=0.25, YSize=0.25
TV, image, 0.4, 0.33, /Normal, XSize=0.25, YSize=0.25
TV, image, 0.7, 0.33, /Normal, XSize=0.25, YSize=0.25

Cheers,

David
-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: Postscript problem [message #11942 is a reply to message #11940] Mon, 08 June 1998 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Tim Abbott (tmca@cfht.hawaii.edu) writes:

> I have a problem with postscript output from a routine which works
> just fine on output to the display.

...[snip]

> Is there something about the PS driver I'm not understanding...?

There is a lot about the PS driver *to* understand!

I think the problem here is that images are not normally
sized and displayed in PostScript in exactly the same
way they are sized and displayed on the display.

In particular, instead of using Congrid to get the image
the correct size, like you do normally, you probably
want to use the XSize and YSize keywords of the TV command
to size the images in PostScript. I like to give both the
size of the image and the position of the lower-left corner
of the image in Normalized coordinates. Then I can use the
same code whether I am going to put the images on the display
or into a PostScript file.

For example, suppose I have an image and I want to put this
in a 500 by 300 window on my display, each image centered
in the Y direction and equally spaced in X. I might type this:

Window, XSize=500, YSize=300
snapshot = Congrid(image, 100, 100)
TV, image, 0.1, 0.33, /Normal
TV, image, 0.4, 0.33, /Normal
TV, image, 0.7, 0.33, /Normal

If I want to do the same thing in PostScript I might
do this:

Set_Plot, 'PS'
Device, XSize=5, YSize=3, /Inches, /Encap
TV, image, 0.1, 0.33, /Normal, XSize=1, YSize=1
TV, image, 0.4, 0.33, /Normal, XSize=1, YSize=1
TV, image, 0.7, 0.33, /Normal, XSize=1, YSize=1

The nice thing is that I could use the XSize and YSize
keywords to the TV command even if I were displaying to
the device itself. The values of those keywords are just
ignored on devices that do not support scalable pixels
the way PostScript does.

There are a lot of these PostScript tips on my web page
and in my IDL Programming Techniques book.

Best Regards,

David

-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438
Coyote's Guide to IDL Programming: http://www.dfanning.com/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Cross-platform !PATH (was Cross-platform PWD)
Next Topic: IDL and COM

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

Current Time: Wed Oct 08 18:07:32 PDT 2025

Total time taken to generate the page: 0.00570 seconds