octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #46494] Incorrect behavior of setting handle c


From: anonymous
Subject: [Octave-bug-tracker] [bug #46494] Incorrect behavior of setting handle children.
Date: Sat, 21 Nov 2015 23:37:04 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0

URL:
  <http://savannah.gnu.org/bugs/?46494>

                 Summary: Incorrect behavior of setting handle children.
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Sat 21 Nov 2015 11:37:03 PM UTC
                Category: Plotting
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.8.1
        Operating System: GNU/Linux

    _______________________________________________________

Details:

There's a particular weird behavior from using set() with the
'ShowHiddenHandles' option:

    graphics_toolkit('gnuplot');
    flag = logical(1);
    patch([0,0,1,1],[0,1,1,0], 'r');
    patch([0,0,2,2],[0,0.5,0.5,0], 'b');
    kk = get(gca,'children')
    if flag,
      show=get(0, 'ShowHiddenHandles');
      set(0, 'ShowHiddenHandles', 'on');
    end;
    kk_h = get(gca,'children')
    set(gca,'children',[kk_h(2);kk_h(3:length(kk_h));kk_h(1)]);
    kk_h = get(gca,'children')
    if flag,
      set(0, 'ShowHiddenHandles', show);
    end
    kk = get(gca,'children')

Using the above code to test, one will notice that if 'ShowHiddenHandles' is
set to 'on', setting gca's children will actually double the number of
children instead of replacing it, where the new permutation is inserted before
the old one. This does not occur when 'ShowHiddenHandles' is set to 'off'.

The intended behavior is that the red patch should now be covering over the
blue patch instead of the other way around. While this does not affect fltk as
much due to still drawing the final red patch after the final blue patch,
gnuplot will have problems due to only caring about the first copy of the
draw. Either way, the behavior is incorrect (also according to Matlab) because
the number of gca's children should remain constant unless a new handle is
created.




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?46494>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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