axisLimitReset(vara​rgin)

Version 1.1.0.0 (2.19 KB) by Greg Bass
Reset the y-axis of subplots in a figure using pre-determined limits or by computing new limits.
65 Downloads
Updated 29 Jan 2016

View License

This function resets the input figure so that all subplots have the same y-axis limits. If new axis limits are given, the function uses them; otherwise, it determines the new limits based on the current subplots. This function can be used for a single plot as well, but is primarily designed to homogenize the output of subplots. It also works well when you want to plot boxplots from different datasets side-by-side but don't want to map a category variable to them.

Cite As

Greg Bass (2024). axisLimitReset(varargin) (https://www.mathworks.com/matlabcentral/fileexchange/52822-axislimitreset-varargin), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2015a
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!
Version Published Release Notes
1.1.0.0

Updated varargin to check for the case that only the figure handle is given as an input, as was shown in the example code.

1.0.0.0

Changed title and summary.