Skip to content

Commit 0f3b81e

Browse files
authored
Merge pull request #74 from nschloe/dufte
Dufte
2 parents 58fe95b + 8519595 commit 0f3b81e

File tree

4 files changed

+13
-14
lines changed

4 files changed

+13
-14
lines changed

Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ tag:
1111
# git push --tags
1212
curl -H "Authorization: token `cat $(HOME)/.github-access-token`" -d '{"tag_name": "v$(VERSION)"}' https://api.github.com/repos/nschloe/stressberry/releases
1313

14-
# https://packaging.python.org/distributing/#id72
15-
upload: setup.py
14+
upload:
1615
@if [ "$(shell git rev-parse --abbrev-ref HEAD)" != "master" ]; then exit 1; fi
1716
rm -f dist/*
1817
# python3 setup.py sdist bdist_wheel

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ plots which can easily be compared.
2424
custom case with fans (@flyingferret, [#21](https://github.com/nschloe/stressberry/issues/21)) | [KKSB case](https://kksb-cases.com/products/kksb-raspberry-pi-4-case-aluminium) (@JohBod, [#31](https://github.com/nschloe/stressberry/issues/31)) | [Argon One case](https://www.argon40.com/argon1/argon-one-pi4.html) (@jholloway, [#37](https://github.com/nschloe/stressberry/issues/37))
2525
<img src="https://nschloe.github.io/stressberry/hex-wrench.png" width="70%"> | <img src="https://nschloe.github.io/stressberry/coolipi.jpg" width="70%"> | <img src="https://nschloe.github.io/stressberry/ice-tower.jpg" width="70%">
2626
[hex wrench case](https://www.amazon.ca/Aluminum-Model-Raspberry-Wrench-Enclosure/dp/B07W6FT1DD?th=1) (@patrickpoirier51, [#45](https://github.com/nschloe/stressberry/issues/45)) | [CooliPi](https://www.coolipi.com/) (@CooliPi, [#47](https://github.com/nschloe/stressberry/issues/47), [#48](https://github.com/nschloe/stressberry/issues/48)) | [low-profile ice tower case](https://www.aliexpress.com/i/4000288119233.html) (@leonhess, [#54](https://github.com/nschloe/stressberry/issues/54))
27+
<img src="https://nschloe.github.io/stressberry/flirc4b.jpeg" width="70%"> | |
28+
[Flirc case](https://flirc.tv/more/raspberry-pi-4-case) (@RichardKav, [#73](https://github.com/nschloe/stressberry/issues/73)) | |
2729

2830

2931
### Raspberry Pi 3B+

setup.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = stressberry
3-
version = 0.3.0
3+
version = 0.3.1
44
author = Nico Schlömer
55
email = nico.schloemer@gmail.com
66
description = Stress tests for the Raspberry Pi
@@ -27,7 +27,7 @@ classifiers =
2727
packages = find:
2828
# importlib_metadata can be removed when we support Python 3.8+ only
2929
install_requires =
30-
cleanplotlib
30+
dufte
3131
importlib_metadata
3232
matplotlib
3333
pyyaml

stressberry/cli/plot.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@
66

77

88
def plot(argv=None):
9-
import cleanplotlib as cpl
9+
import dufte
1010
import matplotlib.pyplot as plt
1111

12+
plt.style.use(dufte.style)
13+
1214
parser = _get_parser_plot()
1315
args = parser.parse_args(argv)
1416

@@ -17,28 +19,24 @@ def plot(argv=None):
1719
# actually plot it
1820
fig = plt.figure()
1921
ax1 = fig.add_subplot(1, 1, 1)
20-
a = []
21-
b = []
22-
c = []
2322
for d in data:
2423
temperature_data = d["temperature"]
2524
if args.delta_t:
2625
temperature_data = []
2726
zip_object = zip(d["temperature"], d["ambient"])
2827
for d["temperature"], d["ambient"] in zip_object:
2928
temperature_data.append(d["temperature"] - d["ambient"])
30-
a.append(d["time"])
31-
b.append(temperature_data)
32-
c.append(d["name"])
3329

34-
cpl.multiplot(a, b, c)
30+
plt.plot(d["time"], temperature_data, label=d["name"])
31+
32+
dufte.legend()
3533

3634
if args.delta_t:
3735
plot_yaxis_label = "Δ temperature [°C over ambient]"
3836
else:
3937
plot_yaxis_label = "temperature [°C]"
40-
cpl.xlabel("time [s]")
41-
cpl.ylabel(plot_yaxis_label)
38+
plt.xlabel("time [s]")
39+
plt.ylabel(plot_yaxis_label)
4240

4341
if args.temp_lims:
4442
ax1.set_ylim(*args.temp_lims)

0 commit comments

Comments
 (0)