bugGNU Octave - Bugs: bug #56787, Misplaced legend when printing...

 
 

bug #56787: Misplaced legend when printing with a nondefault size

Submitter:  Marco Caliari <caliari>
Submitted:  Wed 21 Aug 2019 12:34:41 PM UTC
   
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
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
   

Mon 18 Nov 2019 09:04:46 PM UTC, comment #3: 

Verified with new legend.m.  Marking as fixed and closing report.

Rik <rik5>
Group administrator
Mon 18 Nov 2019 09:44:11 AM UTC, comment #2: 

legend.m has been rewritten for (OpenGL toolkits only). This bug should now be fixed.

Marking ready for test.

Pantxo Diribarne <pantxo>
Group Member
Wed 21 Aug 2019 02:43:12 PM UTC, comment #1: 

I found the following workaround


x = linspace (1, 2);
semilogy (x, x);
h = ylabel ('ylabel')
pos = get(h, 'Position');
legend ('TSFP', 'Location','NorthWest');
set (h, 'Position', pos + [-0.05,0,0])
print ('-depslatexstandalone', '-F:16', 'tstleg')
system ('latex tstleg.tex')
system ('dvips -E tstleg.dvi -o tstleg.eps')


Marco Caliari <caliari>
Group Member
Wed 21 Aug 2019 12:34:41 PM UTC, original submission:  

Maybe this is related to bug #39697, comment #15. The following


x = linspace (1, 2);
semilogy (x, x);
ylabel ('ylabel')
h = legend ('TSFP', 'Location','NorthWest');
pos = get (h, 'Position')
set (h, 'Position', pos + [0.1, 0, 0.1, 0])
pause
print ('-depslatexstandalone', '-F:16', 'tstleg')
system ('latex tstleg.tex')
system ('dvips -E tstleg.dvi -o tstleg.eps')


produces a tstleg.eps figure in which the legend is outside the box on the left. In order this to happen, it is necessary to use a seimlogy plot, to use the ylabel and to use the option -F:16 in print. Manually changing the position (set (h, 'Position' ...)) does not help: the legend is pushed to the left when printing.

Marco Caliari <caliari>
Group Member

 

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

    Date Changed by Updated Field Previous Value => Replaced by
    2019-11-18 rik5 StatusReady For Test Fixed
        Open/ClosedOpen Closed
        Release5.1.0 dev
    2019-11-18 pantxo StatusNone Ready For Test

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code