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

Fix ordering of data points

parent 0d668592
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env python #!/usr/bin/env python
import itertools
import pandas import pandas
import matplotlib import matplotlib
import sys import sys
...@@ -21,8 +22,10 @@ timeframe = timeframe[timeframe.what == what] ...@@ -21,8 +22,10 @@ timeframe = timeframe[timeframe.what == what]
fig, ax1 = plt.subplots() fig, ax1 = plt.subplots()
ax2 = ax1.twinx() ax2 = ax1.twinx()
ax1.plot(flopframe['degree'], flopframe['GFlops'], "b-", flopframe['degree'], flopframe['GFlops'], "bo") x, y = list(itertools.izip(*sorted(itertools.izip(flopframe['degree'], flopframe['GFlops']))))
ax2.plot(timeframe['degree'], timeframe['DOFs'], "r-", timeframe['degree'], timeframe['DOFs'], "ro") ax1.plot(x, y, "b-", x, y, "bo")
x, y = list(itertools.izip(*sorted(itertools.izip(timeframe['degree'], timeframe['DOFs']))))
ax2.plot(x, y, "r-", x, y, "ro")
ax1.set_xlabel("Polynomial degree") ax1.set_xlabel("Polynomial degree")
ax1.set_ylabel("GFlops /s", color="b") ax1.set_ylabel("GFlops /s", color="b")
......
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