bugGNU Octave - Bugs: bug #34342, legend's interpreter property...

 
 

bug #34342: legend's interpreter property doesn't function

Submitter:  Ben Abbott <bpabbott>
Submitted:  Tue 20 Sep 2011 12:28:12 PM UTC
   
 
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  bpabbott
Originator Name:  Ben Abbott Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sat 08 Jun 2013 03:24:05 PM UTC, comment #9: 

I just got back to this, and noticed the warming has already been added.

I'm closing this report.

Ben Abbott <bpabbott>
Group Member
Thu 01 Dec 2011 12:34:12 AM UTC, comment #8: 

You're totally correct.  I wasn't thinking beyond the fact that you can add property/value pairs to most plot functions.  I suppose it would be nice to have a warning if it is easy to code.

Rik <rik5>
Group administrator
Wed 30 Nov 2011 11:43:40 PM UTC, comment #7: 

I see a problem with using syntax such as below.


h = legend ("Hello_World", "interpreter", "none")


Essentially this is the same as


h = legend ("label 1", "label 2", "label 3")


Which will create a legend with labels for the first three objects of the current axes.

Matlab responds as below.


legend ('Hello_World', 'interpreter', 'none')
Warning: Ignoring extra legend entries.


Is it sufficient to add the same warning to Octave?

Ben Abbott <bpabbott>
Group Member
Wed 30 Nov 2011 10:31:46 PM UTC, comment #6: 

ok.  I see the same result as you do with the legend statement you used.

However, if the set (h, "interpreter", "none") is used then the result is ok.

I'll have to dig deeper to see where the problem is.


Ben Abbott <bpabbott>
Group Member
Wed 30 Nov 2011 10:11:16 PM UTC, comment #5: 

It still doesn't work for me.  The 'W' character is subscripted after the call to legend and the subsequent set() call doesn't change that.  I also tried combining everything into one call


h = legend ("Hello_World", "interpreter", "none")


but that also didn't work.  For reference, I'm running gnuplot 4.4.0 on an extremely recent tip (13966:62a18e06cfc5).

Rik <rik5>
Group administrator
Wed 30 Nov 2011 08:47:02 PM UTC, comment #4: 

I've attached a rebased changeset for the default branch.

This one works for me. The test I ran is below.


close all
graphics_toolkit gnuplot
plot (1:10)
h = legend ("Hello_World");
set (h, "interpreter", "none")



(file #24510)

Ben Abbott <bpabbott>
Group Member
Wed 30 Nov 2011 07:23:01 PM UTC, comment #3: 

Ben, this looks related to newly filed bug #34938.

Did you ever get this patch to work?  I just tried the second version but I still get subscripts on gnuplot when the interpreter is set to none.

Rik <rik5>
Group administrator
Tue 20 Sep 2011 03:30:17 PM UTC, comment #2: 

Found a few problems. A second version is attached.

(file #24000)

Ben Abbott <bpabbott>
Group Member
Tue 20 Sep 2011 03:11:26 PM UTC, comment #1: 

I've attached a changeset for the stable branch.

Are there any objections to escaping "_" and "^" when the interpreter is "none"?

(file #23999)

Ben Abbott <bpabbott>
Group Member
Tue 20 Sep 2011 12:28:12 PM UTC, original submission:  

I get the same error for both the gnuplot and fltk backends.


plot(1:10)
h = legend ("hello_world")
set (h, "interpreter", "none")
error: updatelegendtext: subscript indices must be either positive integers or logicals
error: called from:
error:   /Users/bpabbott/Development/mercurial/default/scripts/plot/legend.m at line 816, column 11


Ben Abbott <bpabbott>
Group Member

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #24510:  changeset.patch added by bpabbott (3KiB - application/octet-stream - rebased for default branch (30.11.2011))
file #24000:  changeset.patch added by bpabbott (3KiB - application/octet-stream - second attempt)
file #23999:  changeset.patch added by bpabbott (3KiB - application/octet-stream - first attempt)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by burkart
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by bpabbott (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 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-06-08 bpabbott Open/ClosedOpen Closed
    2013-06-06 bpabbott StatusReady For Test Fixed
    2012-03-20 burkart Carbon-Copy- Added burkart
    2011-11-30 bpabbott Attached File- Added changeset.patch, #24510
    2011-09-20 bpabbott Attached File- Added changeset.patch, #24000
    2011-09-20 bpabbott Attached File- Added changeset.patch, #23999
        StatusNone Ready For Test
        Assigned toNone bpabbott

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code