how to plot a line graph between a set of values against a single value
조회 수: 4 (최근 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!