Evenly spaced range of discrete values
See original GitHub issueHey, I would like to have a slider with a list of evenly-spaced values. Is there a way to implement that easily now without having to calculate percentages for each?
My feature suggestion here would be to have range
also accept an array, which would then be evenly spaced automatically.
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
np.linspace(): Create Evenly or Non-Evenly Spaced Arrays
In this tutorial, you'll learn how to use NumPy's np.linspace() effectively to create an evenly or non-evenly spaced range of numbers.
Read more >Evenly spaced colours for discrete data — scale_colour_hue ...
Evenly spaced colours for discrete data ... Maps each level to an evenly spaced hue on the colour wheel. It does not generate...
Read more >Making a list of evenly spaced numbers in a certain range in ...
What is a pythonic way of making list of arbitrary length containing evenly spaced numbers (not just whole integers) between ...
Read more >numpy.linspace — NumPy v1.24 Manual
Return evenly spaced numbers over a specified interval. Returns num evenly spaced samples, calculated over the interval [start, stop].
Read more >Is there a measure of 'evenness' of spread? - Cross Validated
My literal minded brain say that data such 1,4,7,10,13,... are perfectly evenly distributed. But you might mean something entirely different. – ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
There is now an example on using an array of values in the documentation.
Yes, you’d need to set up
format
to translate between a numeric range and the string values (if they are not numeric).