ztickformat
Set or get the z-axis tick label format.
📝Syntax
ztickformat(fmt)
fmt = ztickformat()
ztickformat(ax, ...)
📥Input Arguments
Parameter Description
fmt Format specifier: a sprintf-style conversion or a preset keyword.
ax Target axes. Default is the current axes.
📤Output Arguments
Parameter Description
fmt Current tick label format.
📄Description

ztickformat sets or gets the format used for the z-axis tick labels of the current axes.

The format applies to automatically generated tick labels.

The format is a sprintf-style conversion (for example %.2f or %g) applied to each numeric tick value. The preset keywords usd, eur, gbp, jpy, degrees and percentage are also accepted. Custom tick labels set with zticklabels take precedence over the format.

💡Examples
Format z-axis tick labels.
t = linspace(0, 10, 50);
plot3(sin(t), cos(t), t / 4);
ztickformat('%.1f');
🔗See Also
ztickszticklabelsxtickformat
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub