def plot(self, fontsize=16):
"""Create the barplot from the stats file"""
from sequana.lazy import pylab
from sequana.lazy import pandas as pd
pylab.clf()
df = pd.DataFrame(self._parse_data()['rules'])
ts = df.ix['mean-runtime']
total_time = df.ix['mean-runtime'].sum()
#ts['total'] = self._parse_data()['total_runtime'] / float(self.N)
ts['total'] = total_time
ts.sort_values(inplace=True)
ts.plot.barh(fontsize=fontsize)
pylab.grid(True)
pylab.xlabel("Seconds (s)", fontsize=fontsize)
try:
pylab.tight_layout()
except:
pass
评论列表
文章目录