octave-maintainers
[Top][All Lists]
Advanced

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

Re: changes to graphics.cc and subplot.m


From: Ben Abbott
Subject: Re: changes to graphics.cc and subplot.m
Date: Mon, 22 Jul 2013 03:38:42 +0200

On Jul 21, 2013, at 10:24 PM, Stefan Mahr wrote:

> 
>> oops!  The test only fails for me the 1st time it is run, and only because 
>> the axes handles are in the wrong order.
>> 
>> Ben
> 
> It's weird. With your test script I get the same results as you.
> However, the resulting output still has different y-axis size for both
> plots.
> 
> If I copy-paste your example block-wise in interactive mode, I get more
> errors. Could it be some kind of timing problem?

The extra errors are because the test aborts after the first error.

> -----------
> 
>  graphics_toolkit fltk
>  close all
>  hf = figure (gcf (), "__graphics_toolkit__", "fltk", "visible", "on");
> 
> 
>  subplot(2,1,1); plot(rand(10,1)); subplot(2,1,2); plot(rand(10,1))
>  hax = findall (gcf (), "type", "axes");
>  positions = cell2mat (get (hax, "position"));
>  outerpositions = cell2mat (get (hax, "outerposition"));
>  looseinsets = cell2mat (get (hax, "looseinset"));
>  tightinsets = cell2mat (get (hax, "tightinset"));
>  close all
> 
> 
>  subplot(2,1,1); plot(rand(10,1)); subplot(2,1,2); plot(rand(10,1))
>  hax = findall (gcf (), "type", "axes");
>  assert (cell2mat (get (hax, "position")), positions, 0.001)
>  assert (cell2mat (get (hax, "outerposition")), outerpositions, 0.001)
>  assert (cell2mat (get (hax, "looseinset")), looseinsets, 0.001)
>  assert (cell2mat (get (hax, "tightinset")), tightinsets, 0.001)
> 
> ------------------------
> 
>> assert (cell2mat (get (hax, "position")), positions, 0.001)
> error: assert (cell2mat (get (hax, "position")),positions,0.001) expected
>   0.13000   0.58384   0.77500   0.32733
>   0.13000   0.12384   0.77500   0.32733
> but got
>   0.13000   0.60122   0.77500   0.30994
>   0.13000   0.18964   0.77500   0.26152
> maximum absolute error 0.0658047 exceeds tolerance 0.001
> error: called from:
> error:   /usr/share/octave/3.7.5/m/testfun/assert.m at line 235, column 5
>> assert (cell2mat (get (hax, "outerposition")), outerpositions, 0.001)
>> assert (cell2mat (get (hax, "looseinset")), looseinsets, 0.001)
>> assert (cell2mat (get (hax, "tightinset")), tightinsets, 0.001)
> error: assert (cell2mat (get (hax, "tightinset")),tightinsets,0.001)
> expected
>   0.042857   0.013122   0.000000   0.026316
>   0.042857   0.013199   0.000000   0.026316
> but got
>   0.04286   0.09122   0.00000   0.01696
>   0.04286   0.13964   0.00000   0.00000
> maximum absolute error 0.126443 exceeds tolerance 0.001
> error: called from:
> error:   /usr/share/octave/3.7.5/m/testfun/assert.m at line 235, column 5

The second error is the one I hoped to catch.  I'll work in fixing the test.

Ben





reply via email to

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