以下代码生成显示的图像:
probabilities = datasetlist(1,:);
avgscores = datasetlist(2,:);
x = probabilities;
y = probabilities;
err = avgscores;
hold on
for k = 1:length(x)
e1 = errorbar(x(k),y(k),err(k),'-');
if err(k) == min(err)
set(e1,'Color','r')
set(e1,'MarkerEdgeColor','r')
set(e1,'Marker','*')
else
set(e1,'Color','k')
set(e1,'MarkerEdgeColor','k')
set(e1,'Marker','.')
end
end
hold on
e1.LineStyle = '-';
但是,应该有一条线连接数据点。我什至设置了e1.LineStyle
,但这没有用。我怎样才能生产那条线?