octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #56972] Calling again command 'legend' after f


From: Valdas
Subject: [Octave-bug-tracker] [bug #56972] Calling again command 'legend' after figure window resize is messing plot layout
Date: Mon, 30 Sep 2019 14:51:26 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0

URL:
  <https://savannah.gnu.org/bugs/?56972>

                 Summary: Calling again command 'legend' after figure window
resize is messing plot layout
                 Project: GNU Octave
            Submitted by: zmogas
            Submitted on: Mon 30 Sep 2019 06:51:24 PM UTC
                Category: Plotting
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: GNU/Linux

    _______________________________________________________

Details:

 First case:
- call this command (result in fig_1.png):

close all; x=[-pi:0.1:pi]; h_p=plot(x,sin(x),x,cos(x));
h_l=legend([h_p(1),h_p(2)],{'sinusas','kosinusas'},'location',
'northoutside','Orientation','horizontal');

- then shrink figure vertically (result in fig_2.png);
- call 'legend' again:  

h_l=legend([h_p(1),h_p(2)],{'a','b'})

 Result (fig_3.png) was mess in plot layout. Seems that legend was placed in
position (in pixels?) when figure was in original size, and then axes follows
legend and expands vertically.

 Second case:
- execute this command (result in fig_4.png):

close all; x=[-pi:0.1:pi]; h_p=plot(x,sin(x),x,cos(x));
h_l=legend([h_p(1),h_p(2)],{'sinusas','kosinusas'});

- then expand figure vertically (result in fig_5.png);
- call 'legend' again:  

h_l=legend([h_p(1),h_p(2)],{'a','b'})

 Result in fig_6.png: legend jumps in to middle of plot window (original
absolute position of canvas in pixels?).


_System_:
Operating System: Kubuntu 19.04
KDE Plasma Version: 5.16.5
KDE Frameworks Version: 5.62.0
Qt Version: 5.12.2
Kernel Version: 5.0.0-29-generic
OS Type: 64-bit
Processors: 16 × AMD Ryzen 7 1700X Eight-Core Processor
Memory: 15,7 GiB

_Octave_:
version 6.0.0
graphics_toolkit = qt
_hg summary_:
parent: 27439:251056aeba5d tip
 Align negative numbers correctly with g format (bug #56940).
branch: default
bookmarks: *@
commit: 2222 unknown (clean)
update: (current) 



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Mon 30 Sep 2019 06:51:24 PM UTC  Name: fig_1.png  Size: 38KiB   By:
zmogas

<http://savannah.gnu.org/bugs/download.php?file_id=47595>
-------------------------------------------------------
Date: Mon 30 Sep 2019 06:51:24 PM UTC  Name: fig_3.png  Size: 26KiB   By:
zmogas

<http://savannah.gnu.org/bugs/download.php?file_id=47596>
-------------------------------------------------------
Date: Mon 30 Sep 2019 06:51:24 PM UTC  Name: fig_2.png  Size: 28KiB   By:
zmogas

<http://savannah.gnu.org/bugs/download.php?file_id=47597>
-------------------------------------------------------
Date: Mon 30 Sep 2019 06:51:24 PM UTC  Name: fig_4.png  Size: 38KiB   By:
zmogas

<http://savannah.gnu.org/bugs/download.php?file_id=47598>

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?56972>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]