Added two functions scale_bar and scale_segment