beautifygraph: use slicing instead of subscripting on bytestr

Authored by durin42.