How to change the degree range on a plot?
이전 댓글 표시
How to change from -10 degrees to 10 degrees on the x-axis?
%% Sensitive parameter P5
figure('Name','Zmiana wartości kąta położenia warstw forniru między sobą w osi podłużnej')
plot(1,1)
plot(L_18(:,1),L_18(:,2),L_18(:,1),L_18(:,3),L_18(:,1),L_18(:,4),...
L_18(:,1),L_18(:,5),L_18(:,1),L_18(:,6),L_18(:,1),L_18(:,7),...
L_18(:,1),L_18(:,8), L_18(:,1),L_18(:,9),L_18(:,1),L_18(:,10),...
L_18(:,1),L_18(:,11),L_18(:,1),L_18(:,12),L_18(:,1),L_18(:,13),...
L_18(:,1),L_18(:,14), L_18(:,1),L_18(:,15),L_18(:,1),L_18(:,16),...
L_18(:,1),L_18(:,17),L_18(:,1),L_18(:,18),'LineWidth',1.5),
set (gcf,'position',[200,200,170,170]) % X pos, Y pos, X size, Y size
set (gca, 'FontSize',9,'fontname','Times New Roman','ytick',-0.05:0.05:0.2) %Size font axis
grid on,
ytickformat('%g%%')
% degree symbol in x-axis - START
xt=get(gca,'xtick');
for k=1:numel(xt);
xt1{k}=sprintf('%d°',xt(k));
end
set(gca,'xticklabel',xt1);
% degree symbol in x-axis - END
set(gca,'colororder',parula(16)) % to avoid color repetition in plotting lines
ylim([0 0.2])
yticks(0:0.2:0.2)
xticks(-10:10:10)
xlim([-10 10]) % How to change from -10 degrees to 10 degrees on a x-axis?
title('SK_5','FontSize',10,'fontname','Times New Roman')

채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Annotations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!