Graphics

Library

MATLAB ships with a powerful graphics GUI that makes it easy to add, remove, and edit titles, labels, legends, and axes. The same operations can also be performed directly through functions.

Plot Categories

Other Elements

Title, Axis Labels, and Legend

The following functions add a title, axis labels, and a legend to an existing chart:

  • title
  • xlabel
  • ylabel
  • zlabel
  • legend

These all accept char arguments and can render . legend additionally accepts a cell array of char vectors.

Pass the name-value pair 'Interpreter', 'latex' to render with .

Useful Tips

  • Use exportgraphics to export graphs.