TightInset in conjunction with "axis image"

3 views (last 30 days)
Matt J
Matt J on 13 Apr 2021
Commented: Jonas on 18 Apr 2021
According to the documentation, the TightInset axes property is defined as "the distances between the bounds of the Position property and the extent of the surrounding text." In light of this, isn't it wrong for the left-hand TightInset value for the following plot to be zero? Shouldn't it be non-zero to account for the extenf of the yticklabels running along the left-hand side of the axis?
plot(1:5)
title('TITLE');
axis image
TightInset = get(gca,'TightInset')
TightInset = 1×4
0 0.0520 0 0.0526
  1 Comment
Jonas
Jonas on 18 Apr 2021
looks like the
axis image
command makes the space of the ylabels not count for the TightInset in x direction.
the bahvior differs if you add a ylabel instead of adding a title, maybe the reason for the unintuitive behavior is that axis image sets the DataAspectRatio to [1 1 1]

Sign in to comment.

Answers (0)

Categories

Find more on Image Processing Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!