bugGNU Octave - Bugs: bug #61823, not possible to print uiXXX objects


bug #61823: not possible to print uiXXX objects

Submitter:  None
Submitted:  Fri 14 Jan 2022 12:09:53 PM UTC
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Confirmed Assigned to:  None
Originator Name:  Giuseppe Catastini Originator Email:  -email is unavailable-
Open/Closed:  * Open Release:  * dev
Operating System:  * Any
* Mandatory Fields

Add a New Comment (Rich Markup)

Comment Type & Canned Response:


Fri 14 Jan 2022 05:47:48 PM UTC, comment #1: 

I don't think uiXXX objects of any type are printable in Octave.  For example, "help print" displays documentation for the print function and I see

          Don't print uicontrol objects such as pushbuttons which may
          overlay the plot.  This is the default behavior and it is not
          possible to include uicontrol objects in the output without
          using an external screen capture tool.

So, unfortunately if you want to display tabular data another program might be better.  All the calculations and data preparation can still be done in Octave, and then use a convenient format like CSV for exchanging the data with the program that would be used for printing.

On the 7.0.90 Release Candidate the code produces a much more reasonable message

error: print: no axes object in figure to print

Rik <rik5>
Project Administrator
Fri 14 Jan 2022 12:09:53 PM UTC, original submission:  

Dear all, I'm experiencing the following error with Octave 6.4.

Hereafter you may find a sample script that properly generates the figure, but that fails when printing the figure on a png file. I'm not able also to save the picture from the figure File/Save_as menu.

I have also attached the code as demo_error.m script.

 f=figure('position',[100 100 650 270]);
 c = uicontrol(f,'Style','text','Position',[55 155 500 155],'String','Demo Error');
 data = rand(5,4)*10;
 colnames = {'100 km', '200 km','300 km','400 km'};
 rownames = {'10 deg', '20 deg','30 deg','40 deg','50 deg'};
 f = uitable(f, 'Data', data, 'ColumnName', colnames,'RowName',rownames,'Position', [10 20 610 200]);


error: matrix cannot be indexed with {
error: called from
    _print_parse_opts_ at line 253 column 14
    print at line 415 column 8
    demo_error at line 11 column 2

Thank you in advance.



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

Attach Files:

Attached Files
file #52668:  demo_error.m added by None (421B - text/plain)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by None (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 project members can vote.





    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-01-14 rik5 Item GroupUnexpected Error or Warning Matlab Compatibility
        StatusNone Confirmed
        Release6.4.0 dev
        Summaryerror when printing on file a figure containing uitable object not possible to print uiXXX objects
    2022-01-14 None Attached File- Added demo_error.m, #52668

    Back to the top

    Powered by Savane 3.9