ctioga2 has moved to sourceforge. You should be redirected there shortly

ctioga2

the polymorphic plotting program

ctioga2’s commands

Independently of the way to use ctioga2, though command-line or using command files, one interacts ctioga2 by using commands.

Most commands take compulsory arguments, whose order should be respected, and even more of them accept options, that can be given in any order.

This page describes all the commands known to ctioga2. It is generated automatically from the inline documentation of ctioga2. Arguments to the commands, are links to the corresponding type. So are options.

Plots

Plots

Available commands: plot plot-last

Command: plot

Synopsis (file)

plot dataset /option=...

Synopsis (command-line)

--plot dataset /option=...

Available options: as bypass-transforms clipped color color-map contour-conrec contour-minor-number contour-minor-scale contour-minor-style contour-number depth error-bar-color fill fill-color fill-transparency ignore-hooks legend line-style line-width marker marker-color marker-color-map marker-min-scale marker-scale name path-style region-side split-on-nan where xaxis yaxis zaxis

Use the current backend to load the given datasets onto the data stack and plot them. It is a combination of the load and the plot-last commands; you might want to see their documentation.

Command: plot-last

Synopsis (file)

plot-last /option=...

Synopsis (command-line)

-p  /option=...
--plot-last  /option=...

Available options: clipped color color-map contour-conrec contour-minor-number contour-minor-scale contour-minor-style contour-number depth error-bar-color fill fill-color fill-transparency legend line-style line-width marker marker-color marker-color-map marker-min-scale marker-scale path-style region-side split-on-nan which xaxis yaxis zaxis

Plots the last dataset pushed onto the data stack (or the one specified with the which option), with the current style. All aspects of the curve style (colors, markers, line styles...) can be overridden through the use of options.

Curves styles

Set stylistic details of curves or other object drawn from data

Available commands: clipped color color-map color-set contour-conrec contour-minor-number contour-minor-scale contour-minor-style contour-number depth error-bar-color error-bar-color-set fill fill-color fill-color-set fill-set fill-transparency fill-transparency-set line-style line-style-set line-width line-width-set marker marker-color marker-color-map marker-color-set marker-min-scale marker-scale marker-scale-set marker-set path-style path-style-set region-side region-side-set split-on-nan zaxis

Command: clipped

Synopsis (file)

clipped boolean-or-auto

Synopsis (command-line)

--clipped boolean-or-auto

Sets the clipped for subsequent curves, until cancelled with auto as argument.

Command: color

Synopsis (file)

color color-or-false-or-auto

Synopsis (command-line)

-c color-or-false-or-auto
--color color-or-false-or-auto

Sets the line color for subsequent curves, until cancelled with auto as argument.

Command: color-map

Synopsis (file)

color-map colormap-or-auto

Synopsis (command-line)

--color-map colormap-or-auto

Sets the color map for the subsequent curves, until cancelled by an auto argument.

Color maps are used for 3D plots, ie under the effet of contour, xyz-map and xy-parametric.

Command: color-set

Synopsis (file)

color-set color-or-false-set

Synopsis (command-line)

--color-set color-or-false-set

Chooses a set for the line color of subsequent curves. Also sets color to auto, so that the set takes effect immediately

Command: contour-conrec

Synopsis (file)

contour-conrec boolean-or-auto

Synopsis (command-line)

--contour-conrec boolean-or-auto

If on, the subsequent curves will use the CONREC algorithm for contouring. In the opposite case, the contouring algorithm of Gri is used.

Only useful when contour is in effect.

Command: contour-minor-number

Synopsis (file)

contour-minor-number integer-or-auto

Synopsis (command-line)

--contour-minor-number integer-or-auto

Sets the number of minor level lines between major ones (approx) for subsequent curves, until cancelled with auto as argument.

Command: contour-minor-scale

Synopsis (file)

contour-minor-scale float-or-auto

Synopsis (command-line)

--contour-minor-scale float-or-auto

Sets the relative scale of minor level lines for subsequent curves, until cancelled with auto as argument.

Command: contour-minor-style

Synopsis (file)

contour-minor-style line-style-or-auto

Synopsis (command-line)

--contour-minor-style line-style-or-auto

Sets the minor ticks line style for subsequent curves, until cancelled with auto as argument.

Command: contour-number

Synopsis (file)

contour-number integer-or-auto

Synopsis (command-line)

--contour-number integer-or-auto

Sets the overall number of level lines for subsequent curves, until cancelled with auto as argument.

Command: depth

Synopsis (file)

depth integer-or-auto

Synopsis (command-line)

--depth integer-or-auto

Sets the depth for subsequent curves, until cancelled with auto as argument.

Command: error-bar-color

Synopsis (file)

error-bar-color color-or-false-or-auto

Synopsis (command-line)

--error-bar-color color-or-false-or-auto

Sets the error bar color for subsequent curves, until cancelled with auto as argument.

Command: error-bar-color-set

Synopsis (file)

error-bar-color-set color-or-false-set

Synopsis (command-line)

--error-bar-color-set color-or-false-set

Chooses a set for the error bar color of subsequent curves. Also sets error-bar-color to auto, so that the set takes effect immediately

Command: fill

Synopsis (file)

fill fill-until-or-auto

Synopsis (command-line)

--fill fill-until-or-auto

Sets the Fill until for subsequent curves, until cancelled with auto as argument.

Command: fill-color

Synopsis (file)

fill-color color-or-auto

Synopsis (command-line)

--fill-color color-or-auto

Sets the fill color for subsequent curves, until cancelled with auto as argument.

Command: fill-color-set

Synopsis (file)

fill-color-set color-set

Synopsis (command-line)

--fill-color-set color-set

Chooses a set for the fill color of subsequent curves. Also sets fill-color to auto, so that the set takes effect immediately

Command: fill-set

Synopsis (file)

fill-set fill-until-set

Synopsis (command-line)

--fill-set fill-until-set

Chooses a set for the Fill until of subsequent curves. Also sets fill to auto, so that the set takes effect immediately

Command: fill-transparency

Synopsis (file)

fill-transparency float-or-auto

Synopsis (command-line)

--fill-transparency float-or-auto

Sets the fill transparency for subsequent curves, until cancelled with auto as argument.

Command: fill-transparency-set

Synopsis (file)

fill-transparency-set float-set

Synopsis (command-line)

--fill-transparency-set float-set

