How can I prevent or remove the asterisk annotations on my BAR plot in MATLAB 7.6 (R2008a)?

3 views (last 30 days)
I am creating a bar plot using the BAR function in MATLAB 7.6 (R2008a). If my bin sizes are unequal, BAR marks them with asterisks on the plot.
figure;
a=(rand(1,1000)*10);
hst=1:10;
hist(10.^a,10.^hst)
I would like to turn off or remove this annotation.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
The ability to prevent the asterisks from being displayed on unequal bins in plots created with BAR (or HIST and other functions that call BAR) is not available in MATLAB 7.6 (R2008a).
It is possible to remove the asterisks after the plot is created by either of the following methods.
Edit the plot manually:
1) Once your plot is created, select "Tools > Edit Plot" or click the "Edit Plot" button on the toolbar (a white pointer icon).
2) Then, select any one of the asterisks (try to click on the upper edge of an asterisk to avoid selecting the axes instead). The asterisks are markers of a line object, so all the asterisks are selected when you click on only one of them.
3) Hit the ‘delete’ button to delete the asterisks.
Edit the plot programmatically:
After creating the plot, get a handle to the line of asterisks and turn off the markers with the following code:
h = findobj(gca,'Type','line');
set(h,'Marker','none');
For more information on the FINDOBJ function or Line object properties, consult the documentation by executing the following at the MATLAB command prompt:
doc findobj
doc axes_props

More Answers (0)

Categories

Find more on Graphics Object Identification in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!