bugGNU Octave - Bugs: bug #36135, legend: should box & visible...

 
 

bug #36135: legend: should box & visible by synced ?

Submitter:  Rik <rik5>
Submitted:  Mon 09 Apr 2012 03:27:02 AM UTC
   
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  bpabbott
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 01 May 2012 11:40:59 PM UTC, comment #4: 

I pushed a changeset.

http://hg.savannah.gnu.org/hgweb/octave/rev/c38a253723d3

I choose to deviate from Matlab's behavior, but if anyone thinks that we should follow Matlab's behavior, I'm ok with that as well.

Ben Abbott <bpabbott>
Group Member
Tue 01 May 2012 03:05:28 PM UTC, comment #3: 

The problem is that "show" does


set (hlegend, "visible", "on")


This leaves the box "off", which is why only half the box is drawn.

For Matlab, "show" is equivalent to


set (findobj (hlegend), "visible", "on");
set (hlegend, "box", "on");


Should we copy Matlab's behavior, or do something reasonable like,


set (findobj (hlegend), "visible", "on");
set (hlegend, "visible", get (hlegend, "box"));



Ben Abbott <bpabbott>
Group Member
Tue 01 May 2012 02:14:28 PM UTC, comment #2: 

The original bug is fixed but there are still some oddities.

Try the following code


graphics_toolkit fltk
plot (1:10)
legend line1
legend boxoff
legend hide
legend show


When the legend is drawn again due to the 'legend show' command there is 1/2 of a box around the legend.  This is neither 'boxoff' nor 'boxon'.  Should this bug be re-opened or do you want a different bug report for this?

Rik <rik5>
Group administrator
Thu 26 Apr 2012 02:16:09 PM UTC, comment #1: 

This has been fixed by the changeset below.

http://hg.savannah.gnu.org/hgweb/octave/rev/f579a94aacaa

I had inadvertently attributed the changet to Carnë Draug.

I hadn't noticed this bug, and thought it a regression of my changeset, so I fixed it.

Ben Abbott <bpabbott>
Group Member
Mon 09 Apr 2012 03:27:02 AM UTC, original submission:  

legend ("hide") removes the legend text but leaves the box around the legend still visible.  A call to legend ("boxoff") will properly remove the box as well.  The key is probably that the "hide" command is not changing the "visibility" property of the legend graphics object.

Sample code:


plot (1:10)
legend line1
legend hide;  # box still visible
legend boxoff


Rik <rik5>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bpabbott (Posted a comment)
  • -email is unavailable- added by rik5 (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-06-06 bpabbott StatusIn Progress Fixed
    2012-05-01 bpabbott Open/ClosedOpen Closed
    2012-05-01 bpabbott StatusFixed In Progress
        Open/ClosedClosed Open
        Summarylegend (&quot;hide&quot;) still leaves legend box visible with fltk toolkit legend: should box & visible by synced ?
    2012-04-26 bpabbott StatusNone Fixed
        Assigned toNone bpabbott
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code