As stated in the title, when I use below code I don't get a figure, but I see: <Figure size 432x288 with 1 Axes> [<matplotlib.lines.Line2D at 0x7f7df9afca50>]
Code to reproduce behavior:
import numpy as np
import matplotlib.pyplot as plt
x = np.linspace(0, 2*np.pi, 50)
y = np.sin(x)
fig, ax = plt.subplots()
ax.plot(x, y)
I found similar questions on SO, all with the answer to use plt.show(), but that doesn't work.
My configuration:
- Databricks Runtime version: 7.3 LTS (includes Apache Spark 3.0.1, Scala 2.12)
matplotlib==3.3.2
As stated by Databricks themselves, from version 6.5 and up, you no longer need to use %matplotlib inline. Whether I use that or not, it doesn't matter since I get the same output (no figure, but the axes statement).
Note: with matplotlib==3.2.1 I do see the figure, but I would like to know why it fails with version 3.2.2.