You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
When creating figures with subplots for publications, the appearance (line width, tick length etc.) should be identical and easily be changeable without searching and double-checking if all properties are defined properly.
This function takes all plot axes of the current figure and adjusts the properties consistently for all axes. It can easily be executed at the end of a figure-creating function or called from the command line after the figure is created.
Matlab determines the length of axis ticks proportional to the longest axis, which can result in different subplot having different tick lengths. This function allows to specify the tick length in cm and will make them consistent for all plots in the figure.
Other properties can easily be added.
Example:
adjustFigure('TickLength',0.05,'AxesLineWidth',0.5,'TickDir','out')
will adjust all plots in the current figure to have a tick length of 0.05 cm, an axis line width of 1 and tick direction pointing outwards.
Cite As
Christian Keine (2026). adjustFigure (https://in.mathworks.com/matlabcentral/fileexchange/70094-adjustfigure), MATLAB Central File Exchange. Retrieved .
General Information
- Version 1.0.3 (2.66 KB)
MATLAB Release Compatibility
- Compatible with R2014b and later releases
Platform Compatibility
- Windows
- macOS
- Linux
