[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Mismatch between plotted graph and its saved file.
From: |
Mike Miller |
Subject: |
Re: Mismatch between plotted graph and its saved file. |
Date: |
Thu, 27 Feb 2014 10:24:31 -0500 |
On Thu, Feb 27, 2014 at 20:23:14 +0530, Kavya Manohar wrote:
> 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.
This may be because you are actually plotting a horizontal series of
dots, and not a solid line, and that may be the source of the mismatch
(results may vary depending on the version of Octave and which
plotting toolkit is used).
A dotted line is plotted because your value Vm is a scalar, not a
vector. If you do want a solid line instead, try using
Vm = 12 * sqrt (2) * ones (size (t));
HTH,
--
mike