I want to change the background value of figure to white.

1.052 visualizaciones (últimos 30 días)
YongHyun
YongHyun el 26 de Abr. de 2016
Comentada: Adam Danz el 8 de Nov. de 2024 a las 15:46
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 comentario
Adam
Adam el 26 de Abr. de 2016
Isn't the background already white? I'm not sure I understand what you are asking to do.

Iniciar sesión para comentar.

Respuesta aceptada

Adam Danz
Adam Danz el 4 de Oct. de 2024
Editada: Adam Danz el 4 de Oct. de 2024
Set the figure's color using the figure's Color property.
set(gcf,'Color','white')
Or set the color upon creation of the figure,
figure('color','white')

Más respuestas (1)

Kevin Moerman
Kevin Moerman el 26 de Abr. de 2016
Editada: Kevin Moerman el 26 de Abr. de 2016
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 comentarios
Natasha Kovacevic
Natasha Kovacevic el 19 de Jun. de 2022
Use gcf to get handle of your current figure, then set figure color to white:
set(gcf,'Color','w');
Adam Danz
Adam Danz el 8 de Nov. de 2024 a las 15:46
Note that colordef will be removed very soon.
hf = figure; %Open figure and keep handle
hf=colordef(hf,'white')
Warning: colordef will be removed in a future release.
hf =
Figure (1) with properties: Number: 1 Name: '' Color: [0.9400 0.9400 0.9400] Position: [1628 1512 583 437] Units: 'pixels' Use GET to show all properties

Iniciar sesión para comentar.

Categorías

Más información sobre Colormaps en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by