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 visualizaciones (últimos 30 días)
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:

Respuesta aceptada

Walter Roberson
Walter Roberson el 19 de Mzo. de 2021
Editada: Walter Roberson el 19 de Mzo. de 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 comentarios

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Language Fundamentals en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by