我有一个条形图,可以计算三种不同方法的进动和召回,并以三种不同的颜色表示它们,我使用的代码如下
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')
我想添加一个应显示maroon color is for indiscernible relation
,green is for discernible relation
和blue is for equivalence relation
答案 0 :(得分:2)
试试这个:
$scope.isInvoiceAmountInvalid = function(){
var error = $scope.invoiceForm.invoiceAmount.$error;
var required = error.hasOwnProperty("required") && error.required;
var pattern = error.hasOwnProperty("pattern") && error.pattern;
console.log("Inside isInvoiceAmountInvalid", error, required, pattern);
return (required || pattern);
};
$scope.isVatAmountInvalid = function(){
var error = $scope.invoiceForm.vatAmount.$error;
var required = error.hasOwnProperty("required") && error.required;
var pattern = error.hasOwnProperty("pattern") && error.pattern;
console.log("Inside isVatAmountInvalid", error, required, pattern);
return (required || pattern);
};
颜色将自动插入图例