bugGNU Octave - Bugs: bug #52389, Legend labels are hidden beyond...


bug #52389: Legend labels are hidden beyond the legend box when using QT or FLTK

Submitted by:  None
Submitted on:  Fri 10 Nov 2017 07:02:15 PM UTC  
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Babak Razmjoo Originator Email:  -email is unavailable-
Open/Closed:  Closed Release:  4.0.3
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.


Sun 12 Nov 2017 10:23:04 PM UTC, comment #2: 

I can't confirm either. Since pure 2D figures are now (in 4.3+) drawn without depth sorting, this bug is not likely to happen anymore (in 3D this is another story). I'll close this report as fixed.

@Dan: can you file another bug report about the behavior you observe when resizing the window very small?

Pantxo Diribarne <pantxo>
Project Member
Sat 11 Nov 2017 06:02:48 AM UTC, comment #1: 

I don't see that behavior here with 4.3.0+, so this may have been fixed some time ago, i.e., can't confirm.

However, in testing your example, I've found that Qt has a bug in which shrinking the figure window small (like in your plot 4.png) then expanding messes up the plot boundaries so that the axes are magnified drastically.  See the attached example.

It looks as though FLTK has its window size forced to a minimum that won't allow such a situation to arise.  I recall gnuplot terminals having similar problems too (nothing to do with Octave).  Rather than digging into the issue, programmers for gnuplot also have gone the route of ensuring a minimum window size, i.e., avoid the situation.

Dan Sebald <sebald>
Fri 10 Nov 2017 07:02:15 PM UTC, original submission:  

I generates a plot with QT including a legend:

>> graphics_toolkit()

ans = qt

>> plot(randn(1,20))
>> legend('Normal')
>> title 'QT'

The label 'Normal' is hidden beyond the box of the legend (file 1). If I resize the window to a minimum height, I can see the label being overdrawn by the legend box (file 2).

I can generate the same result by using FLTK. You can see them in files 3 and 4:

>> graphics_toolkit fltk
>> figure
>> plot(randn(1,20))
>> legend('Normal')
>> title 'FLTK'

But using GNU plot, the legend is rendered correctly.

QT version : 1:4.8.7-18.fc25
FLTK version: 1.3.3-8.fc25



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

Attach Files:

Attached Files
file #42363:  1.png added by None (17KiB - image/png)
file #42364:  3.png added by None (19KiB - image/png)
file #42365:  2.png added by None (12KiB - image/png)
file #42366:  4.png added by None (11KiB - 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 pantxo (Posted a comment)
  • -email is unavailable- added by sebald (Updated the item)
  • -email is unavailable- added by None (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
    2017-11-12 pantxo CategoryPlotting => Plotting with OpenGL
        StatusNone => Fixed
        Open/ClosedOpen => Closed
    2017-11-11 sebald Attached File- => Added shrink_then_expand_qt_plot_Screenshot from 2017-11-10 23-56-56.png, #42367
    2017-11-10 None Attached File- => Added 1.png, #42363
        Attached File- => Added 3.png, #42364
        Attached File- => Added 2.png, #42365
        Attached File- => Added 4.png, #42366

    Back to the top

    Powered by Savane 3.5