ctioga2

the polymorphic plotting program

Customizing the look of axes and labels

Here are ways to tweak various things about axes and things.

Alternative X or Y axes

It is possible to use different axes for different curves in a single plot, using --y2 or --x2:

ctioga2 -X --math 'sin(x)' 'cos(x)' -y '$y$ values' \
	--y2 'x**2' -y '$y_2$ values' \
	-x '$x$ values' /color Blue

This example also shows how to define the label for the current X and Y axes; the -x and -y commands provide many options to fine-tune the look of the labels.

X and Y ranges

It is possible to define the X and Y ranges of the plot thus:

ctioga2 -X --math 'sin(x)' 'cos(x)' \
	--xrange -20: --yrange -0.8:2

Alternatively, it is possible to use --margin to leave a certain fraction of the plots around the data points; to make the reading easier. In this case, we leave 3%:

ctioga2 -X --math --margin 0.03 \
	'sin(x)' 'cos(x)'

Log plots

It is possible to use a log scale by passing the --xlog or --ylog commands:

ctioga2 -X --math --ylog --margin 0.03 \
	'1 + x**2' '1 + x**4' '1 + x**6' 

Tweaking the looks of axes

It is possible to change the look of each of the sides of the plot individually using the --axis-style and the companion --label-style commands that set the style of the axis and of the labels respectively.

ctioga2 -X --math 'sin(x)' 'cos(x)' \
	--top off --bottom major-num /stroke_color Blue \
	--axis-style right /decoration major \
	--label-style bottom /color Blue