Hi Julien, Julien Cubizolles <j.cubizol...@free.fr> 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