Hugging Face
Models
Datasets
Spaces
Posts
Docs
Enterprise
Pricing
Log In
Sign Up
Spaces:
amankishore
/
sjc
like
2
Build error
App
Files
Files
Community
Fetching metadata from the HF Docker repository...
10528ca
sjc
/
my
/
utils
/
plot.py
amankishore
Updated app.py
7a11626
about 2 years ago
raw
Copy download link
history
blame
Safe
193 Bytes
import
numpy
as
np
import
matplotlib.pyplot
as
plt
def
mpl_fig_to_buffer
(
fig
):
fig.canvas.draw()
plot = np.array(fig.canvas.renderer.buffer_rgba())
plt.close(fig)
return
plot