Skip to content

autoscale differences between 1.5.1 and 2.0.0b3 #6968

@LevN0

Description

@LevN0

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()

limits_tight


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?

import matplotlib as mpl

plt.plot([1,2,3,4])

ax = plt.gca()
ax.set_xscale('log')
ax.set_yscale('log')

plt.show()

log_scaling

Python 2.7 and 3.4
Using tkagg backend.
Windows 7

Metadata

Metadata

Assignees

Labels

Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions