### 16.5 Plot Annotations

— Function File: title (title)

> Create a title object and return a handle to it.

— Function File: legend (st1, st2, ...)
— Function File: legend (st1, st2, ..., pos)
— Function File: legend (matstr)
— Function File: legend (matstr, pos)
— Function File: legend (cell)
— Function File: legend (cell, pos)
— Function File: legend ('func')

> Legend puts a legend on the current plot using the specified strings as labels. Use independant strings (st1, st2, ...), a matrix of strings (matstr), or a cell array of strings (cell) to specify legends. Legend works on line graphs, bar graphs, etc. Be sure to call plot before calling legend.

> pos optionally places the legend in the specified location:

> | -1 | To the top right of the plot
> | 0 | Don't move the legend box (default)
> | 1 | Upper right-hand corner
> | 2 | Upper left-hand corner
> | 3 | Lower left-hand corner
> | 4 | Lower right-hand corner

> Some specific functions are directely avaliable using func:

> `show`
>   Show legends from the plot
> `hide`
> `off`
>   Hide legends from the plot
> `boxon`
>   Draw a box around legends
> `boxoff`
>   Withdraw the box around legends
> `left`
>   Text is to the left of the keys
> `right`
>   Text is to the right of the keys

— Function File: h = text (x, y, label)
— Function File: h = text (x, y, z, label)

> Create a text object with text label at position x, y, z on the current axes. The label may be followed by property-value pairs.

— Function File: xlabel (string)
— Function File: ylabel (string)
— Function File: zlabel (string)

> Specify x, y, and z axis labels for the plot.

> See also: plot, semilogx, semilogy, loglog, polar, mesh, contour, bar, stairs, ylabel, title.

— Function File: box (arg)
— Function File: grid (h, ...)

> Control the display of a border around the plot. The argument may be either `"on"` or `"off"`. If it is omitted, the current box state is toggled.

> See also: grid.

— Function File: grid (arg)
— Function File: grid ("minor", arg2)

> Force the display of a grid on the plot. The argument may be either `"on"` or `"off"`. If it is omitted, the current grid state is toggled.

> If arg is `"minor"` then the minor grid is toggled. When using a minor grid a second argument arg2 is allowed, which can be either `"on"` or `"off"` to explicitly set the state of the minor grid.

> See also: plot, semilogx, semilogy, loglog, polar, mesh, contour, bar, stairs, xlabel, ylabel, title.