bugGNU Octave - Bugs: bug #49769, struct2hdl does not restore...

 
 

bug #49769: struct2hdl does not restore legends or colorbars fully

Submitted by:  Muhali <muhali>
Submitted on:  Mon 05 Dec 2016 12:31:48 PM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: ConfirmedAssigned to: None
Originator Name: Open/Closed: Open
Release: devOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Sun 11 Dec 2016 10:03:50 PM UTC, comment #6:

The problem is that, by default (without the "hilev" option), legends are turned into regular axes for which the "visible" property is not interpreted the same way by the rederer.

@Rik: The idea of the "hilev" argument was to make use of high level functions to restore listeners. This option was meant to be enabled whenever we want to load dynamic objects, like in hdload, unfortunately it is untested up to now and the code behind it is probably not the right way to go. I would not recommend to enable it until we have a proper mechanism to reload objects which heavily rely on listeners (legends, colorbars, bar groups ...).

PS: I have proposed an improvement in bug #44670 that make struct2hdl more compatible with Matlabs old .fig format. When I get some time, I'll try to rebase those changes and propose some cleanup same time.

Pantxo Diribarne <pantxo>
Project Member
Fri 09 Dec 2016 08:31:02 PM UTC, comment #5:

Separately, I improved the performance of hdl2struct about 40% in this cset (http://hg.savannah.gnu.org/hgweb/octave/rev/763ec7cbee9e).

Rik <rik5>
Project Administrator
Wed 07 Dec 2016 04:25:10 PM UTC, comment #4:

Adding Pantxo to the CC list since I believe he wrote these functions originally.

I can confirm that hdl2struct successfully saves a legend object in the struct. But struct2hdl does not restore it completely. There is an optional third input to struct2hdl which when set to 'true' helps a bit. But I'm shooting in the dark here.

Rik <rik5>
Project Administrator
Tue 06 Dec 2016 04:36:23 PM UTC, comment #3:

Adding colorbars to the bug report since this special object is also not tagged correctly.

Rik <rik5>
Project Administrator
Tue 06 Dec 2016 04:32:39 PM UTC, comment #2:

Changing title to reflect the root issue. Although an axes object is partially restored, it is not a true legend object. It lacks, for example, the tag "legend". Restoring that tag is enough to correct the display of the object.

Rik <rik5>
Project Administrator
Mon 05 Dec 2016 11:51:41 PM UTC, comment #1:

Confirmed. hdl2struct and struct2hdl do not seem to have been reviewed. There are functional as well as performance issues here.

Rik <rik5>
Project Administrator
Mon 05 Dec 2016 12:31:48 PM UTC, original submission:

In the example

the loaded graphics has the legend box on.

Muhali <muhali>

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by pantxo (Posted a comment)
  • -unavailable- added by rik5
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by muhali (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 07 Dec 2016 04:25:10 PM UTCrik5Carbon-Copy-=>Added pantxo
    Tue 06 Dec 2016 04:36:23 PM UTCrik5Summarystruct2hdl does not restore legends fully=>struct2hdl does not restore legends or colorbars fully
    Tue 06 Dec 2016 04:32:39 PM UTCrik5Summaryhgload ignoring legend boxoff=>struct2hdl does not restore legends fully
    Mon 05 Dec 2016 11:51:41 PM UTCrik5CategoryNone=>Octave Function
      Item GroupNone=>Incorrect Result
      StatusNone=>Confirmed
      Operating SystemGNU/Linux=>Any

    Back to the top


    Powered by Savane 3.1-cleanup1