xtickangle — Query or set X-axis tick label rotation.
xtickangle returns or updates the X-axis tick label rotation in degrees for the current axes or specified axes handles.
Syntax
angle = xtickangle()
xtickangle(angle)
angle = xtickangle(ax)
xtickangle(ax, angle)Inputs
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
angle | NumericScalar | Yes | — | X-axis tick label rotation in degrees. |
ax | AxesHandle | Yes | — | Scalar target axes handle. |
ax | AxesHandle | Yes | — | Target axes handle or array of axes handles. |
Returns
| Name | Type | Description |
|---|---|---|
angle | NumericScalar | Current X-axis tick label rotation in degrees. |
Errors
| Identifier | When | Message |
|---|---|---|
RunMat:xtickangle:InvalidArgument | Argument count, angle value, or axes handle is invalid. | xtickangle: invalid argument |
RunMat:xtickangle:Internal | Internal plotting state update fails. | xtickangle: internal operation failed |
How xtickangle works
xtickangle()returns the current X tick label rotation, defaulting to0.xtickangle(angle)sets the current axes X tick label rotation in degrees.xtickangle(ax)queries a scalar axes handle without changing the current axes.xtickangle(ax, angle)accepts a scalar axes handle or numeric array of axes handles and sets each target.- The function shares state with
XTickLabelRotationon axes andTickLabelRotationon the X-axis ruler returned byget(ax, 'XAxis').
GPU memory and residency
xtickangle only reads and writes axes metadata. It does not inspect, gather, or transform GPU-resident plot data.
Examples
Rotate X tick labels
plot(1:3);
xtickangle(45);
xtickangle()Expected output:
ans = 45Target a specific axes
ax = subplot(1, 2, 1);
xtickangle(ax, -30);Using xtickangle with coding agents
Open a RunMat example with live inputs, then ask the agent to explain how xtickangle changes the result.
Run a small xtickangle 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 · pan · parula · patch · plotmatrix · plotyy · polarhistogram · polarplot · polarscatter · print · quiver3 · ribbon · saveas · savefig · sphere · stackedplot · subtitle · suptitle · textscatter · textscatter3 · triplot · waitbar · wordcloud · xline · xscale · xtickformat · xticklabels · xticks · yline · yscale · ytickangle · ytickformat · yticklabels · yticks · zoom
Open-source implementation
Unlike proprietary runtimes, every RunMat function is open-source. Read exactly how xtickangle is executed, line by line, in Rust.
- View the source for xtickangle 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.