Cant make certain changes to plot

2 次查看(过去 30 天)
jrz
jrz 2022-9-14
评论: jrz 2022-9-14
Im trying to change the axis font size, remove the fill of the airfoil shape and increase the linewidth on this plot but for some reason the standrd commmands arent working. Would appreciate some help
figure(1)
hold on
grid on
grid minor
contour(real(z),imag(z),imag(f),[-5:.2:5])
plot(real(z_circle),imag(z_circle),'b')
axis equal
axis([-5 5 -5 5])
hold on
contour(real(J),imag(J),imag(f),[-5:.2:5])
fill(real(z_airfoil),imag(z_airfoil),'w')
axis equal
axis([-5 5 -5 5])
ax.FontSize = 20;
xlabel('Real (x)');
ylabel('Imaginary (y)');
box on
set(gca,'GridLineStyle','-')
set(gca,'MinorGridLineStyle','-')
set(gca,'GridColor','k')
set(gca,'MinorGridColor','k')
  2 个评论
dpb
dpb 2022-9-14
ax.FontSize = 20;
ax is undefined in the above code...there may have been another axes in workspace, but it isn't going to be addressing the one here.
figure(1)
hold on
grid on
grid minor
contour(real(z),imag(z),imag(f),[-5:.2:5])
plot(real(z_circle),imag(z_circle),'b')
hAx=gca; % get current axes
axis equal
axis([-5 5 -5 5])
%hold on % hold is already on...superfluous
contour(real(J),imag(J),imag(f),[-5:.2:5])
fill(real(z_airfoil),imag(z_airfoil),'w')
%axis equal % dito
%axis([-5 5 -5 5])
hAx.FontSize = 20; % use current handle
xlabel('Real (x)');
ylabel('Imaginary (y)');
box on
set(hAx,'GridLineStyle','-','MinorGridLineStyle','-')
set(hAx,'GridColor','k','MinorGridColor','k')
You forgot to attach the needed data so anybody could possibly try to duplicate any issues about the color...

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by