image thumbnail


version 1.0.0 (2.12 KB) by Anders Sjöström
Cut out space in your plot


Updated 23 Sep 2021

View License

cutAxes is a tool to cut out empty parts of a plot. It is NOT reccommeded to use this tool for scientific visualisations. In fact, it is a bad idea to do so. You most likely should use a logarithmic plot instead.
That said, the function takes a figure handle, a start position, an end position, and an axis and cuts out the parts of the plot between the start and stop position and restart the tickLabels after the cut.
Note that the resulting figure will have the datapoints higher than the stop value shifted down with the size of the gap that has been cut out. The function assumes that the area to be cut out is empty

Cite As

Anders Sjöström (2021). cutAxes (, MATLAB Central File Exchange. Retrieved .

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