reference
labkit.app.plot.showMessage
Show a centered empty-state message in an axes.
Syntax
hText = labkit.app.plot.showMessage(ax, message)
hText = labkit.app.plot.showMessage(ax, message, Name=Value)Inputs
ax- Valid scalar MATLAB axes or uiaxes handle.
message- User-visible text scalar displayed at the axes center.
Name-Value Arguments
Title- Axes title text. Default: "".
Color- MATLAB color value for the message text. Default: [0.30 0.30 0.30].
Outputs
hText- MATLAB text object containing the message.
Description
message clears the axes, resets it to linear unit limits [0 1], removes ticks, and draws non-pickable text. Use it for an empty preview, loading prompt, or unavailable result. Because it performs a complete clear, it is not an overlay operation and does not preserve the previous zoom.
Errors
labkit:app:plot:InvalidAxes- ax is not a valid scalar axes handle. labkit:app:plot:InvalidOptions or labkit:app:plot:InvalidOption - Name-value arguments are malformed or unsupported. Invalid MATLAB text or color values propagate their originating graphics error.
Example
fig = figure("Visible", "off");
cleanup = onCleanup(@() close(fig));
ax = axes(fig);
h = labkit.app.plot.showMessage(ax, "No data", "Title", "Preview");
assert(string(h.String) == "No data")Related APIs
labkit.app.plot.clearAxes— Prepare an axes for an app-owned redraw.labkit.app.plot.clampPointToAxes— Keep data coordinates inside the visible axes box.labkit.app.plot.enablePopout— Add a standalone-figure action to an axes context menu.labkit.app.plot.fitAxesToGraphics— Fit axes limits to finite plotted X/Y data.labkit.app.plot.fitCanvasToSource— Fit a preview axes into a fixed-aspect pixel frame.labkit.app.plot.offsetPointByAxesFraction— Move data coordinates by normalized axes fractions.
Source
This page is generated from the MATLAB help text in +labkit/+app/+plot/showMessage.m.