无论怎样,当我使用策略时,我可以选择性地放大这两个数据集吗?
换句话说,我想重新缩放和定位数据后,绘图,似乎无法做到这一点,到目前为止。我遇到了以下情况,但我不确定如何将其转换为使用plotyy进行自动绘图的函数:
MATLAB - Pan a plot independently of other plots in the same axes
发布于 2014-03-21 16:45:34
是啊,诡异就像那样。不过,您可以尝试的一件事是提取这两行,然后手动应用重新标度,例如:
plotyy(x1,y1,x2,y2);
lines=findobj(gca,'type','line'); % this results in a size=2 array
Y=get(lines(1),'ydata');
set(lines(1),'ydata',Y*2);
% this multiplies the lines(1), which is usually the (x2,y2) line, by two我自己也没试过,所以如果你在右边画另一个绿色的轴,也许你也会在你的行数组中找到这个。玩一玩,希望这会有帮助。
https://stackoverflow.com/questions/18785814
复制相似问题