My gnuplot in emacs is not working right now, so I cannot give a complete working answer. However, the :exports property for the python bit should be output , not code . In addition, in order to access this data in a gnuplot session, you will most likely want to read it in a table. Therefore, if you have python code like:
#+name: foo #+begin_src python :exports results import random for x in range(0,300): print random.randrange(1000), random.randrange(1000) #+end_src
you want your gnuplot session to be read in the result table as a variable
#+name: plot-it(data = foo)
You may need to process the data variable in gnuplot code to make sure that this is the appropriate format. As I said above, I cannot verify this at this time, but this should be the starting point.
source share