Just continue with same question
The code I develop .. can I add one more sub text so as to differentiate the cases ...For eg :- after 7378 there should be one more text for [ 55 55] duration is there any possibility to add second text in the plot ....Thank you in advance
A=xlsread('Compare_All_cases','B9:AB9');
x1=ones(1,3);
y1=A(:,(1:3))
scatter(x1,y1,'filled','r')
xticks([1])
xticklabels({'2 kW'})
text(x1(1),y1(1),sprintf('(%.0f)',y1(1)))
text(x1(2),y1(2),sprintf('(%.0f)',y1(2)))
text(x1(3),y1(3),sprintf('(%.0f)',y1(3)))
hold on
x2=ones(1,3);
y2=A(:,(4:6))
scatter(x2,y2,'filled','b')
xticks([1])
xticklabels({'2 kW'})
text(x2(1),y2(1),sprintf('(%.0f)',y2(1)))
text(x2(2),y2(2),sprintf('(%.0f)',y2(2)))
text(x2(3),y2(3),sprintf('(%.0f)',y2(3)))

 채택된 답변

KSSV
KSSV 2022년 2월 9일

1 개 추천

댓글 수: 4

Prasad Joshi
Prasad Joshi 2022년 2월 9일
편집: Prasad Joshi 2022년 2월 9일
Sir I think this will not work as there are 2 values of X i.e 2kw and 55 percent is there any alternative of plotting Scatter plot with string values on x and plotting values of Y
KSSV
KSSV 2022년 2월 9일
Show us your plot along with data.
xticks([2 3 5])
xticklabels({'2KW&55', '3KW&35', '5KW&25'});
Prasad Joshi
Prasad Joshi 2022년 2월 9일
Thank you KSSV and Walter sir for you help

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

추가 답변 (0개)

카테고리

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

질문:

2022년 2월 9일

편집:

2022년 2월 9일

Community Treasure Hunt

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

Start Hunting!

Translated by