Navigation

Operators and Keywords

Function List:

C++ API

: box
: box on
: box off
: box (hax, …)

Control display of the axis border.

The argument may be either "on" or "off". If it is omitted, the current box state is toggled.

If the first argument hax is an axes handle, then operate on this axis rather than the current axes returned by gca.

See also: axis, grid.

Demonstration 1

The following code

 clf;
 plot (1:10, "o-");
 box off;
 title ("box off");

Produces the following figure

Figure 1

Demonstration 2

The following code

 clf;
 plot (1:10, "o-");
 box on;
 title ("box on");

Produces the following figure

Figure 1

Demonstration 3

The following code

 clf;
 z = [0:0.05:5];
 plot3 (cos (2*pi*z), sin (2*pi*z), z);
 box off;
 title ("box off");

Produces the following figure

Figure 1

Demonstration 4

The following code

 clf;
 z = [0:0.05:5];
 plot3 (cos (2*pi*z), sin (2*pi*z), z);
 box on;
 set (gca, "boxstyle", "back");
 title ({"box on", 'boxstyle = "back"'});

Produces the following figure

Figure 1

Demonstration 5

The following code

 clf;
 z = [0:0.05:5];
 plot3 (cos (2*pi*z), sin (2*pi*z), z);
 box on;
 set (gca, "boxstyle", "full");
 title ({"box on", 'boxstyle = "full"'});

Produces the following figure

Figure 1

Package: octave