Skip to content

Commit 60ee695

Browse files
committed
improve figure: titles below, smaller radius, less margins
1 parent 9ac619d commit 60ee695

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

group_composition_plot/group_composition_plot.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,17 @@ def errorexit(msg='internal error', code=1):
4444
# Creating the joint plot
4545
scaling = .9
4646
iymax = (len(data)+1)//2
47-
fig = plt.figure(figsize=(scaling*16, scaling*8*iymax))
47+
fig = plt.figure(figsize=(scaling*16, scaling*9/2*iymax))
4848

4949
i = 1
5050
for inst, idata in data.items():
5151
ax = fig.add_subplot(iymax, min(2, len(data)), i)
52-
ax.pie(idata['activity_weights'], colors=colors, startangle=140)
52+
ax.pie(idata['activity_weights'], colors=colors, startangle=140, shadow=True, radius=.8)
5353
inst_name = idata['institution_name']
5454
if 'group_name' in idata:
5555
inst_name = idata['group_name'] + "\n" + inst_name
5656
if not args['hide_titles']:
57-
ax.set_title(inst_name, fontsize=20)
57+
ax.set_title(inst_name, fontsize=20, y=-0.05)
5858
i += 1
5959

6060
# Shared legend

0 commit comments

Comments
 (0)