【问题标题】:Modifying subplot axes in matlab在matlab中修改子图轴
【发布时间】:2012-05-01 02:34:24
【问题描述】:

我正在绘制 2 个子图,并且我希望每个子图具有不同的轴缩放比例。

我当前的代码是:

subplot(2,1,1)
axis([0 20 0 1])
plot(t,Ca,'-.',t,Cb,'.',t,Cc);

subplot(2,1,2)
axis([0 5 0 1]);
plot(t2,Ca2,'-.',t2,Cb2,'.',t2,Cc2);

但是两个子图都像没有指定轴一样绘制。 有什么想法吗?

【问题讨论】:

    标签: matlab matlab-figure


    【解决方案1】:

    试试:

    subplot(2,1,1)
    plot(t,Ca,'-.',t,Cb,'.',t,Cc);
    axis([0 20 0 1])
    
    subplot(2,1,2)
    plot(t2,Ca2,'-.',t2,Cb2,'.',t2,Cc2);
    axis([0 5 0 1]);
    

    plot 将重新定义坐标轴,因此您必须在最后一个绘图之后调用轴。

    【讨论】:

      猜你喜欢
      • 2016-09-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-09-24
      相关资源
      最近更新 更多