RunMat
  • Pricing
RunMat
GitHub
GitHub
Sign inTry in browser
DesktopRuntimePhysicsCADAdministrationAgent

Get RunMat updates

New releases, guides and examples.

Product+
  • Runtime
  • GPU
  • Parallel
  • Compile
  • Interop and MEX
  • Simulation
  • MCAD
  • ECAD
  • Enterprise
  • AI integrations
  • Pricing
  • Download
Math+
  • Signal processing
  • Linear algebra
  • Statistics
  • Curve fitting
  • Differential equations
  • Control systems
  • Optimization
  • Finance
  • Data and tables
  • Plotting
Physics+
  • Simulation overview
  • Structural
  • Thermal
  • Electromagnetic
  • Joule heating
  • Thermal stress
  • Acoustics
  • Fluid flow
  • Conjugate heat transfer
  • Fluid–structure
  • What is FEA
Industries+
  • Aerospace
  • Automotive and transportation
  • Defense
  • Electronics and semiconductors
  • Energy
  • Industrial machinery
  • Life sciences
  • Quantitative finance
Learn+
  • Guides
  • Docs
  • Function reference
  • Language reference
  • Migration guide
  • Changelog
  • MATLAB Online
  • MATLAB AI agent
  • For students
Compare+
  • RunMat vs MATLAB
  • RunMat vs Ansys
  • RunMat vs SOLIDWORKS
  • RunMat vs Altium
  • RunMat vs Cadence
  • RunMat vs COMSOL
  • RunMat vs Python
  • RunMat vs Julia
  • RunMat vs Physics AI
  • RunMat vs Octave
  • Benchmarks
  • MATLAB alternatives
  • All comparisons
Company+
  • About
  • Blog
  • Contact
  • Source code↗
  • License
  • Privacy
  • Terms

Product

  • Runtime
  • GPU
  • Parallel
  • Compile
  • Interop and MEX
  • Simulation
  • MCAD
  • ECAD
  • Enterprise
  • AI integrations
  • Pricing
  • Download

Math

  • Signal processing
  • Linear algebra
  • Statistics
  • Curve fitting
  • Differential equations
  • Control systems
  • Optimization
  • Finance
  • Data and tables
  • Plotting

Physics

  • Simulation overview
  • Structural
  • Thermal
  • Electromagnetic
  • Joule heating
  • Thermal stress
  • Acoustics
  • Fluid flow
  • Conjugate heat transfer
  • Fluid–structure
  • What is FEA

Industries

  • Aerospace
  • Automotive and transportation
  • Defense
  • Electronics and semiconductors
  • Energy
  • Industrial machinery
  • Life sciences
  • Quantitative finance

Learn

  • Guides
  • Docs
  • Function reference
  • Language reference
  • Migration guide
  • Changelog
  • MATLAB Online
  • MATLAB AI agent
  • For students

Compare

  • RunMat vs MATLAB
  • RunMat vs Ansys
  • RunMat vs SOLIDWORKS
  • RunMat vs Altium
  • RunMat vs Cadence
  • RunMat vs COMSOL
  • RunMat vs Python
  • RunMat vs Julia
  • RunMat vs Physics AI
  • RunMat vs Octave
  • Benchmarks
  • MATLAB alternatives
  • All comparisons

Company

  • About
  • Blog
  • Contact
  • Source code↗
  • License
  • Privacy
  • Terms
GitHubXLinkedIn

© Dystr, Inc. · RunMat v0.7.2, Nov 26, 2026 ·

RunMat® is a registered trademark of Dystr, Inc. MATLAB® is a registered trademark of The MathWorks, Inc. RunMat is not affiliated with, endorsed by, or sponsored by The MathWorks, Inc.

