How to programmatically download png files from matplotlib plots in notebook?

Hunter
New Contributor III

I am creating plots in databricks using python and matplotlib. These look great in notebook and I can save them to the dbfs using

plt.savefig("/dbfs/FileStore/tables/[plot_name].png")

I can then download the png files to my computer individually by pasting a url in my browser like

https://[address]/files/tables/[plot_name].png

What I'm wondering is if there is a way to run this url and download the png file for a plot programmatically when I run a notebook