From mboxrd@z Thu Jan 1 00:00:00 1970 From: Torsten Bronger Subject: Re: Matplotlib (Python) plots inline Date: Thu, 09 Jun 2011 09:30:57 +0200 Message-ID: <87k4cv31hq.fsf@physik.rwth-aachen.de> References: <87fwnn71t9.fsf@physik.rwth-aachen.de> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:58543) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUZln-00061G-6G for emacs-orgmode@gnu.org; Thu, 09 Jun 2011 03:35:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QUZll-00005p-Er for emacs-orgmode@gnu.org; Thu, 09 Jun 2011 03:35:10 -0400 Received: from lo.gmane.org ([80.91.229.12]:38296) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUZll-00005e-1L for emacs-orgmode@gnu.org; Thu, 09 Jun 2011 03:35:09 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QUZlh-0007OB-Ef for emacs-orgmode@gnu.org; Thu, 09 Jun 2011 09:35:05 +0200 Received: from koln-5d811323.pool.mediaways.net ([93.129.19.35]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 09 Jun 2011 09:35:05 +0200 Received: from bronger by koln-5d811323.pool.mediaways.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 09 Jun 2011 09:35:05 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hallöchen! Pierre de Buyl writes: > I have success with the following: > #+begin_src python :results output raw :exports results > import numpy, matplotlib, matplotlib.pyplot > figure = matplotlib.pyplot.figure() > axes = figure.add_subplot(111, title=u"Hello", xlabel="x", ylabel="y") > x = numpy.arange(-10, 10, 0.1) > axes.plot(x, x**2) > figure.savefig("/tmp/plot_test.png") > figure.clf() > print "[[/tmp/plot_test.png]]" > #+end_src > > You get only the figure as a result, and not the code. > This method executes the code at each export. Thanks also for your answer, however, one should write print "[" + "[/tmp/plot_test.png]]" or something like this in order to prevent the string literal from being substituted by the bitmap. Tschö, Torsten. -- Torsten Bronger Jabber ID: torsten.bronger@jabber.rwth-aachen.de or http://bronger-jmp.appspot.com