bug fixed for singletons in clean_graph function
add a linewidth option in plot_graph