caxis — Query or set colormap limits using the legacy name for clim.
caxis is the legacy name for clim and shares its color-limit query, setter, mode, compatibility, and host graphics-state contracts.
Syntax
limits = caxis()
limits = caxis([cmin cmax])
limits = caxis(mode)Inputs
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
limits | NumericArray | Yes | — | Two-element numeric vector [cmin cmax]. |
mode | StringScalar | Yes | — | Limit mode string ('auto', 'tight', or 'manual'). |
Returns
| Name | Type | Description |
|---|---|---|
limits | NumericArray | Two-element color limit vector [cmin cmax] or [NaN NaN] when auto. |
Errors
| Identifier | When | Message |
|---|---|---|
RunMat:caxis:InvalidArgument | Argument count, mode, or limit vector is invalid. | caxis: invalid argument |
RunMat:caxis:Internal | Internal plotting state update fails. | caxis: internal operation failed |
How caxis works
caxis()returns the current explicit color limits as a two-element double row vector.caxis([cmin cmax])accepts a two-element single or double vector with finite values andcmin < cmax.- The public modes are
autoandmanual;tightis not a color-limit mode. - All eight typed integer limit classes are the same RunMat-only extension declared by canonical
clim, with compatibility rejection before conversion and one deliberate host double graphics boundary when enabled. - Resident arguments reject without provider dispatch.
- Persistent mode state, computed automatic-limit queries, set-form output arity, and specific-target or multi-target forms remain general graphics-surface gaps.
Example
Use the legacy alias to set color limits
imagesc([1 2; 3 4]);
caxis([1 4]);Using caxis with coding agents
Open a RunMat example with live inputs, then ask the agent to explain how caxis changes the result.
Run a small caxis 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 · clim · colorcube · colororder · copyobj · daspect · datacursormode · dataTipTextRow · fcontour · figure · fill · fill3 · findobj · fsurf · gobjects · groot · hgload · hgsave · hidden · histogram2 · hold · line · linkaxes · openfig · opengl · pan · parula · patch · plotmatrix · plotyy · polarhistogram · polarplot · polarscatter · print · quiver3 · ribbon · saveas · savefig · sphere · stackedplot · subtitle · suptitle · text · textscatter · textscatter3 · triplot · waitbar · wordcloud · xlabel · xlim · xline · xscale · xtickangle · xtickformat · xticklabels · xticks · ylabel · ylim · yline · yscale · ytickangle · ytickformat · yticklabels · yticks · zlim · zoom
Open-source implementation
Unlike proprietary runtimes, every RunMat function is open-source. Read exactly how caxis is executed, line by line, in Rust.
- View the source for caxis in Rust on GitHub
- Learn how the RunMat runtime works
- Found a bug? Open an issue with a minimal reproduction.
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.