Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Titles and Labels

Add titles, axis labels, informative text, and other graph annotations

Functions

titleAdd title
xlabelLabel x-axis
ylabelLabel y-axis
zlabelLabel z-axis
clabelLabel contour plot elevation
legendAdd legend to axes
colorbarColorbar showing color scale
textAdd text descriptions to data points
texlabelFormat text with TeX characters
gtextAdd text to figure using mouse
lineCreate primitive line
rectangleCreate rectangle with sharp or curved corners
annotationCreate annotations

Properties

Colorbar PropertiesControl colorbar appearance and behavior
Legend PropertiesControl legend appearance and behavior
Line PropertiesControl primitive line appearance and behavior
Rectangle PropertiesControl rectangle appearance and behavior
Text PropertiesControl text appearance and behavior
Arrow PropertiesControl arrow appearance and behavior
DoubleEndArrow PropertiesControl double end arrow appearance and behavior
Ellipse PropertiesControl ellipse appearance and behavior
Line PropertiesControl annotation line appearance and behavior
Rectangle PropertiesControl annotation rectangle appearance and behavior
TextArrow PropertiesControl text arrow appearance and behavior
TextBox PropertiesControl text box appearance and behavior

Topics

Programmatic Workflow

Add Title, Axis Labels, and Legend to Graph

This example shows how to add a title, axis labels and a legend to a graph using the title, xlabel, ylabel and legend functions.

Add Text to Specific Points on Graph

This example shows how to add text descriptions with arrows that point to three data points on a graph.

Greek Letters and Special Characters in Graph Text

You can add text to a graph that includes Greek letters and special characters using TeX markup.

Text with Mathematical Expression Using LaTeX

These examples show how add text to a graph that includes mathematical expressions using LaTeX.

Include Variable Values in Graph Text

These examples show how to include variable values in text on a graph.

Display Text Outside Axes

This example shows how to display text outside an axes by creating a second axes for the text.

Exclude Objects from Graph Legend

This example shows how to plot several lines and create a legend that includes descriptions for a subset of the lines.

Specify Legend Descriptions During Line Creation

This example shows how to plot multiple lines and specify the associated legend labels during the plotting command.

Create Interactive Legends Using Callbacks

You can create interactive legends so that when you click an item in the legend, the associated chart updates in some way.

Tools Workflow

Add Text to Graph Interactively

This example shows how to interactively add a title, legend, axis labels, and other text to a graph using the figure menus and plot tools.

Add Annotations to Graph Interactively

These examples show how to interactively add annotations to a graph and pin them to the axes.

Align Objects in Graph Using Alignment Tools

This example shows how to align text boxes in a graph using alignment tools.

Was this topic helpful?