octave-maintainers
[Top][All Lists]
Advanced

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

Re: Subplot problems


From: Rik
Subject: Re: Subplot problems
Date: Tue, 16 Dec 2014 08:58:51 -0800

On 12/16/2014 07:46 AM, address@hidden wrote:
Date:
12/16/2014 07:46 AM
To:
Juan Pablo Carbajal <address@hidden>
CC:
Octave Maintainers List <address@hidden>
List-Post:
<mailto:address@hidden>
Precedence:
list
MIME-Version:
1.0
References:
<address@hidden> <address@hidden> <address@hidden> <address@hidden> <address@hidden> <address@hidden> <address@hidden>
In-Reply-To:
<address@hidden>
Message-ID:
<address@hidden>
Content-Type:
multipart/alternative; boundary=001a11c3562403f4ee050a5742a0
Message:
4



2014-12-16 16:41 GMT+01:00 Juan Pablo Carbajal <address@hidden>:
On Tue, Dec 16, 2014 at 4:39 PM, Pantxo Diribarne
<address@hidden> wrote:
>
>
> 2014-12-16 16:27 GMT+01:00 Juan Pablo Carbajal <address@hidden>:
>>
>> On Tue, Dec 16, 2014 at 3:53 PM, Pantxo <address@hidden>
>> wrote:
>> > Juan Pablo Carbajal-2 wrote
>> >> On Tue, Dec 16, 2014 at 3:05 PM, Andreas Weber &lt;
>> >
>> >> octave@
>> >
>> >> &gt; wrote:
>> >>> Am 16.12.2014 um 14:56 schrieb Juan Pablo Carbajal:
>> >>>> FLTK has a weird behavior with subplots.
>> >>>> First it resizes them on the fly, but if that is disregarded as
>> >>>> "style" the following behavior is definitely a bug.
>> >>>>
>> >>>> order=[4 8 12 11 16 15 14 10 13 9 5 6 1 2 3 7];
>> >>>> for i=1:length(order);
>> >>>>   subplot(4,4,order(i));
>> >>>>   plot(randn(10,1));
>> >>>>   text(0,0,num2str(i));
>> >>>>   axis off;
>> >>>>   pause;
>> >>>> endfor
>> >>>>
>> >>>> If you ran that script you see that axes numbered 7 and 8 are plotted
>> >>>> but then erased when axes numbered 9 and 10 are created.
>> >>>
>> >>> I think its this bug report: https://savannah.gnu.org/bugs/?41128
>> >>> and/or this: https://savannah.gnu.org/bugs/index.php?42033
>> >>>
>> >>> -- Andy
>> >>
>> >> Maybe the last one, but if you go through the plots in order there is
>> >> no problem!
>> >> So that bug might look as fixed now.
>> >> Problem is when you are going in reverse order through the plots.
>> >>
>> >> Where is subplot for fltk implemented?
>> >
>> > It is implemented in scripts/plot/util/subplot.m for all toolkits.
>> >
>> > I am in the process of refactoring subplot.m so that it behaves more
>> > like
>> > Matlab does. I haven't assigned the bug to my self, but if no body is
>> > already working on this I'll do so. Also if someone who has already
>> > worked
>> > on the current implementation has comments/advises, they are welcome
>> > (either
>> > here or on the bug tracker).
>> >
>> > Pantxo
>> >
>> >
>> >
>> > --
>> > View this message in context:
>> > http://octave.1599824.n4.nabble.com/fltk-erases-subplots-tp4667823p4667829.html
>> > Sent from the Octave - Maintainers mailing list archive at Nabble.com.
>> >
>>
>> Ok Pantxo, then I understand you will refactor subplot.m *soon* and
>> therefore there is no point in fixing this now.
>>
>> Correct?
>
>
> Depends on what *soon* means. If you need it fixed in the next coming
> week(s) just tell me, I'll let you work on this. I can also share the
> observations I gathered from playing with subplot in Matlab.
>
> Pantxo

Due to this an many other issues I am not using FLTK so I am in no
hurry. But I did not wanted to invest time if you are going to
refactor the code eventually, but surely.

I frequently use subplot for fast/compact data visualisation and I am also very annoyed by this bug in 3.8.2; so yes I will work on this for sure in the coming month(s).


12/16/14

Pantxo,

subplot() is rather annoying and I would d be happy to see someone take a look at it in a deep way.  The issue, also one of Matlab compatibility, is that drawing a subplot over an existing one should replace it.  This can happen when one subplot spans multiple subplot grids.  Some sample code

subplot (2,2, 1:2)   # axis spans window horizontally
plot (1:10)
subplot (2,2,4)
ezplot (@sin)
subplot (2,2,1)      # This should replace the spanning axis

Unfortunately what happens now is that the tolerances in positioning can add up so that it appears to Octave that the next axes to plot will overlap an existing subplot axes so it erases the one created earlier.

--Rik


reply via email to

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