I am trying to display the plot using plt.show(), but this function gives the following warning and does not display the plot.
UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure
How can I fix this issue so that the plot is displayed?