How to remove units from a plot?
이전 댓글 표시
Hello! How can I remove the unit "seconds" for the x label? I need to use the unit in another language. I searched everywhere and I coul not find a helpfull answer. Thank you!

댓글 수: 5
Kevin Chng
2020년 10월 16일
possible share your code, so we could help you better
Walter Roberson
2020년 10월 16일
At the moment I suspect it would be a matter of changing the axes xlabel()
André Galera
2020년 10월 16일
편집: André Galera
2020년 10월 16일
Rasmus
2023년 1월 31일
I would still like to know how i get rid of the units...? Its very annoying that they cannot be removed.
num = [37.5 13875 1125000]; den = [2.45 38.125 6205 1125000];
G = tf(num,den);
t = 1:0.01:5;
sq_wave = 0.01*square(2*pi*0.3.*t,50);
%% plot the response
fig = figure();
lsim(G,sq_wave,t);
L = findall(fig, 'String', 'Time (seconds)');
L.String = 'Time';
This was a weird one. It turns out that the labels that are visible are in a separate axes that is marked Visible off and HandleVisibility off. I have no idea why they would bother to do that.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Annotations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
