在此处,画长方形宽和高之比为0.75:1.

代码为:

frontx=0:0.01:1 ;
 fronty=1-frontx.^0.5 ;
 
q=8;
w=9;
 plot(frontx,fronty,'b','Linewidth',2,'Markersize',4) ;
hold on
A=importdata('E:\文章\1.dat');
A1=A(:,1);
A2=A(:,2);
plot(A1,A2,'or','Markersize',4)  %画个体

xlabel('f1','FontSize',q),ylabel('f2','FontSize',q),title('t=5','FontSize',w);
axis([0 1.0 0 1.0]);

 set(gca,'XTick',0:0.25:1,'FontSize',q);
 set(gca,'YTick',0:0.25:1);
set(gca,'FontSize',q);
此时画出图为宽和高之比为1:1.如图所示:

一个简单的用matlab画散点图长方形的步骤

只需要在画出的图像上面手动把右边线条拉到0.75处,就可以画出宽和高之比为0.75:1的图形。

图像为:

一个简单的用matlab画散点图长方形的步骤

相关文章:

  • 2021-12-18
  • 2022-01-11
  • 2021-09-29
  • 2021-12-14
  • 2021-12-02
  • 2021-06-09
  • 2022-02-10
  • 2021-12-17
猜你喜欢
  • 2021-04-12
  • 2021-10-01
  • 2022-12-23
  • 2021-06-04
  • 2021-12-29
  • 2021-04-30
  • 2022-01-08
相关资源
相似解决方案