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

Home » Public Forums » archive » Re: TV and PostScript
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: TV and PostScript [message #7864] Tue, 21 January 1997 00:00
joseph.b.gurman is currently offline  joseph.b.gurman
Messages: 15
Registered: October 1995
Junior Member
In article <5c2hi2$1a72@urano.inet.it>, aspinelli@ismes.it (Andrea
Spinelli) wrote:

> Hi everyone,
>
> I would like to print a colour map with TV on a PostScript
> device.
>
> I have a grid with my data, let's suppose it is a 10 x 20 floating
> array named mygrid.
>
> I want to use all available display space, so I do
>
> biggrid = congrid( mygrid, !d.x_size , !d.y_size )
> tv, biggrid
>
> On a window, this causes no problems.
>
> But, if I select a postscript device , !d.x_size and !d.y_size are
> very very big (there are 1000 pixel for cm, so there are about 20000
> pixels for dimension). This makes for a 20k x 20k grid, about 400
> million elements. Obviously, this breaks IDL.
>
> I do not want 1000 pixel per cm! But I cannot change the resolution
> (or, I am not able to change it). What can I do?
>
> Has anybody made a colour map with PostScript???
>
> Is there any way out of this problem???

Andrea -

First, you don't have to do the CONGRID mapping at all; IDL takes care of
that when you give the TV command in with the plotting device set to PostScript.
You do, however, want to set xsize and ysize such that the aspect ratio of
the plotting box is the same as that of the original array (i.e., with
DEVICE, xsize = xxxx, ysize = yyyy commands).

Also, if you have an 8-bit color table, don't forget to set the device:

IDL> DEVICE, bits = 8, /color

Hope this helps,

Joe Gurman

--
J.B. Gurman / Solar Physics Branch/ NASA Goddard Space Flight Center/
Greenbelt MD 20771 USA / joseph.b.gurman@gsfc.nasa.gov
| Federal employees are still prohibited from holding opinions while at |
| work. Therefore, any opinions expressed herein are somebody else's. |
Re: TV and PostScript [message #7865 is a reply to message #7864] Tue, 21 January 1997 00:00 Go to previous message
Pirmin Kaufmann is currently offline  Pirmin Kaufmann
Messages: 3
Registered: January 1997
Junior Member
Andrea Spinelli wrote:
>
> Hi everyone,
>
> I would like to print a colour map with TV on a PostScript
> device.
>
> I have a grid with my data, let's suppose it is a 10 x 20 floating
> array named mygrid.
>
> I want to use all available display space, so I do
>
> biggrid = congrid( mygrid, !d.x_size , !d.y_size )
> tv, biggrid
>
> On a window, this causes no problems.
>
> But, if I select a postscript device , !d.x_size and !d.y_size are
> very very big (there are 1000 pixel for cm, so there are about 20000
> pixels for dimension). This makes for a 20k x 20k grid, about 400
> million elements. Obviously, this breaks IDL.
>
> I do not want 1000 pixel per cm! But I cannot change the resolution
> (or, I am not able to change it). What can I do?
>
> Has anybody made a colour map with PostScript???
>
> Is there any way out of this problem???
>
> Help is quite appreciated...
>
> Thanks in advance.
>
> Andrea
>
> Andrea Spinelli - Ismes Spa. 9, Via Pastrengo, 24068 Seriate BG, Italy
> tel.: +39-35-307777 fax.: +39-35-302999 e-mail: aspinelli@ismes.it
> "Truth hurts, but pimples much more"

The actual pixel size depends on the resolution of the printer.
Postscript is printer-independent. Thus the system variables !d.x_size
and !d.y_size cannot provide an actual pixel size, but return some sort
of maximal thinkable resolution (I'm not an expert on Postscript).

However, in contrast to the screen device, the postcript device is
scalable. There is no need to call congrid. Instead, you can scale your
image directly using the xsize and ysize keywords of tv:

tv,mygrid,xsize=horizontal_image_size,ysize=vertical_image_s ize,/centimeter

where image_size is the size of the printed image in cm.

Note that because you work in Italy, I added the keyword /centimeter
to ensure the units of xsize, ysize are centimeters, not inches.

You may also want to call
device,bits_per_pixel=8
after set_plot,'PS' if you are using 8 bit color scheme.

xsize and ysize do not work for non-scalable devices like the screen.
--
------------------------------------------------
Pirmin Kaufmann pkaufmann@etl.noaa.gov
NOAA/ERL/ETL phone: 303 497-6613
325 Broadway R/E/ET7 fax: 303 497-6978
Boulder, CO 80303-3328
------------------------------------------------
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Starting IDL on UNIX in the background (rc script)
Next Topic: TV and PostScript

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

Current Time: Sat Oct 11 15:53:20 PDT 2025

Total time taken to generate the page: 0.48170 seconds