Bar plot... problem with * marks

I have a problem with bar ploting. This is the code and picture is in attachment
figure
c=histc(sondaza(:,i),e);
h=bar(e,c, 'histc');
set(h,'FaceColor','b'); hold on;
How remove blue *??

 Accepted Answer

The stars are an odd peculiarity of the 'histc' option... I'm not sure what the original programmer's motivation was, but if your bin widths are not even, markers are placed along the x-axis at each bin edge. The handle to this line object isn't returned, so you'll have to handle-dive to get rid of them:
delete(findobj('marker', '*'));
I'd be curious to know where this convention came from... I use the 'histc' option with bar all the time, but it is an undocumented legacy option (and is implemented via barV6.m, which "is undocumented and may change in a future release"), so I too discovered the * behavior accidentally.

More Answers (0)

Categories

Find more on Graphics Objects in Help Center and File Exchange

Tags

Asked:

on 25 Apr 2014

Commented:

on 25 Apr 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!