<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to programmatically download png files from matplotlib plots in notebook? in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/how-to-programmatically-download-png-files-from-matplotlib-plots/m-p/15272#M9620</link>
    <description>&lt;P&gt;Thank you!&lt;/P&gt;</description>
    <pubDate>Thu, 16 Sep 2021 16:50:13 GMT</pubDate>
    <dc:creator>Hunter</dc:creator>
    <dc:date>2021-09-16T16:50:13Z</dc:date>
    <item>
      <title>How to programmatically download png files from matplotlib plots in notebook?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-programmatically-download-png-files-from-matplotlib-plots/m-p/15270#M9618</link>
      <description>&lt;P&gt;I am creating plots in databricks using python and matplotlib. These look great in notebook and I can save them to the dbfs using&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;plt.savefig("/dbfs/FileStore/tables/[plot_name].png")&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I can then download the png files to my computer individually by pasting a url in my browser like&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;https://[address]/files/tables/[plot_name].png&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;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&lt;/P&gt;</description>
      <pubDate>Wed, 15 Sep 2021 21:31:58 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-programmatically-download-png-files-from-matplotlib-plots/m-p/15270#M9618</guid>
      <dc:creator>Hunter</dc:creator>
      <dc:date>2021-09-15T21:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to programmatically download png files from matplotlib plots in notebook?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-programmatically-download-png-files-from-matplotlib-plots/m-p/15272#M9620</link>
      <description>&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 16 Sep 2021 16:50:13 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-programmatically-download-png-files-from-matplotlib-plots/m-p/15272#M9620</guid>
      <dc:creator>Hunter</dc:creator>
      <dc:date>2021-09-16T16:50:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to programmatically download png files from matplotlib plots in notebook?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-programmatically-download-png-files-from-matplotlib-plots/m-p/15273#M9621</link>
      <description>&lt;P&gt;Hi Hunter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FileStore is a special folder within&amp;nbsp;&lt;A href="https://docs.databricks.com/data/databricks-file-system.html" alt="https://docs.databricks.com/data/databricks-file-system.html" target="_blank"&gt;Databricks File System (DBFS)&lt;/A&gt;&amp;nbsp;where you can save files and have them accessible to your web browser. In your case it the png files will be saved into /FileStore/plots which contains images created in notebooks when you call display() on a Python or R plot object, such as a ggplot or matplotlib plot. If you delete files in this folder, you may have to regenerate those plots in the notebooks that reference them. &lt;/P&gt;&lt;P&gt;If you would like to download the files, then you will need to follow the instructions from here to create the url &lt;A href="https://docs.databricks.com/data/filestore.html#save-a-file-to-filestore" target="test_blank"&gt;https://docs.databricks.com/data/filestore.html#save-a-file-to-filestore&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Sep 2021 21:00:12 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-programmatically-download-png-files-from-matplotlib-plots/m-p/15273#M9621</guid>
      <dc:creator>jose_gonzalez</dc:creator>
      <dc:date>2021-09-17T21:00:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to programmatically download png files from matplotlib plots in notebook?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-programmatically-download-png-files-from-matplotlib-plots/m-p/15274#M9622</link>
      <description>&lt;P&gt;Hello Hunter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think that you pushed it too far - FileStore download via web browser is a cool feature, when you want to download file to your local in the quickest possible way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have an external storage mounted to you workspace? Storages like Azure Storage, S3 has their own APIs, multiple SDKs and you should be heading that direction to download it programatically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps!&lt;/P&gt;</description>
      <pubDate>Sat, 18 Sep 2021 07:27:39 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-programmatically-download-png-files-from-matplotlib-plots/m-p/15274#M9622</guid>
      <dc:creator>pawelmitrus</dc:creator>
      <dc:date>2021-09-18T07:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to programmatically download png files from matplotlib plots in notebook?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-programmatically-download-png-files-from-matplotlib-plots/m-p/15275#M9623</link>
      <description>&lt;P&gt;Hi Hunder, Please find the below steps to download the png file &lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Copy the png file to a file store location Eg. -&amp;nbsp;&amp;nbsp;dbfs:/FileStore/&lt;B&gt;tables/DeltaLakeCheatSheet.png&lt;/B&gt;&lt;/LI&gt;&lt;LI&gt;In a separate browser tab, I entered the below URL to automatically download the file to the local.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;A href="https://%3Cmycompany.databricks.com%3E/files/" alt="https://%3Cmycompany.databricks.com%3E/files/" target="_blank"&gt;https://&amp;lt;mycompany.databricks.com&amp;gt;/files/&lt;/A&gt;&lt;B&gt;tables/DeltaLakeCheatSheet.png?o=######&lt;/B&gt;&lt;/P&gt;&lt;P&gt;a. Replace &amp;lt;&lt;A href="https://mycompany.databricks.com/" alt="https://mycompany.databricks.com/" target="_blank"&gt;mycompany.databricks.com&lt;/A&gt;&amp;gt; with the URL you have used to login to databricks&lt;/P&gt;&lt;P&gt;b. ?o=######" where the number after&amp;nbsp;o=&amp;nbsp;is the same as in your URL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, the below example, which displays a hyperlink to the png file which can be used to download the png file&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;displayHTML("""
&amp;lt;p&amp;gt; This is a link &amp;lt;a href="files/tables/DeltaLakeCheatSheet.png?o=######"&amp;gt; link&amp;lt;/a&amp;gt; to the document &amp;lt;/p&amp;gt;
""")&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 18 Sep 2021 20:40:29 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-programmatically-download-png-files-from-matplotlib-plots/m-p/15275#M9623</guid>
      <dc:creator>shan_chandra</dc:creator>
      <dc:date>2021-09-18T20:40:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to programmatically download png files from matplotlib plots in notebook?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-programmatically-download-png-files-from-matplotlib-plots/m-p/15276#M9624</link>
      <description>&lt;P&gt;Thanks everyone! I am already at a place where I can download a png to FileStore and use a url to download that file locally. What I was wondering was if there is some databricks function I can use to launch the url that references the png file and download it. But it sounds like that may not be possible currently.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Sep 2021 15:19:02 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-programmatically-download-png-files-from-matplotlib-plots/m-p/15276#M9624</guid>
      <dc:creator>Hunter</dc:creator>
      <dc:date>2021-09-20T15:19:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to programmatically download png files from matplotlib plots in notebook?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-programmatically-download-png-files-from-matplotlib-plots/m-p/15277#M9625</link>
      <description>&lt;P&gt;Thanks for the html trick Shan_Chandra, I'll use that in my reports.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Sep 2021 15:23:35 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-programmatically-download-png-files-from-matplotlib-plots/m-p/15277#M9625</guid>
      <dc:creator>Hunter</dc:creator>
      <dc:date>2021-09-20T15:23:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to programmatically download png files from matplotlib plots in notebook?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-programmatically-download-png-files-from-matplotlib-plots/m-p/15279#M9627</link>
      <description>&lt;P&gt;Hi Hunter,&lt;/P&gt;&lt;P&gt;Did you ever find a way to automatically download?  I tried going the route of running a jupyter instance on my local laptop and using the requests package to hit the Databricks Filestore url, but I am getting an error. Wondering if you ended up solving this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;</description>
      <pubDate>Mon, 12 Dec 2022 21:53:01 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-programmatically-download-png-files-from-matplotlib-plots/m-p/15279#M9627</guid>
      <dc:creator>peter_mcnally</dc:creator>
      <dc:date>2022-12-12T21:53:01Z</dc:date>
    </item>
  </channel>
</rss>

