Plot Overlay MATLAB

前端 未结 2 1051
一整个雨季
一整个雨季 2020-12-14 10:16

How do you take one plot and place it in the corner (or anywhere for that matter) of another plot in MATLAB?

I have logarithmic data that has a large white space i

2条回答
  •  青春惊慌失措
    2020-12-14 10:48

    An example:

    x = 1:20;
    y = randn(size(x));
    
    plot(x, y,'LineWidth',2)
    xlabel('x'), ylabel('y'), title('Plot Title')
    
    h = axes('Position', [.15 .65 .2 .2], 'Layer','top');
    bar(x,y), title('Bar Title')
    axis(h, 'off', 'tight')
    

    screenshot

提交回复
热议问题