diff --git a/bench_runner/plot.py b/bench_runner/plot.py index bca84cc6..4086cee5 100644 --- a/bench_runner/plot.py +++ b/bench_runner/plot.py @@ -65,7 +65,9 @@ class Options: plt.close("all") if output_filename.suffix == ".svg": - with tempfile.NamedTemporaryFile(delete=False) as tmp: + with tempfile.NamedTemporaryFile( + dir=output_filename.parent, delete=False + ) as tmp: with open(output_filename) as fd: scour.start(Options(), fd, tmp) output_filename.unlink()