在 while 循环中,我需要绘制两个实体的位置 (x,y)。也就是说,我只需要生成一个包含两个点的图表。我需要将图表缩放到特定的最大 x 值和 y 值。另外一个要求是其中一个点需要有三个同心圆环并且每个环的半径都已知。此外,这一切都需要在循环中发生,因此我希望只有一个绘图窗口打开,而不会出现一堆窗口打开(对应每次循环迭代)。
基本上,这是我正试图实现的伪代码:
基本上,这是我正试图实现的伪代码:
-> Open new plot window, with a given x and y axis
while (running) {
-> Clear the plot, so figure is nice and clean
-> Plot the two points
-> Plot the three circles around point A
}
我在 MATLAB 的文档中找到了几个项目,但似乎没有单个绘图函数可以实现我想要的功能,或者我不小心创建了只有部分数据的多个绘图(即一个绘图具有点,而另一个绘图具有圆圈)。