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.
조회 수: 4 (최근 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:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/555487/image.png)
Line chart I drew:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/555492/image.png)
댓글 수: 0
채택된 답변
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])
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!