bugGNU Octave - Bugs: bug #46968, bar() : argument problem

 
 

bug #46968: bar() : argument problem

Submitter:  None
Submitted:  Mon 25 Jan 2016 12:24:28 PM UTC
   
 
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Feature Request
Status:  Wont Fix Assigned to:  None
Originator Name:  nicmus Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 4.0.0
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 12 Feb 2016 12:13:38 PM UTC, comment #2: 

The same as in comment #1 for Matlab 2015b.  The documentation might be improved regarding x and y to be vectors of same length, but for "plot" the desired behavior of is explicitly mentioned.

https://www.gnu.org/software/octave/doc/interpreter/Two_002dDimensional-Plots.html

A workaround for you might be:


h1 = bar (1, 2, "r"); hold on; h2 = bar (1, 1);

set (h1, "facecolor", "g")


But for me this behavior is not very desirable.

So closing this item.

Kai Torben Ohlhus <siko1056>
Group Member
Tue 26 Jan 2016 01:04:52 PM UTC, comment #1: 

In matlab, R2013a, if I run

h=bar(1,[2 1])

I get an error:
Error using bar
X must be same length as Y.

John Donoghue <lostbard>
Group Member
Mon 25 Jan 2016 12:24:28 PM UTC, original submission:  

I expect the following command

h=bar(1,[2 1])


to return two handles (one for the bar at [1,2] and one for the bar at [1, 1]). Instead I get invalid number of arguments error.

Compare with

h=plot(1,[2 1])

this works right.

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 siko1056 (Posted a comment)
  • -email is unavailable- added by lostbard (Posted a comment)
  •  

    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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-02-12 siko1056 Item GroupIncorrect Result Feature Request
        StatusNone Wont Fix
        Open/ClosedOpen Closed
        Operating SystemGNU/Linux Any

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code