旋转Matlab茎图

时间:2013-11-27 14:09:09

标签: matlab plot matlab-figure

感谢我在这个帖子上收到的帮助:

How to plot asymnmetric errors with errorbar

我接近实现我想要的东西,第三张图表的剩余部分显示为一系列离散点,仅作为线条绘制,如此处所示的第15/16页所示图表的第三列:

comisef.eu/files/wps031.pdf

茎似乎做了我想要的但是我不知道热转动轴? 或者也许有其他方法可以做到这一点?

   x = 1985:.5:2001; % x data
   grad_ = rand(1,length(x))*.3; % graduated stuff
   grad_2 = rand(1,length(x))*.3;
   grad_3= rand(1,length(x))*.3;
   h = subplot(1,3,1);
   %plot(grad_,x); % flip x and y for vertical plot
   herrorbar(grad_,x,grad_2,grad_3,'.');
   axis(h, [0 0.6 1985 2001])
   set(h, 'Ytick', x(1):x(end), 'Xtick', 0:.15:.6, 'YDir','reverse', 'YGrid', 'on');
   xlabel('Gradient Search')

   diff_ = rand(1,length(x)).^2 *.15; % differential stuff
   h = subplot(1,3,2);
   plot(diff_,x);
   set(h,'yticklabel',[], 'Ytick', x(1):x(end), 'Xtick', 0:.15:.6, 'YDir','reverse', 'YGrid', 'on');
   axis(h, [0 0.6 1985 2001])
   xlabel('Differential Evolution')

   delta_ = rand(1,length(x)).^2 *.2 - .2; % delta stuff
   h = subplot(1,3,3);
   %plot(delta_,x);
   stem(x,delta_);
   view(90,90);
   set(h,'yticklabel',[], 'Ytick', [], 'Xtick', -.15:.15:.15, 'YDir','reverse', 'XGrid', 'on');
   axis(h, [-.15 .15 1985 2001])
   xlabel('\Delta of medians')

1 个答案:

答案 0 :(得分:2)

您可以使用view

来实现
stem(1:20,randn(1,20))
view(90,90)

enter image description here