Files
cem17/figures/cpu_matvec.py
Carl Pearson 691ce0e527 figures
2017-05-18 08:35:15 -07:00

27 lines
797 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.65e1, 4.84e1)
total = (1.2e2, 5.77e1)
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 (s)")
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)