bugGNU Octave - Bugs: bug #57313, plotyy fails to set parent of...

 
 

bug #57313: plotyy fails to set parent of secondary y-axis to parent of primary y-axis

Submitter:  None
Submitted:  Wed 27 Nov 2019 09:38:04 AM UTC
   
 
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * dev
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 27 Nov 2019 04:17:10 PM UTC, comment #2: 

This was easier than I thought.  I checked in a fix here https://hg.savannah.gnu.org/hgweb/octave/rev/597e50809a9c.

Marking as fixed and closing report.

Rik <rik5>
Group administrator
Wed 27 Nov 2019 04:05:21 PM UTC, comment #1: 

Confirmed.

I'm not surprised given how complicated a function plotyy is.  Also, when Octave was first getting written the only possible parent of an axes object was a figure, so there are probably some embedded assumptions in the code.

Rik <rik5>
Group administrator
Wed 27 Nov 2019 09:38:04 AM UTC, original submission:  

I've got a figure which contains a panel and a plot nested inside the panel. When I call plotyy(), the first line gets plotted into my primary y-axis as expected, but the secondary y-axis doesn't show up / gets plotted behind the panel. The 'parent' of the primary y-axis is the panel while the 'parent' of the new, secondary y-axis is the underlying figure.

Here's some example code:

h = figure(1);
p = uipanel(h,'title','test panel');
ax = axes('parent',p);
a = (1:10); %dummy
[yyax,~,~] = plotyy(gca,a,a,2.*a,sqrt(a));
display(get(get(yyax(1),'parent'),'type'))
display(get(get(yyax(2),'parent'),'type'))
%set new parent in order for the plot to show up
set(yyax(2),'parent',p)


Thanks in advance!

Anonymous

 

(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 rik5 (Posted a comment)
  • -email is unavailable- added by None (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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-11-27 rik5 StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2019-11-27 rik5 StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code