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.

Author: Faushura Kagor
Country: Dominican Republic
Language: English (Spanish)
Genre: Life
Published (Last): 15 September 2009
Pages: 177
PDF File Size: 12.48 Mb
ePub File Size: 13.25 Mb
ISBN: 629-6-72223-826-9
Downloads: 31878
Price: Free* [*Free Regsitration Required]
Uploader: Douzil

For example a true-color n by m element image can be ordered in three ways: First, make a script to generate a plot on the graphics window. Pseudo-color images are similar to those displayed using the workstation monitor. The page on the left shows an IDL plot printed in “portrait” orientation. Color output or direct color separations can be produced with color PostScript. Sometimes, however, the default bounding box is setplot for the image being displayed.

When in doubt, reload the color table of the new device explicitly. For example, to create and load a color table with four elements, black, red, green and blue:. These keywords control the position of IDL plots on the page. As with black and white PostScript, images may be output with 1, 2, 4, or 8 bits, yielding 1, 2, 16, or possible colors.

Here, the X and Y offsets are still taken relative to the same points even though the orientation of the plot has changed. Suppose this script is called plotmydata.

Unlike monitors where white is the most visible color, PostScript writes black on white paper. Because devices have differing capabilities and not all are capable of representing the same number of colors, the treatment of color tables when switching devices is somewhat tricky. If the new device has more colors than the old device, some color indices will be invalid. After installing Ghostscript, creating a PDF file can set_plott as simple as this.


Use of PostScript fonts is discussed in detail in. The Macintosh computer uses the built-in pstopdf program to st_plot the conversion for you. Encapsulated postscript files offer the advantage that they can be included in documents like your final project paperprinted, and converted into other formats, all pretty easily.

MULTI is the number of columns per page. On Windows and UNIX computers, excluding Macintosh computers, the conversion is done with Ghostscript set_poot, a free, easily obtained and installed software package. This is straightforward if both devices have the same number of color indices.

IDL Graphics Devices

Text and graphic color indices are translated to RGB by dividing the red, green and blue color table values by Similarly, when output to an EPS file, this set_plor will only fill a small portion of the bounding box. The height of the picture is stored in s[2]: Department of Physics and Astronomy. Zero is normally black and white is normally represented by an index of The following example writes a bit image, interleaved over the 3rd dimension, to a PostScript file: True-color images are also routed through the color tables.

Any routines that rely on data coordinates should not be called until a new data coordinate system has been established. D to reflect the configuration of the set_ppot device.

A PDF document with my graphics was created! It also provides several examples of how the PostScript graphics device is used. Image Background Color Images that are displayed with a black background on a monitor frequently look better if set_pplot background is changed to white when displayed with PostScript. But I don’t like that solution. In this case, the same set_plit is reproduced four times. A scalar string containing the name of the device to use.

Creating PDF Files in IDL

If you have a color PostScript device you can enable the use of color with the statement:. This method works best when displaying images with continuous color ranges. Great FTP software, isl Set this keyword to copy the device’s color table from the internal color table, preserving the current color mapping.


Back to Index Next Tutorial.

Creating PDF Files in IDL

Set this keyword to indicate sst_plot the current contents of the internal color table should be interpolated to cover the range of the newly-selected device. In each case, a different number of bits are used per image pixel. When the resulting Isl file is brought into a desktop publishing program, it becomes very hard to properly scale the image since the aspect ratio of the bounding box bears no relation to the aspect ratio of the image itself.

Tweak it until you like the plot. This make automatic generation of PDF files problematic. Keyword parameters control how the color tables are transferred to the newly selected graphics device.

I’m going to assume that you have a script containing a list of commands that would ordinarily plot to the IDL window. Most UNIX systems come with this already installed. The procedure comprises the following steps: 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. Assuming that the previously-selected device’s sey_plot table contains M elements, and the new device’s color table contains N elements, then the minimum of M and N elements are loaded.

A pseudo-color image is a two dimensional image, each pixel of which is used to index the color table, thereby obtaining sft_plot RGB value for each possible pixel value. COLOR to the maximum color index minus one or, in the case of devices with white odl, such as PostScript, to 0 black.