那 些 回 忆 丶 挥 之 不 去 Cnblogs Pandaman Dashboard

如何给 plotyy 绘制的图形设置不同的 y 轴标签

Cell=[5.77  7.69    13.88   10.95   14.33   12.22   14.46   14.05   12.89];

Viability=[89.3 79.3    88.3    89.3    95.1    95.2    95.9    95.5    94.4];

Time=1:1:length(Cell);

[AX,H1,H2] = plotyy(Time,Cell,Time,Viability,'plot');


%图形框设置

grid off

box off
 

%坐标轴设置

set(get(AX(1),'Ylabel'),'String','Cell density/x10^5')

set(get(AX(2),'Ylabel'),'String','Viablity/%')

xlabel('Time/Stage')
 

%线型设置

set(H1,'LineStyle','-','Marker','s','linewidth',2)

set(H2,'LineStyle','-','Marker','s','linewidth',2)
 

%图例标志

legend([H1,H2],'Cell density','Viablity')

 
%坐标轴设置

set(AX(1),'Xlim',[0,10],'Ylim',[0,20])

set(AX(2),'Xlim',[0,10],'Ylim',[0,100])
Cell=[5.77  7.69    13.88   10.95   14.33   12.22   14.46   14.05   12.89];

Viability=[89.3 79.3    88.3    89.3    95.1    95.2    95.9    95.5    94.4];

Time=1:1:length(Cell);

[AX,H1,H2] = plotyy(Time,Cell,Time,Viability,'plot');

 
%图形框设置

grid off

box off

 
%坐标轴设置

set(get(AX(1),'Ylabel'),'String','Cell density/x10^5')

set(get(AX(2),'Ylabel'),'String','Viablity/%')

xlabel('Time/Stage')

 
%线型设置

set(H1,'LineStyle','-','Marker','s','linewidth',2)

set(H2,'LineStyle','-','Marker','s','linewidth',2)

 
%图例标志

legend([H1,H2],'Cell density','Viablity')

 
%坐标轴设置

set(AX(1),'Xlim',[0,10],'Ylim',[0,20])

set(AX(2),'Xlim',[0,10],'Ylim',[0,100])