[Top][All Lists]

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

Re: Subplots not drawing correctly.

From: IMacaulay
Subject: Re: Subplots not drawing correctly.
Date: Mon, 29 Oct 2018 13:13:57 +0000

Thanks for the suggestion, but that does not work for me.  I have
tried this, in the past, and also drawing all lines (data) in one
horribly long 'plot' command but neither solved the issue.  In the
attached example, you'll see that although the first plot is fixed,
the second lacks its x-grid lines.  I also tried using drawnow between
each plot, as it seemed, at one point that plots *might* draw
correctly, but get 'damaged' when later ones were drawn, but I suspect
this was not the case.

On 26/10/2018, address@hidden <address@hidden> wrote:
> Thanks! That helped. It seems to be a bug (that might not be a bug) with
> an easy work around.
> For the first subplot you place "hold on" before plotting anything. This
> creates axes without a "box" (the top and right lines missing).
> Fix: move the "hold on" command to after the first plot command.
> Attached is the corrected example.
> Alternative: after subplot(221) add:
>    set(gca, 'box', 'on')
> ------------
> Explanation: When you issue "hold on" without any plot an axis is first
> created (axis command). This default axis does not have the box
> attribute set to on.
> Willem
> On 2018-10-26 3:17 a.m., IMacaulay wrote:
>> Certainly.
>> The attached example.m is a cut down version of the function that
>> produced the plot I previously sent, and example.png is cut from a
>> screen shot of the result of running this on my machine this morning.
>> I have had so many problems with saving/printing figures in the past,
>> that now I only use screen shots, which are adequate for most
>> purposes.
>> Thanks.

Attachment: example2.png
Description: PNG image

reply via email to

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