Remove numbers from axis and use strings instead

조회 수: 7 (최근 30일)
Samuel Garces Utermann
Samuel Garces Utermann 2023년 5월 2일
댓글: Samuel Garces Utermann 2023년 5월 2일
Hi World,
I'm currently doing some plots and diagramms for my thesis. Unfortunately I am not allowed to include some units and dimensions in some of the plots.
I would like to know, how can I remove the numers from the axis and replace them with a series of strings... For example let the x-axis be the time. At t=0 I would like to include t_{start} and at the end of the axis t_{end} instead of the correspondig values.
I hope somebody here can helpme :) Thank you in advance!

채택된 답변

VBBV
VBBV 2023년 5월 2일
t = 0:0.01:10;
a = 1.02;
Y = a*t.^2;
plot(t,Y);
xticks([min(t) max(t)])
xticklabels(string({'t_{start}','t_{end}'}));
  댓글 수: 2
VBBV
VBBV 2023년 5월 2일
you can do something like above
Samuel Garces Utermann
Samuel Garces Utermann 2023년 5월 2일
Perfect it worked. Thank you!!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Axis Labels에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by