[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
4.1.0.10 cgm
The ‘cgm‘ terminal generates a Computer Graphics Metafile, Version 1. This file format is a subset of the ANSI X3.122-1986 standard entitled "Computer Graphics - Metafile for the Storage and Transfer of Picture Description Information".
Syntax:
set terminal cgm {color | monochrome} {solid | dashed} {{no}rotate} {<mode>} {width <plot_width>} {linewidth <line_width>} {font "<fontname>,<fontsize>"} {<color0> <color1> <color2> ...} |
‘solid‘ draws all curves with solid lines, overriding any dashed patterns; <mode> is ‘landscape‘, ‘portrait‘, or ‘default‘; <plot_width> is the assumed width of the plot in points; <line_width> is the line width in points (default 1); <fontname> is the name of a font (see list of fonts below) <fontsize> is the size of the font in points (default 12).
The first six options can be in any order. Selecting ‘default‘ sets all options to their default values.
Each color must be of the form ’xrrggbb’, where x is the literal character ’x’ and ’rrggbb’ are the red, green and blue components in hex. For example, ’x00ff00’ is green. The background color is set first, then the plotting colors.
Examples:
set terminal cgm landscape color rotate dashed width 432 \\ linewidth 1 'Helvetica Bold' 12 # defaults set terminal cgm linewidth 2 14 # wider lines & larger font set terminal cgm portrait "Times Italic" 12 set terminal cgm color solid # no pesky dashes! |
— CGM FONT —
The first part of a Computer Graphics Metafile, the metafile description, includes a font table. In the picture body, a font is designated by an index into this table. By default, this terminal generates a table with the following 35 fonts, plus six more with ‘italic‘ replaced by ‘oblique‘, or vice-versa (since at least the Microsoft Office and Corel Draw CGM import filters treat ‘italic‘ and ‘oblique‘ as equivalent):
Helvetica Helvetica Bold Helvetica Oblique Helvetica Bold Oblique Times Roman Times Bold Times Italic Times Bold Italic Courier Courier Bold Courier Oblique Courier Bold Oblique Symbol Hershey/Cartographic_Roman Hershey/Cartographic_Greek Hershey/Simplex_Roman Hershey/Simplex_Greek Hershey/Simplex_Script Hershey/Complex_Roman Hershey/Complex_Greek Hershey/Complex_Script Hershey/Complex_Italic Hershey/Complex_Cyrillic Hershey/Duplex_Roman Hershey/Triplex_Roman Hershey/Triplex_Italic Hershey/Gothic_German Hershey/Gothic_English Hershey/Gothic_Italian Hershey/Symbol_Set_1 Hershey/Symbol_Set_2 Hershey/Symbol_Math ZapfDingbats Script 15 |
The first thirteen of these fonts are required for WebCGM. The Microsoft Office CGM import filter implements the 13 standard fonts listed above, and also ’ZapfDingbats’ and ’Script’. However, the script font may only be accessed under the name ’15’. For more on Microsoft import filter font substitutions, check its help file which you may find here:
C:\\Program Files\\Microsoft Office\\Office\\Cgmimp32.hlp |
and/or its configuration file, which you may find here:
C:\\Program Files\\Common Files\\Microsoft Shared\\Grphflt\\Cgmimp32.cfg |
In the ‘set term‘ command, you may specify a font name which does not appear in the default font table. In that case, a new font table is constructed with the specified font as its first entry. You must ensure that the spelling, capitalization, and spacing of the name are appropriate for the application that will read the CGM file. (Gnuplot and any MIL-D-28003A compliant application ignore case in font names.) If you need to add several new fonts, use several ‘set term‘ commands.
Example:
set terminal cgm 'Old English' set terminal cgm 'Tengwar' set terminal cgm 'Arabic' set output 'myfile.cgm' plot ... set output |
You cannot introduce a new font in a ‘set label‘ command.
— CGM FONTSIZE —
Fonts are scaled assuming the page is 6 inches wide. If the size command is used to change the aspect ratio of the page or the CGM file is converted to a different width, the resulting font sizes will be scaled up or down accordingly. To change the assumed width, use the ‘width‘ option.
— CGM LINEWIDTH —
The ‘linewidth‘ option sets the width of lines in pt. The default width is 1 pt. Scaling is affected by the actual width of the page, as discussed under the ‘fontsize‘ and ‘width‘ options.
— CGM ROTATE —
The ‘norotate‘ option may be used to disable text rotation. For example, the CGM input filter for Word for Windows 6.0c can accept rotated text, but the DRAW editor within Word cannot. If you edit a graph (for example, to label a curve), all rotated text is restored to horizontal. The Y axis label will then extend beyond the clip boundary. With ‘norotate‘, the Y axis label starts in a less attractive location, but the page can be edited without damage. The ‘rotate‘ option confirms the default behavior.
— CGM SOLID —
The ‘solid‘ option may be used to disable dashed line styles in the plots. This is useful when color is enabled and the dashing of the lines detracts from the appearance of the plot. The ‘dashed‘ option confirms the default behavior, which gives a different dash pattern to each line type.
— CGM SIZE —
Default size of a CGM plot is 32599 units wide and 23457 units high for landscape, or 23457 units wide by 32599 units high for portrait.
— CGM WIDTH —
All distances in the CGM file are in abstract units. The application that reads the file determines the size of the final plot. By default, the width of the final plot is assumed to be 6 inches (15.24 cm). This distance is used to calculate the correct font size, and may be changed with the ‘width‘ option. The keyword should be followed by the width in points. (Here, a point is 1/72 inch, as in PostScript. This unit is known as a "big point" in TeX.) Gnuplot ‘expressions‘ can be used to convert from other units.
Example:
set terminal cgm width 432 # default set terminal cgm width 6*72 # same as above set terminal cgm width 10/2.54*72 # 10 cm wide |
— CGM NOFONTLIST —
The default font table includes the fonts recommended for WebCGM, which are compatible with the Computer Graphics Metafile input filter for Microsoft Office and Corel Draw. Another application might use different fonts and/or different font names, which may not be documented. The ‘nofontlist‘ (synonym ‘winword6‘) option deletes the font table from the CGM file. In this case, the reading application should use a default table. Gnuplot will still use its own default font table to select font indices. Thus, ’Helvetica’ will give you an index of 1, which should get you the first entry in your application’s default font table. ’Helvetica Bold’ will give you its second entry, etc.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |