How to rotate XtickLabels and make them vertical.
이전 댓글 표시
f = fopen('1IV7_1M.txt','r');
x = fscanf(f , '%d %d %f' , [3 inf]);
x = x';
g = fopen('1FA3_6_1M.txt','r');
y = fscanf(g, '%d %d %f %f',[4 inf]);
y = y';
h = fopen('1FA3_12_1M.txt','r');
z = fscanf(h, '%d %d %f %f', [4 inf]);
z = z';
F = [x(:,3), y(:,3), z(:,3)];
Fmean = mean(F,2);
Fsd = std(F,0,2);
Ferr = Fsd/sqrt(3);
errorbar(Fmean, Ferr, 'bx');
xlabel ('H-bonded amide residue pairs ');
ylabel ('F (pN)');
label = cellstr(num2str(x(:,1:2)));
title('Average force on backbone atoms due to all atoms of its parntering H-bond residue ');
set(gca,'XTickLabel',label);
set(gca,'XTick',1:length(label))
채택된 답변
추가 답변 (3개)
Mariana Frid Dalarsson
2018년 10월 16일
1 개 추천
Try this: xtickangle(45)
댓글 수: 1
Walter Roberson
2018년 10월 19일
This will work from R2016b onwards, but would not have worked for Ahmed Lachhab's R2013a version.
Laura
2015년 12월 29일
0 개 추천
This File Exchange submission may be of help: http://www.mathworks.com/matlabcentral/fileexchange/3486-xticklabel-rotate
Ahmed Lachhab
2018년 8월 18일
0 개 추천
my x axis labels are long (dates), I have a 2013a version, how can I tilt them by 45 deg. thank you
댓글 수: 1
Walter Roberson
2018년 8월 22일
The File Exchange Contribution linked to above should work for you.
카테고리
도움말 센터 및 File Exchange에서 Surfaces, Volumes, and Polygons에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!