IDL Tutorial 2: Plots and Output Files for Making Hardcopies .. Hence, you need to first start the PS device using the set_plot command, and then use the. SET_PLOT, ‘PS’. This causes IDL to use the PostScript driver for producing graphical output. Once the PostScript driver is enabled via SET_PLOT, the DEVICE. IDL treats the screen as one device and a postscript file (which you can print) as another. You can switch devices with the set_plot command.
|Published (Last):||26 February 2007|
|PDF File Size:||20.51 Mb|
|ePub File Size:||5.66 Mb|
|Price:||Free* [*Free Regsitration Required]|
D to reflect the configuration of the new device.
The case of Device is ignored by IDL. It sets the read-only system variable! The default is not to load the color table upon selection. As with most display devices, color indices range from 0 to A pseudo-color image is a two dimensional image, each pixel of which is used to index the color table, set_plo obtaining an RGB value for each possible pixel value.
If the COPY keyword parameter is set, the internal color tables are copied into the device. True-color images are also routed through the color tables.
Printing your graph.
Set this keyword to indicate that the current contents of the internal color table should be interpolated to cover the range of the newly-selected device. The resulting file produces a set of plots as shown in Multiple plots on a single page produced by setting the! Text and graphic color indices are translated to RGB by dividing the red, green and blue color table values by This section shows how to generate IDL PostScript graphics so that they can be inserted into other documents.
Sometimes, however, the default bounding box is inappropriate for the image being displayed. Vertical offset 5 in. The second element of! COLOR to the maximum color index minus one or, in the case of devices with white backgrounds, such as PostScript, to 0 black.
Assuming that the color tables have been loaded with the vectors RGand Ba pixel with a color value of rgb is displayed with a color of R rG gB b. This is easily done with the statement: On Windows and UNIX computers, excluding Macintosh computers, the conversion is done with Ghostscripta free, easily obtained and installed software package.
This tutorial describes one of many ways to generate hardcopy from a postscript printer. As an example, suppose you have an image that is narrow and tall that, when TV’ed to an IDL window, fills only a small portion of the plotting window. An Encapsulated PostScript EPS file is similar to a regular PostScript file except that it contains only one page of PostScript output contained in a “bounding box” that is used to tell other programs about the size and aspect ratio of the encapsulated image.
You have more options under Linux, but your best bet is to use a program called “gv.
Set up IDL to plot an encapsulated postscript file of some chosen name. The third element is the number of rows per page. The following IDL procedure demonstrates this technique.
When the resulting EPS file is brought into a desktop publishing program, it becomes very hard set_plott properly scale the image since the aspect ratio of the bounding box bears no relation to the aspect ratio of the image itself.
If you irl a color PostScript device you can enable the use of color with the statement:. For example, to create and load a color table with four elements, black, red, green and blue:.
Creating PDF Files in IDL
It demonstrates some of the three-dimensional plotting capabilities of IDL. This happens because IDL moves the origin of the plot before rotating the PostScript coordinate system degrees clockwise for the landscape plot. This procedure reads an X Windows Dump file and writes it back out as a properly-sized, 8-bit-color Encapsulated PostScript file: A PDF document with my graphics was created! This is straightforward if both devices have the same number of color indices.
The first element of! As with other devices, a color table value of represents maximum intensity, while 0 indicates an absence of the color.
IDL Tutorial 2 : Plots and Output Files for Making Hardcopies
Department of Physics and Astronomy. The page on the left shows an IDL plot printed in “portrait” orientation. Otherwise, the internal color tables are not changed.