I was able to add an optional "range" parameter to:
get_histo_range(from,to[,range])
It works great in Lua, but I'm not sure how to implement it for uBasic. Here's the relevant section of ubasic.c
case TOKENIZER_GET_HISTO_RANGE:
accept(TOKENIZER_GET_HISTO_RANGE);
int from = expr();
int to = expr();
//int scale = expr(); //is optional possible??
r = (unsigned short)shot_histogram_get_range(from, to, 100);//returns -1 for error
break;