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

Usage with np.arange() #266

Open
zooplibob opened this issue Feb 21, 2024 · 2 comments
Open

Usage with np.arange() #266

zooplibob opened this issue Feb 21, 2024 · 2 comments

Comments

@zooplibob
Copy link

I have some code doing a sweep using np.arrange:

for variable in np.arange(10, 20, 0.1):
...

I can use manual mode can calculate the percentage, but how can I have it display the actual value of variable next to the bar (rather than just percent)?

@TheTechRobo
Copy link
Contributor

Check out the Displaying messages section of the README - bar.text might be what you're looking for

@rsalmei
Copy link
Owner

rsalmei commented Feb 21, 2024

You have two ways. One is like you and @TheTechRobo have said: use manual mode to directly calculate the percentage, and bar.text to display it on the bar.
Another is to just use the variable range as the total, which would automatically calculate the percentage for you. You could also show it the same way.

range = (20 - 10) / .1 = 100 steps

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

3 participants