Offseting the y axis to make data more clear
12 ビュー (過去 30 日間)
古いコメントを表示
I need to offset a Y axis so that my data is more clear. Below is an example of what I'm dealing with.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/163241/image.png)
As you can see the black airfoil coordinates plot is vary distracting from the -Cp plot. How can I shift the right y axis down with out having to subtract my y/c coordinates by some constant, because I still need the trailing edge of the airfoil to be at (1,0).
%if true
figure
hold on;
yyaxis right;
plot(xc,yc,'black','LineWidth',2)
ylim([-.5,1.5]);
ylabel('y/c');
xlabel('x/c');
yyaxis left;
for k=1:21
plot(xa,-cp(1,:),'r')
plot(xa,-cp(6,:),'g')
plot(xa,-cp(11,:),'b')
plot(xa,-cp(16,:),'c')
plot(xa,-cp(21,:),'m')
end
ylim([-2,9]);
ylabel('-Cp');
legend('-5^o','0^o','5^o','10^o','15^o')
hold off;
end
my current code is above for my plots. thanks.
0 件のコメント
回答 (1 件)
Andrew Newell
2017 年 4 月 24 日
After
yyaxis right;
use a command like
ylim([-0.1 1.5])
to move the axes.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Guidance, Navigation, and Control (GNC) についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!