diff --git a/concho/procs_chooser.py b/concho/procs_chooser.py index 595f6af..523f719 100644 --- a/concho/procs_chooser.py +++ b/concho/procs_chooser.py @@ -54,6 +54,19 @@ def plotCpuPassmark(): plt.show() +def create_unique_marker(config_index): + marker_string='' + alphabet_size = 26 + alphabel_base = 0x41 + while True: + digit_index = config_index % alphabet_size + marker_string = chr(alphabel_base + digit_index) + marker_string + if config_index < alphabet_size: + break + else: + config_index = config_index // alphabet_size + return marker_string + def plot_system_efficiency(): cpuTable = numpy.genfromtxt('cpu_table.dat', dtype=("|U15", float, int, float, float, float), names=True, delimiter='\t') @@ -208,21 +221,23 @@ def plot_system_efficiency(): print('itemTotalCost', itemTotalCost[i]) print('flops', item_flops[i]) # print y + config_index = 0 for label, x1, y1, power, speed, price, in zip(item_label, x, y, item_power_consumption, item_speed, item_price): print(label, x1, y1) if y1 > 0.0001: color = getColorCodeFromItemLabel(label) # marker = markersCycler.next() - marker = get_marker_from_label( label ) + # marker = get_marker_from_label( label ) #print(x1, y1) short_label = label.replace('dell-poweredge-','').replace('intel-xeon-','') - plt.scatter( x1, y1, facecolors=color, s=markerSize, marker=marker[0], label=short_label) - if y1 > 5.0e16: + plt.scatter( x1, y1, facecolors=color, s=(markerSize * len(create_unique_marker(config_index))) , marker='$\mathrm{%s}$' % create_unique_marker(config_index), label=short_label) + if False: # y1 > 5.0e16: plt.annotate( u'%s' % short_label, xy = (x1, y1), xytext = (x1*4.0, (y1-5.2e16)*7.1), textcoords = 'data', ha = 'right', va = 'bottom', bbox = dict(boxstyle = 'round,pad=0.5', fc = 'yellow', alpha = 0.5), arrowprops = dict(arrowstyle = '->', connectionstyle = 'arc3,rad=0')) + config_index += 1 plt.xlabel(u'purchase price [€]') plt.ylabel(u'num total DP operations/total cost [€/^-1]')