/
See all docs
Builtin Reference
    • addpoints
    • ancestor
    • animatedline
    • area
    • autumn
    • axes
    • axis
    • bar
    • barh
    • bone
    • box
    • caxis
    • cla
    • clf
    • clim
    • colorbar
    • colorcube
    • colormap
    • colororder
    • contour
    • contour3
    • contourf
    • cool
    • copper
    • copyobj
    • cylinder
    • daspect
    • datacursormode
    • dataTipTextRow
    • drawnow
    • errorbar
    • fcontour
    • figure
    • fill
    • fill3
    • findobj
    • fsurf
    • gca
    • gcf
    • get
    • gobjects
    • gray
    • grid
    • groot
    • heatmap
    • hgload
    • hgsave
    • hidden
    • hist
    • histogram
    • histogram2
    • hold
    • hot
    • image
    • imagesc
    • imshow
    • inferno
    • isgraphics
    • ishandle
    • jet
    • legend
    • line
    • lines
    • linkaxes
    • loglog
    • magma
    • mesh
    • meshc
    • openfig
    • opengl
    • pan
    • parula
    • patch
    • pie
    • pink
    • plasma
    • plot
    • plot3
    • plotmatrix
    • plotyy
    • polarhistogram
    • polarplot
    • polarscatter
    • print
    • quiver
    • quiver3
    • ribbon
    • saveas
    • savefig
    • scatter
    • scatter3
    • semilogx
    • semilogy
    • set
    • sgtitle
    • shading
    • sphere
    • spring
    • stackedplot
    • stairs
    • stem
    • subplot
    • subtitle
    • summer
    • suptitle
    • surf
    • surfc
    • text
    • textscatter
    • textscatter3
    • title
    • triplot
    • turbo
    • view
    • viridis
    • waitbar
    • winter
    • wordcloud
    • xlabel
    • xlim
    • xline
    • xscale
    • xtickangle
    • xtickformat
    • xticklabels
    • xticks
    • ylabel
    • ylim
    • yline
    • yscale
    • ytickangle
    • ytickformat
    • yticklabels
    • yticks
    • zlabel
    • zlim
    • zoom

title — Set the title of the current axes or specified axes.

title attaches text to individual axes and returns a text handle for later property updates. Use sgtitle when one heading should span an entire figure.

Syntax

h = title(txt)
h = title(ax, txt)
h = title(txt, Name, Value, ...)
h = title(ax, txt, Name, Value, ...)
title(txt)
title(ax, txt)
title(txt, Name, Value, ...)
title(ax, txt, Name, Value, ...)

Inputs

txt
Type
Any
Required
Yes
Description
Title text (string/char/cellstr-like multiline forms).
ax
Type
AxesHandle
Required
Yes
Description
Target axes handle.
props
Type
Any
Required
Variadic
Description
Property/value pairs (Color, FontSize, FontWeight, etc.).
NameTypeRequiredDefaultDescription
txtAnyYes—Title text (string/char/cellstr-like multiline forms).
axAxesHandleYes—Target axes handle.
propsAnyVariadic—Property/value pairs (Color, FontSize, FontWeight, etc.).

Returns

h
Type
NumericScalar
Description
Handle to the created/updated title object.
NameTypeDescription
hNumericScalarHandle to the created/updated title object.

Errors

RunMat:title:InvalidArgument
When
Axes handle, text payload, or property/value arguments are invalid.
Message
title: invalid argument
RunMat:title:Internal
When
Internal plotting state update fails.
Message
title: internal operation failed
RunMat:title:TooManyOutputs
When
More than one output is requested.
Message
title: too many output arguments
IdentifierWhenMessage
RunMat:title:InvalidArgumentAxes handle, text payload, or property/value arguments are invalid.title: invalid argument
RunMat:title:InternalInternal plotting state update fails.title: internal operation failed
RunMat:title:TooManyOutputsMore than one output is requested.title: too many output arguments

Behavior

The returned value is a text handle that can be inspected or updated through get and set.

With no explicit target, title attaches text to the current axes as returned by gca.

Passing an axes handle as the first argument targets that specific axes, which is useful in subplot layouts.

String scalars, char arrays, string arrays, cell arrays, and finite numeric scalars are accepted. Native integer scalars are formatted directly from their exact decimal value, including full-width int64 and uint64 values. String arrays and cell arrays produce multiline titles.

Text styling properties — FontSize, FontWeight, FontAngle, Color, Interpreter, and Visible — use the shared plotting text-property system.

FontSize accepts single, double, and all eight native integer classes, then validates that the size is positive, finite, and within the renderer's supported range.

Placement and execution

This command mutates local graphics scene state and may notify the graphics host. Inputs and returned graphics handles are host-owned; worker transfer of numeric handle values does not transfer scene ownership.

Interpreter and compiled routes use the same runtime operation; a browser graphics host or desktop graphics host is required for presentation.

Example captions

% title is rendered above the axes

% Each panel has its own title; the figure has none

% Titles are attached to their respective axes regardless of which is currently selected

% Both strings appear, stacked above the axes

% The axes title is updated in place

Examples

Add a title to the current axes

plot(0:0.1:2*pi, sin(0:0.1:2*pi));
title('Sine Wave');

Style the title and inspect its handle

plot(1:10, rand(1, 10));
h = title('Random Signal', 'FontSize', 16, 'FontWeight', 'bold');
get(h, 'Type')

Expected output:

ans =
    'text'

Set an independent title on each subplot panel

subplot(1, 2, 1);
plot(0:0.1:pi, sin(0:0.1:pi));
title('Sine');
subplot(1, 2, 2);
plot(0:0.1:pi, cos(0:0.1:pi));
title('Cosine');

Target a specific axes using an explicit handle

ax1 = subplot(1, 2, 1);
plot(ax1, 1:5, 1:5);
ax2 = subplot(1, 2, 2);
plot(ax2, 1:5, (1:5).^2);
title(ax1, 'Linear');
title(ax2, 'Quadratic');

Create a multiline title from a string array

plot(1:5, [2 4 1 3 5]);
title(["Top line"; "Bottom line"]);

Update a title after plotting using set

plot(1:10, rand(1, 10));
h = title('Draft');
set(h, 'String', 'Final Title', 'FontSize', 14);

Using title with coding agents

Open a RunMat example with live inputs, then ask the agent to explain how title changes the result.

Run a small title example, explain the result, then change one input and compare the output.

FAQ

How is title different from sgtitle?⌄

title is axes-scoped: it attaches to one panel. sgtitle is figure-scoped and is drawn once above all subplot panels. Use title for per-panel labels and sgtitle for an overall figure heading.

How do I create a multiline title?⌄

Pass a string array or cell array. RunMat joins the elements with newlines.

title({'First line', 'Second line'});
Can I update the title after the plot is created?⌄

Yes. title returns a text handle, so you can update it at any time with set.

h = title('Initial');
set(h, 'String', 'Updated', 'Color', 'r');
How do I set titles on specific subplots without changing the active axes?⌄

Pass the axes handle returned by subplot or gca as the first argument.

ax = subplot(2, 1, 1);
title(ax, 'Top Panel');

Related Plotting functions

2D Charts

area · bar · errorbar · heatmap · hist · histogram · loglog · pie · plot · scatter · semilogx · semilogy · stairs · stem

3D & Surface

contour · contour3 · contourf · mesh · meshc · plot3 · quiver · scatter3 · surf · surfc

Images

image · imagesc · imshow

Axes & Layout

axis · box · grid · sgtitle · subplot · view · zlabel

Appearance

colorbar · colormap · legend · shading

Handle Access

gca · gcf · get · set

Other

addpoints · ancestor · animatedline · autumn · axes · barh · bone · caxis · cla · clf · clim · colorcube · colororder · cool · copper · copyobj · cylinder · daspect · datacursormode · dataTipTextRow · drawnow · fcontour · figure · fill · fill3 · findobj · fsurf · gobjects · gray · groot · hgload · hgsave · hidden · histogram2 · hold · hot · inferno · isgraphics · ishandle · jet · line · lines · linkaxes · magma · openfig · opengl · pan · parula · patch · pink · plasma · plotmatrix · plotyy · polarhistogram · polarplot · polarscatter · print · quiver3 · ribbon · saveas · savefig · sphere · spring · stackedplot · subtitle · summer · suptitle · text · textscatter · textscatter3 · triplot · turbo · viridis · waitbar · winter · wordcloud · xlabel · xlim · xline · xscale · xtickangle · xtickformat · xticklabels · xticks · ylabel · ylim · yline · yscale · ytickangle · ytickformat · yticklabels · yticks · zlim · zoom

More plotting resources

  • Styling plots and axes
  • Plot replay and export
  • Complete plotting guide

Source you can read

Every RunMat function's source is public. Read exactly how title is executed, line by line, in Rust.

  • View the source for title in Rust on GitHub
  • Learn how the RunMat runtime works
  • Found a bug? Open an issue with a minimal reproduction.

About RunMat

RunMat is a runtime that executes MATLAB-syntax code fast on any GPU. The runtime is free for individuals, including freelancers; students and faculty at an academic institution, for teaching or research there; contributors to an open-source project, for work on that project; organizations with 250 or fewer people and US$10M or less in annual revenue; and anyone, for non-production use. See runmat.com/license.

  • RunMat automatically optimizes your math for GPU execution on Apple, Nvidia, and AMD hardware. No code changes needed. Simulations that took hours now take minutes.
  • Start running code in seconds. RunMat runs in the browser, on the desktop, or from the CLI. No license server, no IT ticket.

Getting started · Benchmarks · Pricing

Download RunMat

Download RunMat for full performance, or use RunMat in your browser for zero setup.

Download RunMatOpen Sandbox
On this page
  • Syntax
  • Inputs
  • Returns
  • Errors
  • Behavior
  • Placement and execution
  • Example captions
  • Examples
  • Add a title to the current axes
  • Style the title and inspect its handle
  • Set an independent title on each subplot panel
  • Target a specific axes using an explicit handle
  • Create a multiline title from a string array
  • Update a title after plotting using set
  • Using title with coding agents
  • FAQ
  • Related Plotting functions
  • 2D Charts
  • 3D & Surface
  • Images
  • Axes & Layout
  • Appearance
  • Handle Access
  • Other
  • More plotting resources
  • Source you can read
  • About RunMat