Hugging Face
Models
Datasets
Spaces
Posts
Docs
Solutions
Pricing
Log In
Sign Up
Spaces:
amankishore
/
sjc
like
2
Build error
App
Files
Files
Community
cfc39b8
sjc
/
my
/
utils
/
plot.py
amankishore
Updated app.py
7a11626
over 1 year ago
raw
history
blame
No virus
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