ICTRANS(1NCARG)
π ictrans β ICTRANS(1NCARG), NCAR GRAPHICS β¨
okay bestie, welcome to the manual page for ictrans, the interactive NCAR CGM translator π
it lives in the NCAR GRAPHICS manual, section 1NCARG, and it's basically the glow-up front-end for ctrans. let's get into it π«Ά
β¨ NAME β¨
ictrans β the interactive NCAR CGM translator, aka ctrans π¦
π SYNOPSIS π
ictrans [ -d device ] [ -font font ] [ -e script ]* [ -soft ] [ -bell ]
[ -lmin min ] [ -lmax max ] [ -lscale scale ] [ -pal pal_fname ] [
-Version ] [ -wid window_id ] [ device-specific options ] metafile...
πΈ DESCRIPTION πΈ
so. ictrans is the user interface to the Computer Graphics Metafile (CGM) translator ctrans. the way that it works is: the second you invoke it, ictrans drops into command interpreter mode and justβ¦ waits for you to tell it what to do π while it's waiting for commands from you, it shows you this prompt:
ictrans>
main character energy, honestly.
On invocation, ictrans also does a whole configuration ritual for its spooled device table β and it builds that table by processing several sources, in order, no skipping:
- first it hunts for the file
ncarv_spoolin the$NCARG_ROOT/lib/ncargdirectory. if that file exists,ictransloads it into the spooled device table. - next, it hunts for the file
.ncarv_spoolin your home directory. if it finds it, its contents get merged into the spooler table. - finally, the
NCARV_SPOOLenvironment variable may contain the definition for a single spooler. if that variable is set, its contents also get merged into the table.
Every entry in all of those sources is identified by a name. and if there's a name conflict? the last entry encountered wins β like, the previous entry of the same name gets overridden. periodt. π
π₯ OPTIONS π₯
-bellβ ring the bell at the end of each frame π the default is to run in silent mode. not every device supports this option, so don't be shocked (pun intended) if it does nothing.-ddevice β device name.ictranswill use the Graphcap (if it exists) or the appropriate graphics library indicated by device.
if device is preceded by a UNIX directory path, then ictrans will look in that directory for the specified graphcap. otherwise ictrans searches the directory $NCARG_ROOT/lib/ncarg/graphcaps for the graphcap.
for all device specifications except X11, output is directed to standard out. in the case of X11, translation results in appropriate calls to the X11 libraries. see graphcap(5NCARG) for a description of supported devices, and see gcaps(1NCARG) for a list of devices supported by your particular configuration of ctrans π
this option overrides the GRAPHCAP environment variable.
-escript β script is a singleictranscommand. the validictranscommands are discussed in the COMMANDS section below. multiple-eoptions may appear on a single command line. be careful to use quotes if your command contains spaces or metacharacters that might get interpreted by the shell π when this option is used,ictransdoes not enter interactive mode β it simply performs the given commands and then exits.-fontfontcap β fontcap file to be used for stroking text. when interpreting CGMTEXTcommand elements, use fontcap as the default font for textual translation. Note: CGMs may contain textual descriptions which are not embedded in CGMTEXTelements, so those are not influenced by fontcap specifications. also note that a CGM may explicitly specify a named font, which may override a font provided on the command line. the environment variableFONTCAPmay also be used to specify a default fontcap.
if fontcap is preceded by a UNIX directory path, then ictrans will look in that directory for the specified fontcap. otherwise ictrans searches the directory $NCARG_ROOT/lib/ncarg/fontcaps for the fontcap.
see fontcap(5NCARG) for a description of the available fontcaps, and see fcap(1NCARG) for a list of the fontcaps installed on your system.
this option overrides the FONTCAP environment variable.
-lminmin β on devices which support line width scaling, all lines are guaranteed to be scaled at least min times the default line width for that device. this option effectively insures that the minimum value for the CGM element"LINE WIDTH"is min.-lmaxmax β on devices which support line width scaling, all lines are guaranteed to be scaled at most max times the default line width for that device. this option effectively insures that the maximum value for the CGM element"LINE WIDTH"is max.
the results of setting max less than min are undefined. like, genuinely undefined. don't do it, bestie π
-lscalescale β on devices which support line width scaling, all line width specifications within the metafile will be scaled by scale. this option is subject to modification by the-lminand-lmaxoptions.-palpal_fname β use the color palette defined in the file pal_fname for subsequent translation of the metafile. this palette will override any color map defined by the CGM being translated π for a description of the format of pal_fname seeras_palette(5NCARG).-softβ unconditionally perform software filling of all filled polygons. this option may be useful for devices which have limits on the number of vertices describing a polygon. on some devices this number is known and software filling is performed, as appropriate, without user specification β¨-Versionβ print the version number and then exit. that's it, that's the whole thing π
π¦ DEVICE SPECIFIC OPTIONS π¦
ictrans accepts an identical set of device-specific options to that of ctrans. for a description of the device-specific options, see ctrans(1NCARG).
and yeah, that's only part one, bestie β there's more coming ππ
πΈ COMMANDS πΈ
β¨ Command Structure β¨
okay so bestie, ictrans commands are so regular, it's giving clean girl aesthetic π
Every command has the same lil shape. Commands that work directly on the metafile you're processing can be preceded by a frame_list telling them which frames they apply to. Some commands take arguments. And literally anything that comes after a command name? That's an argument, periodt:
( frame [ ,frame ])* command ( argument )*
A comma-separated pair of frames means the inclusive list of frames, no cap. If you skip the frame list and the command needs a frame, it just uses the current frame as the default. And if you skip the argument list when one's required, a default argument gets used whenever that's even possible π«Ά
So like, 1,5 8 save /tmp/foo would write the first through fifth frame and the eighth frame of the metafile out to the file /tmp/foo. Iconic.
Commands will ignore any unexpected arguments (rude of you to send them, honestly). And command names can be abbreviated up to the point where they're unique π₯
π Frame Lists π
You can address frames in several ways, bestie:
nnnβ by frame number. Frames get a relative number from first to last in the metafile, and the first frame is numbered1.$β the last frame in the file..β the current frame.ictranskeeps track of the last frame an operation was performed on, and that frame is called the "current frame" πframe+-nβ a frame number followed by a plus sign (+) or a minus sign (-), followed by a decimal number, specifies the frame plus or minus that indicated number of frames.framecan be omitted, in which case the current frame is assumed. So for example,10+2addresses frame 12 in the metafile β¨
π Commands π
!command β run command as a shell command on the local machine.alias [ name [ def ] ]β assign def to the alias name. If def is omitted, the alias name is displayed along with its current definition. If both name and def are omitted, all aliases are displayed. def is of the form:
: [ ctrans_args ] : [ filter_chain ]
where ctrans_args is a list of command line arguments for the metafile translator ctrans, and filter_chain is a set of simple commands separated by |. filter_chain may be terminated by > or >> filename. For example:
ictrans> alias name1 : -d xwd : | cat > outfile
or
ictrans> alias name2 : -d ps.mono : | filter1 | lpr
dup [number]β sets how many times each frame gets displayed during subsequent plotting. Default is one. If you invokedupwith no arguments, it hands you back the current value ofdupπ«Άcountβ reports the number of frames contained in the file.currentβ reports the current frame.file [ metafile ]β the file metafile will be used for subsequent translation.ictransuses the shell defined by the environment variableSHELL(/bin/shby default) to do filename substitution on metafile. The rules governing filename substitution are exactly as defined by the working shell. If you give no argument, the current metafile name gets reported.font [ font ]β set the fontcap to font for future translation. This function is identical to the one from the-fontoption. If font is omitted, the current fontcap name is reported.help [ command ]β print a usage statement for command. If command is omitted, you get a brief description of all the commands πΈ[ frames ] listβ give brief info about each metafile frame in frames. If frames is omitted, the current frame is used. If frames is omitted and the current frame isn't the last frame, the current frame is incremented to the next frame in the metafile.< frame1 > < frame2 > mergeβ plot frame number frame1 and then plot frame number frame2 over that first frame without clearing the device. The result is a "merge" of the two plots. The current frame is not changed. There are no defaults for frame1 or frame2. The resulting plot might not be what you expected β attributes from the first frame, like color, may override attributes in the second frame πloopβ toggle loop mode on or off. When loop mode is on, subsequent plot commands will cause the requested frames to be plotted, and thenictranswill proceed to either the first frame in the defined segment or the last, and repeatedly display the first through last (or last through first) frames. Looping continues until an interrupt signal is received. How it decides which way to loop, forwards or backwards, goes like this: if the last group of frames plotted was in ascending order, loop forward. If the last group of frames plotted was in descending order, loop backwards. If the order can't be determined, don't loop. For example: if loop mode is set,1 3,4 plotwill result in forward looping,1 4,3 plotwill result in backward looping, and3,4 1 plotwill result in no looping at all β because the last group of frames plotted,1, is a single frame πmovie [ time ]β display each frame for time seconds before proceeding to the next frame during subsequent plots. If time is omitted, movie mode gets toggled off or on. If movie mode is toggled on, the default time is zero seconds. If movie mode is toggled to off, a newline must be received before advancing to the next frame during plotting.nextβ multiple files may be specified on theictranscommand line. To edit the next file in the argument list, use thenextcommand.[ frames ] plotβ plot the addressed frames. If frames is omitted, the current frame is plotted and, if possible, the current frame number is incremented. Ifmoviemode is set,ictranswill wait time seconds after displaying each plot before continuing β time is set with themoviecommand. Ifmoviemode is not set,ictranswill wait for a newline character before advancing to the next frame.plotwill report the number of frames and the last frame in frames. Plotting will be terminated andictranswill reenter command mode after the last frame is plotted, or upon receiving an interrupt signal,SIGINT.[ frames ] Printβ the addressed frames are translated and sent to the current spooling device. Translation is performed by a spawned translator. Thespoolercommand may be used to select a spooling device. Seencarv_spool(5NCARG).quitβ terminate the session. bye bestie π[ frames ] save [ metafile ]β save the addressed frames to metafile. If metafile doesn't exist, it's created. Filename substitution is performed on metafile. If metafile is omitted, the last file saved to is used. If frames is omitted, the current frame is used.[ frames ] Save [ metafile ]β same as thesavecommand, exceptSavedoes not confirm its actions with you when the file already exists. If the file exists but isn't a valid NCGM, it gets overwritten. If the file exists and is a valid NCGM, it gets appended to.skip [ number ]β set the number of frames to skip over during subsequent plotting. So for example, ifskipis set to1and a request is made to plot frames 1 through 10, frames 1, 3, 5, 7, and 9 will be displayed. With no arguments,skipreports its current value. The default is zero.spooler [ spooler_alias ]β with no arguments, the current spooler alias name is reported. If spooler_alias is a valid alias, either defined by thealiascommand, or in ancarv_spoolconfiguration file, or by theNCARV_SPOOLenvironment variable, then spooler alias becomes the current spooler. SubsequentPrintcommands will use the spooler definition defined by the current spooler. Seencarv_spool(5NCARG).[ start frame ] startβ this command defines the first frame in a segment of frames.start, together with thestopcommand, define the boundaries of a segment of metafile frames. Whenictransis in loop mode, the contents of this segment are repeatedly displayed. The default start frame is the first frame in the metafile,1. If no arguments are given,startreports the first frame in the current segment.[ stop frame ] stopβ this command defines the last frame in a segment of frames. The default stop frame is the last frame in the metafile,$. If no arguments are given,stopreports the last frame in the current segment.zoom [ llx [ lly [ urx [ ury ]]]]β thezoomcommand lets you specify a workstation window (in the GKS sense). Four coordinates are specified, which define a rectangular window that's a subset of the normalized VDC rectangle with corner points(0.0, 0.0)and(1.0, 1,0). That specified window is then mapped onto the entire viewport. For example
ictrans> zoom 0.0 0.0 0.5 0.5
would result in the lower left quarter of subsequent plots being blown up to fill the entire display. Specifying a window like this may be used for zooming and panning β¨
The range with which one may zoom in on a plot may be limited by the integer addressing precision of the device.
π¦ EXAMPLES π¦
The following example shows how ictrans might be used in a batch mode to translate a metafile called gmeta and send the translated results of the entire file to a spooled device called "imagen" which might be defined in the system ncarv_spool file:
% ictrans -e 'spooler imagen' -e '1,$Print' gmeta
π ENVIRONMENT π
FONTCAPβ default fontcap specifier.GRAPHCAPβ default output device specifier.NCARG_ROOTβ path to root of NCAR Graphics installation.NCARG_LIBβ if set, this variable contains the path to the installed NCAR Graphics libraries.NCARG_LIBoverridesNCARG_ROOT.NCARG_TMPβ if set, this environment variable contains a directory path to be used for temporary files. On most systems the default is/tmp. On some systems the default is/usr/tmp.TMPDIRβ ifNCARG_TMPis not set, this environment variable specifies the directory path for scratch disk space. If neitherNCARG_TMPnorTMPDIRis set, a site-dependent, hard-coded default is used.
πΎ FILES πΎ
ok so here's where your config lives, bestie:
$NCARG_ROOT/lib/ncarg/ncarv_spoolβ the local ictrans spooler config file, aka the site-wide one~/.ncarv_spoolβ your very own user's ictrans spooler config file π
π SEE ALSO π
go read these next, fr fr:
ctrans(1NCARG)fcaps(1NCARG)gcaps(1NCARG)idt(1NCARG)med(1NCARG)ncarv_spool(5NCARG)
Hardcopy: NCAR Graphics Fundamentals, UNIX Version β yes, actual paper, iconic behavior πβ¨
β οΈ CAVEATS β οΈ
ok so listen up because this one matters: metafile frames that get written to an existing file via the save command will be subject to the effects of any global "attribute elements" contained within the file. like, the file's existing global vibes will absolutely influence your new frames. no cap. π
Β©οΈ COPYRIGHT Β©οΈ
Copyright (C) 1987-2009
University Corporation for Atmospheric Research
The use of this Software is governed by a License Agreement.
and that's the whole page, bestie!! π«Ά this one's from the NCARG crew, dated January 1993, and it's filed under ICTRANS(1NCARG) β go forth and translate those metafiles, you absolute main character π β¨π
π¦ where this page comes from
- epel 9: ncl-common 6.6.2-59.el9 Β· LicenseRef-Callaway-BSD
- fedora 43: ncl-common 6.6.2-58.fc43 Β· LicenseRef-Callaway-BSD
- fedora 44: ncl-common 6.6.2-62.fc44 Β· LicenseRef-Callaway-BSD
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms