save the sub_plot in the db