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):||5 July 2005|
|PDF File Size:||8.5 Mb|
|ePub File Size:||12.4 Mb|
|Price:||Free* [*Free Regsitration Required]|
This is easily done with the statement: Keywords allow UNIX users to select other conversion programs, such as pstopdf or esptopdfto perform the conversion. A scalar string containing the name of the device to use. Unlike monitors where white is the most visible color, PostScript writes black on white paper. A value of 1 specifies pixel interleaving, 2 is row interleaving, se_tplot 3 is image interleaving. This section shows how to generate IDL PostScript graphics so that they can be inserted into other documents.
The second element of! The first element of! When the resulting EPS 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.
IDL Tutorial 2 : Plots and Output Files for Making Hardcopies
If the image column size is not an exact multiple, extra pixels with a value of are output at the end of each row. This tutorial describes one of many ways to generate hardcopy from a postscript printer. Sometimes, however, the default bounding box is inappropriate for the image being displayed.
Assuming that the previously-selected device’s color table contains M elements, and the new device’s color table contains N elements, then the minimum of M and N elements are loaded. In addition, images are either pseudo-color or true-color. Run your plotting script. For example, the following lines of code create a PostScript file, multi. For the histogram plot, for example, you can now just type this. 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.
Here, the X and Y offsets are still taken relative to the same points even though the orientation of the plot has changed. The red color table array contains the intensity translation table for the red image, and so forth.
Color output or direct color separations can be produced with color PostScript.
The PostScript Device
To direct graphics output to a PostScript file, issue the command:. For example, to create and load a color table with four elements, black, red, green and blue:. For example a true-color n by m element image can be ordered in three ways: Department of Physics and Astronomy.
True-Color Images A true-color image consists of an array with three dimensions, one of which has a size of three, containing the three color components. A color index of writes white which is invisible on white paper. Similarly, when output to an EPS file, this image will only fill a small portion of the bounding box.
This happens because IDL moves the origin of the plot before rotating the PostScript coordinate system degrees clockwise for the landscape plot. Great FTP software, too!
A true-color image consists of an array with three dimensions, one of which has a size of three, containing the three color components. The following IDL procedure demonstrates this technique.
Generating Hardcopy of Plots There are many different ways to produce plots in a format other than onto the IDL graphics window. This offset is always taken relative to the lower left-hand corner of the page when viewed in portrait orientation. A PDF document with my graphics was created! Because devices have differing capabilities and not all are capable of representing the set_plt number of colors, the treatment of color tables when switching devices is somewhat tricky.
These keywords control the position of IDL plots on the page. Color Images As with black and white PostScript, images may be output with 1, 2, 4, or 8 bits, yielding 1, 2, 16, or udl colors. This procedure reads an X Windows Dump file and writes it back out as a properly-sized, icl Encapsulated PostScript file:.
Then, use a postscript viewer to look at it and print it, or, if one is not available, embed the plot in a word processing document.
IDL Graphics Devices
Here is a set of commands to generate an encapsulated postscript file. Many laser printers and high-resolution, high-quality photo typesetters support PostScript. Drawing text or graphics with a color index of 0 results in black, 1 in red, 2 in green, and 3 in blue.
MULTI is a counter that reports how many plots remain on the page. Zero is normally black and white is normally represented by an index of It was produced with the following IDL statements: The height of the picture is stored in s: The page on the right shows an IDL plot printed in “landscape” orientation.
The width of the picture in pixels is stored in s. MULTI set_lpot a 5-element set_pot array that controls the number of rows and columns of plots to make on a page or in a graphics window.
If the new device’s color tables contain more indices than those of the old device, the new device’s tables are not completely filled. PostScript is a programming language designed to convey a description of a page containing text and graphics. MULTI is the number of columns per page. By convention the first color is always red, the second green, and the last is blue. ido
In this case, the same image is reproduced four times. Such graphics output compares favorably with the output from IDL 8 function graphics commands, although Coyote Graphics output files are generally smaller in size.