TEK2PLOT(1)
β¨ NAME β¨
Bestie, welcome to TEK2PLOT(1) from GNU Plotting Utilities β the page for tek2plot, whose whole job is to translate Tektronix files to other graphics formats. π
β¨
π¦ SYNOPSIS π¦
tek2plot [ options ] [ files ]
π DESCRIPTION π
Okay so tek2plot translates Tektronix graphics files to other formats, or displays them on an X Window System display. You pick the output format with the -T option, and the possible output formats are the same as those supported by graph(1), plot(1), pic2plot(1), and plotfont(1). If an output file is produced, it is written to standard output. β¨
Options and file names may be interspersed on the command line, but the options are processed before the file names are read. If -- is seen, it is interpreted as the end of the options. If no file names are specified, or the file name - is encountered, the standard input is read. That's the whole traffic pattern, bestie. π«Ά
π OPTIONS π
πΈ General Options πΈ
Every flag, every value, no skips β periodt. π
-Ttype,--output-formattype β Select type as the output format. It may be"X","png","pnm","gif","svg","ai","ps","cgm","fig","pcl","hpgl","regis","tek", or"meta"(the default). These refer respectively to the X Window System, PNG (Portable Network Graphics) format, portable anymap format (PBM/PGM/PPM), a pseudo-GIF format that does not use LZW encoding, the new XML-based Scalable Vector Graphics format, the format used by Adobe Illustrator, Postscript or Encapsulated Postscript (EPS) that can be edited withidraw(1), CGM format (by default, conforming to the WebCGM profile), the format used by thexfig(1)drawing editor, the Hewlett-Packard PCL 5 printer language, the Hewlett-Packard Graphics Language, ReGIS graphics format (which can be displayed by thedxterm(1)terminal emulator or by a VT330 or VT340 terminal), Tektronix format itself, and device-independent GNU metafile format. Unless type is"X", an output file is produced and written to standard output. Omitting the-Toption is equivalent to specifying-T meta. GNU metafile format may be translated to other formats withplot(1). It's giving format buffet, and honestly? Iconic. π-pn,--page-numbern β Output only page number n, within the Tektronix file or sequence of Tektronix files that is being translated. n must be a non-negative integer, since a Tektronix file may consist of one or more pages, numbered beginning with zero. The default behavior if the-poption is not used is to output all nonempty pages in succession. For example,tek2plot -T Xdisplays each Tektronix page in its own X window. If the-T png,-T pnm,-T gif,-T ai, or-T figoption is used, the default behavior is to output only the first nonempty Tektronix page, since files in those output formats contain only a single page of graphics. Most Tektronix files consist of either one page (page #0) or two pages (an empty page #0, and page #1). Tektronix files produced by the GNU plotting utilities (e.g., bygraph -T tek) are normally of the latter sort. Page zero said "not me being empty," and page one said "main character energy." π-Fname,--font-namename β Use the font name for rendering the native Tektronix fonts, if it is available. The default font is"Courier"except fortek2plot -T png,tek2plot -T pnm,tek2plot -T gif,tek2plot -T hpgl,tek2plot -T regis, andtek2plot -T tek, for which it is"HersheySerif". A list of available fonts can be obtained with the--help-fontsoption (see below). If a font outside the Courier family is used, the--position-charsoption (see below) should probably be specified. The-Foption is useful only if you have a Tektronix file that draws text using native Tektronix fonts. Tektronix files produced by the GNU plotting utilities (e.g., bygraph -T tek) do not use native Tektronix fonts: they use Hershey vector fonts instead. Font lore, lowkey. π-Wline_width,--line-widthline_width β Set the width of lines, as a fraction of the width of the display, to be line_width. A negative value means that a default value should be used. This value is format-dependent. The interpretation of zero line width is also format-dependent (in some output formats, a zero-width line is the thinnest line that can be drawn; in others, a zero-width line is invisible). Heads up: zero can mean "baby-fine line" or "ghost line," depending on the format. π--bg-colorname β Set the color used for the background to be name. This is relevant only totek2plot -T X,tek2plot -T png,tek2plot -T pnm,tek2plot -T gif,tek2plot -T svg,tek2plot -T cgm, andtek2plot -T regis. An unrecognized name sets the color to the default, which is"white". The environment variableBG_COLORcan equally well be used to specify the background color. If the-T svgor-T cgmoption is used, an output file without a background may be produced by setting the background color to"none". If the-T pngor-T gifoption is used, a transparent PNG file or a transparent pseudo-GIF, respectively, may be produced by setting theTRANSPARENT_COLORenvironment variable to the name of the background color. Transparency? We love a see-through moment. π¦--bitmap-sizebitmap_size β Set the size of the graphics display in which the plot will be drawn, in terms of pixels, to be bitmap_size. The default is"570x570". This is relevant only toplot -T X,plot -T png,plot -T pnm, andplot -T gif. If you choose a rectangular (non-square) window size, the fonts in the plot will be scaled anisotropically, i.e., by different factors in the horizontal and vertical directions. Forplot -T X, this requires an X11R6 display. Any font that cannot be scaled in this way will be replaced by a default scalable font, such as the vector font"HersheySerif". The environment variableBITMAPSIZEcan equally well be used to specify the window size. For backward compatibility, the X resourceXplot.geometrymay be used instead. Stretch responsibly, bestie. π--emulate-coloroption β If option isyes, replace each color in the output by an appropriate shade of gray. This is seldom useful, except when usingtek2plot -T pclto prepare output for a PCL 5 device. (Many monochrome PCL 5 devices, such as monochrome LaserJets, do a poor job of emulating color on their own.) You may equally well request color emulation by setting the environment variableEMULATE_COLORto"yes". Monochrome LaserJet said "I'll try my best," and honestly, that's all we can ask. π--max-line-lengthmax_line_length β Set the maximum number of points that a polygonal line may contain, before it is flushed out, to be max_line_length. If this flushing occurs, the polygonal line will be split into two or more sub-lines, though the splitting should not be noticeable. The default value of max_line_length is 500. The reason for splitting long polygonal lines is that some display devices (e.g., old Postscript printers and HP-GL pen plotters) have limited buffer sizes. The environment variableMAX_LINE_LENGTHcan also be used to specify the maximum line length. Buffer anxiety is real, and the polyline feels it. π«Ά--page-sizepagesize β Set the size of the page on which the plot will be positioned. This is relevant only totek2plot -T svg,tek2plot -T ai,tek2plot -T ps,tek2plot -T cgm,tek2plot -T fig,tek2plot -T pcl, andtek2plot -T hpgl. The default is"letter", which means an 8.5 inch by 11 inch page. Any ISO page size in the range"a0"..."a4"or ANSI page size in the range"a"..."e"may be specified ("letter"is an alias for"a"and"tabloid"is an alias for"b")."legal"and"ledger"are recognized page sizes also. The environment variablePAGESIZEcan equally well be used to specify the page size. The graphics display in which the plot is drawn will be a square region that would occupy nearly the full width of the specified page. An alternative size for the graphics display can be specified. For example, the page size could be specified as"letter,xsize=4in,ysize=6in", or"a4,xsize=5.0cm,ysize=100mm". For all of the above excepttek2plot -T hpgl, the graphics display will, by default, be centered on the page. For all of the above excepttek2plot -T svgandtek2plot -T cgm, the graphics display may be repositioned manually, by specifying the location of its lower left corner, relative to the lower left corner of the page. For example, the page size could be specified as"letter,xorigin=2in,yorigin=3in", or"a4,xorigin=0.5cm,yorigin=0.5cm". It is also possible to specify an offset vector. For example, the page size could be specified as"letter,xoffset=1in", or"letter,xoffset=1in,yoffset=1.2in", or"a4,yoffset=-1cm". In SVG format and WebCGM format it is possible to specify the size of the graphics display, but not its position. Page-size customization is the group-chat "where are we meeting" of graphics, and the answer is always "it depends." π--pen-colorname β Set the pen color to be name. An unrecognized name sets the pen color to the default, which is"black". Default pen said "black is a classic," and it's not wrong. π€--position-charsβ Position the characters in each text string individually. If the text font is not a member of the Courier family, and especially if it is not a fixed-width font, this option is recommended. It will improve the appearance of text strings, at the price of making it difficult to edit the output file withxfig(1),idraw(1), or Illustrator. Beauty is pain, especially for whoever has to edit the file later. π--rotationangle β Rotate the graphics display by angle degrees. Recognized values are"0","90","180", and"270"."no"and"yes"are equivalent to"0"and"90", respectively. The environment variableROTATIONcan also be used to specify a rotation angle. Spin the block, but only by the approved angles, bestie. π--use-tek-fontsβ Use the bitmap fonts that were used on the original Tektronix 4010/4014 terminal. This option is relevant only totek2plot -T X. The four relevant bitmap fonts are distributed with most versions of the GNU plotting utilities, under the names"tekfont0"..."tekfont3". They can easily be installed on any modern X Window System display. For this option to work properly, you must also select a window size of 1024x1024 pixels, either by using the--bitmap-size 1024x1024option or by setting the value of theXplot.geometryresource. This is because bitmap fonts, unlike the scalable fonts thattek2plotnormally uses, cannot be rescaled. Vintage terminal fonts are iconic, but they do not do "resize me" energy. π
Okay so this option is useful only if you have a file in Tektronix format that draws text using native Tektronix fonts. Tektronix files produced by the GNU plotting utilities (e.g., by graph -T tek) do not use native Tektronix fonts: they use Hershey vector fonts instead. π
π¨οΈ Options for Metafile Output
The following option is relevant only if the -T option is omitted or if -T meta is used. In this case tek2plot outputs a GNU graphics metafile, which must be translated to other formats with plot(1).
-O,--portable-outputβ outputs the portable (human-readable) version of GNU metafile format, rather than a binary version (the default). Vibe check: the format of the binary version is machine-dependent.
βΉοΈ Informational Options
--helpβ prints a list of command-line options, and exits. Iconic.--help-fontsβ prints a table of available fonts, and exits. The table will depend on which output format is specified with the-Toption.tek2plot -T X,tek2plot -T svg,tek2plot -T ai,tek2plot -T ps,tek2plot -T cgm, andtek2plot -T figeach support the 35 standard Postscript fonts.tek2plot -T svg,tek2plot -T pcl, andtek2plot -T hpglsupport the 45 standard PCL 5 fonts, and the latter two support a number of Hewlett-Packard vector fonts. All seven support a set of 22 Hershey vector fonts, as dotek2plot -T png,tek2plot -T pnm,tek2plot -T gif,tek2plot -T regis, andtek2plot -T tek.tek2plotwithout a-Toption in principle supports any of these fonts, since its output must be translated to other formats withplot(1).
The plotfont(1) utility may be used to obtain a character map of any supported font.
--list-fontsβ like--help-fonts, but lists the fonts in a single column to facilitate piping to other programs. If no output format is specified with the-Toption, the full set of supported fonts is listed.--versionβ prints the version number oftek2plotand the plotting utilities package, and exits.
π ENVIRONMENT
The environment variables BITMAPSIZE, PAGESIZE, BG_COLOR, EMULATE_COLOR, MAX_LINE_LENGTH and ROTATION serve as backups for the options --bitmap-size, --page-size, --bg-color, --emulate-color, --max-line-length, and --rotation, respectively. The remaining environment variables are specific to individual output formats.
tek2plot -T Xβ pops up a window on an X Window System display and draws graphics in it, and it checks theDISPLAYenvironment variable. Its value determines the display that will be used.tek2plot -T pngandtek2plot -T gifβ produce output in PNG format and pseudo-GIF format respectively. Theyβre affected by theINTERLACEenvironment variable. If its value is"yes", the output will be interlaced. Also, if theTRANSPARENT_COLORenvironment variable is set to the name of a color, that color will be treated as transparent in the output.tek2plot -T pnmβ produces output in portable anymap (PBM/PGM/PPM) format, and is affected by thePNM_PORTABLEenvironment variable. If its value is"yes", the output will be in a human-readable format rather than binary (the default).tek2plot -T cgmβ produces output in CGM (Computer Graphics Metafile) format, and is affected by theCGM_MAX_VERSIONandCGM_ENCODINGenvironment variables. By default, it produces a binary-encoded version of CGM version 3 format. For backward compatibility, the version number may be reduced by settingCGM_MAX_VERSIONto"2"or"1". Irrespective of version, the output CGM file will use the human-readable clear text encoding ifCGM_ENCODINGis set to"clear_text". However, only binary-encoded CGM files conform to the WebCGM profile.tek2plot -T pclβ produces PCL 5 output for Hewlett-Packard printers and plotters, and is affected by the environment variablePCL_ASSIGN_COLORS. It should be set to"yes"when producing PCL 5 output for a color printer or other color device. This will ensure accurate color reproduction by giving the output device complete freedom in assigning colors, internally, to its"logical pens". If it is"no"then the device will use a fixed set of colored pens, and will emulate other colors by shading. The default is"no"because monochrome PCL 5 devices, which are much more common than colored ones, must use shading to emulate color.tek2plot -T hpglβ produces Hewlett-Packard Graphics Language output, and is affected by several environment variables. The most important isHPGL_VERSION, which may be set to"1","1.5", or"2"(the default)."1"means that the output should be generic HP-GL,"1.5"means that the output should be suitable for the HP7550A graphics plotter and the HP758x, HP7595A and HP7596A drafting plotters (HP-GL with some HP-GL/2 extensions), and"2"means that the output should be modern HP-GL/2. If the version is"1"or"1.5"then the only available fonts will be vector fonts, and all lines will be drawn with a default width (the-Woption will not work).- The position of the
tek2plot -T hpglgraphics display on the page can be rotated 90 degrees counterclockwise by setting theHPGL_ROTATEenvironment variable to"yes". This is not the same as the rotation obtained with the--rotationoption, since it both rotates the graphics display and repositions its lower left corner toward another corner of the page. Besides"no"and"yes", recognized values forHPGL_ROTATEare"0","90","180", and"270"."no"and"yes"are equivalent to"0"and"90", respectively."180"and"270"are supported only ifHPGL_VERSIONis"2"(the default). - By default,
tek2plot -T hpglwill draw with a fixed set of pens. Which pens are present may be specified by setting theHPGL_PENSenvironment variable. IfHPGL_VERSIONis"1", the default value ofHPGL_PENSis"1=black"; ifHPGL_VERSIONis"1.5"or"2", the default value ofHPGL_PENSis"1=black:2=red:3=green:4=yellow:5=blue:6=magenta:7=cyan". The format should be self-explanatory. By settingHPGL_PENSyou may specify a color for any pen in the range#1...#31. All color names recognized by the X Window System may be used. Pen#1must always be present, though it need not be black. Any other pen in the range#1...#31may be omitted. - If
HPGL_VERSIONis"2"thentek2plot -T hpglwill also be affected by the environment variableHPGL_ASSIGN_COLORS. If its value is"yes", thentek2plot -T hpglwill not be restricted to the palette specified inHPGL_PENS: it will assign colors to"logical pens"in the range#1...#31, as needed. The default value is"no"because other than color LaserJet printers and DesignJet plotters, not many HP-GL/2 devices allow the assignment of colors to logical pens. - The drawing of visible white lines is supported only if
HPGL_VERSIONis"2"and the environment variableHPGL_OPAQUE_MODEis"yes"(the default). If its value is"no"then white lines (if any), which are normally drawn with pen#0, will not be drawn. This feature is to accommodate older HP-GL/2 devices. HP-GL/2 pen plotters, for example, do not support the use of pen#0to draw visible white lines. Some older HP-GL/2 devices may, in fact, malfunction if asked to draw opaque objects.
- The position of the
π SEE ALSO
Lowkey go read plot(1), plotfont(1), and The GNU Plotting Utilities Manual. π«Ά
π AUTHORS
tek2plot was written by Robert S. Maier (rsm@math.arizona.edu). It incorporates a Tektronix parser written by Edward Moy (moy@parc.xerox.com).
π BUGS
Email bug reports to bug-gnu-utils@gnu.org.
Shoutout to FSF for this one, dated Jun 2000 β itβs TEK2PLOT(1), no cap. π
β¨
π¦ where this page comes from
- arch rolling: plotutils 2.6-12 Β· GPL-3.0-or-later
- centos-stream 10: plotutils 2.6-37.el10 Β· GPL-2.0-or-later AND GPL-3.0-or-later
- centos-stream 9: plotutils 2.6-28.el9 Β· GPLv2+ and GPLv3+
- centos-stream 9: plotutils 2.6-28.el9 Β· GPLv2+ and GPLv3+
- fedora 43: plotutils 2.6-38.fc43 Β· GPL-2.0-or-later AND GPL-3.0-or-later
- fedora 43: plotutils 2.6-38.fc43 Β· GPL-2.0-or-later AND GPL-3.0-or-later
- fedora 44: plotutils 2.6-39.fc44 Β· GPL-2.0-or-later AND GPL-3.0-or-later
- fedora 44: plotutils 2.6-39.fc44 Β· GPL-2.0-or-later AND GPL-3.0-or-later
- opensuse-leap 16.0: plotutils 2.6-160000.2.2 Β· GPL-2.0-or-later AND GPL-3.0-or-later
- opensuse-leap 16.0: plotutils 2.6-160000.2.2 Β· GPL-2.0-or-later AND GPL-3.0-or-later
- opensuse-leap 16.0: plotutils 2.6-160000.2.2 Β· GPL-2.0-or-later AND GPL-3.0-or-later
- opensuse-leap 16.0: plotutils 2.6-160000.2.2 Β· GPL-2.0-or-later AND GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms