Eric Schulte <eric.schu...@gmx.com> writes:
> Petro <x.pi...@gmail.com> writes:
>
>> Hi all.
>> I generate an image from python source like this:
>> _____________________________________________________
>> #+BEGIN_SRC python :results output raw :export results
>> from pylab import figure, plot
>> import pylab as plt
>> import numpy as np
>> plt.ioff()
>> figure()
>> plot(np.random.rand(10),'o')
>> pic_name='fit_rates1.svg'
>> path_name='/home/petro/tmp/'
>> plt.savefig(path_name + pic_name)
>> print "[" + "[" + path_name + pic_name +"]]"
>>
>> #+END_SRC
>>
>> #+RESULTS:
>> [[/home/petro/tmp/fit_rates1.svg]]
>>
>> _____________________________________________________
>> Can I export the result? Rigth now the image is exported only if I copy the
>> image link and
>> paste it few lines below.
>
> Hi Petro,
>
> Is the link exported at all, or do you get no results export?
>
> You could add the following additional header argument to your code
> block to inform org-mode that the results are a link to a file.
>
> :file /home/petro/tmp/fit_rates1.svg
>
> Best,
>
>>
>> Thanks.
>> Petro
>>
I think I cannot use :file header argument, if I remember well with this
argument org-mode will create a new results file overwriting the one
created by a command in the source code.
My problem solved. I've made a mistake of using :export instead of
:exports in the source header. Now everything works.
Thanks
Petro