Hello everyone, I would like to ask a question. The question is as follows: how to draw a five-pointed star and a square on a point.

13 次查看(过去 30 天)
MATLAB code:
x=[25 30 35 40 45 50 55];
y1=[3.48 3.42 3.32 3.28 3.1 2.93 2.88];
y2=[12.5 13.4 14.3 15.2 17.1 17.9 18.5];
hold on;
[AX,H1,H2] =plotyy(x,y1,x,y2,@plot);%
set(get(AX(1),'ylabel'),'string', 'Power consumption(KW)','fontsize',16);
set(get(AX(2),'ylabel'),'string', 'Heating capacity(KW)','fontsize',16);
xlabel('Hot air temperature(℃)','fontsize',16);
%plot(x,y1,'-s');
set(H1,'Linestyle','-s');
%plot2(x,y2,'-p');
set(H2,'Linestyle','-p');
set(gcf,'color','white')
%set(gca,'linewidth',1.5) %
axis([20 60 2.8 3.55])
Line chart in the literature:
Line chart I drew:

采纳的回答

Walter Roberson
Walter Roberson 2021-3-19
编辑:Walter Roberson 2021-3-19
x=[25 30 35 40 45 50 55];
y1=[3.48 3.42 3.32 3.28 3.1 2.93 2.88];
y2=[12.5 13.4 14.3 15.2 17.1 17.9 18.5];
[AX,H1,H2] = plotyy(x,y1,x,y2,@plot);%
set(get(AX(1),'ylabel'),'string', 'Power consumption(KW)','fontsize',16);
set(get(AX(2),'ylabel'),'string', 'Heating capacity(KW)','fontsize',16);
xlabel('Hot air temperature(℃)','fontsize',16);
set(H1, 'Marker', 's', 'Color', 'k', 'LineWidth', 1.5, 'MarkerFaceColor', 'k');
set(H2, 'Marker', 'p', 'Color', 'b', 'LineWidth', 1.5);
set(gcf,'color','white')
axis([20 60 2.8 3.55])
  6 个评论

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Language Fundamentals 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by