Created
June 10, 2014 10:44
-
-
Save vighneshbirodkar/79b562b984710affaba1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
N = 4 | |
# Custom, nx , LIL , CSR | |
# First data set | |
construct_mem1 = (10.92,29.47,8.03,17.17) | |
merge_mem1 = (11.26,29.89,8.28,476.95) | |
# second data set | |
construct_mem2 = (110.99,272.55,39.78,225.19) | |
merge_mem2 = (123.12,284.69,40.07,257.37) | |
# 3rd data set | |
construct_mem3 = (150.08,370.51,53.66,286.27) | |
merge_mem3 = (165.41,386.41,53.78,378.78) | |
ind1 = np.arange(N)*4 # the x locations for the groups | |
ind2 = np.arange(N)*4 + 1 | |
ind3 = np.arange(N)*4 + 2 | |
width = 0.2 # the width of the bars: can also be len(x) sequence | |
pc1 = plt.bar(ind1, construct_mem1, width, color='#953732') | |
pm1 = plt.bar(ind1 + 0.3, merge_mem1, width, color='#B5BB3E',) | |
pc2 = plt.bar(ind2, construct_mem2, width, color='#953732') | |
pm2 = plt.bar(ind2 + 0.3, merge_mem2, width, color='#B5BB3E') | |
pc3 = plt.bar(ind3, construct_mem3, width, color='#953732') | |
pm4 = plt.bar(ind3 + 0.3, merge_mem3, width, color='#B5BB3E') | |
plt.ylabel('Memory in MB') | |
plt.title('Memory Usage by Approach') | |
plt.xticks(ind1+width*6, ('CUSTOM','NX','LIL','CSR') ) | |
#plt.xticks(ind2+width/2., ('CUSTOM-2','NX-2','LIL-2','CSR-2') ) | |
plt.yticks(np.arange(0,200,40)) | |
plt.legend( (pc1[0], pm1[0]), ('Construction', 'Merging'),loc = 2 ) | |
plt.ylim((0,200)) | |
#plt.xlim((0,5)) | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment