adjustFigure

Small utility function which adjusts all subplots in a figure to have the same properties. Useful when creating figures for publication.
44 download
Aggiornato 4 feb 2019

Visualizza la licenza

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.

Cita come

Christian Keine (2024). adjustFigure (https://www.mathworks.com/matlabcentral/fileexchange/70094-adjustfigure), MATLAB Central File Exchange. Recuperato .

Compatibilità della release di MATLAB
Creato con R2018b
Compatibile con R2014b e release successive
Compatibilità della piattaforma
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
Versione Pubblicato Note della release
1.0.3

added try-catch for TickLabelGapOffset, since it seems to be newer than 2014b

1.0.2

update picture

1.0.1

updated figure

1.0.0