added rebinned drawing
added new function to get scale factor