Cool, and I plan to turn this into a histogram version at some point. One note — delete line 56 to have the function actually listen to your choice for break_type. As it is now, it always sets break_type = 'Patch'.
Does this function work for matrix Y? Or does it only work with vector? I tried with matrix, but it gave me error in the break type section of the code. Also, what if the data I have got negative values, and they are the part I want to scale to reduce the space, what should I do with that?