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

 
 

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

Submitted by:  Marco Caliari <caliari>
Submitted on:  Wed 21 Aug 2019 12:34:41 PM UTC  
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  None Assigned to:  None
Originator Name:  Open/Closed:  Open
Release:  5.1.0 Operating System:  GNU/Linux

Add a New Comment (Rich Markup)
   

You are not logged in

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

 

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>
Project 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>
Project 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 caliari (Submitted the item)
  •  

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

    Only project members can vote.

     

     

     

    No changes have been made to this item

    Back to the top


    Powered by Savane 3.5