Print a string representing a list of numeric values as a spark graph/bar chart

spark  

Given a list of numeric values, this method turns them into a string of bar heights and prints them out. Useful for quickly graphing the shape of an array.

Introduced in v2.5

Examples

# Example 1

spark (range 1, 5)   



#=> ▁▃▅█



# Example 2

spark (range 1, 5).shuffle



#=> ▃█▅▁