uibutton: GUI pushbuttons with better labels

version (3.13 KB) by Douglas Schwarz
Creates pushbutton uicontrol labeled with TeX or LaTeX strings.


Updated Fri, 05 Nov 2010 11:23:39 +0000

View License

Have you ever wanted to create a pushbutton uicontrol containing a Greek letter, some other mathematical expression or even just a multi-line label? This function will do it for you. It is very easy to use as it accepts all the same arguments as uicontrol with the addition of the Interpreter property which you can set to 'tex' or 'latex' and the Rotation property to set the angle of rotation of the text. Also, you can pass in a cell array of strings for the String property to get a multi-line label. For example,

uibutton('String','Set \beta','Interpreter','tex')

Can also create something that looks like a text uicontrol.

Cite As

Douglas Schwarz (2022). uibutton: GUI pushbuttons with better labels (https://www.mathworks.com/matlabcentral/fileexchange/10743-uibutton-gui-pushbuttons-with-better-labels), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2009a
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!