But today I want to share a nice trick with you that I have just found out: How to delete legend entries in a Matlab plot.
Why would anyone want to do that? An example is the errorbarbar script. It adds errorbars to your bar plot. A pretty useful thing! What is not so useful is the fact that the errorbars themselves appear in the legend. See for yourself:
>> values=10*rand(5, 3);
>> errors=rand(5,3);
>> errorbarbar(values, errors);
The resulting image, after a legend has been inserted using Insert -> Legend:

The data4, ..., data 5 entries are both useless and annoying.
Here's the solution. In the figure window, click Edit -> Properties. Then, select an error bar and enter
>> hasbehavior(gco, 'legend', false);
Do this for each bar in the first group. Then delete the old legend and insert a new one using Insert -> Legend. VoilĂ :

Looks much better, doesn't it?