|
|
|
|
|
by toolslive
1065 days ago
|
|
emacs org mode can do this but is not tied to just python. Anyway, something like this works: #+BEGIN_SRC python :results file
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
fn = 'my_fig.png'
plt.plot([1, 2, 3, 2.5, 2.8])
plt.savefig('my_fig.png', dpi=50)
return fn
#+END_SRC
#+RESULTS:
[[file:my_fig.png]]
|
|