File Exchange

image thumbnail

Axis context menu for toggling X/Y scale and limits

version (1.68 KB) by Lior Cohen
Adds a special context menu to the axis that helps toggling the scale and limits of the axes.


Updated 18 Jan 2013

View License

Adds scale (linear / log) and axis limit (auto / manual) toggling as a special contextmenu of the axis (not the regular uicontextmenu of the axes).



Important: This function relies on the uiaxiscontextmenu by Lior Cohen.
It can be downloaded from
Please make sure it is in the Matlab path or in your working directory

Cite As

Lior Cohen (2021). Axis context menu for toggling X/Y scale and limits (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (1)

Jonathan Mynard

I have been using this extremely useful code for setting axis properties via a context menu. However, I recently migrated from Windows to a Mac and for some reason, the X/Y axis context menus just doesn’t work anymore. I can set a context menu for an axes or line object manually and it works fine, but the YUIContextMenu and XUIContextMenu set by this code don’t seem to work. If you have any ideas for a solution, I would be most appreciative!

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

Inspired by: Axis Context Menu

Community Treasure Hunt

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

Start Hunting!