Chooses a set for the fill transparency of subsequent curves. Also sets fill-transparency to auto, so that the set takes effect immediately

Command: line-style

Synopsis (file)

line-style line-style-or-auto

Synopsis (command-line)

--line-style line-style-or-auto

Sets the line style for subsequent curves, until cancelled with auto as argument.

Command: line-style-set

Synopsis (file)

line-style-set line-style-set

Synopsis (command-line)

--line-style-set line-style-set

Chooses a set for the line style of subsequent curves. Also sets line-style to auto, so that the set takes effect immediately

Command: line-width

Synopsis (file)

line-width float-or-auto

Synopsis (command-line)

--line-width float-or-auto

Sets the line width for subsequent curves, until cancelled with auto as argument.

Command: line-width-set

Synopsis (file)

line-width-set float-set

Synopsis (command-line)

--line-width-set float-set

Chooses a set for the line width of subsequent curves. Also sets line-width to auto, so that the set takes effect immediately

Command: marker

Synopsis (file)

marker marker-or-auto

Synopsis (command-line)

-m marker-or-auto
--marker marker-or-auto

Sets the marker for subsequent curves, until cancelled with auto as argument.

Command: marker-color

Synopsis (file)

marker-color color-or-auto

Synopsis (command-line)

--marker-color color-or-auto

Sets the marker color for subsequent curves, until cancelled with auto as argument.

Command: marker-color-map

Synopsis (file)

marker-color-map colormap-or-auto

Synopsis (command-line)

--marker-color-map colormap-or-auto

Sets the color map for markers for subsequent curves, until cancelled with auto as argument.

Command: marker-color-set

Synopsis (file)

marker-color-set color-set

Synopsis (command-line)

--marker-color-set color-set

Chooses a set for the marker color of subsequent curves. Also sets marker-color to auto, so that the set takes effect immediately

Command: marker-min-scale

Synopsis (file)

marker-min-scale float-or-false-or-auto

Synopsis (command-line)

--marker-min-scale float-or-false-or-auto

Sets the marker scale for subsequent curves, until cancelled with auto as argument.

Command: marker-scale

Synopsis (file)

marker-scale float-or-auto

Synopsis (command-line)

--marker-scale float-or-auto

Sets the marker scale for subsequent curves, until cancelled with auto as argument.

Command: marker-scale-set

Synopsis (file)

marker-scale-set float-set

Synopsis (command-line)

--marker-scale-set float-set

Chooses a set for the marker scale of subsequent curves. Also sets marker-scale to auto, so that the set takes effect immediately

Command: marker-set

Synopsis (file)

marker-set marker-set

Synopsis (command-line)

--marker-set marker-set

Chooses a set for the marker of subsequent curves. Also sets marker to auto, so that the set takes effect immediately

Command: path-style

Synopsis (file)

path-style text-or-auto

Synopsis (command-line)

--path-style text-or-auto

Sets the path style for subsequent curves, until cancelled with auto as argument.

Command: path-style-set

Synopsis (file)

path-style-set text-set

Synopsis (command-line)

--path-style-set text-set

Chooses a set for the path style of subsequent curves. Also sets path-style to auto, so that the set takes effect immediately

Command: region-side

Synopsis (file)

region-side region-side-or-auto

Synopsis (command-line)

--region-side region-side-or-auto

Sets the region side for subsequent curves, until cancelled with auto as argument.

Command: region-side-set

Synopsis (file)

region-side-set region-side-set

Synopsis (command-line)

--region-side-set region-side-set

Chooses a set for the region side of subsequent curves. Also sets region-side to auto, so that the set takes effect immediately

Command: split-on-nan

Synopsis (file)

split-on-nan boolean-or-auto

Synopsis (command-line)

--split-on-nan boolean-or-auto

In general, the NaN (not a number, ie invalid data points in the dataset) in a dataset are silently ignored. When this option is on, the lines of xy-plot-style plots are split upon encountering a NaN.

Command: zaxis

Synopsis (file)

zaxis text-or-auto

Synopsis (command-line)

--zaxis text-or-auto

Sets the name of the zaxis for the subsequent curves. This must be an axis that has been previously created using new-zaxis.

This axis will be used to display the colormaps of the following curve.

Legends

Commands to specify legends and tweak their look.

Available commands: auto-legend legend legend-inside legend-line legend-multicol legend-multicol-end legend-style

Command: auto-legend

Synopsis (file)

auto-legend boolean

Synopsis (command-line)

--auto-legend boolean

When this option is in effect (off by default), all datasets get a legend, their 'dataset name', unless another legend is manually specified.

Command: legend

Synopsis (file)

legend text

Synopsis (command-line)

-l text
--legend text

Sets the legend for the next dataset. Overridden by the legend option to the plot command.

Command: legend-inside

Synopsis (file)

legend-inside aligned-point /option=...

Synopsis (command-line)

--legend-inside aligned-point /option=...

Available options: dy frame-color frame-fill-color frame-fill-transparency frame-padding frame-radius frame-shape frame-style frame-width picto-height picto-to-text picto-width scale symbol-scale text-scale vpadding

Using this command sets the position of the legends for the current (sub)plot inside it, at the precise location given.

As a shortcut, legend-inside also takes all the options that legend-style takes, with the same effect.

Command: legend-line

Synopsis (file)

legend-line text /option=...

Synopsis (command-line)

--legend-line text /option=...

Available options: align alignment angle color justification position scale shift

Adds a line of text unrelated to any curve to the legend.

The options controlling the aspect of the legend are documented in the define-text-style command.

Command: legend-multicol

Synopsis (file)

legend-multicol /option=...

Synopsis (command-line)

--legend-multicol  /option=...

Available options: columns dx

Following legends will be layed out in multiple columns, until a call to legend-multicol-end.

Command: legend-multicol-end

Synopsis (file)

legend-multicol-end 

Synopsis (command-line)

--legend-multicol-end 

Stop layout out legends in several columns

Command: legend-style

Synopsis (file)

legend-style /option=...

Synopsis (command-line)

--legend-style  /option=...

Available options: dy frame-color frame-fill-color frame-fill-transparency frame-padding frame-radius frame-shape frame-style frame-width picto-height picto-to-text picto-width scale symbol-scale text-scale vpadding

Sets the various aspects of the style of the legends throught its options:

The frame- options control the drawing of a frame around the legend; they have the same meaning as corresponding ones of define-box-style with the frame- bit dropped.

