ploticus(1)
π ploticus(1) β General Commands Manual π
okay so bestie, welcome to the ploticus manual, literally the group chat of data display packages π this is section 1 of the ploticus(1) page and we are gonna get through it together.
β¨ NAME β¨
ploticus β the data display package, no cap π
β¨ SYNOPSIS β¨
ploticus -prefab prefabname parm=value .. [-options]
.. OR ..
ploticus scriptfile [-options]
β¨ DESCRIPTION β¨
so ploticus is the main character of the 'ploticus' data display package π
it's a program that produces plots and charts from data, and the results can be viewed on web pages, paper, slides, or interactively right there on your screen. Standard types of plots may be done using prefab plot templates, or if you're feeling extra you can supply a user-developed script file for more flexibility and customization. ploticus may be run from the command line or as a CGI program π
for complete online docs and downloads, see http://ploticus.sourceforge.net β¨
π¦ Where to find examples π¦
check out the various prefab examples π a large number of script examples are also available, obsessed. some usage examples are also shown below π
π Command line arguments π
command line arguments may generally be given in any order, we're flexible like that π«Ά if there are arguments you want to always have in effect, you can invoke them from a config file. many settings can also be made dynamically from scripts via proc settings or proc page. processing happens in this order:
- first the config file is read
- then command line args are processed (left to right)
- then proc page and/or proc settings
later settings override earlier ones β the newest one always wins, periodt π
πΈ Basic command line options πΈ
-prefabprefabname β produce a plot using a prefab plot template. prefabname identifies the template, eg.cronorvbars. necessary parameters are supplied on the command line using the formparm=valueβ¨scriptfile/-fscriptfile β names a script file that will be interpreted to produce results. alternatively,-stdinmay be used to indicate that script will be available on standard input π₯- variable=value β declares the named variable and sets it to the given value. this is a convenient way to pass information to prefabs and scripts. variable names are case-sensitive. example:
CUTDATE=10-31-98sets the variableCUTDATEto10-31-98π -ooutfile|stdoutβ specify a filename where the result will be written. no processing is applied to this name.. so the ending should be appropriate for the selected output format, eg. use.pngfor PNG files. if-o stdoutis used, result will be sent to standard output. if-ois not specified, a default output filename will be used. example:-o fp001.pngπΎ-dirdirname β set ploticus' working directory to dirname. if used, this argument should be specified leftmost on the command line, since it affects evaluation of other args π
π Result format options π
(Availability depends on your ploticus configuration/build) β like, your build might not have all of these, check before you cry π
-pngβ PNG image πΌοΈ-gifβ pseudo-GIF image-jpegβ JPEG image-svgor-svgzβ SVG graphic. see also SVG / XML options below β¨-swfβ SWF (flash) result-wbmpβ WBMP image-epsβ EPS (encapsulated PostScript)-psβ paginated PostScript to stdout-x11β display on X11 screen π₯οΈ-drawdumpfilename β produce no visible graphic; save a generic representation of the graphic result to a file. by using-drawdumpand-drawdumpayou can easily overlay or combine results from separate ploticus runs. the drawdump file can be rendered later in any desired format, using this command:ploticus -prefab draw dumpfile=filenameor by using proc drawcommands. Drawdump capability is available in all builds. (2.30+) π₯-drawdumpafilename β same as-drawdumpbut result is appended to file π
π Clickable image maps and mouseover options π
-csmapβ produce a client-side clickable imagemap to accompany a png, gif, or jpeg. these can be used for hyperlinks, and also for providing pop-up text labels that appear when the mouse passes over a region. by default, client-side map content is written to stdout π±οΈ-csmapdemoβ same as-csmapbut all mapped regions are shown outlined in green, and a complete HTML chunk is produced which involves the output image name β-mapfilefilename|stdout|stderrβ explicitly name the output file containing the map info. the name may also be set in proc page. if a name is not specified, client-side image map info will be written to stdout; for SVG this parameter is not needed, since image map info is embedded in the SVG file πΊοΈ-mapβ produce a server-side clickable imagemap file to accompany a png, gif, jpeg, or SVG. note: server-side maps are deprecated π
π§ Result sizing options π§
-scalesx[,sy] β scale the final result. if one value is given, the result is scaled by this amount in both x and y. if two values are given, scaling in x and scaling in y may be done independently. a scale value of less than1.0reduces the size; an scale value of greater than1.0enlarges. scaling is done relative to the origin(0,0)which is at the lower left. example:-scale 0.7π-pagesizewidth,height β sets the pre-crop size of the result image for GIF/PNG/JPEG, or sets the display window size when drawing to X11. on other output devices this option does nothing, bestie it's just vibing. width and height are in absolute units.0,0is the lower left corner. if-pagesizeis not specified, the default size will be8" x 8". size is set before any drawing takes place and is unaffected by the-scaleoption.
when rendering PNG/GIF/JPEG images, this option determines amount of internal memory allocation for accommodating the image. the result can never be bigger than this size, and any drawing outsize the bounds will not be visible. to create PNG/GIF/JPEG images larger than 8" x 8", this option MUST be specified to set a bigger size. cropping options (below) can be used along with -pagesize as long as they result in a smaller rectangle than the pagesize; they take effect after all drawing has been completed.
-pagesize has no effect with EPS or paginated PostScript results (the PostScript BoundingBox will be determined by the extent of the graphic).
example: -pagesize 7,3 π¦
-tightcropβ for image or EPS output, crop the result tightly to the extent of the design. normally a small margin is allowed on all four sides. this option sometimes crops a bit too tight; if so try-croprelβοΈ-cropx1,y1,x2,y2 β crop image or EPS result to the box specified by x1,y1 and x2,y2, in absolute units.
note that there may be no spaces in the coordinates specification. cropping takes place after design is rendered and does not affect coordinate locations.
example: -crop 1.2,0.8,4.4,5.2 π
-croprelleft,bottom,right,top β crop image or EPS result tightly to the extent of the design (like-tightcrop), but then adjust the cropping outward or inward on one or more sides. left is the amount to adjust the left side, in absolute units. similarly for bottom, right, and top. positive values always adjust outward from center; negative values adjust inward (tighter). there may be no spaces in the left,bottom,right,top specification. cropping takes place after design is rendered and does not affect coordinate locations.
example: -croprel 0,-0.1,0,0.1 πΈ
-pixsizewidth,height β if specified, result PNG/GIF/JPG image will be created at exactly this width and height in pixels. does not interact with scaling or cropping... user is responsible for ensuring that content fits appropriately into the specified size. user is also responsible for setting-pagesizeappropriately for larger images. π₯ New in 2.40
β Graphics environment options β
-fontfont β sets the overall font to font. see fonts for more info ποΈ-textsizepointsize β sets the overall default textsize to pointsize. all embedded size specifications will be rendered relative to this β¨-linewidthw β sets the overall default linewidth to w. all embedded line width specifications will be rendered relative to this. seelinedetails(pli)for more on line width π-colorcolor β sets the overall default text and line drawing color to color π¨-backcolorcolor β sets the background color to color ποΈ-cmβ use centimeters as your absolute units, instead of inches. on the command line this must appear to the left of any arguments dealing with absolute unit values, such as-pagesize. centimeter absolute units can also be set via proc settings. if cm will always be the desired absolute units, the preferred way to achieve this is by usingunits: cmin a ploticus config file π-inchesβ use inches as your absolute units. this is the default π-outlabellabel β set the label or title for the output. for X11 this sets the window title; for PostScript and SVG it sets the%%Titleattribute π·οΈ
π CAPACITY SETTING OPTIONS π
okay so these ones are new as of version 2.10 and they're literally just knobs for how much stuff ploticus is allowed to hold in its lil hands at once π«Ά. Bump 'em up if you're working with a HUGE data set, or dial 'em down if you're trying to keep memory usage cute and minimal. The defaults in this section are all defined in pl.h, iykyk.
-maxrows nrowsβ sets the capacity for data rows to nrows. Default nrows is10,000. Ploticus will allocate one pointer for each row.-maxfields nfieldsβ sets the capacity for data fields to nfields. Default nfields is200,000. Ploticus will allocate one pointer for each field.-maxproclines nlinesβ sets the capacity for script lines for active procs to nlines. Default nlines is5000. "Active procs" means the current proc, all#savedprocs, and allproc getdataprocs that contain embedded data. Ploticus will allocate one pointer for each line in each active proc.-maxvector ncellsβ sets the capacity for the data plotting vector to ncells. Default ncells is100,000. The data plotting vector is an array which holds plottable values for situations where the values must be sorted or pre-screened for bad values. Ploticus will allocate one double value for each cell.-maxdrawpoints nβ use this if you need to render a polygon having more than500points in PNG/GIF/JPEG, X11, or SWF, or any continuous line having more than500points in SWF.
Note: raising the maximum number of categories may be done using proc categories from within the script. not me dropping a whole plot twist in the capacity section π
-cpulimit sβ set unix resource limit on cpu time to s seconds. Default is30seconds. New in 2.40 π¦
π SVG / XML OPTIONS: π
-svg_tagparms stringβ this lets you shove arbitrary text into the opening<svg>tag. Example:-svg_tagparms 'height="10cm" width="15cm"'-omit_xml_declarationβ by default the first line of the SVG result will be the XML declaration<?xml .. >. Use this option to suppress the XML declaration line if the SVG result is to be embedded into a larger XML document.-xml_encoding methodβ set the XML character encoding method. This encoding will be indicated in the XML declaration line. The default isiso-8859-1which provides Latin and Western European character sets. For Unicode fonts this should be set toutf-8(for more discussion see the Unicode section infonts).-tagβ causes a suitable HTML<EMBED>tag to be written to standard output.-zlevel nβ this may be used to set the compression level to n for SVGZ output (0-9where9is highest level of compression and the default).
π INTERACTIVE (WORKSTATION) USE OPTIONS π
-winloc x,yβ control where on the screen the upper-left corner of the X11 display window will be placed. x and y are in pixels. Example:-winloc 200 0-v command-viewer command
After generating results in the specified format, execute command in order to view the results on your screen. The output file will automatically be included in the command. For example, if a GIF file is being generated you might use this to invoke the xv utility: -viewer xv. If PostScript is being generated you could use something like this to invoke the ghostview utility: -viewer "gv -magstep -1". The given command must be available on your system and locatable in your command search path. This option may not be used with -o stdout. π«
-noshellβ if specified, ploticus is prohibited from issuing any shell commands. This is a security feature useful for example when running a script that was sent to you by an unknown party. Lowkey essential bestie, do not skip this one. New in 2.31 π
π¦ PAPER ORIENTATION OPTIONS π¦
-landscapeβ for paginated postscript, set paper orientation to landscape (oblong).-portraitβ for paginated postscript, set paper orientation to portrait.-posteroffset x,yβ allows production of large-size posters made up of multiple standard sheets of paper butted together. May be used only with paginated PostScript, and should be used in combination with the-scaleand-textsizeoptions. x,y is the point within your result (inabsolute units) that is to be placed at the lower left corner of the page. For further discussion of this, seeposters. π
π DEVELOPMENT AND DEBUGGING OPTIONS π
-debugβ debug mode. Causes diagnostic information to be written to the diagnostic stream (stderrby default, see-diagfilebelow). Highly recommended if you are experiencing difficulty. Best to use-debugas the first (leftmost) argument so that it can report on all arguments gotten. Another effect of debug mode is that any temporary files are not removed upon termination. π-pingβ write the ploticus name and version number to standard output and exit. versions 2.33+-echo [ diag | stdout]β write ploticus script lines as they are executed. Lines are written to the diagnostic stream (standard error by default) or standard output. Lines are written after variables and most script directives, including flow-of-control directives, are evaluated.-showbadβ identify unplottable data, showing the value, and its row and field. π΅οΈ-diagfile filename | stderr | stdoutβ all non-error messages and output will be written to this file (default isstderr).-errmsgpre tagβ allows developer to set the first portion of all ploticus error messages to tag for purposes of presentation or identification.-errfile filename | stderr | stdoutβ all error messages will be written to this file (default isstderr).-helpor-?or-versionβ print version number, copyright info, web site address, etc. bestie behavior fr fr π
β¨ OUTPUT FILE NAMES β¨
okay so where does your lil masterpiece even GO. here's the tea:
The output file may be specified on the command line using the -o option, or via Proc Page's outfilename attribute. If so, the result is written to a file of that name. -o stdout may also be used to send result to standard output.
Otherwise, if your script filename has a "recognized extension" ( .p, .pl, .plo, .pls, .htm or .html ), the base part of the script file name is used and .png, .gif, etc. is appended. If your script filename doesn't have a recognized extension, the generic name out.* will be used.
X11 output is always displayed on the screen, and paginated PostScript is written to standard output unless -o is used.
If page breaks (Proc Page) are encountered when rendering in any format other than paginated PostScript, special action is necessary since each page must go into a separate file. A Proc Page outfilename may be specified for each page; otherwise a pn prefix will be attached to the beginning of each page's output file name to indicate page n.
If a clickmap is being generated, the result file is named similarly to the above. πΊοΈ
πΈ USAGE EXAMPLES πΈ
The following example uses the scat prefab:
ploticus -prefab scat -png datafile=results.dat x=2 y=3
The following examples assume that you have a script file called lineplot1.p.
ploticus -x lineplot1.p = view on X11 screen
ploticus -png lineplot1.p = create PNG image lineplot1.png
ploticus -gif lineplot1.p -o stdout = create GIF image on
standard output
ploticus -gif lineplot1.p -viewer xv = produce GIF and view
using xv (assuming xv image viewer is available on your system).
ploticus -eps lineplot1.p = produce EPS file lineplot1.eps
ploticus -eps lineplot1.p -viewer gv = produce EPS and view
using gv (that's ghostview, assuming it is available on your
system).
ploticus -eps lineplot1.p -o lineplot.eps = produce EPS into
file lineplot.eps
ploticus -ps lineplot1.p | lp = produce paginated postscript and
send to unix lp print spooler.
ploticus -ps lineplot1.p -veiwer gv = produce paginated
postscript and view using ghostview.
ngl bestie that last one is spelled -veiwer in the original page and I refuse to snitch on it π it's giving typo but we keep it exactly as it is, no cap.
π ENVIRONMENT π
PLOTICUS_CONFIGβ the name of aploticus configuration file, for setting default date notations, number notations, measurement units, etc.PLOTICUS_PREFABSβ the path name of a directory where ploticus will look forprefab scripts. The "factory" prefabs are located in the ploticus./prefabssubdirectory.LC_CTYPE,LC_COLLATE,LANGβ locale support. Thanks to Oleg Bartunovoleg@sai.msu.sufor contributing this. ploticus must be built with-DLOCALEfor this to work.TDH_ERRMODEβ control the disposition of error messages. Allowable values:stderrwhich is the default, andcgiwhich causes error messages to be written to stdout with html formatting.
π BUGS π
Ploticus has some stated limitations (mostly related to capacities that you may run into if you're dealing with large data sets). To report problems or get help see the ploticus support page.
β AUTHOR, COPYRIGHT, LICENSING β
The primary author is Stephen C. Grubb. Ploticus covered by the General Public License (GPL)... please see the ploticus copyright page for more info.
π SEE ALSO π
and that's the whole page bestie, we did it π₯³ this version is PLOTICUS ploticus.sourceforge.net, dated 11-MAR-2009, and it's literally ploticus(1) β go forth and plot, you absolute icon πβ¨
π¦ where this page comes from
- debian trixie: ploticus 2.42-8
- ubuntu questing: ploticus 2.42-8
- ubuntu resolute: ploticus 2.42-9
- ubuntu stonking: ploticus 2.42-9
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms