fix in plot_elements script