clc;clear all;
x=[];%横坐标
y1=[];%纵坐标1温度
y2=[];%纵坐标2压力
hold on;
[ax,h1,h2]=plotyy(x,y1,x,y2);
set(get(ax(1),'Ylabel'),'string','Temperature, \circC');
set(get(ax(2),'Ylabel'),'string','Pressure, GPa');
xlabel('feed ,\mum');
hold off;
希望能帮到你。
用plotyy命令就可以实现
例如
>> x=1:0.01:10;
>> y1=sin(x);
>> y2=x.^2+cos(x);
>> plotyy(x,y1,x,y2)
close all
clear all
clc
x=[5 10 15 20 25 30 35];
y1=[3.5 4.3 6 9.8 10 11.8 12.1];
[AX,h1,h2]=plotyy(x,y1,x,y1,'plot')
xlabel('Feed,um')
set(gca,'YTicklabel',[0,200,400,600,800,1000,1200,1400])
set(get(AX(1),'Ylabel'),'String','Temperature C')
set(get(AX(2),'Ylabel'),'String','Pressure GPa')
h = legend('Temperature');
set(h1,'LineStyle','o')
本视频展示如何用matlab绘制散圆状态图,可用于相关科研数据绘图!