bugGNU Octave - Bugs: bug #51829, Consecutive plots gradually drifts...

 
 

bug #51829: Consecutive plots gradually drifts out of figure area

Submitter:  Tunc <tunc>
Submitted:  Wed 23 Aug 2017 04:51:57 PM UTC
   
 
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 4.0.0 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 23 Aug 2017 10:35:34 PM UTC, comment #4: 

This is busted on 4.0 and 4.2 branches, but the development branch works just fine for me.  I don't even have the problem that Dan reported about the FLTK xlabel extending below the bottom of the figure.  I'm marking this as fixed. 

For the original reporter, options are to wait until the 4.4 release or to build Octave from source code.

Rik <rik5>
Group administrator
Wed 23 Aug 2017 10:12:58 PM UTC, comment #3: 

On my computer (linnux mint 17.3) I can reproduce the issue with Octave 4.0 but not in the latest 4.2.1 release or dev.
The synchronization between threads has been improved before 4.2 (by queuing thread operations when printing) and that bug is probably fixed.

Pantxo Diribarne <pantxo>
Group Member
Wed 23 Aug 2017 07:37:25 PM UTC, comment #2: 

Thank you for your reply. My observation was with Qt and Octave version is the standard package in Linux Mint 18.2 repository.

Yes, manual enlargement of font size is essential to reproduce the problem. Everything is alright with the default size or smaller.

Tunc <tunc>
Wed 23 Aug 2017 07:23:54 PM UTC, comment #1: 

Which toolkit are you using?  I'm not quite seeing what you are seeing.  (I'm using the latest development code on Linux.)

For FLTK/Qt/gnuplot the image doesn't keep growing in side with each iteration, but the FLTK plot has the Xlabel extending past the bottom of the figure.  Qt lays things out nicely.  gnuplot is pretty good, but it has a separate problem of the Ylabel overlapping the tick text (that's a separate issue from this bug report).

Both FLTK and Qt have the annoying trait of the figure window and plot growing in size about 10% and then shrinking back to the original size with each iteration.  Looks awful.  In fact, there's a good chance that could be the source of error on your system.  I.e., with each iteration this 10% growth and subsequent shrink could be incrementally increasing some variable that keep track of plot size due to some poorly synchronized cross-thread action--as you point out the need for a pause.  Wild theory, but that might be where to look first.

Or font size.  Is that first line changing the font size necessary to make this behavior happen?

Dan Sebald <sebald>
Wed 23 Aug 2017 04:51:57 PM UTC, original submission:  

If multiple plots are made without explicitly closing the figure window, the following plots tend to gradually drift downwards (towards -y axis). It is as if the calculation of corner coordinates are done without using the updated value of the font size variable.

Attached png files show what happens as the below loop iterates. Basically,
1) The plot moves downwards, truncating first the labels and then the plot itself.
2) The legend also is improperly plotted after iteration 10. As a
3) If the system is not forced to pause between figures, some figures are rendered before actually being plotted, resulting in white files.


set(0,'DefaultAxesFontSize', 20);
data = rand(50,50);

for i = 1:1:20
        imagesc(data);
        xlabel('x-label');
        ylabel('y-label');
        colorbar;
        print(sprintf('%d.png',i));
        pause(0.05);
end


Tunc <tunc>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #41622:  1.png added by tunc (36KiB - image/png)
file #41623:  5.png added by tunc (35KiB - image/png)
file #41624:  10.png added by tunc (30KiB - image/png)
file #41625:  20.png added by tunc (28KiB - image/png)

 

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 sebald (Posted a comment)
  • -email is unavailable- added by tunc (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
    2017-08-23 rik5 StatusWorks For Me Fixed
        Open/ClosedOpen Closed
    2017-08-23 pantxo StatusNone Works For Me
    2017-08-23 tunc Attached File- Added 1.png, #41622
        Attached File- Added 5.png, #41623
        Attached File- Added 10.png, #41624
        Attached File- Added 20.png, #41625

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code