Sie können den text Befehl, um die Saiten auf der x-Achse erhalten
stem(rand(4,1));
set(gca, 'XTick', [1:4], 'XTickLabel', cell(10,1), 'YLim', [0 1]);
text(1, -.05, {'above string 1', 'above string 1', 'string 1'}, 'FontSize', 10, 'HorizontalAlignment', 'Center');
text(2, -.05, {'above string 2', 'above string 2', 'string 2'}, 'FontSize', 10, 'HorizontalAlignment', 'Center');
text(3, -.05, {'above string 3', 'above string 3', 'string 3'}, 'FontSize', 10, 'HorizontalAlignment', 'Center');
text(4, -.05, {'above string 4', 'above string 4', 'string 4'}, 'FontSize', 10, 'HorizontalAlignment', 'Center');
Um Grundstück von der y stammt Achse Sie den Plotrahmens mit view Befehlen wie diesen drehen könnte:
% plot some data
stem([1:3], 'LineWidth', 2);
% set the x axis which will be the y axis after the rotation
set(gca, 'XLim', [1 3], 'XTick', [1:3], 'XTickLabel', cell(3,1));
text(1.1, -.25, {'another y string 1', 'above y string 1', 'y string 1'}, 'FontSize', 10, 'HorizontalAlignment', 'Center');
text(2, -.25, {'another y string 2', 'above y string 2', 'y string 2'}, 'FontSize', 10, 'HorizontalAlignment', 'Center');
text(3, -.25, {'another y string 3', 'above y string 3', 'y string 3'}, 'FontSize', 10, 'HorizontalAlignment', 'Center');
% set the y axis which will be the x axis after the rotation
set(gca, 'YLim', [0 3], 'YTick', [1:4], 'YTickLabel', cell(10,1));
text(0.9, 0, {'above string 1', 'above string 1', 'string 1'}, 'FontSize', 10, 'HorizontalAlignment', 'Center');
text(0.9, 1, {'above string 2', 'above string 2', 'string 2'}, 'FontSize', 10, 'HorizontalAlignment', 'Center');
text(0.9, 2, {'above string 3', 'above string 3', 'string 3'}, 'FontSize', 10, 'HorizontalAlignment', 'Center');
text(0.9, 3, {'above string 4', 'above string 4', 'string 4'}, 'FontSize', 10, 'HorizontalAlignment', 'Center');
% rotate the view
view(90,-90)