Re: TV and PostScript [message #7865 is a reply to message #7864] |
Tue, 21 January 1997 00:00  |
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
------------------------------------------------
|
|
|