pan — Control interactive axes panning for figures and axes.
pan toggles or configures MATLAB-compatible figure panning state. It supports figure and axes targets, returns a live pan mode object, and integrates with get and set for common pan object properties.
Syntax
p = pan()
pan()
status = pan(option)
status = pan(target, option)
p = pan(fig)Inputs
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
option | StringScalar | Yes | — | Pan option: on, off, toggle, xon, or yon. |
target | Any | Yes | — | Figure or axes handle. |
option | Any | Yes | — | Pan option. |
fig | NumericScalar | Yes | — | Target figure handle. |
Returns
| Name | Type | Description |
|---|---|---|
p | Any | Pan mode object for the current or specified figure. |
status | StringScalar | Returns "ok" when the pan command succeeds. |
Errors
| Identifier | When | Message |
|---|---|---|
RunMat:pan:InvalidArgument | Argument count, target handle, option, or pan property is invalid. | pan: invalid argument |
RunMat:pan:Internal | Internal pan state or handle-object update fails. | pan: internal operation failed |
GPU memory and residency
pan mutates plotting interaction metadata only. It does not gather or copy GPU-resident plot data.
Examples
Enable horizontal panning
plot(1:10);
pan xon;Expected output:
% Pan mode is enabled horizontallyUse the pan object with get and set
p = pan;
set(p, 'Enable', 'on', 'Motion', 'vertical');
get(p, 'Motion')Expected output:
ans = 'vertical'Using pan with coding agents
Open a RunMat example with live inputs, then ask the agent to explain how pan changes the result.
Run a small pan example, explain the result, then change one input and compare the output.
Related Plotting functions
2D Charts
area · bar · errorbar · heatmap · hist · histogram · loglog · pie · plot · scatter · semilogx · semilogy · stairs · stem
Other
addpoints · ancestor · animatedline · axes · barh · cla · clf · colorcube · colororder · copyobj · daspect · datacursormode · dataTipTextRow · fcontour · figure · fill3 · findobj · fsurf · gobjects · groot · hgload · hgsave · hidden · histogram2 · hold · line · linkaxes · openfig · opengl · parula · patch · plotmatrix · plotyy · polarhistogram · polarplot · polarscatter · print · quiver3 · ribbon · saveas · savefig · sphere · stackedplot · subtitle · suptitle · textscatter · textscatter3 · triplot · waitbar · wordcloud · xline · xscale · xtickangle · xtickformat · xticklabels · xticks · yline · yscale · ytickangle · ytickformat · yticklabels · yticks · zoom
About RunMat
RunMat is an open-source runtime that executes MATLAB-syntax code blazing on any GPU. It is licensed under the Apache 2.0 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.