bugGNU Octave - Bugs: bug #40334, printing a plot with legend fails,...

 
 

bug #40334: printing a plot with legend fails, if setting fontsize

Submitter:  Stefan Mahr <dac922>
Submitted:  Mon 21 Oct 2013 07:17:35 PM UTC
   
 
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Regression
Status:  Fixed Assigned to:  None
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 22 Oct 2013 01:35:41 PM UTC, comment #5: 

The callback for the fontsize property on legends has to re-create the legend object entirely.  This means the existing graphic objects get destroyed.

I pushed more of a complete hack here (http://hg.savannah.gnu.org/hgweb/octave/rev/132d9f543cc5).

Rik <rik5>
Group administrator
Tue 22 Oct 2013 12:23:05 PM UTC, comment #4: 

I tried to debug this and surrounded print.m:409:

 ishandle(h)'
 set (sort (h(ishandle (h))), "fontsize", fontsize);
 ishandle(h)'


and run the script


octave:1> plot(1:2);
octave:2> legend('a');
octave:3> print('test.png','-F:20')
ans =
   1   1   1   1   1   1   1   1   1   1   1   1
ans =
   1   1   0   1   1   1   1   1   1   1   1   1


Why is the handle for the legend text no longer a handle after a call to set?

Andreas Weber <andy1978>
Group Member
Tue 22 Oct 2013 11:25:32 AM UTC, comment #3: 


plot(1:2);
legend('a');
print('test.png','-F:20')
plot(1:2);
legend('a');
print('test.png','-F:20')


still fails with default 5b0036d89d4a (after e477578fca3d), fltk and gnuplot backend.


error: set: invalid handle (= -4.26911)
error: called from:
error:   /home/andy/src/octave-build/../octave-src/scripts/plot/util/print.m at line 409, column 9


Andreas Weber <andy1978>
Group Member
Tue 22 Oct 2013 08:52:32 AM UTC, comment #2: 

The bug is not fixed for me. It's just fixed for the first try, but for the second plot it still occurs.

Stefan Mahr <dac922>
Tue 22 Oct 2013 05:46:50 AM UTC, comment #1: 

Fixed in this changeset (http://hg.savannah.gnu.org/hgweb/octave/rev/e477578fca3d).  This will be a part of the 3.8 release due out in a few weeks.

Rik <rik5>
Group administrator
Mon 21 Oct 2013 07:17:35 PM UTC, original submission:  


plot(1:2);
legend('a');
print('test.png','-F:20')

error: set: invalid handle (= -16.2304)
error: called from:
error:   /data/devel/octave/octave-repos-hg/dbg-octave/../octave-hg/scripts/plot/util/print.m at line 408, column 9


title, xlabel, ylabel and text are working fine, only using legend triggers this bug.

Both, gnuplot and fltk toolkit are affected.

Stefan Mahr <dac922>

 

(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 andy1978 (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by dac922 (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 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-10-22 rik5 StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2013-10-22 andy1978 Item GroupNone Regression
        StatusFixed Confirmed
        Open/ClosedClosed Open
    2013-10-22 rik5 StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code