i have a bar graph which calculates precession and recall for three different methods and represents them in three different colors, code i used is as follows
x=[0.4,0.31,0.21]
y=[0.45,0.38,0.27]
bar(x,y,0.1)
h = bar(x,diag(y),0.1,'stacked');
xlabel('precession')
ylabel('recall')
i want to add a legend that should show maroon color is for indiscernible relation
, green is for discernible relation
and blue is for equivalence relation
Try this:
legend('indiscernible relation','cernible relation' ,'equivalence relation')
Colors will be automatically inserted to the legend