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

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

[Octave-bug-tracker] [bug #37746] 'legend right' squeezes figure to the


From: Rik
Subject: [Octave-bug-tracker] [bug #37746] 'legend right' squeezes figure to the left (using 'eastoutside')
Date: Tue, 04 Dec 2012 18:55:21 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:17.0) Gecko/20100101 Firefox/17.0

Follow-up Comment #2, bug #37746 (project octave):

I'm going to add Ben to the CC list since he is more of an expert on this
piece of code.

The problem seems to be in the large switch statement on position.  


Line 691 of legend.m
case "east"
  if (outside)
    lpos = [ca_outpos(1) + ca_outpos(3) - lpos(3) - ypad, ...
            ca_pos(2) + (ca_pos(4) - lpos(4)) / 2, lpos(3), lpos(4)];
    new_pos = [ca_pos(1), ca_pos(2), ca_pos(3) - lpos(3), ca_pos(4)];
  else
    lpos = [ca_pos(1) + ca_pos(3) - lpos(3) - ypad, ...
            ca_pos(2) + (ca_pos(4) - lpos(4)) / 2, lpos(3), lpos(4)];
  endif


When the legend does not exist, ca_pos and ca_outpos variables work correctly
in the equations to resize the current axis to accomodate the legend being
placed on the outside.  When the legend already exists, however, the
accomodation has already been made but these equations don't take that into
account.  Instead they shrink the current axis again.  In fact, there is some
recursive updating taking place that I'm not sure is desired.  If I set a
breakpoint on the line then it gets executed 3 times for a single call to
"legend right".  This seems like overkill.


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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