首页 文章

旋转Matlab茎图

提问于
浏览
0

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

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 回答

  • 2

    您可以使用view实现它:

    stem(1:20,randn(1,20))
    view(90,90)
    

    enter image description here

相关问题