octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Plots in LaTeX


From: Jason Martin
Subject: Re: Plots in LaTeX
Date: Fri, 26 Mar 2010 22:13:58 -0400
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3

On 3/26/2010 8:38 PM, Ben Abbott wrote:
On Mar 26, 2010, at 8:10 PM, Jason Martin wrote:

On 3/26/2010 7:05 PM, Ben Abbott wrote:
On Mar 26, 2010, at 11:54 AM, Jason Martin wrote:

Can anyone help me understand what file format I need to use with the following 
print commands?  Are what I have listed correct?

On 3/23/2010 1:38 PM, Jason Martin wrote:

     Also, is my understanding correct on the following print -d"device" 
commands?

-dtex filename.tex

-depslatex filename.eps

-depslatexstandalone I have no idea what extension to use here, and the manual 
doesn't explain either

-dpstex    filename.ps

-dpslatex    filename.ps

     Thanks in advance for any help.

Jason

Just let Octave pick the extension for you.

        print -depslatex test

The result will be a pair of files. One test.tex and one test.eps

In your latex document you just need to input the latex file ...

        \input{test.tex}

Ben
Ben,

    Thanks first off!  I tried this, and it does not give me two files, or even 
a single file with an extension.  when I do:

    figure(2);
    plot(ff0/pi,abs(G));
    line([pstart,pstart],[0,1],"color","magenta");
    line([pstop,pstop],[0,1],"color","magenta");
    line([0,2],[pmax,pmax],"color","magenta");
    xlabel ('f/f_0');
    ylabel('\Gamma');
    text(0.566,0.5,'\leftarrow f_{start} = 8 GHz');
    text(1.55,0.5,'\leftarrow f_{stop} = 22 GHz');
    text(1,0.05,'\Gamma_m');
    print -depslatex test2;

    I get a single file named test2 and that is it.  no extension, no 
additional files.and every example I have found, including in the printed 
manual, has the command as print -deps foo.eps.   So, I guess I am still 
confused.  Is there something wrong with my setup that is keeping Octave from 
producing the proper files?  I have tried it both in and out of qtoctave.  I am 
running on Windows.

Jason

I thought the print() command was able to add the extension. I'll put that on 
my list of todos.

For now, try ...

        print -depslatex test.tex

Ben

p.s. please "reply-all" and respond on the bottom so that those arriveing late 
can follow along. TiA


Sorry for that Ben.

Following the example above did produce the 2 files necessary. I am now having an issue in getting the resultant tex file to input into my report. Seeing as it is a LaTeX issue, should I move it to a different group?

Just in case it can be resolved here, the following error is what I am getting {and it might just be a matter of me not including the right package}:

~~LaTeX file

\documentclass{article}
\usepackage{graphicx,psfrag,floatflt,hyperref}
\begin{document}
\input{test2.tex}
\end{document}

~~LaTeX error
~~ snippet before the end ~~
Package hyperref Warning: Rerun to get /PageLabels entry.
(C:\Octave\3.2.3_gcc-4.4.0\MATLAB\test2.tex
! Missing $ inserted.
<inserted text>
                           $
1.116          \gplbacktext

?




Jason


reply via email to

[Prev in Thread] Current Thread [Next in Thread]