image thumbnail

xunits, yunits and zunits.m (Jul 2014)

version (68.8 KB) by Carlos Adrian Vargas Aguilera
Add unit (and prefix) to your axis labels.


Updated 07 Jul 2014

View License

When you require to write the units of your x-axis values, you use the XLABEL function.
Now you can use XUNITS to add them right with the labels. And, if you like it, it could use International System Units prefixes instead of the scientific notation.

Besides, you get the same format for all the numbers (check the Screenshot).

It works for log scale as well as the linear one, and includes YUNITS and ZUNITS functions.

Finally, it works after zooming or panning.

Enjoy it!

Cite As

Carlos Adrian Vargas Aguilera (2021). xunits, yunits and zunits.m (Jul 2014) (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2013b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!