I wanted to generate the interquartile (IQR) positions programmatically so that I could use them as a basis for obtaining values within a min - max range, with increasing orders of granularity.
I got stuck on this for a while. Surprisingly, when I was looking for ideas, I found nothing on Stack Overflow. Because of that, I'll post the solution I came up with in order to help people in the future if they need.
This is the solution I came up with:
Doing this gives the following output: