How to set axis scaling?

4 views (last 30 days)
John
John on 23 Apr 2015
Commented: Paul Wintz on 10 Sep 2021
What is the figure property name for setting the axis scaling? I would like to set 'axis tight' as the default, but I can not seem to find the appropriate property handle for this?

Answers (1)

Brendan Hamm
Brendan Hamm on 23 Apr 2015
In versions 2014b or later you can use the properties:
XLimSpec, YLimSpec and ZLimSpec
by setting these properties to 'tight'.
Prior to 2014b you would need to use the XLim, YLim and XLim properties, but these need to be assigned the min and max values.
  1 Comment
Paul Wintz
Paul Wintz on 10 Sep 2021
How is XLimSpec different that using XLimitMethod?

Sign in to comment.

Categories

Find more on Graphics Object Programming 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!