bugGNU Octave - Bugs: bug #41970, plotyy () and changing legend...

 
 

bug #41970: plotyy () and changing legend properties

Submitted by:  sergey plotnikov <nul0m>
Submitted on:  Thu 27 Mar 2014 10:43:12 AM UTC  
 
Category: PlottingSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

(Jump to the original submission Jump to the original submission)

Thu 17 Jul 2014 08:13:22 PM UTC, comment #15:

The latest syntax doesn't produce a warning and seems to run all the demos correctly so I committed it here (http://hg.savannah.gnu.org/hgweb/octave/rev/961ecaf9fb57).

Rik <rik5>
Project Administrator
Wed 16 Jul 2014 05:23:26 PM UTC, comment #14:

I've got the same warning, but what is strange is that this warning disappears if you change the code this way:

I'm not sure how get(hax,"units") works, but it seems the output is always a column vector. In that case we don't even need the first line in the code above.

sergey plotnikov <nul0m>
Wed 16 Jul 2014 04:28:38 PM UTC, comment #13:

Maybe things have changed since this was coded because your example seems to work now. However, If I make the change and then run demo ('legend') I now have warnings. So something with the new syntax still isn't perfect.

Rik <rik5>
Project Administrator
Wed 16 Jul 2014 04:20:04 PM UTC, comment #12:

Look at the comment above the line in question. It is Octave weirdness that is forcing this issue.

Rik <rik5>
Project Administrator
Wed 16 Jul 2014 04:18:11 PM UTC, comment #11:

I mean that the following works in Octave (at least for me):

sergey plotnikov <nul0m>
Wed 16 Jul 2014 03:56:18 PM UTC, comment #10:

But then.. why not:

Sorry if this is obvious. I've just supplied a patch for the bug #42554 where we need to take into account the same possibility.

sergey plotnikov <nul0m>
Wed 16 Jul 2014 03:23:39 PM UTC, comment #9:

Because there may be more than one value in the variable "units" and Octave was not auto-expanding the property {"units"} to match the number af values in the variable.

This works

because Octave loops internally over every handle in hax and applies the one-to-one mapping of Property/Value pair.

This doesn't work

because the number of properties doesn't match the number of values. At some point it would be nice to update the set routine in C++ to deal with this. But it doesn't happen very often so the workaround of repmat is okay for now.

Rik <rik5>
Project Administrator
Wed 16 Jul 2014 10:00:47 AM UTC, comment #8:

Just out of interest.. Why did you use repmat() when changing "units" back? Are there any drawback in writing line 1093 as simple as:

sergey plotnikov <nul0m>
Thu 15 May 2014 07:11:14 AM UTC, comment #7:

If patch for bug #42362 is applied, this works for me too.

Stefan Mahr <dac922>
Thu 15 May 2014 03:30:09 AM UTC, comment #6:

This changeset fixes the problem with plotyy for me (http://hg.savannah.gnu.org/hgweb/octave/rev/5f37573a6868).

Rik <rik5>
Project Administrator
Wed 14 May 2014 10:26:58 PM UTC, comment #5:

As mentioned in bug 42362 this bug should be reopened, since it's not possible to call plotyy again after setting legend.

Stefan Mahr <dac922>
Wed 09 Apr 2014 04:16:44 AM UTC, comment #4:

I was working along similar lines to Pantxo and created a changeset that solves the problem. I checked it in here (http://hg.savannah.gnu.org/hgweb/octave/rev/8c0646dd9e5a). Closing report.

Rik <rik5>
Project Administrator
Tue 08 Apr 2014 08:49:10 PM UTC, comment #3:

I attached a patch.

(file #31142)

Pantxo Diribarne <pantxo>
Project Member
Thu 27 Mar 2014 03:17:10 PM UTC, comment #2:

plotyy and legend are both complicated functions that put multiple axes objects on the same figure so I'm not surprised that there's a bit of a problem with interactions between the two. I overhauled plotyy on the development branch so any fixes should be done on that branch which uses the newest versions of plotyy.m and legend.m. I'm marking the release as "dev" to encourage that.

Rik <rik5>
Project Administrator
Thu 27 Mar 2014 01:02:24 PM UTC, comment #1:

Confirmed, and for completeness, here is the error I see with 3.8.1:

This didn't work under 3.6.4 either, although with a different error:

Mike Miller <mtmiller>
Project Administrator
Thu 27 Mar 2014 10:43:12 AM UTC, original submission:

For some reason I wasn't able to change neither loacation nor orientation of legend created for plotyy chart.

Just check out the following piece of code:

sergey plotnikov <nul0m>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #31142:  legendupdate41970.patch added by pantxo (1KiB - application/x-download)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by dac922 (Posted a comment)
  • -unavailable- added by pantxo (Updated the item)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by nul0m (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 09 Apr 2014 04:16:44 AM UTCrik5StatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Tue 08 Apr 2014 08:49:10 PM UTCpantxoAttached File-=>Added legendupdate41970.patch, #31142
    Thu 27 Mar 2014 03:17:10 PM UTCrik5Release3.8.1=>dev
    Thu 27 Mar 2014 01:02:24 PM UTCmtmillerItem GroupSegfault, Bus Error, etc.=>Incorrect Result
      StatusNone=>Confirmed

    Back to the top


    Powered by Savane 3.1-cleanup1