parametrize figsize

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2020-07-08 15:21:32 +02:00
parent f035a0c560
commit 7c64e1dc52
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
1 changed files with 2 additions and 2 deletions

View File

@ -24,7 +24,7 @@ class PDGraphPeers():
ylabel='# of peers') ylabel='# of peers')
return ax return ax
def weekly_cohorts(self): def weekly_cohorts(self, figsize=(18, 14)):
self.df['datetime'] = pd.to_datetime(self.df['Date']) self.df['datetime'] = pd.to_datetime(self.df['Date'])
self.df['week'] = self.df['datetime'].dt.to_period('W') self.df['week'] = self.df['datetime'].dt.to_period('W')
self.df['month'] = self.df['datetime'].dt.to_period('M') self.df['month'] = self.df['datetime'].dt.to_period('M')
@ -44,7 +44,7 @@ class PDGraphPeers():
fig, ax = plt.subplots(1, fig, ax = plt.subplots(1,
2, 2,
figsize=(20, 16), figsize=figsize,
sharey=True, sharey=True,
gridspec_kw={'width_ratios': [1, 11]}) gridspec_kw={'width_ratios': [1, 11]})