Re: Postscript problem [message #11940] |
Mon, 08 June 1998 00:00 |
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  |
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  |
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/
|
|
|