<?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 How to execute matplotlib animations in a Databricks notebook? in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/how-to-execute-matplotlib-animations-in-a-databricks-notebook/m-p/21501#M14663</link>
    <description>&lt;P&gt;How to execute matplotlib animations in a Databricks notebook?&lt;/P&gt;</description>
    <pubDate>Tue, 03 May 2022 19:45:19 GMT</pubDate>
    <dc:creator>shan_chandra</dc:creator>
    <dc:date>2022-05-03T19:45:19Z</dc:date>
    <item>
      <title>How to execute matplotlib animations in a Databricks notebook?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-execute-matplotlib-animations-in-a-databricks-notebook/m-p/21501#M14663</link>
      <description>&lt;P&gt;How to execute matplotlib animations in a Databricks notebook?&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2022 19:45:19 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-execute-matplotlib-animations-in-a-databricks-notebook/m-p/21501#M14663</guid>
      <dc:creator>shan_chandra</dc:creator>
      <dc:date>2022-05-03T19:45:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to execute matplotlib animations in a Databricks notebook?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-execute-matplotlib-animations-in-a-databricks-notebook/m-p/21502#M14664</link>
      <description>&lt;P&gt;Please refer to the below example code and , use &lt;B&gt;displayHTML(ani.to_jshtml()) &lt;/B&gt;to execute matplotlib animations in a databricks notebook&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;import matplotlib.pyplot as plt
import matplotlib.animation
import numpy as np
t = np.linspace(0,2*np.pi)
x = np.sin(t)
fig, ax = plt.subplots()
l, = ax.plot([0,2*np.pi],[-1,1])
animate = lambda i: l.set_data(t[:i], x[:i])
ani = matplotlib.animation.FuncAnimation(fig, animate, frames=len(t))
plt.show()
displayHTML(ani.to_jshtml())&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2022 19:47:08 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-execute-matplotlib-animations-in-a-databricks-notebook/m-p/21502#M14664</guid>
      <dc:creator>shan_chandra</dc:creator>
      <dc:date>2022-05-03T19:47:08Z</dc:date>
    </item>
  </channel>
</rss>

