ytickformat
Set or get the y-axis tick label format.
📝Syntax
ytickformat(fmt)
fmt = ytickformat()
ytickformat(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

ytickformat sets or gets the format used for the y-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 yticklabels take precedence over the format.

💡Examples
Format y-axis tick labels.
plot(1:10, (1:10) * 100);
ytickformat('usd');
🔗See Also
yticksyticklabelsxtickformat
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub