help-octave
[Top][All Lists]
Advanced

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

Re: Mismatch between plotted graph and its saved file.


From: Kavya Manohar
Subject: Re: Mismatch between plotted graph and its saved file.
Date: Thu, 27 Feb 2014 20:23:14 +0530

Hi,

My OS is Ubuntu 13.10 and Octave is version 3.6.4

When I run this code, I get a figure window which plots sinusoid, but not the straight line.(Its screenshot is here: testfig.png)
When that figure window is maximized, I get the straight line too.!!(Its screenshot is here: testfig2.png)
But the saved figure contains no straight line. (test.png, the file saved by octave)

And the problem persists only with horizontal straight lines.

Thanks
Kavya



On Thu, Feb 27, 2014 at 7:02 PM, Doug Stewart <address@hidden> wrote:



On Thu, Feb 27, 2014 at 6:37 AM, Kavya Manohar <address@hidden> wrote:

Hi,

I plotted a sinusoid and a straight horizontal line on same graph. But when it was saved  in '.png' format using print function the straight line did not appear in the figure. 

The following is the code.

f=50;
t=[0:1/(35*f):3/f];
Vm=12*sqrt(2);
A=Vm*sin(2*pi*f*t);
plot(t,A,"1",t,Vm,"1");
print("test.png")


Why could it be so? What is the way out?


Thanks

Kavya Manohar


I tried your code on my comp. and it works !

What version of octave?
which OS are you using?

Doug

Attachment: testfig.png
Description: PNG image

Attachment: testfig2.png
Description: PNG image

Attachment: test.png
Description: PNG image


reply via email to

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