I want to change the background value of figure to white.
1,053 次查看(过去 30 天)
显示 更早的评论
I've a figure like this (attached) and I want to change the background value of figure to white. The figure was generated by cloudPlot function below. http://www.mathworks.com/matlabcentral/fileexchange/23238-cloudplot
Thank you in advance.
1 个评论
Adam
2016-4-26
Isn't the background already white? I'm not sure I understand what you are asking to do.
采纳的回答
更多回答(1 个)
Kevin Moerman
2016-4-26
编辑:Kevin Moerman
2016-4-26
Perhaps this answers your question. Find where the figure is created in the code and replace by something like:
hf = figure; %Open figure and keep handle
hf=colordef(hf,'white'); %Set color scheme
hf.Color='w'; %Set background color of figure window
If instead of white you want black background and colorscheme, replace by 'black' and 'k', etc.
Kevin
2 个评论
Natasha Kovacevic
2022-6-19
Use gcf to get handle of your current figure, then set figure color to white:
set(gcf,'Color','w');
Adam Danz
2024-11-8,15:46
Note that colordef will be removed very soon.
hf = figure; %Open figure and keep handle
hf=colordef(hf,'white')
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Colormaps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!