Switch between different kinds of plots

How to switch between different kinds of plot types

Available commands: contour histogram xy-parametric xy-plot xyz-map

Command: contour

Synopsis (file)

contour 

Synopsis (command-line)

--contour 

Switch to contour plots for later curves. Contour plots need three columns (X,Y,Z). They have major and minor lines.

Command: histogram

Synopsis (file)

histogram /option=...

Synopsis (command-line)

--histogram  /option=...

Available options: cumulative inter-sep intra-sep

Switch to drawing histograms.

Command: xy-parametric

Synopsis (file)

xy-parametric /option=...

Synopsis (command-line)

--xy-parametric  /option=...

Available options: z1 z2

Switch to XY parametric plots, that is standard XY plots whose appearance (such as color, marker color, and, potentially, marker kinds and more) are governed by one (or more ?) Z values.

Command: xy-plot

Synopsis (file)

xy-plot 

Synopsis (command-line)

--xy-plot 

Switch (back) to standard XY plots (ctioga's default)

Command: xyz-map

Synopsis (file)

xyz-map 

Synopsis (command-line)

--xyz-map 

Switch to XYZ maps, ie plots where the color at a XY location is given by its Z value.

Plot coordinates

Plot coordinates

Available commands: margin xfact xlog xoffset xrange xscale yfact ylog yoffset yrange yscale

Command: margin

Synopsis (file)

margin float

Synopsis (command-line)

--margin float

Leaves a margin around the data points. Expressed in relative size of the whole plot.

Command: xfact

Synopsis (file)

xfact float

Synopsis (command-line)

--xfact float

Alias for xscale.

Command: xlog

Synopsis (file)

xlog boolean

Synopsis (command-line)

--xlog boolean

Uses a logarithmic scale for the X axis.

Command: xoffset

Synopsis (file)

xoffset float

Synopsis (command-line)

--xoffset float

Adds the given offset to all X coordinates.

Command: xrange

Synopsis (file)

xrange partial-float-range

Synopsis (command-line)

--xrange partial-float-range

Sets the range of the X coordinates.

Command: xscale

Synopsis (file)

xscale float

Synopsis (command-line)

--xscale float

Multiplies the X coordinates by this factor.

Command: yfact

Synopsis (file)

yfact float

Synopsis (command-line)

--yfact float

Alias for yscale.

Command: ylog

Synopsis (file)

ylog boolean

Synopsis (command-line)

--ylog boolean

Uses a logarithmic scale for the Y axis.

Command: yoffset

Synopsis (file)

yoffset float

Synopsis (command-line)

--yoffset float

Adds the given offset to all Y coordinates.

Command: yrange

Synopsis (file)

yrange partial-float-range

Synopsis (command-line)

--yrange partial-float-range

Sets the range of the Y coordinates.

Command: yscale

Synopsis (file)

yscale float

Synopsis (command-line)

--yscale float

Multiplies the Y coordinates by this factor.

Graphics primitives

Tioga graphics primitives

Available commands: draw draw-arrow draw-box draw-contour draw-line draw-marker draw-string-marker draw-tangent draw-text

Command: draw

Synopsis (file)

draw drawing-spec

Synopsis (command-line)

--draw drawing-spec

Tries to emulate the old --draw behavior of ctioga. Don't use it for new things.

Command: draw-arrow

Synopsis (file)

draw-arrow point point /option=...

Synopsis (command-line)

--draw-arrow point point /option=...

Available options: base-style clipped color depth head-angle head-color head-marker head-scale line-style line-width style tail-angle tail-color tail-marker tail-scale width

Draws arrow on the current plot, using the given style. For more information on the available options, see the define-arrow-style command.

Command: draw-box

Synopsis (file)

draw-box point point /option=...

Synopsis (command-line)

--draw-box point point /option=...

Available options: base-style clipped color depth fill-color fill-transparency fill-color fill-transparency radius shape style width

Draws box on the current plot, using the given style. For more information on the available options, see the define-box-style command.

Command: draw-contour

Synopsis (file)

draw-contour level /option=...

Synopsis (command-line)

--draw-contour level /option=...

Available options: clipped closed color depth style width

Directly draws contour on the current plot

Command: draw-line

Synopsis (file)

draw-line point point /option=...

Synopsis (command-line)

--draw-line point point /option=...

Available options: base-style clipped color depth line-style line-width style width

Draws line on the current plot, using the given style. For more information on the available options, see the define-line-style command.

Command: draw-marker

Synopsis (file)

draw-marker point marker /option=...

Synopsis (command-line)

--draw-marker point marker /option=...

Available options: alignment angle base-style clipped color depth fill-color horizontal-scale justification scale stroke-color vertical-scale

Draws marker on the current plot, using the given style. For more information on the available options, see the define-marker-style command.

Command: draw-string-marker

Synopsis (file)

draw-string-marker point text /option=...

Synopsis (command-line)

--draw-string-marker point text /option=...

Available options: alignment angle base-style clipped color depth fill-color font horizontal-scale justification scale stroke-color vertical-scale

Draws marker on the current plot, using the given style. For more information on the available options, see the define-marker-style command.

Command: draw-tangent

Synopsis (file)

draw-tangent data-point /option=...

Synopsis (command-line)

--draw-tangent data-point /option=...

Available options: clipped color depth head-color head-marker head-scale line-style line-width nbavg tail-color tail-marker tail-scale xextent xfrom xto yextent yfrom yto

Directly draws tangent on the current plot

Command: draw-text

Synopsis (file)

draw-text point text /option=...

Synopsis (command-line)

--draw-text point text /option=...

Available options: alignment angle base-style clipped color depth font justification position scale shift

Draws text on the current plot, using the given style. For more information on the available options, see the define-text-style command.

The 'direct' backend: Direct format

The commands in this group drive the behaviour of the direct backend; see its documentation for more information

Available commands: direct

Command: direct

Synopsis (file)

direct 

Synopsis (command-line)

--direct 

Selects the 'direct' backend

The 'gnuplot' backend: Gnuplot files

The commands in this group drive the behaviour of the gnuplot backend; see its documentation for more information

Available commands: gnuplot gnuplot-range gnuplot-samples gnuplot-vars

Command: gnuplot

Synopsis (file)

gnuplot /option=...

Synopsis (command-line)

--gnuplot  /option=...

Available options: range samples vars

Selects the 'gnuplot' backend

Command: gnuplot-range

Synopsis (file)

gnuplot-range range

Synopsis (command-line)

--gnuplot-range range

The plotting X range, such as 0:2

Command: gnuplot-samples

Synopsis (file)

gnuplot-samples samples

Synopsis (command-line)

--gnuplot-samples samples

The number of samples

Command: gnuplot-vars

Synopsis (file)

gnuplot-vars vars

Synopsis (command-line)

--gnuplot-vars vars

A colon-separated override of local variables, such as a=1;b=3;c=5

The 'math' backend: Mathematical functions

The commands in this group drive the behaviour of the math backend; see its documentation for more information

Available commands: math math-log math-samples math-trange math-xrange

Command: math

Synopsis (file)

math /option=...

Synopsis (command-line)

--math  /option=...

Available options: log samples trange xrange

Selects the 'math' backend

Command: math-log

Synopsis (file)

math-log log

Synopsis (command-line)

--math-log log

Space samples logarithmically

Command: math-samples

Synopsis (file)

math-samples samples

Synopsis (command-line)

--math-samples samples

The number of points

Command: math-trange

Synopsis (file)

math-trange trange

Synopsis (command-line)

--math-trange trange

T range (a:b) (parametric plot)

Command: math-xrange

Synopsis (file)

math-xrange xrange

Synopsis (command-line)

--math-xrange xrange

X range (a:b)

The 'text' backend: Text format

The commands in this group drive the behaviour of the text backend; see its documentation for more information

Available commands: csv text text-col text-header-line text-parameters text-separator text-skip text-split

Command: csv

Synopsis (file)

csv 

Synopsis (command-line)

--csv 

Now parse the following data files as CSV.

text /separator=/[,;]/

Command: text

Synopsis (file)

text /option=...

Synopsis (command-line)

--text  /option=...

Available options: col header-line parameters separator skip split

Selects the 'text' backend

Command: text-col

Synopsis (file)

text-col col

Synopsis (command-line)

--text-col col

Which columns to use when the @1:2 syntax is not used

Command: text-header-line

Synopsis (file)

text-header-line header-line

Synopsis (command-line)

--text-header-line header-line

Regular expression indicating the header line (containing column names) (default /^##/

Command: text-parameters

Synopsis (file)

text-parameters parameters

Synopsis (command-line)

--text-parameters parameters

Regular expression for extracting parameters from a file. Defaults to nil (ie nothing)

Command: text-separator

Synopsis (file)

text-separator separator

Synopsis (command-line)

--text-separator separator

The columns separator. Defaults to / +/

Command: text-skip

Synopsis (file)

text-skip skip

Synopsis (command-line)

--text-skip skip

Number of lines to be skipped at the beginning of the file

Command: text-split

Synopsis (file)

text-split split

Synopsis (command-line)

--text-split split

If true, splits files into subsets on blank/non number lines

LaTeX

Commands providing control over the LaTeX output (preamble, packages...)

Available commands: preamble set-global-font use utf8

Command: preamble

Synopsis (file)

preamble text

Synopsis (command-line)

--preamble text

Adds the given string to the LaTeX preamble of the output.

Command: set-global-font

Synopsis (file)

set-global-font /option=...

Synopsis (command-line)

--set-global-font  /option=...

Available options: size

Set global font. Sets the size of everything, including that of text that has already been used.

Command: use

Synopsis (file)

use text /option=...

Synopsis (command-line)

--use text /option=...

Available options: arguments

Adds a command to include the LaTeX package into the preamble. The arguments, if given, are given within [square backets].

Command: utf8

Synopsis (file)

utf8 

Synopsis (command-line)

--utf8 

Makes ctioga2 use UTF-8 for all text. It is exactly equivalent to the command preamble with the argument:

\usepackage[utf8]{inputenc}\usepackage[T1]{fontenc}

Subplots and assimilated

Subplots and assimilated

Available commands: end frame-margins gradient inset next-inset padding plot-scale region setup-grid zoom-inset

Command: end

Synopsis (file)

end 

Synopsis (command-line)

--end 

Leaves the current subobject.

Command: frame-margins

Synopsis (file)

frame-margins frame-margins

Synopsis (command-line)

--frame-margins frame-margins

Sets the margins for the current plot. Margins are the same things as the position (such as specified for and inset). Using this within an inset or more complex plots might produce unexpected results. The main use of this function is to control the padding around simple plots.

Command: gradient

Synopsis (file)

gradient color color

Synopsis (command-line)

--gradient color color

All the curves between this command and the corresponding end will have their color set to a weighted average of the colors given as argument. This gives a neat gradient effect.

Command: inset

Synopsis (file)

inset box

Synopsis (command-line)

--inset box

Starts a new inset within the given box.

If no graph has been started yet, it just creates a new graph using the given box. In short, it does what it seems it should.

Command: next-inset

Synopsis (file)

next-inset box

Synopsis (command-line)

--next-inset box

Has the same effet as end followed by inset.

Particularly useful for chaining subgraphs. In that case, you might be interested in the grid box specification and setup-grid.

Command: padding

Synopsis (file)

padding dimension

Synopsis (command-line)

--padding dimension

When the frame-margins is set to automatic, ctioga2 leaves that much space around the plot on the sides where there are no labels.

Command: plot-scale

Synopsis (file)

plot-scale float /option=...

Synopsis (command-line)

--plot-scale float /option=...

Available options: what

Applies a scaling factor to the whole current subplot. Depending on the 'what' option (default text), the scale applies to:

Command: region

Synopsis (file)

region /option=...

Synopsis (command-line)

--region  /option=...

Available options: color reversed-color reversed-transparency transparency

The curves up to the corresponding end will be considered for delimiting a colored region between them. The actual position of the curves with respect to the region can be fine-tuned using the region-side command (or the corresponding option to plot).

Command: setup-grid

Synopsis (file)

setup-grid text /option=...

Synopsis (command-line)

--setup-grid text /option=...

Available options: bottom dx dy left right top

Sets up a grid of the given layout (such as 2x1). After this command, arguments such as grid:0,1 can be used as the box argument of inset and next-inset commands.

Alternatively, the layout can be specified as 1,2,1x1,4, in which case there are three columns and two rows; the second column is 2 times larger than the other ones, while the second row is four times larger than the first.

Command: zoom-inset

Synopsis (file)

zoom-inset box

Synopsis (command-line)

--zoom-inset box

Zooms are currently not implemented yet.

Axes and labels

Axes and labels

Available commands: axis-style background-lines bottom clear-axes label-style left new-zaxis no-title no-xlabel no-ylabel right ticks title top x2 xaxis xlabel y2 yaxis ylabel

Command: axis-style

Synopsis (file)

axis-style axis /option=...

Synopsis (command-line)

--axis-style axis /option=...

Available options: also-axes axis-label-alignment axis-label-angle axis-label-color axis-label-justification axis-label-loc axis-label-position axis-label-scale axis-label-shift axis-label-text background-lines-color background-lines-style background-lines-width decoration location log major-tick-length major-tick-width minor-tick-length minor-tick-width offset stroke-color tick-label-alignment tick-label-angle tick-label-color tick-label-justification tick-label-position tick-label-scale tick-label-shift ticks-format ticks-format-last ticks-labels ticks-major ticks-minor ticks-side transform

This command can be used to set various aspects of the style of the given axis, through its various options, which are documented in more details in the define-axis-style command -- excepted for the ticks bit which are documented in the ticks command.

If the option also-axes is specified, the style is also applied to the comma-separated list of axes it contains.

Command: background-lines

Synopsis (file)

background-lines axis color-or-false /option=...

Synopsis (command-line)

--background-lines axis color-or-false /option=...

Available options: style width

Sets the color of the background lines for the given axis.

Command: bottom

Synopsis (file)

bottom axis-decoration /option=...

Synopsis (command-line)

--bottom axis-decoration /option=...

Available options: axis-label-alignment axis-label-angle axis-label-color axis-label-justification axis-label-loc axis-label-position axis-label-scale axis-label-shift axis-label-text background-lines-color background-lines-style background-lines-width location log major-tick-length major-tick-width minor-tick-length minor-tick-width offset stroke-color tick-label-alignment tick-label-angle tick-label-color tick-label-justification tick-label-position tick-label-scale tick-label-shift ticks-format ticks-format-last ticks-labels ticks-major ticks-minor ticks-side transform

Sets the type of the bottom axis.

The options have the same meaning as for define-axis-style, see that command for more information.

Command: clear-axes

Synopsis (file)

clear-axes 

Synopsis (command-line)

--clear-axes 

Removes all the axes and their associated labels

Command: label-style

Synopsis (file)

label-style label /option=...

Synopsis (command-line)

--label-style label /option=...

Available options: align alignment angle color justification loc position scale shift text

Sets the style of the given label (see the type label for more information). See define-text-style for detailed information about the meaning of the options.

The option text permits to also set the text of the label (does not work for ticks).

For tick labels, setting the color option also sets the color for the lines of the corresponding axis. If you don't want that, you can override the color using the stroke-color option of axis-style. This will only work with Tioga version 1.11 or greater.

Command: left

Synopsis (file)

left axis-decoration /option=...

Synopsis (command-line)

--left axis-decoration /option=...

Available options: axis-label-alignment axis-label-angle axis-label-color axis-label-justification axis-label-loc axis-label-position axis-label-scale axis-label-shift axis-label-text background-lines-color background-lines-style background-lines-width location log major-tick-length major-tick-width minor-tick-length minor-tick-width offset stroke-color tick-label-alignment tick-label-angle tick-label-color tick-label-justification tick-label-position tick-label-scale tick-label-shift ticks-format ticks-format-last ticks-labels ticks-major ticks-minor ticks-side transform

Sets the type of the left axis.

The options have the same meaning as for define-axis-style, see that command for more information.

Command: new-zaxis

Synopsis (file)

new-zaxis text /option=...

Synopsis (command-line)

--new-zaxis text /option=...

Available options: axis-label-alignment axis-label-angle axis-label-color axis-label-justification axis-label-loc axis-label-position axis-label-scale axis-label-shift axis-label-text background-lines-color background-lines-style background-lines-width bar-shift bar-size bounds decoration location log major-tick-length major-tick-width minor-tick-length minor-tick-width offset padding stroke-color tick-label-alignment tick-label-angle tick-label-color tick-label-justification tick-label-position tick-label-scale tick-label-shift ticks-format ticks-format-last ticks-labels ticks-major ticks-minor ticks-side transform

Creates a named Z axis that can display information from Z color maps

Command: no-title

Synopsis (file)

no-title 

Synopsis (command-line)

--no-title 

Removes the title of the current plot.

Command: no-xlabel

Synopsis (file)

no-xlabel 

Synopsis (command-line)

--no-xlabel 

Removes the X label for the current plot.

Command: no-ylabel

Synopsis (file)

no-ylabel 

Synopsis (command-line)

--no-ylabel 

Removes the Y label for the current plot.

Command: right

Synopsis (file)

right axis-decoration /option=...

Synopsis (command-line)

--right axis-decoration /option=...

Available options: axis-label-alignment axis-label-angle axis-label-color axis-label-justification axis-label-loc axis-label-position axis-label-scale axis-label-shift axis-label-text background-lines-color background-lines-style background-lines-width location log major-tick-length major-tick-width minor-tick-length minor-tick-width offset stroke-color tick-label-alignment tick-label-angle tick-label-color tick-label-justification tick-label-position tick-label-scale tick-label-shift ticks-format ticks-format-last ticks-labels ticks-major ticks-minor ticks-side transform

Sets the type of the right axis.

The options have the same meaning as for define-axis-style, see that command for more information.

Command: ticks

Synopsis (file)

ticks axis /option=...

Synopsis (command-line)

--ticks axis /option=...

Available options: format format-last labels major minor

This command can be used to control the location of major and minor ticks and the text of their labels for the given axis. Options available:

Format is a normal sprintf format, with the following additional special codes:

Command: title

Synopsis (file)

title text /option=...

Synopsis (command-line)

-t text /option=...
--title text /option=...

Available options: align alignment angle color justification loc position scale shift

Sets the title of the current plot.

Command: top

Synopsis (file)

top axis-decoration /option=...

Synopsis (command-line)

--top axis-decoration /option=...

Available options: axis-label-alignment axis-label-angle axis-label-color axis-label-justification axis-label-loc axis-label-position axis-label-scale axis-label-shift axis-label-text background-lines-color background-lines-style background-lines-width location log major-tick-length major-tick-width minor-tick-length minor-tick-width offset stroke-color tick-label-alignment tick-label-angle tick-label-color tick-label-justification tick-label-position tick-label-scale tick-label-shift ticks-format ticks-format-last ticks-labels ticks-major ticks-minor ticks-side transform

Sets the type of the top axis.

The options have the same meaning as for define-axis-style, see that command for more information.

Command: x2

Synopsis (file)

x2 

Synopsis (command-line)

--x2 

Switches to using the top axis for X axis for the subsequent curves, and turns on full decoration for the right axis. Shortcut for:

xaxis top
axis-style top /decoration=full

Command: xaxis

Synopsis (file)

xaxis axis

Synopsis (command-line)

--xaxis axis

Sets the default axis for the X axis for all subsequent commands take rely on default axes (such as plot, xrange, yrange...).

Command: xlabel

Synopsis (file)

xlabel text /option=...

Synopsis (command-line)

-x text /option=...
--xlabel text /option=...

Available options: align alignment angle color justification loc position scale shift

Sets the X label of the current plot.

Command: y2

Synopsis (file)

y2 

Synopsis (command-line)

--y2 

Switches to using the right axis for Y axis for the subsequent curves, and turns on full decoration for the right axis. Shortcut for:

yaxis right
axis-style right /decoration=full

Command: yaxis

Synopsis (file)

yaxis axis

Synopsis (command-line)

--yaxis axis

Sets the default axis for the Y axis for all subsequent commands take rely on default axes (such as plot, xrange, yrange...).

Command: ylabel

Synopsis (file)

ylabel text /option=...

Synopsis (command-line)

-y text /option=...
--ylabel text /option=...

Available options: align alignment angle color justification loc position scale shift

Sets the Y label of the current plot.

Background

Commands dealing with the aspect of the background of a plot (excluding background lines, which are linked to axes).

Available commands: background watermark

Command: background

Synopsis (file)

background color-or-false

Synopsis (command-line)

--background color-or-false

Sets the background color for the current (and subsequent?) plot.

Command: watermark

Synopsis (file)

watermark text /option=...

Synopsis (command-line)

--watermark text /option=...

Available options: alignment angle color fill-color font horizontal-scale justification scale stroke-color vertical-scale

Sets a watermark for the background of the current plot.

Default styles

Commands for defining default styles.

All commands take the name of the style to redefine. Different styles live in a different name space, so there is no risk naming an axis and a text style with the same name. All styles for a given type inherit from the style name base.

ctioga2 does not support changing a style after its use. It may affect only the following objects or all the ones that were created from the beginning, depending on the context. For safety, only define style before issueing any graphics command.

ctioga2 may support at a later time loading style files, but that is not the case for now.

Available commands: define-arrow-style define-axis-style define-background-style define-box-style define-line-style define-marker-style define-text-style define-title-style

Command: define-arrow-style

Synopsis (file)

define-arrow-style text /option=...

Synopsis (command-line)

--define-arrow-style text /option=...

Available options: color head-angle head-color head-marker head-scale style tail-angle tail-color tail-marker tail-scale width

Sets the default style for arrows. All arrow styles descend from the base style. Use a style different than base by passing its name as the /base-style option to the draw-arrow command.

Meaning of the style parameters:

Command: define-axis-style

Synopsis (file)

define-axis-style text /option=...

Synopsis (command-line)

--define-axis-style text /option=...

Available options: axis-label-alignment axis-label-angle axis-label-color axis-label-justification axis-label-loc axis-label-position axis-label-scale axis-label-shift axis-label-text background-lines-color background-lines-style background-lines-width decoration location log major-tick-length major-tick-width minor-tick-length minor-tick-width offset stroke-color tick-label-alignment tick-label-angle tick-label-color tick-label-justification tick-label-position tick-label-scale tick-label-shift ticks-format ticks-format-last ticks-labels ticks-major ticks-minor ticks-side transform

Sets the style for a whole axis. All axis styles descend from the base style. Horizontal and vertical axis styles descend from the x and y styles, and plot sides are styled with the left, right, top and bottom styles.

Axis styles have lots of parameters:

Command: define-background-style

Synopsis (file)

define-background-style text /option=...

Synopsis (command-line)

--define-background-style text /option=...

Available options: background-color watermark watermark-alignment watermark-angle watermark-color watermark-fill-color watermark-font watermark-horizontal-scale watermark-justification watermark-scale watermark-stroke-color watermark-vertical-scale

Sets the style for plot background. All background styles descend from the base style. In addition, the background of a plot is change by the style name background.

Meaning of the style parameters:

Command: define-box-style

Synopsis (file)

define-box-style text /option=...

Synopsis (command-line)

--define-box-style text /option=...

Available options: color fill-color fill-transparency radius shape style width

Sets the default style for boxes. All box styles descend from the base style. Use a style different than base by passing its name as the /base-style option to the draw-box command.

Meaning of the style parameters:

Command: define-line-style

Synopsis (file)

define-line-style text /option=...

Synopsis (command-line)

--define-line-style text /option=...

Available options: color style width

Sets the default style for lines. All line styles descend from the base style. Use a style different than base by passing its name as the /base-style option to the draw-line command.

Meaning of the style parameters:

--define-line-style base /color=Pink

makes all lines pink (unless overriden by the /color option to draw-line), while

--define-line-style line-pink /color=Pink

only affect those to which the /base-style=line-pink style option was given.

Command: define-marker-style

Synopsis (file)

define-marker-style text /option=...

Synopsis (command-line)

--define-marker-style text /option=...

Available options: alignment angle color fill-color font horizontal-scale justification scale stroke-color vertical-scale

Sets the style for marker and marker strings. All marker and marker string styles descend from the base style. Use a style different than base by passing its name as the /base-style option to the draw-marker or draw-string-marker commands.

Meaning of the style parameters:

Command: define-text-style

Synopsis (file)

define-text-style text /option=...

Synopsis (command-line)

--define-text-style text /option=...

Available options: alignment angle color justification position scale shift

Sets the default style for texts. All text styles descend from the base style. Use a style different than base by passing its name as the /base-style option to the draw-text command.

Meaning of the style parameters:

Command: define-title-style

Synopsis (file)

define-title-style text /option=...

Synopsis (command-line)

--define-title-style text /option=...

Available options: alignment angle color justification loc position scale shift text

Sets the style for title. All title styles descend from the base style. In addition, the title of a plot is addressed by the style name title.

Meaning of the style parameters:

Output setup

Commands in this group deal with various aspects of the production of output files:

Available commands: clean eps mark name open output-and-reset output-directory output-now page-size png svg viewer xpdf

Command: clean

Synopsis (file)

clean boolean

Synopsis (command-line)

--clean boolean

When this is on (the default), ctioga2 automatically cleans up intermediate files produced by Tioga. When LaTeX fails, it can be useful to have a closer look at them, so disable it to be able to look into them.

Command: eps

Synopsis (file)

eps boolean

Synopsis (command-line)

--eps boolean

When this feature is on, all produced PDF files are converted to EPS using the pdftops program (from the xpdf tools suite).

Command: mark

Synopsis (file)

mark boolean

Synopsis (command-line)

--mark boolean

When this feature is on (which is the default, as it comes in very useful), the 'title' field of the PDF informations is set to the command-line that resulted in the PDF file. Disable it if you don't want any information to leak.

Please note that this will not log the values of the CTIOGA2_PRE and CTIOGA2_POST variables, so you might still get a different output if you make heavy use of those.

Command: name

Synopsis (file)

name figure name

Synopsis (command-line)

-n figure name
--name figure name

Sets the name of the figure, which is also the base name for the output file. This has nothing to do with the title of the plot, which can be set using the command title.

If the name contains a %, it is interpreted by ctioga2 as a printf-like format. It will attempt to find the first file that does not exist, feeding it with increasing numbers.

The default value is now Plot-%03d, which means you'll get increasing numbers automatically.

Command: open

Synopsis (file)

open 

Synopsis (command-line)

--open 

Uses open (available on MacOS) to view the PDF files produced by ctioga2.

Command: output-and-reset

Synopsis (file)

output-and-reset 

Synopsis (command-line)

--output-and-reset 

Writes the current figure and starts a fresh one. All non-graphical information are kept (curves loaded, figure names, preamble, and so on).

Command: output-directory

Synopsis (file)

output-directory text

Synopsis (command-line)

-O text
--output-directory text

Sets the directory to which files will be plot. It defaults to the current directory.

Command: output-now

Synopsis (file)

output-now figure name

Synopsis (command-line)

-o figure name
--output figure name

Writes a figure with the given name (see name) and keeps the current state. This can be used to create an animation.

Command: page-size

Synopsis (file)

page-size text /option=...

Synopsis (command-line)

-r text /option=...
--page-size text /option=...

Available options: count-legend

Sets the size of the output PDF file, in real units. Takes arguments in the form of 12cm x 3in (spaces can be omitted).

Command: png

Synopsis (file)

png resolution /option=...

Synopsis (command-line)

--png resolution /option=...

Available options: oversampling scale

Turns all produced PDF files into PNG images of the given resolution using convert. This also has for effect to set the page-size to the resolution divided by the 'scale' option in Postscript points. By default, 2 pixels are rendered for 1 final to produce a nicely antialiased image. Use the 'oversampling' option to change that, in case the output looks too pixelized. This option only affects conversion time.

Command: svg

Synopsis (file)

svg boolean

Synopsis (command-line)

--svg boolean

When this feature is on, all produced PDF files are converted to SVG using the neat pdf2svg program.

Command: viewer

Synopsis (file)

viewer text

Synopsis (command-line)

--viewer text

Sets the command for viewing the PDF file after ctioga2 has been run.

Command: xpdf

Synopsis (file)

xpdf 

Synopsis (command-line)

-X 
--xpdf 

Uses xpdf to view the PDF files produced by ctioga2.

If xpdf is not found, then it tries to guess which viewers are available:

Data stack manipulation

Commands for manipulation of the data stack

Available commands: apply-formula compute-contour dataset-hook dataset-hook-add dataset-hook-clear drop join-datasets load make-contour merge-datasets print-dataset show-stack xy-reglin

Command: apply-formula

Synopsis (file)

apply-formula text /option=...

Synopsis (command-line)

--apply-formula text /option=...

Available options: name which

Applies a formula to the last dataset (or the named one)

Command: compute-contour

Synopsis (file)

compute-contour float /option=...

Synopsis (command-line)

--compute-contour float /option=...

Available options: which

Computes the contour at the given level for the given dataset (or the last on the stack if none is specified) and pushes it onto the data stack.

You can further manipulate it as usual.

Command: dataset-hook

Synopsis (file)

dataset-hook commands

Synopsis (command-line)

--dataset-hook commands

The dataset hook is a series of commands such as those in the command files that are run every time after a dataset is added onto the data stack. Its main use is to provide automatic filtering of data, but any arbitrary command can be used, so enjoy !

Command: dataset-hook-add

Synopsis (file)

dataset-hook-add commands

Synopsis (command-line)

--dataset-hook-add commands

Adds the given commands to the dataset hook. See dataset-hook for more information about the dataset hook.

Command: dataset-hook-clear

Synopsis (file)

dataset-hook-clear 

Synopsis (command-line)

--dataset-hook-clear 

Clears the dataset hook. See dataset-hook for more information.

Command: drop

Synopsis (file)

drop stored-dataset

Synopsis (command-line)

--drop stored-dataset

Removes the given dataset from the stack.

Can become useful when dealing with large datasets, some of which are only used as intermediates for apply-formula or compute-contour, for instance.

Command: join-datasets

Synopsis (file)

join-datasets /option=...

Synopsis (command-line)

-j  /option=...
--join-datasets  /option=...

Available options: name number which

Pops the last two (or number, if it is specified) datasets from the stack, concatenates them (older last) and push them back onto the stack. The name option can be used to give a name to the new dataset.

Command: load

Synopsis (file)

load dataset /option=...

Synopsis (command-line)

-L dataset /option=...
--load dataset /option=...

Available options: as ignore-hooks name where

Use the current backend to load the given dataset(s) onto the data stack.

If the name option is given, the last dataset loaded this way (if dataset expansion occurs) gets named, or, if it contains a %d (or similar construct), each dataset gets named with %d replace with the number of the dataset within the expansion (starting at 0). This name can be used to further use the dataset without remembering its number. See the type stored-dataset for more information.

Command: make-contour

Synopsis (file)

make-contour float /option=...

Synopsis (command-line)

--make-contour float /option=...

Available options: as ignore-hooks name where which

Command: merge-datasets

Synopsis (file)

merge-datasets /option=...

Synopsis (command-line)

--merge-datasets  /option=...

Available options: number which

This commands merges data with matching X values from a dataset (by default the one before the last) into the last one. Data points that have no corresponding X value in the current dataset are simply ignored.

This can be used to build 3D datasets for xyz-map or xy-parametric.

Command: print-dataset

Synopsis (file)

print-dataset /option=...

Synopsis (command-line)

-P  /option=...
--print-dataset  /option=...

Available options: save which

Prints to standard output data contained in the last dataset pushed onto the stack, or the given stored dataset if the which option is given.

Command: show-stack

Synopsis (file)

show-stack 

Synopsis (command-line)

--show-stack 

Displays the current contents of the dataset stack.

Mostly used for debugging when operations like merge-datasets or join-datasets don't work as expected.

Command: xy-reglin

Synopsis (file)

xy-reglin /option=...

Synopsis (command-line)

--xy-reglin  /option=...

Available options: linear which

...

This command will get documented some day.

Introspection

Commands displaying information about the internals of ctioga2, such as known types/commands/backends...

Available commands: edit-command edit-group edit-type list-commands list-groups list-types version-raw

Command: edit-command

Synopsis (file)

edit-command text /option=...

Synopsis (command-line)

--edit-command text /option=...

Available options: doc

Edit the given command in an editor. It will only work from the top directory of a ctioga2 source tree.

Command: edit-group

Synopsis (file)

edit-group text

Synopsis (command-line)

--edit-group text

Edit the given group in an editor. It will only work from the top directory of a ctioga2 source tree.

Command: edit-type

Synopsis (file)

edit-type text

Synopsis (command-line)

--edit-type text

Edit the given type in an editor. It will only work from the top directory of a ctioga2 source tree.

Command: list-commands

Synopsis (file)

list-commands /option=...

Synopsis (command-line)

--list-commands  /option=...

Available options: format raw

List all commands known to ctioga2

Command: list-groups

Synopsis (file)

list-groups /option=...

Synopsis (command-line)

--list-groups  /option=...

Available options: raw

List all command groups known to ctioga2

Command: list-types

Synopsis (file)

list-types /option=...

Synopsis (command-line)

--list-types  /option=...

Available options: raw

List all types known to ctioga2

Command: version-raw

Synopsis (file)

version-raw 

Synopsis (command-line)

--version-raw 

Prints the raw version number, without any other decoration and newline.

Filters

The commands in this group act upon the last dataset pushed unto the data stack: they can be viewed as filters.

Available commands: avg-dup avg-dup-last cherry-pick cherry-pick-last smooth-last sort sort-last trim trim-last

Command: avg-dup

Synopsis (file)

avg-dup 

Synopsis (command-line)

--avg-dup 

Install the avg-dup-last command as a dataset hook (see dataset-hook): all datasets acquired after this is on will be averaged if they have identical successive values of X.

Command: avg-dup-last

Synopsis (file)

avg-dup-last 

Synopsis (command-line)

--avg-dup-last 

Averages successive points with identical X values. This algorithm is naive with respect to the min/max values and averages them just as well, whereas one might expect something more clever.

To average over identical X values when they are not successive in the dataset, you might want to hand it over to sort-last first.

Command: cherry-pick

Synopsis (file)

cherry-pick text

Synopsis (command-line)

--cherry-pick text

Install the cherry-pick-last command as a dataset hook (see dataset-hook): all points for which the formula returns false for subsequent datasets will be removed.

Command: cherry-pick-last

Synopsis (file)

cherry-pick-last text

Synopsis (command-line)

--cherry-pick-last text

Removes the data from the last dataset in the data stack for which the formula returns false.

See also the cherry-pick command to apply the selection to all datasets.

You might find it much easier to use the /where option of the plot or load commands.

Command: smooth-last

Synopsis (file)

smooth-last integer

Synopsis (command-line)

--smooth-last integer

Smooth the data using a simple (naive even) gaussian filter. Good for producing 'lines to guide the eye'

Command: sort

Synopsis (file)

sort 

Synopsis (command-line)

--sort 

Install the sort-last command as a dataset hook (see dataset-hook): all subsequent datasets will be sorted according to their X values.

Command: sort-last

Synopsis (file)

sort-last 

Synopsis (command-line)

--sort-last 

Sorts the last dataset pushed unto the stack according to X values. Can be used as a filter.

See also sort.

Command: trim

Synopsis (file)

trim integer

Synopsis (command-line)

--trim integer

Install the trim-last command as a dataset hook (see dataset-hook): all subsequent datasets will be trimmed to keep only every n point.

Command: trim-last

Synopsis (file)

trim-last integer

Synopsis (command-line)

--trim-last integer

Only keeps one every ? data point on the last dataset pushed unto the data stack. Useful when data have too many points to avoid creating heavy PDF files that take ages to display with no additional benefits.

This operation is very crude and does not average data.

See also trim.

General commands

General scope commands

Available commands: command-line-help debug echo eval include verbose version

Command: command-line-help

Synopsis (file)

command-line-help /option=...

Synopsis (command-line)

-h  /option=...
--help  /option=...

Available options: pager

Prints helps about short and long options available when run from the command-line.

Command: debug

Synopsis (file)

debug 

Synopsis (command-line)

--debug 

With this on, ctioga2 writes a whole lot of debugging information. You probably will not need that unless you intend to file a bug report or to tackle a problem yourself.

Command: echo

Synopsis (file)

echo 

Synopsis (command-line)

--echo 

Writes the whole command-line used to standard error, quoted in such a way that it should be usable directly for copy/paste.

Command: eval

Synopsis (file)

eval commands

Synopsis (command-line)

-e commands
--eval commands

Runs the given strings as commands, as if given from a command file.

Command: include

Synopsis (file)

include file /option=...

Synopsis (command-line)

-f file /option=...
--file file /option=...

Available options: log

Reads the file and runs commands found in them, using the ctioga language.

ctioga2 -f my_file.ct2

If the /log is on, then all messages are written to a -log.txt file instead of to the terminal.

Command: verbose

Synopsis (file)

verbose 

Synopsis (command-line)

-v 
--verbose 

With this on, ctioga2 outputs quite a fair amount of informative messages.

Command: version

Synopsis (file)

version 

Synopsis (command-line)

-V 
--version 

Prints the version of ctioga in use

Generated for ctioga2 version: SVN, revision 548+git8, Thu Dec 19 23:29:27 2013 +0100