Files
cem17/figures/cpu_matvec.py
2017-05-16 11:47:15 -07:00

27 lines
798 B
Python

import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
import math
sns.set(style="white", context="talk")
plt.rcdefaults()
DPI=300
BBOX_INCHES='tight'
path = 'figures/cpu_matvec'
fig, ax = plt.subplots(figsize=(6, 3))
systems = ('XE (32T)', "S822LC (160T)")
mlfmm = (8.65e4, 4.84e4)
total = (1.2e5, 5.77e4)
x_pos = np.arange(len(systems))
ax.bar(x_pos, mlfmm, color='0.4', label='MLFMM')
ax.bar(x_pos, [i-j for i,j in zip(total, mlfmm)], color='0.8', bottom=mlfmm, label='Non-MLFMM')
ax.set_xticks(x_pos)
ax.set_xticklabels(systems)
ax.set_ylabel("Execution Time (ms)")
handles, labels = ax.get_legend_handles_labels()
ax.legend(handles, labels)
sns.despine(trim=True)
plt.savefig(path+'.pdf', bbox_inches=BBOX_INCHES)
plt.savefig(path+'.png', dpi=DPI, bbox_inches=BBOX_INCHES)