[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: tikz terminal
From: |
Ben Abbott |
Subject: |
Re: tikz terminal |
Date: |
Mon, 18 Jan 2010 08:08:54 -0500 |
On Jan 18, 2010, at 6:14 AM, Dingwen Yuan wrote:
>
> 2010/1/18 Ben Abbott <address@hidden>:
>> On Jan 17, 2010, at 4:58 PM, Dingwen Yuan wrote:
>>
>>> Hi,
>>>
>>> I am using octave version 3.2.2 on ubuntu 9.10. I want to you whether
>>> it's possible to save an octave plot (I know the backend for plotting
>>> is gnuplot) into tikz scripts.
>>>
>>> regards,
>>>
>>> Dingwen
>>
>> I haven't tested this using LaTeX, but ...
>>
>> figure (1)
>> clf
>> surf (peaks)
>> drawnow ('tikz', 'plot.tikz', false, 'gnuplot.gp')
>>
>> ... will produce a "plot.tikz" file. I don't have a copy of 3.2.2 available
>> to try, but even though 3.0.5 throws a gnuplot error, the file is produced.
>>
>> Please do report back if this works for you.
>>
>> Ben
> Hi Ben,
>
> On my computer, after I keyed in the last line, I got lots of outputs such as
> "
> gnuplot> @
> ^
> line 0: invalid character @
> ". And I got an empty plot.tikz and a nonempty gnuplot.gp.
> BTW, my octave version is 3.2.2 and my gnuplot version is 4.2 patch 6
> and I have installed the lua terminal into the gnuplot. The lua
> version is 5.1.4.
>
> Thanks,
>
> Dingwen
hmm ... I may have got the command wrong. I'm running development code for
gnuplot, and it is a bit dated. Try ...
drawnow ('lua', 'plot.tikz', false, 'gnuplot.gp')
A more complicated solution would be to ..
drawnow ("x11", "/dev/null", false, "gnuplot.gp")
Then (1) edit gnuplot.gp and replace the "x11" terminal specification with
"lua". (2) Modify or add a "set output ...." line to read "set output
plot.tikz". (3) type "gnuplot gnuplot.gp" form a terminal window. That should
produce your result.
I'm in a rush at the moment, so my instructions are from memory and I did not
test them.
Ben