how to plot a line graph between a set of values against a single value
1 次查看(过去 30 天)
显示 更早的评论
I have the values of c1 c2 and accuacy . At c1=-5,c2=-7 my model accuracy is 0.81 respectively. The data is given below now my question is how to draw a line graph for this data.
c1 c2 Accuracy
-5 -7 0.81
-7 -4 0.96
-4 3 0.94
-1 6 0.87
5 -3 0.84
3 -1 0.75
9 5 0.82
0 个评论
回答(1 个)
KSSV
2022-7-20
data = [-5 -7 0.81
-7 -4 0.96
-4 3 0.94
-1 6 0.87
5 -3 0.84
3 -1 0.75
9 5 0.82] ;
c1 = data(:,1) ;
c2 = data(:,2) ;
Acc = data(:,3) ;
c1(end+1) = NaN ;
c2(end+1) = NaN;
c = [Acc ;NaN];
figure
patch(c1,c2,c,'EdgeColor','interp','Marker','o','MarkerFaceColor','flat');
colorbar;
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!