basically reverted changes to method _visualize_path_energy() in class Visualize