Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Configure formatting for bin labels #80

Open
tardigradus opened this issue Nov 7, 2023 · 1 comment
Open

Feature request: Configure formatting for bin labels #80

tardigradus opened this issue Nov 7, 2023 · 1 comment

Comments

@tardigradus
Copy link

With commit 2811faf the format of the bin edge labels for histograms was changed to exponential format. The application I want to use, https://github.com/ycrc/seff-array, mainly produces bin labels which are percentages, e.g.

CPU Efficiency (%)
---------------------
+0.00e+00 - +1.00e+01  [ 1]  ███▋
+1.00e+01 - +2.00e+01  [ 0]
+2.00e+01 - +3.00e+01  [ 0]
+3.00e+01 - +4.00e+01  [ 0]
+4.00e+01 - +5.00e+01  [ 0]
+5.00e+01 - +6.00e+01  [ 0]
+6.00e+01 - +7.00e+01  [ 0]
+7.00e+01 - +8.00e+01  [ 9]  ████████████████████████████████▊
+8.00e+01 - +9.00e+01  [11]  ████████████████████████████████████████
+9.00e+01 - +1.00e+02  [ 0]

Here the exponential format makes the labeling rather unclear.

Would it be possible to make this configurable?

@tardigradus tardigradus changed the title Feature request: Change formatting for bin lables Feature request: Configure formatting for bin lables Nov 7, 2023
@tardigradus tardigradus changed the title Feature request: Configure formatting for bin lables Feature request: Configure formatting for bin labels Nov 7, 2023
@tardigradus
Copy link
Author

tardigradus commented Nov 10, 2023

As a local fix, in the file hist.py in my venv I have replaced the line

f"{bin_edges[k]:+.2e} - {bin_edges[k+1]:+.2e}"

with

f"{bin_edges[k]:>6.2f} - {bin_edges[k+1]:>6.2f}"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant