Graphics and Handles

The current AUXLAB graphics system is handle-based. Functions such as figure, axes, plot, line, text, delete, and repaint work with runtime graphics handles rather than only with implicit global state.

Current Handle Variables

Two predefined variables expose the currently active graphics objects:

These are pseudo variables, not ordinary user variables. They depend on an installed graphics backend. If the frontend does not provide graphics support, graphics calls can fail with backend-availability errors.

Creating Graphics Objects

Typical graphics setup now looks like this:

h = figure
ax = axes(h)
plot(ax, [1 2 3 4])
repaint(h)

The current engine metadata shows these common calling patterns:

Passing a target handle is the clearest way to control which object receives the drawing operation.

Handle Properties

Graphics handles can expose and accept properties through member-style access. In current auxlab2 code, axes properties such as these are already used:

Example:

h = figure
ax = axes(h)
ax.xlim = [0 10]
ax.ylim = [-1 1]
plot(ax, tone(440, 500))
repaint(h)

The older help system had only partial graphics property documentation. The new canonical set should document verified properties page by page as they are confirmed in the current backend.

Example With Callback-Owned Graphics

The repository already contains a live example in cb1.aux:

function [out,h,ax]=cb1(in)
if in.?index==0
    out = []
    h=figure
    ax = axes(h)
    ax.xlim=[0 10]
else
    out ++= in.?data
    plot(ax, out)
    ax.xlim=[0 10]
    repaint(h)
end

This shows an important current pattern:

Notes

Current source basis: