Search Contact information
University of Cambridge Home Department of Engineering
University of Cambridge >  Engineering Department >  computing help
next up previous contents
Next: Creating User Interfaces Up: Graphics Previous: Default Properties


People often want to change the axes and labels that the default setting provides. The size and style of fonts, axes labels and the numbering along the axes can all be controlled using menu options or the set command. Here's an example that also shows how to use greek characters.

% Make the axis numbering smaller than usual
% Have z tic marks at intervals of 0.5
% Label the Z axis 
zlabel = get(gca,'ZLabel');
set (zlabel,'String','D(b/3)')
set (zlabel,'FontName','Symbol')

The text command can deal with maths and changes of font styles. For example,

text(0,1,'{\bf bold} \alpha=x^3. \Sigma x \leq \int y \forall x')
works as LATEX users might expect. The title and labelling commands are similar. More colorful information can be added by using

© Cambridge University Engineering Dept
Information provided by Tim Love