Octave graphic add-on, Octplot



česky

1.10 Addition in graphs - functions colorbar, grid, title





Function file: h = colorbar()


This function adds to an actual figure color bar on the right side.


Function file: h = colormap(MAP)


This function sets color palette. Parameter MAP must be matrix min. 2 x 3.


Function file: h = grid(HSTAT)


This function sets or cancel grid in actual figure.

Example:
grid("on") - activate grid
grid("off") - deactivate grid
grid() - opposite of actual setting



Function file: AX = axis(ARGS)


This function are able to set axes.

Example:
AX=asix() - it returns actual limits of axis to variable AX
AX=[xmin,xmax,ymin,ymax] - according to variables xmin,xmax,ymin,ymax set actual limits of axis
axis("auto") - automatically set of axes according to drawing object
axis("equal") - causes same length of system of coordinates
axis("off") - turn off (or turn on with parameter "on") axis and labels



Function files: title(LABEL), xlabel(LABEL), ylabel(LABEL)


These functions sets title of graph, label of axe x (xlabel) and label of axe y (ylabel).

Example:
x=-2.9:0.2:2.9;
bar(x,exp(-x.*x))
title("exp")
xlabel("x")
ylabel("y")




Function file: h = text(x,y,STR,ARGS)


This function are able to place a text STR on position (x,y). If there are next parameters, it use to format of the text. It return handle to variable h.


<<< 1.9 Save figure to a file - function print 1.11 More than 1 graph in one figure - function subplot >>>

© 2008 David Prokop