fix rounding
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 182 KiB After Width: | Height: | Size: 183 KiB |
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 182 KiB After Width: | Height: | Size: 183 KiB |
@@ -1,6 +1,7 @@
|
|||||||
import numpy as np
|
import numpy as np
|
||||||
import seaborn as sns
|
import seaborn as sns
|
||||||
import matplotlib.pyplot as plt
|
import matplotlib.pyplot as plt
|
||||||
|
import math
|
||||||
sns.set(style="white", context="talk")
|
sns.set(style="white", context="talk")
|
||||||
plt.rcdefaults()
|
plt.rcdefaults()
|
||||||
DPI=600
|
DPI=600
|
||||||
@@ -11,7 +12,7 @@ def autolabel(ax, rect):
|
|||||||
"""
|
"""
|
||||||
height = rect.get_height()
|
height = rect.get_height()
|
||||||
ax.text(rect.get_x() + rect.get_width()/2., 1.05*height,
|
ax.text(rect.get_x() + rect.get_width()/2., 1.05*height,
|
||||||
'%d' % int(height),
|
'%d' % int(round(height)),
|
||||||
ha='center', va='bottom')
|
ha='center', va='bottom')
|
||||||
|
|
||||||
path = 'figures/cpu_matvec'
|
path = 'figures/cpu_matvec'
|
||||||
@@ -38,7 +39,7 @@ path='figures/mlfmm_bw'
|
|||||||
width=0.33
|
width=0.33
|
||||||
fig, ax = plt.subplots()
|
fig, ax = plt.subplots()
|
||||||
systems = ('1T', "32T", "1 GPU" ,"4 GPU", "16 GPU")
|
systems = ('1T', "32T", "1 GPU" ,"4 GPU", "16 GPU")
|
||||||
mlfmm = (1.50e6, 8.64e4, 2.78e4, 7.01e3, 1.89e3)
|
mlfmm = (1.50e6, 8.64e4, 2.783779e4, 7.01e3, 1.89e3)
|
||||||
num = (45,45,45,45,47)
|
num = (45,45,45,45,47)
|
||||||
x_pos = np.arange(len(systems))
|
x_pos = np.arange(len(systems))
|
||||||
rects = ax.bar([p-width/2 for p in x_pos], [i/j for i,j in zip(mlfmm,num)], color='darkgray', log=True, width=width)
|
rects = ax.bar([p-width/2 for p in x_pos], [i/j for i,j in zip(mlfmm,num)], color='darkgray', log=True, width=width)
|
||||||
|
Reference in New Issue
Block a user