Documentation

This is machine translation

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

我们为许可用户提供了部分翻译好的中文文档。您只需登录便可查阅这些文档

Titles and Labels

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

Functions

title Add title to axes or legend
xlabel Label x-axis
ylabel Label y-axis
zlabel Label z-axis
clabel Label contour plot elevation
legend Add legend to axes
colorbar Colorbar showing color scale
text Add text descriptions to data points
texlabel Format text with TeX characters
gtext Add text to figure using mouse
line Create line object
rectangle Create rectangle with sharp or curved corners
annotation Create annotations

Properties

Colorbar Properties Control colorbar appearance and behavior
Legend Properties Control legend appearance and behavior
Primitive Line Properties Control primitive line appearance and behavior
Rectangle Properties Control rectangle appearance and behavior
Text Properties Control text appearance and behavior
Annotation Arrow Properties Control annotation arrow appearance and behavior
Annotation Double Arrow Properties Control annotation double arrow appearance and behavior
Annotation Ellipse Properties Control annotation ellipse appearance and behavior
Annotation Line Properties Control annotation line appearance and behavior
Annotation Rectangle Properties Control annotation rectangle appearance and behavior
Annotation Text Arrow Properties Control annotation text arrow appearance and behavior
Annotation Text Box Properties Control annotation 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?