help-octave
[Top][All Lists]
Advanced

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

Re: what's wrong with the plot?


From: Henry F. Mollet
Subject: Re: what's wrong with the plot?
Date: Mon, 04 Apr 2005 10:42:34 -0700
User-agent: Microsoft-Entourage/10.1.1.2418

Works fine for me. See attached pdf. Also got an eps with appropriate
command but don't know how to look at it and check that it is the same as
the pdf.
Henry


GNU Octave, version 2.1.46 (powerpc-apple-darwin6.6).
GnuPlot 3.8h, and also old version of AquaTerm

octave:1> y=[97 89 67 62 50 41 35 25];
octave:2> x=1:8;
octave:3> koeff=polyfit(x,log(y),1);
octave:4> realkoeff=exp(koeff)
realkoeff =

    0.82808
  124.36915

octave:5> yp=polyval(koeff,x);
octave:6> plot(x,y,';verkligt antal;',x,exp(yp),';exponentiellt bortfall;');













on 4/4/05 3:26 AM, Gunnar at address@hidden wrote:

> Hello.
> I'm using octave in linux, and I have created a plot with these commands
> 
> y=[97 89 67 62 50 41 35 25];
> x=1:8;
> koeff=polyfit(x,log(y),1);
> realkoeff=exp(koeff)
> yp=polyval(koeff,x);
> gset terminal postscript eps
> gset output 'antal2004.eps'
> plot(x,y,';verkligt antal;',x,exp(yp),';exponentiellt bortfall;');
> 
> The result "antal2004.eps" looks fine in ghostview, it also looks fine when I
> preview the image in LyX (the latex "frontend" which I'm using to write a
> paper). N.B. this preview is the preview inside of LyX, not the
> "View->postscript" way.
> But when I produce a postscript file from LyX, then  graphics is messed up.
> The same messy graph is there if I print the file also.
> 
> The messy graph, well, hard to explain, so I attach a screenshot (enlarged)
> 
> Does anyone know what's wrong? I'm not even sure this is the right forum for
> this question, but I guess at least someone can tell me if I've used gset in
> a correct way.
> 
> Thanks,
> Gunnar.
> 

Attachment: DemoVerklingt.pdf
Description: Binary data

Attachment: antal2004.eps
Description: Binary data


reply via email to

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