-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start working on report, and switch to namedtuple for metadata pickling
- Loading branch information
1 parent
2b93842
commit dd257fa
Showing
4 changed files
with
72 additions
and
24 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,19 @@ | ||
#!/usr/bin/env python3 | ||
# -*- coding: utf-8 -*- | ||
"""A set of functions to analyse the results of a test bench run.""" | ||
|
||
import matplotlib.pyplot as plt | ||
|
||
|
||
def line_plot( | ||
data: dict[str, list[tuple[float, float]]], x_label: str, y_label: str | ||
) -> None: | ||
"""Draw a line plot of a data series.""" | ||
for name, result in data.items(): | ||
print(name, result) | ||
plt.plot(*zip(*result, strict=True), marker="x", label=name) | ||
plt.xlabel(x_label) | ||
plt.ylabel(y_label) | ||
plt.title("Benchmark analysis") | ||
plt.legend() | ||
plt.show() |
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
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