added method for plotting step_functions