Similarly to this question, I am using the subplots keyword in matplotlib except I am drawing pie charts and using pandas.
The labels on my subplots crash with the slice labels when the labels are close to horizontal:
first = pd.Series({'True':2316, 'False': 64})
second = pd.Series({'True':2351, 'False': 29})
df = pd.concat([first, second], axis=1, keys=['First pie', 'Second pie'])
axes = df.plot(kind='pie', subplots=True)
for ax in axes:
ax.set_aspect('equal')
I can alleviate this somewhat by doing as the docs do and adding an explicit figsize, but it still looks pretty cramped:
axes = df.plot(kind='pie', figsize=[10, 4], subplots=True)
for ax in axes:
ax.set_aspect('equal')
Is there a nice way to do better. Something to do with tight_layout maybe?



