bugGNU Octave - Bugs: bug #56911, 'print' produces zoomed images...

 
 

bug #56911: 'print' produces zoomed images when 'paperposition' is changed

Submitted by:  Valdas <zmogas>
Submitted on:  Tue 17 Sep 2019 12:38:26 PM UTC  
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Confirmed Assigned to:  None
Originator Name:  Open/Closed:  Open
Release:  5.1.0 Operating System:  Any

Add a New Comment (Rich Markup)
   

You are not logged in

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

 

Mon 23 Sep 2019 12:16:07 PM UTC, comment #5: 

Yes, #56916 is more likely.

Thanks.

Dmitri.

Dmitri A. Sergatskov <dasergatskov>
Mon 23 Sep 2019 08:12:29 AM UTC, comment #4: 

@Dmitri: There's been no change regarding this bug. I think the issues you are reporting are probably due to the changes related to bug #56916

Pantxo Diribarne <pantxo>
Project Member
Mon 23 Sep 2019 04:06:45 AM UTC, comment #3: 

I suspect "the fix" broke test case for hgsave (and copyobj that
relies on hgsave) for gnuplot backend.

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Tue 17 Sep 2019 04:24:57 PM UTC, comment #2: 

Yes, that fixes issue with zooming when width of axes is changed.
But zooming issue when 'paperposition' is changed still remains.

Valdas <zmogas>
Tue 17 Sep 2019 03:36:11 PM UTC, comment #1: 

Confirmed. When you change the "position" property of the axes, it will also switch the "activepositionproperty" to "position". Then the "print" function, which needs to resize the figure, will mess up the layout. The workaround is to reset the "activepositionproperty" after changing the "position" property:

...
set(h_a, 'position', [ap(1), ap(2), 1 - 0.025 - ap(1), ap(4)], ...
    "activepositionproperty", "outerposition");
...

Can you confirm this fixes the issue? If so, I'll try to modify print.m along those lines.

Pantxo Diribarne <pantxo>
Project Member
Tue 17 Sep 2019 12:38:26 PM UTC, original submission:  

 In my script 'position' of axes is modified (width is increased). When 'paperposition' is not modified then output from 'print' is correct (before change of width in image 'test_print__before__default.tif', after change in image 'test_print__after__default.tif').
 But after I change 'paperposition' (make smaller width and height) then 'print' results slightly zoomed image (image 'test_print__before.tif'). And if I increase width in 'position' of axes then printed image becomes even more zoomed (image dimensions stays same), see image 'test_print__after.tif'.

Attached test script-function 'testas.m'.

Valdas <zmogas>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #47543:  test_print__after.tif added by zmogas (10KiB - image/tiff)
file #47539:  testas.m added by zmogas (716B - text/x-objcsrc)
file #47542:  test_print__before.tif added by zmogas (10KiB - image/tiff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by dasergatskov (Posted a comment)
  • -email is unavailable- added by pantxo (Posted a comment)
  • -email is unavailable- added by zmogas (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.

     

     

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-09-17 pantxo CategoryPlotting => Plotting with OpenGL
        StatusNone => Confirmed
        Operating SystemGNU/Linux => Any
    2019-09-17 zmogas Attached File- => Added test_print__after.tif, #47543
    2019-09-17 zmogas Attached File- => Added testas.m, #47539
        Attached File- => Added test_print__after__default.tif, #47540
        Attached File- => Added test_print__before__default.tif, #47541
        Attached File- => Added test_print__before.tif, #47542

    Back to the top


    Powered by Savane 3.5