Skip to content

Commit

Permalink
Cosmetic changes to D47data.plot_residuals()
Browse files Browse the repository at this point in the history
  • Loading branch information
mdaeron committed Dec 10, 2020
1 parent 43fdb70 commit e96958a
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions D47crunch/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2040,8 +2040,8 @@ def plot_residuals(self, dir = 'plots'):
+ `dir`: the directory in which to save the plot
'''
fig = ppl.figure(figsize = (8,3))
ppl.subplots_adjust(.1,.05,.78,.9)
fig = ppl.figure(figsize = (8,4))
ppl.subplots_adjust(.1,.05,.78,.8)
N = len(self.anchors)
if N == 3:
colorz = {a: c for a,c in zip(self.anchors, [(0,0,1), (1,0,0), (0,2/3,0)])}
Expand Down Expand Up @@ -2087,7 +2087,17 @@ def plot_residuals(self, dir = 'plots'):

ymax = ppl.axis()[3]
for s in x_sessions:
ppl.text(x_sessions[s], ymax +1, s, va = 'bottom', ha = 'center')
ppl.text(
x_sessions[s],
ymax +1,
s,
va = 'bottom',
**(
dict(ha = 'center')
if len(self.sessions[s]['data']) > (0.15 * len(self))
else dict(ha = 'left', rotation = 45)
)
)

for s in self.anchors:
kw['marker'] = '+'
Expand Down

0 comments on commit e96958a

Please sign in to comment.