bugGNU Octave - Bugs: bug #38131, implied set() within plot() isn't...

 
 

bug #38131: implied set() within plot() isn't consistent with set()

Submitter:  Ben Abbott <bpabbott>
Submitted:  Mon 21 Jan 2013 01:05:05 PM UTC
   
 
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Feature Request
Status:  Wont Fix Assigned to:  None
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
   

Wed 23 Jan 2013 06:05:17 AM UTC, comment #3: 

Probably right.  Too much work for too little gain; especially when there are easy workarounds. 

Workarounds:

1) Provide the PROP/VALUE settings as pairs in the call to plot instead of in a cell array.

2) Use the return handle from plot and a separate call to set as in.


h = plot (...)
set (h, {PROPS}, {VALUES})


Rik <rik5>
Group administrator
Wed 23 Jan 2013 02:16:42 AM UTC, comment #2: 

Matlab complains as well, and it appears to me that Octave is working as intended.


plot (1:10, 'color', 'r')
plot (rand (10,1), {'color'}, {'r'})
Error using plot
Illegal parameter-value pair
plot (rand (10,2), {'color','color'}, {'r','b'})
Error using plot
Illegal parameter-value pair


I haven't considered what would be involved to make plot and other functions behave in a manner consistent with set.  Maybe the task to more effort that it is worth?

Ben Abbott <bpabbott>
Group Member
Tue 22 Jan 2013 10:01:25 PM UTC, comment #1: 

Two thoughts:

1) The documentation for plot doesn't say that you should be allowed to pass cell arrays of properties and values so Octave is consistent with itself and also with the Matlab documentation.

2) What does Matlab do?  Did they extend their plot() function to accept cell arrays even of only one parameter?

Rik <rik5>
Group administrator
Mon 21 Jan 2013 01:05:05 PM UTC, original submission:  

Given the syntax below


set ([h1, h2], {"UserDtata", "UserData"}, {"foo", "bar"})


Should the following work?


plot (1:10, {"color"}, {[1 0 1]})



Ben Abbott <bpabbott>
Group Member

 

(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 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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-10-17 rik5 StatusNone Wont Fix
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code