matplotlib/matplotlib — pull request #801 by leejjoon (2012-03-27 13:13:07+00:00)
Title: tight_labels

This is my attempt to improve the situation of axis with too many ticks with overlapping ticklabels.
The overall idea is similar to tight_layout.
It calculates the fraction of the sum of ticklabel lengths (or heights) along the x-axis (or y-axis) over the axis length, and adjust the nbin value of tick locator until it satisfies some criteria.

Here is a simple usage.

```python
fig, axes_list = plt.subplots(4, 4)
plt.tight_labels()
plt.tight_layout()
```

This PR is just to toss around ideas. It may have some problems with shared axes.
Also, I'm not quite happy with the current heuristics, and want to play with other heuristics.