Replace os with pathlib where paths are used (#1984)

This commit is contained in:
Ayaz Salikhov
2023-08-26 17:41:40 +04:00
committed by GitHub
parent 6aded4bc1d
commit 0d8b4e4987
3 changed files with 12 additions and 15 deletions

View File

@@ -1,6 +1,4 @@
# Matplotlib: Test tex fonts
import os
import matplotlib
import matplotlib.pyplot as plt
@@ -22,6 +20,6 @@ y = [1, 2]
ax.plot(x, y, label="a label")
ax.legend(fontsize=15)
file_path = os.path.join("/tmp", "test_fonts.png")
file_path = "/tmp/test_fonts.png"
fig.savefig(file_path)
print(f"File {file_path} saved")