Comment

Comment by ldx77

I use org-mode all the time and do a lot of plotting with Python and matplotlib and for some reason the snippet

  #+BEGIN_SRC python :var fname="delseepy.png" :var delsee=delsee :results file
  import matplotlib.pyplot as plt
  
  x, y, z = zip(\*delsee)
  
  fig = plt.figure()
  axes = fig.add_subplot(1,1,1)
  axes.plot(y, z, marker='o')
  fig.savefig(fname)
  
  return fname
  #+END_SRC
has never worked for me. I have to remove the "return" keyword on the last line. Not sure if this is an org-mode issue or related to the Python version (the author seems to be using Python 2).
parent ldx77 5 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton