Have a read at this link.
where the position of the axis can be written.
for eg:
ax2 = axes('Position',ax1_pos,...
'XAxisLocation','bottom',...
'YAxisLocation','right',...
'Color','none');
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!