diff options
| author | Davi Antônio <30875784+DaviAntonio@users.noreply.github.com> | 2023-03-30 11:48:17 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-30 11:48:17 +0000 |
| commit | 991cb0ed962f348761ad473aa5ce5c0da12333ae (patch) | |
| tree | e1d2ac42db99106c5ba107d60f255c551f19d48e /src/admin/report/barplot.py | |
| parent | a9bb286113e9e8267a6cc45f5b401bdd448a9f8a (diff) | |
| download | boca-991cb0ed962f348761ad473aa5ce5c0da12333ae.tar.gz boca-991cb0ed962f348761ad473aa5ce5c0da12333ae.zip | |
Release 1.5.18-1 (#28)
* Update version info and year
The following files were updated to the next version to be released and
the current year:
- src/version
- src/versionnum.php
* Release 1.5.17-1
Update changelog with all the changes made since its last update on
commit 818abd88.
* Format code with black 23.1.0
* Release 1.5.18-1
Update changelog with all the changes made since its last update on
commit 194f6764.
Diffstat (limited to 'src/admin/report/barplot.py')
| -rw-r--r-- | src/admin/report/barplot.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/admin/report/barplot.py b/src/admin/report/barplot.py index d07f156..edc9df1 100644 --- a/src/admin/report/barplot.py +++ b/src/admin/report/barplot.py @@ -5,23 +5,23 @@ filename = sys.argv[1] title = sys.argv[2] -x = [str(x) + '-' + str(x+10) for x in range(0,300,10)] +x = [str(x) + "-" + str(x + 10) for x in range(0, 300, 10)] -with open(filename,'r') as file: +with open(filename, "r") as file: y = [int(line) for line in file] # Create a bar plot -plt.bar(x, y,width=0.5) +plt.bar(x, y, width=0.5) # Set the y-axis tick labels to step by 5 plt.xticks(rotation=90) -if(max(y)<200): - plt.yticks(range(0, max(y)+1, 5)) +if max(y) < 200: + plt.yticks(range(0, max(y) + 1, 5)) else: - plt.yticks(range(0, max(y)+1, 10)) + plt.yticks(range(0, max(y) + 1, 10)) # Add gridlines to the y-axis -plt.grid(axis='y') +plt.grid(axis="y") # Add a title to the plot plt.title(title) @@ -29,4 +29,4 @@ plt.title(title) plt.tight_layout() # Show the plot -plt.savefig(filename.replace('.txt','.png'),dpi=600,transparent=True) +plt.savefig(filename.replace(".txt", ".png"), dpi=600, transparent=True) |