필터 지우기
필터 지우기

ineed help with legendinfo in plotyy

조회 수: 1 (최근 30일)
Abdulaziz
Abdulaziz 2013년 9월 24일
Hi all,
Please,I have quesion regarding how to use legendinfo in plotyy. the legend has name that changes every loop (Case_Name{i}). The plotting part of the code, which shows only one of the plotted variables, is as following :
Case_Name={'unducted turbine','ducted turbine','multi-turbine system'};tt=1;
for j=1:n % j refers to every raw of matrix
for i=1:2 % i is matrices indices
figure(tt)
[AX,H1,H2] = plotyy(x_TSR_2{i}(j,:),y_P{i}(j,:),x_TSR{i}(j,:),y_Cp{i}(j,:), @(X,Y) plot(X,Y,plotStyle1{j}), @(X,Y) plot(X,Y,plotStyle2{j}));
set(get(AX(1),'Ylabel'),'String',' Power (W)'); set(get(AX(2),'Ylabel'),'String','Power Coefficient (Cp)'); xlabel('TSR');
set(H1,'MarkerFaceColor','k');
title({[' Generated Power and Power Coefficient vs. TSR '];['at Flow Speed of ',num2str(U{1}(j,1))]});
*legendInfo{i}=([Case_Name{i},': Power',Case_Name{i},': Cp']);set(gcf, 'Color', ones(1, 3));grid on;
hold on
end
legend(legendInfo)
hold off
tt=tt+1;
end*

답변 (0개)

카테고리

Help CenterFile Exchange에서 Two y-axis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by