Main Content

Labels and Annotations

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

Add a title, label the axes, or add annotations to a graph to help convey important information. You can create a legend to label plotted data series or add descriptive text next to data points. Also, you can create annotations such as rectangles, ellipses, arrows, vertical lines, or horizontal lines that highlight specific areas of data.


alle erweitern

titleAdd title
subtitleAdd subtitle to plot
sgtitleAdd title to subplot grid
xlabelLabel x-axis
ylabelLabel y-axis
zlabelLabel z-axis
legendAdd legend to axes
bubblelegendCreate legend for bubble chart
textAdd text descriptions to data points
gtextAdd text to figure using mouse
xlineVertical line with constant x-value
ylineHorizontal line with constant y-value
annotationCreate annotations
datatipCreate data tip
lineCreate primitive line
rectangleCreate rectangle with sharp or curved corners
texlabelFormat text with TeX characters
ginputIdentify axes coordinates


alle erweitern

Text PropertiesAxes text appearance and behavior
Text PropertiesSubplot text appearance and behavior
Text PropertiesTiled chart layout text appearance and behavior
Legend PropertiesLegend appearance and behavior
BubbleLegend PropertiesBubble legend appearance and behavior
ConstantLine PropertiesConstant line appearance and behavior
Arrow PropertiesArrow appearance and behavior
DoubleEndArrow PropertiesDouble end arrow appearance and behavior
Ellipse PropertiesEllipse appearance and behavior
Line PropertiesAnnotation line appearance and behavior
Rectangle PropertiesAnnotation rectangle appearance and behavior
TextArrow PropertiesText arrow appearance and behavior
TextBox PropertiesText box appearance and behavior
Line PropertiesPrimitive line appearance and behavior
Rectangle PropertiesRectangle appearance and behavior


Add Title and Axis Labels to Chart

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

Make the Graph Title Smaller

Modify the font size and length of graph titles.

Add Legend to Graph

Label data series using a legend and customize the legend appearance such as changing the location, setting the font size, or using multiple columns.

Add Text to Chart

This example shows how to add text to a chart, control the text position and size, and create multiline text.

Greek Letters and Special Characters in Chart Text

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

Add Annotations to Chart

Annotations are extra information added to a chart to help identify important information.