How is Range calculated

I wish to have the option to set the Range myself. However (as far as I am aware) if I want to set the limits I have to set BOTH of them (min and max). Unfortunately I want to be able to set just one of them.

So far in this situation I have been setting the one to be something like Max value + a bit. Unfortunately I am doing a bar chart where the max value is not rarely where the actual graph finishes (since I have xbins to think about). I could set the Upper limit to be Max value + bin_size however I really dislike how this looks.

Therefore I was hoping that someone could tell me how I can find out how range is calculated. Alternatively if someone can tell me where the code that calculates range exists then I can find out that way.

Many thanks for the help.

As far as I can tell I have found out how the Min and Max are calculated for the bar chart.

I took lower limit to be the

smallest value - Bin_size/20 

and the max to be

smallest value + Bin_Size * Number_Of_Bins

This seemed to get me to almost exactly to what the “rangeauto” got me too.