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
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');