From 2f186e105ff2fb4272302f9a86a446152be42ca9 Mon Sep 17 00:00:00 2001 From: Dominic Kempf <dominic.kempf@iwr.uni-heidelberg.de> Date: Thu, 12 Jan 2017 14:28:32 +0100 Subject: [PATCH] Finalize the plotting script --- bin/plot_measurements.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/bin/plot_measurements.py b/bin/plot_measurements.py index 9de098dd..ae9ca2e5 100755 --- a/bin/plot_measurements.py +++ b/bin/plot_measurements.py @@ -8,24 +8,25 @@ matplotlib.use("PDF") from matplotlib import pyplot as plt -title = sys.argv[1] +what = sys.argv[1] +title = sys.argv[2] filename = title.lower().replace(" ", "_") + ".pdf" -flopframe = pandas.read_csv("./poissondg-insn2/floprates.csv", header=None, delimiter=" ", names=("exec", "degree", "what", "GFlops")) -flopframe = flopframe[flopframe.what == "residual_evaluation"] +flopframe = pandas.read_csv("./floprates.csv", header=None, delimiter=" ", names=("exec", "degree", "what", "GFlops")) +flopframe = flopframe[flopframe.what == what] -timeframe = pandas.read_csv("./poissondg-insn2/doftimes.csv", header=None, delimiter=" ", names=("exec", "degree", "what", "DOFs")) -timeframe = timeframe[timeframe.what == "residual_evaluation"] +timeframe = pandas.read_csv("./doftimes.csv", header=None, delimiter=" ", names=("exec", "degree", "what", "DOFs")) +timeframe = timeframe[timeframe.what == what] fig, ax1 = plt.subplots() ax2 = ax1.twinx() -ax1.plot(frame['degree'], flopframe['GFlops']) -ax2.plot(frame['degree'], timeframe['DOFs']) +ax1.plot(flopframe['degree'], flopframe['GFlops'], "b-", flopframe['degree'], flopframe['GFlops'], "bo") +ax2.plot(timeframe['degree'], timeframe['DOFs'], "r-", timeframe['degree'], timeframe['DOFs'], "ro") ax1.set_xlabel("Polynomial degree") -ax1.set_ylabel("GFlops") -ax2.set_ylabel("DOFs / s") +ax1.set_ylabel("GFlops /s", color="b") +ax2.set_ylabel("MDOFs / s", color="r") plt.title(title) plt.savefig(filename) -- GitLab