Graphics    

Placing Text Outside the Axes

MATLAB always displays text objects within an axes. If you want to create a graph and provide a description of the information alongside the graph, you must create another axes to position the text. If you create an axes that is the same size as the figure and then create a smaller axes to draw the graph, you can then display text anywhere independently of the graph.

For example, define two axes.

Since the axes units are normalized to the figure, specifying the Position as [0 0 1 1] creates an axes that encompasses the entire window.

Now plot some data in the current axes. The last axes created is the current axes so MATLAB directs graphics output there.

Define the text and display it in the full-window axes.


  Multiple Axes per Figure Multiple Axes for Different Scaling