How to label graph curves?
11 次查看(过去 30 天)
显示 更早的评论
Hello,
I have attached a figure in which Rpp is plotted at different angles and I want to label each graph with incident angle. say graph first is angle 10 degree etc. How can I add labeling here? The code of figure is copied here.
figure(4),
subplot(1,5,1);
plot(Out(:,1),time);
xlabel('Rpp')
ylabel('Time (ms)')
set(gca, 'ydir', 'reverse');
subplot(1,5,2);
plot(Out(:,10),time);
set(gca, 'ydir', 'reverse');
subplot(1,5,3);
plot(Out(:,20),time);
set(gca, 'ydir', 'reverse');
subplot(1,5,4);
plot(Out(:,30),time);
set(gca, 'ydir', 'reverse');
subplot(1,5,5);
plot(Out(:,40),time);
set(gca, 'ydir', 'reverse');
0 个评论
采纳的回答
Reshma Nerella
2021-2-18
Hi,
From my understanding, you have multiple subplots and what to label each of them with the incident angle.
After creating subplot, you can add xlabel, ylabel, title for that specific plot and you can do this for all the subplots.
In your case,
You can add title to the each subplot with the incident angle after you create it.
For instance,
subplot(1,5,2);
plot(Out(:,10),time);
set(gca, 'ydir', 'reverse');
title('10 degree incident angle');
subplot(1,5,3);
plot(Out(:,20),time);
set(gca, 'ydir', 'reverse');
title('20 degree incident angle');
Hope this helps!
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!