bugGNU Octave - Bugs: bug #40500, ND-arrays need a nice...

 
 

bug #40500: ND-arrays need a nice representation in GUI Workspace window

Submitter:  Rik <rik5>
Submitted:  Wed 06 Nov 2013 10:57:05 PM UTC
   
 
Category:  GUI Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Feature Request
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Thu 07 Nov 2013 07:13:23 PM UTC, comment #12: 

I don't really think there is any good way to solve this problem.  So I'm OK with closing it.  We really just need a variable browser/editor.

John W. Eaton <jwe>
Group administrator
Thu 07 Nov 2013 06:48:43 PM UTC, comment #11: 

Oops, closed report when you wanted it open.  I'm re-titling to reflect the open issue with ND-arrays, since alignment has been fixed.

Rik <rik5>
Group administrator
Thu 07 Nov 2013 06:46:54 PM UTC, comment #10: 

I think there is plenty of ways we could be clever and have a nicer display, but this will work well enough for the 3.8.0 release.

Rik <rik5>
Group administrator
Thu 07 Nov 2013 06:24:08 PM UTC, comment #9: 

OK, it would be good to list out the first few elements, but we don't have a syntax for that if the elements would span more than one "page".  I.e., a 2x2x2 array is only 8 elements, so they could all be displayed, but there is no simple one-line representation for displaying them.

John W. Eaton <jwe>
Group administrator
Thu 07 Nov 2013 06:23:09 PM UTC, comment #8: 

Fixed the same precedence problem affecting the display of char matrices here (http://hg.savannah.gnu.org/hgweb/octave/rev/b951a8351fd7).  Everything seems fine now, closing report.

Rik <rik5>
Group administrator
Thu 07 Nov 2013 06:06:56 PM UTC, comment #7: 

I just fixed the display of ND-arrays here (http://hg.savannah.gnu.org/hgweb/octave/rev/8fde5edabedd).

Rik <rik5>
Group administrator
Thu 07 Nov 2013 05:59:27 PM UTC, comment #6: 

Oh yeah, that horrible precedence problem.  Sorry.

John W. Eaton <jwe>
Group administrator
Thu 07 Nov 2013 05:56:18 PM UTC, comment #5: 

I fixed the problem with the display of empty cells (http://hg.savannah.gnu.org/hgweb/octave/rev/28e9562d708b).  Turned out too be quite easy, the stream operator '<<' was grabbing the results of the test from the tertiary operator '?' rather than the result "A" : "B".

Rik <rik5>
Group administrator
Thu 07 Nov 2013 05:52:48 PM UTC, comment #4: 

With your latest changeset things are a lot better.  Multi-dimensional arrays, rand(2,3,4), still don't display anything in the Value column though.

Also, there has been a regression for empty cell arrays.  They now display as '1', rather than '{}'.

Rik <rik5>
Group administrator
Thu 07 Nov 2013 06:01:35 AM UTC, comment #3: 

I checked in the following additional change:

http://hg.savannah.gnu.org/hgweb/octave/rev/1d2e709bbbda

This should improve the situation for printing scalar and matrix values with the format that is in effect at the command line.  However, there are some differences.  For example, try the column vecctor


[1e-6; 1e6]


At the command line, we scan all values and get one format for the whole matrix.  But in the workspace viewer the format selection is done for each value separately.  The reason for this is to allow us to print out the first few values of a matrix efficiently even if the matrix is large.  If we had to scan the whole matrix for max and min just to get the format for a few values it could take too much time for the GUI.  Maybe this could be improved in the future, but I think it is good enough for now.  At least we get some values displayed.  Rather than worrying too much about the formatting, it would be better to spend the time implementing a fully functional variable editor.

John W. Eaton <jwe>
Group administrator
Thu 07 Nov 2013 03:04:24 AM UTC, comment #2: 

Seems good on the alignment.

However, there has been a a few regressions.  Complex variables now display differently.  1+2i use to display as "1 + 2i".  Now it displays as "(1,2)".

ND-arrays such as rand (3,3,3) use to display as "...".  Now there is nothing in the value column.

The value column used to respect the format that was in place at the command line.  Now it is fixed at short.  So,


x = 1.23e7;
format short eng


used to switch the value field to "12.3000e+006"

Rik <rik5>
Group administrator
Thu 07 Nov 2013 12:26:04 AM UTC, comment #1: 

I checked in the following changeset:

  http://hg.savannah.gnu.org/hgweb/octave/rev/49d573a1deda

John W. Eaton <jwe>
Group administrator
Wed 06 Nov 2013 10:57:05 PM UTC, original submission:  

The variables in the Workspace window are not aligned.  It appears as if extra whitespace at the front of the "Value" string is not being trimmed.

Sample code:


x = 11;
y = 1.1e20;
z = 1.1;


The resulting Workspace view is attached as a .png file.


Rik <rik5>
Group administrator

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #29553:  wspace_var_alignment.png added by rik5 (12KiB - image/png)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (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 14 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-11-07 jwe StatusIn Progress Fixed
        Open/ClosedOpen Closed
    2013-11-07 rik5 StatusFixed In Progress
        Open/ClosedClosed Open
        Summaryvariables in GUI Workspace window not aligned ND-arrays need a nice representation in GUI Workspace window
    2013-11-07 rik5 StatusIn Progress Fixed
        Open/ClosedOpen Closed
    2013-11-07 jwe StatusFixed In Progress
        Open/ClosedClosed Open
    2013-11-07 rik5 StatusIn Progress Fixed
        Open/ClosedOpen Closed
    2013-11-07 rik5 StatusNone In Progress
    2013-11-06 rik5 Summaryvariables in GUI workspace not aligned variables in GUI Workspace window not aligned
    2013-11-06 rik5 Attached File- Added wspace_var_alignment.png, #29553

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code