how can I plot numbers and string in x axis

the reason I want to plot this is I want it to show me the numbers that are the furtherst from zero and closer to -1 or 1 and I want to plot the string in x axis
X= 0.3421
-0.3579
-0.0095
0.3425
0.3246
-0.0042
0.3427
-0.0354
-0.3672
-0.3734
-0.2771
0.2493
0.0129
S= {'A…'} {'B…'} {'C…'} {'D…'} {'E…'} {'F…'}....

댓글 수: 5

Perhaps use those values as xticks, and use S as the xticklabels ?
will99
will99 2019년 4월 14일
my graph is showing me that -0.0042 is further from zero than 0.2493 I thought it was the oppsite thank you now I can explain my graph better
will99
will99 2019년 4월 14일
it just my graph doesn't show which variable is assosicate to which data point ?
madhan ravi
madhan ravi 2019년 4월 14일
편집: madhan ravi 2019년 4월 14일
Could you show how your final plot should look like?
text(X, zeros(size(X)), S)

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

답변 (0개)

카테고리

도움말 센터File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

제품

릴리스

R2019a

태그

질문:

2019년 4월 14일

댓글:

2019년 4월 14일

Community Treasure Hunt

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

Start Hunting!

Translated by