Based on description of tight ("If True, set view limits to data limits"), I would have expected MPL 1.5.1 behavior (see code and image below). Though perhaps there was a little margin added intentionally?
Edit: I see this first part was intended, as change #5583. See second issue below.
import matplotlib as mpl
plt.plot([1,2,3,4])
plt.autoscale(axis='both', tight=True)
plt.show()
Aside from this, MPL 1.x use to conveniently adjust view limits for log and symlog when tight autoscaling was not on, but MPL 2 does not seem to do this anymore.
This actually also looks like a result of #5583. I would argue the previous behavior was actually desirable in many instances. Is there a way to recover it?
@LevN0 in answer to your question, with v2.x if you start with mpl.style.use('classic') you will get the same autoscaling as with 1.5. You can also use a context manager, or you can just set the relevant rcParams:
Activity
Make sure that autoscale respect tight closes matplotlib#6968
Make sure that autoscale respect tight closes matplotlib#6968
Make sure that autoscale respect tight closes matplotlib#6968
efiring commented on Nov 13, 2016
@LevN0 in answer to your question, with v2.x if you start with mpl.style.use('classic') you will get the same autoscaling as with 1.5. You can also use a context manager, or you can just set the relevant rcParams:
BUG: make autoscale('tight') set margins to zero; closes matplotlib#6968
Merge pull request #7458 from efiring/autoscale_tight
NelleV commented on Nov 14, 2016
Closed in #7458
LevN0 commented on Nov 14, 2016
@efiring Thank you. I tried axes.autolimit_mode and it seems to result in the MPL 1.5 behavior for that aspect recovered.