add segment_graph & plot_image func