question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Evenly spaced range of discrete values

See original GitHub issue

Hey, 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:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
leongersencommented, Aug 2, 2022

There is now an example on using an array of values in the documentation.

1reaction
leongersencommented, May 12, 2022

Yes, you’d need to set up format to translate between a numeric range and the string values (if they are not numeric).

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found