I add a method that allows to create an automatic division of a canvas where we need to draw n plots.
n
For example, if the input is 20, we will get as a result 4x5.
I placed the method at TRestTools although not sure if that is the best place.
TRestTools