Maltab plot坐标轴设置

x=1:8;

subplot(2,2,1)
plot(x)
%tick style 0(auto)


subplot(2,2,2)
plot(x)
set(gca,'xtick',[1 3 6 8]);%style 1
set(gca,'ytick',[]);%style 2

subplot(2,2,3)
plot(x)
set(gca,'xtick',[1 3 6 8]);
set(gca,'xticklabel',sprintf('%03.4f|',get(gca,'xtick')));%style 3
set(gca,'ytick',[2 4 5 7]);
set(gca,'yticklabel',{'Two','Four','Five','Seven'});%style 4

subplot(2,2,4)
plot(x)
set(gca,'xminortick','on');%style 5
set(gca,'ticklength',[0.05 0.025]);%style 6

set(gca,'tickdir','out');%style 7



set(gca,'xtick',1:100,'xticklabel',mod(1:10,10))


clc; close all; clear all;

x=0:5:30;
y1=[50 100 200 400 900 1300 2300];
y2=[40 38 30 36 18 25 22];
[haxes,hline1,hline2]=plotyy(x,y1,x,y2,'bar','plot');
xlabel('Variable radio');
set(gca,'xtick',0:5:30,'xticklabel',{'FR1','VR2','VR5','VR10','VR30','VR50','VR100'});
axes(haxes(1));
ylabel('Time of press-lever ');
axes(haxes(2));
set(gca,'xticklabel','')
ylabel('Total daily dose ');
set(hline2,'linewidth',2,'linestyle',':','marker','*','color','k');


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值