Menu

#114 bug in __bar.m

open
nobody
None
5
2007-06-18
2007-06-18
Shai Ayal
No

The following produces unexpected results in octplot 0.4.0:

xx = 1:20;

bar(xx/100,xx);

Discussion

  • Nobody/Anonymous

    Logged In: NO

    When the elements in xx are not integer, the x-axis label is seemed to be incorrect.
    The same problem occurs in the statement below:

    bar([0.1 0.2],[10 20]);

     
  • Michael

    Michael - 2007-09-24

    Logged In: YES
    user_id=1199546
    Originator: NO

    In my opinion, this bug is sovled...

    Michael

     
  • Michael

    Michael - 2007-09-25

    Logged In: YES
    user_id=1199546
    Originator: NO

    sorry, if I test your example "bar([0.1 0.2],[10 20])"
    I will get a correct graphics...

    two bars, the first one with a width of 0.08 (this will be scaled... do you think this is wrong?)
    OK, another example. bar([1 2],[10 20]) will produce a bar graphics with two bars with the width of 0.8 each.
    Means, the first one is from 0.6 till 1.4 and the second one is from 1.6 till 2.4 (this is matlab behaviour!)
    Now in your example, a width of 0.8 doesn't make a lot of sense .. so this will be scaled by the factor of 10!
    means the first bar is from 0.06 till 0.14 and the second one from 1.6 till 2.4!
    this happens with the newest svn version. And I didn't change something since about 2 month, so it should work
    with your version...

    if you want a width of 0.8, you have to enter bar([0.1 0.2],[10,20],0.8) :-( ok, it doesn't work, but is not the problem of your example...

    Michael

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.