Write xtick in two lines and write values of plot in figure
Show older comments
I am unable to remove the overlaping in xticks. For longer xticks, how to write it in two lines. In addition how to write the values of plot in the figure from the data. I searched throughout to failed to find a convincing answerMAPE =[0.612 0.530 0.667 0.581 0.530 0.483
0.560 0.348 0.586 0.505 0.365 0.309
0.501 0.320 0.564 0.507 0.311 0.225
0.505 0.244 0.515 0.519 0.452 0.250
0.508 0.285 0.547 0.415 0.388 0.250
0.495 0.342 0.554 0.506 0.374 0.268
0.477 0.170 0.494 0.510 0.317 0.283
0.495 0.210 0.471 0.417 0.254 0.134
0.462 0.195 0.426 0.492 0.216 0.257
0.506 0.165 0.533 0.481 0.492 0.220]
plot(MAPE(1,:),'linewidth',2);
hold on;
plot(MAPE(5,:),'linewidth',2);
hold on;
plot(MAPE(6,:),'linewidth',2);
hold on;
plot(MAPE(8,:),'linewidth',2);
hold on;
title('MAPE of different models for various parts ');
legend('Face','Back','Ventral','Palm');
xticks([1 2 3 4 5 6]);
xticklabels({'Montague Model','CPE Model','Tregear Level 1','Tregear Level 2','Tregear Level 3','Proposed Model'});
xlabel('Models');
ylabel('MAPE');
legend('boxoff');
Accepted Answer
More Answers (0)
Categories
Find more on Annotations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
