我正在尝试保存包含白色文本的图形。我通过以下代码更改了文本颜色:
txt = text(x + window_breadth,y - 2,personID);
set(txt, 'Color','w','FontSize',font_size);
当我在MATLAB中显示图形时,文本颜色会变为白色。但是,当我尝试将其保存在目录中时,如下所示:
fullFileName = sprintf('/Video 1/Before&After_frame_%d.png', curr_frame);
saveas(beforeANDafter_figure, fullFileName);
文字颜色变回黑色。有人知道为什么会这样吗?