From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Leha Subject: Re: Problems with LaTeX source block Date: Tue, 16 Jul 2013 10:03:06 +0200 Message-ID: <87zjtn2apx.fsf@med.uni-goettingen.de> References: <8761wcjk5y.fsf@free.fr> <87wqos42vm.fsf@med.uni-goettingen.de> <87oba3djid.fsf@free.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44174) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uz0EI-0007zn-BL for emacs-orgmode@gnu.org; Tue, 16 Jul 2013 04:03:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uz0EG-0003Fp-F3 for emacs-orgmode@gnu.org; Tue, 16 Jul 2013 04:03:26 -0400 Received: from plane.gmane.org ([80.91.229.3]:54522) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uz0EG-0003Fi-9U for emacs-orgmode@gnu.org; Tue, 16 Jul 2013 04:03:24 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Uz0EC-0000yF-0w for emacs-orgmode@gnu.org; Tue, 16 Jul 2013 10:03:20 +0200 Received: from genepi110.genepi.med.uni-goettingen.de ([134.76.140.110]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 16 Jul 2013 10:03:20 +0200 Received: from andreas.leha by genepi110.genepi.med.uni-goettingen.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 16 Jul 2013 10:03:20 +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 Hi Julien, Julien Cubizolles writes: > Hi Andreas, I forgot to send the following remarks in my previous > post. > > I encounter a problem with pgfplots. The following works, and produces a > png with a white background > #+NAME: python-tikz > #+header: :results raw :file py2tikz_sin.png > #+header: :imagemagick yes :fit yes :headers '("\\usepackage{tikz,pgfplots}") > #+BEGIN_SRC latex :exports results > \begin{tikzpicture} > \begin{axis} > \draw [green,->] (0,0) -- (2,2) -- (3,1); > \end{axis} > \end{tikzpicture} > #+END_SRC > > However, the following produces a png with only the axis displayed (but > the boundaries are wrong), the data points don't appear. Strangely, the > png produced is transparent: the background is the one of the Emacs buffer. > > #+NAME: python-tikz > #+header: :results raw :file py2tikz_sin.png > #+header: :imagemagick yes :fit yes :headers '("\\usepackage{tikz,pgfplots}") > #+BEGIN_SRC latex :exports results > \begin{tikzpicture} > \begin{axis} > \addplot [red,only lines] table {sin_py2csv.csv}; > \end{axis} > \end{tikzpicture} > #+END_SRC > > The temp latex file seems ok (pdflatex produces a correct picture). I > couldn't find the command line for imagemagick conversion to png to test > it though. The problem is in your external data file, I guess. What happens, is that org creates a temporary tex file in a temporary directory (it is in /tmp/babel-sth under Linux) and compiles this tex file there. At that directory your sin_py2csv.csv is not present. So, one quick remedy should be to use an absolute path to the csv. Regards, Andreas