【问题标题】:Add data to specific subplot将数据添加到特定的子图
【发布时间】:2018-12-29 20:56:56
【问题描述】:

假设我有 2 个数字,每个数字都有 3x3 子图矩阵。

代码如下:

figure(1)
subplot(3,3,1)
plot(...)
subplot(3,3,2)
plot(...)
subplot(3,3,3)
plot(...)
subplot(3,3,4)
plot(...)
and so on

一些计算

figure(2)
subplot(3,3,1)
plot(...)
subplot(3,3,2)
plot(...)
subplot(3,3,3)
plot(...)
subplot(3,3,4)
plot(...)
and so on

这里我有更多的计算。

现在,我想在图(2) 的 subplot(3,3,4) 中插入我最后计算的 (x,y)。

我想一个解决方案是在所有计算之后绘制图表,但如果我不想更改顺序,我该怎么做?

谢谢。

【问题讨论】:

    标签: matlab plot figure subplot


    【解决方案1】:

    您可以按任意顺序调用subplot 命令。在代码中的任何位置,如果您只想在figure(n)m-th 块上绘制一些东西,只需执行以下操作:

    figure(n);
    subplot(3,3,m);
    plot(...)
    

    其他街区的所有现有地块将保持不变。

    【讨论】:

      猜你喜欢
      • 2016-11-29
      • 1970-01-01
      • 2018-02-08
      • 2016-12-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-07-19
      相关资源
      最近更新 更多