Skip to content
Snippets Groups Projects
Commit 79a45979 authored by Dominic Kempf's avatar Dominic Kempf
Browse files

Fix spacing for haswell plots

parent 52bc0f4a
No related branches found
No related tags found
No related merge requests found
......@@ -9,7 +9,11 @@ import matplotlib.pyplot as plt
filename = sys.argv[1]
fig, ax = plt.subplots()
width = 0.5
if len(sys.argv) > 2:
# Use 0.35 - 0.4 for a 1-10 plot
width = float(sys.argv[2])
else:
width = 0.5
opframe = pandas.read_csv("./operations.csv",
header=None,
......@@ -25,7 +29,7 @@ ask1 = opframe[opframe.what == "alpha_skeleton_kernel_stage1"]
ask2 = opframe[opframe.what == "alpha_skeleton_kernel_quadratureloop"]
ask3 = opframe[opframe.what == "alpha_skeleton_kernel_stage3"]
ab = opframe[opframe.what == "alpha_boundary_kernel"]
deg = [i - 0.3 for i in sorted(av1['degree'])]
deg = [i - width/1.8 for i in sorted(av1['degree'])]
def update(frame, result=None):
......@@ -70,7 +74,7 @@ ask1 = timeframe[timeframe.what == "alpha_skeleton_kernel_stage1"]
ask2 = timeframe[timeframe.what == "alpha_skeleton_kernel_quadratureloop"]
ask3 = timeframe[timeframe.what == "alpha_skeleton_kernel_stage3"]
ab = timeframe[timeframe.what == "alpha_boundary_kernel"]
deg = [i + 0.3 for i in sorted(av1['degree'])]
deg = [i + width/1.8 for i in sorted(av1['degree'])]
y1 = update(av1)
y2 = update(av2, y1)
......@@ -98,7 +102,7 @@ lgd = ax.legend(loc=3,
texts = []
for x in av1['degree']:
texts.append(ax.text(x, -0.09, "Flops", rotation=45, horizontalalignment="right"))
texts.append(ax.text(x + 0.6, -0.09, "Time", rotation=45, horizontalalignment="right"))
texts.append(ax.text(x + width, -0.09, "Time", rotation=45, horizontalalignment="right"))
plt.savefig(filename,
bbox_extra_artists=tuple(texts) + (lgd,),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment