3DFuse / my /utils /plot.py
jyseo's picture
first commit
d661b19
raw
history blame contribute delete
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