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: bypass-transforms color color-map error-bar-color fill fill-color fill-transparency ignore_hooks legend line-style line-width marker marker-color marker-color-map marker-scale name region-side split-on-nan style 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: color color-map error-bar-color fill fill-color fill-transparency legend line-style line-width marker marker-color marker-color-map marker-scale region-side split-on-nan style 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: color color-map color-set 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-scale marker-scale-set marker-set region-side region-side-set split-on-nan style style-set zaxis

Command: color

Synopsis (file)

color(color-or-auto)

Synopsis (command-line)

-c COLOR-OR-AUTO
--color COLOR-OR-AUTO

Sets the 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 subsequent curves, until cancelled with auto as argument.

Command: color-set

Synopsis (file)

color-set(color-set)

Synopsis (command-line)

--color-set COLOR-SET

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

Command: error-bar-color

Synopsis (file)

error-bar-color(color-or-auto)

Synopsis (command-line)

--error-bar-color COLOR-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-set)

Synopsis (command-line)

--error-bar-color-set COLOR-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 Marker color map 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-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: 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

Sets the Split on NaN for subsequent curves, until cancelled with auto as argument.

Command: style

Synopsis (file)

style(text-or-auto)

Synopsis (command-line)

--style TEXT-OR-AUTO

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

Command: style-set

Synopsis (file)

style-set(text-set)

Synopsis (command-line)

--style-set TEXT-SET

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

Command: zaxis

Synopsis (file)

zaxis(text-or-auto)

Synopsis (command-line)

--zaxis TEXT-OR-AUTO

Sets the Name for the Z axis for subsequent curves, until cancelled with auto as argument.

Legends

Commands to specify legends and tweak their look.

Available commands: auto-legend legend legend-inside legend-line 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_style frame_width scale symbol_scale text_scale

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.

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_style frame_width scale symbol_scale text_scale

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

Switch between different kinds of plots

How to switch between different kinds of plot types

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

Command: xy-parametric

Synopsis (file)

xy-parametric()

Synopsis (command-line)

--xy-parametric 

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 color 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 color fill-color fill-transparency fill_color fill_transparency 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: closed color 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 color 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 color 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 color 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: color 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 color 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: text text-col text-header-line text-parameters text-separator text-skip text-split

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 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: 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 label-style left new-zaxis no-title no-xlabel no-ylabel right 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: 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 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.

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 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: 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).

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 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 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 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: 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 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 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 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.

Data stack manipulation

Commands for manipulation of the data stack

Available commands: apply-formula compute-contour dataset-hook dataset-hook-add dataset-hook-clear 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: 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: 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: 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 {cmd: xyz-map} or {cmd: 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)

Synopsis (command-line)

--edit-command TEXT

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)

Synopsis (command-line)

-f FILE
--file FILE

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

ctioga2 -f my_file.ct2

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: 0.4