filippocld223
Jun 16, 2014 - 18:22
I want to put a matplotlib graph in a ImageView. How to do that?
I want to put a matplotlib graph in a ImageView. How to do that?
Save it to a file:
import matplotlib.pyplot as plt
plt.plot([1, 2, 3, 4])
plt.savefig('temp.png')
...then load it into a ui.Image:
import ui
# ...
img = ui.Image.named('temp.png')
imageview.image = img
Thanks. now I have made a "Plotter" with ui module and matplotlib 😃