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.

14 views (last 30 days)
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:

Accepted Answer

Walter Roberson
Walter Roberson on 19 Mar 2021
Edited: Walter Roberson on 19 Mar 2021
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 Comments

Sign in to comment.

More Answers (0)

Categories

Find more on Language Fundamentals in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!