在用 imagesc 创建的图上覆盖一个半透明矩形?
Overlaying a semi-transparent rectangle on an plot created with imagesc?
我在 MatLab 中使用 imagesc
绘制声场。我现在想在图像的某个位置覆盖一个半透明的填充矩形。理想情况下,我希望能够执行以下操作:
imagesc(g,g,field);
hold on
plotRectangle([100,100,200,200], 'b', 0.5)
hold off
其中 b 是矩形的颜色 0.5 是透明度。这能做到吗?
我在 MatLab 中使用 imagesc
绘制声场。我现在想在图像的某个位置覆盖一个半透明的填充矩形。理想情况下,我希望能够执行以下操作:
imagesc(g,g,field);
hold on
plotRectangle([100,100,200,200], 'b', 0.5)
hold off
其中 b 是矩形的颜色 0.5 是透明度。这能做到吗?