I want to change the background value of figure to white.
1.052 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
YongHyun
il 26 Apr 2016
Commentato: Adam Danz
il 8 Nov 2024 alle 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 Commento
Adam
il 26 Apr 2016
Isn't the background already white? I'm not sure I understand what you are asking to do.
Risposta accettata
Più risposte (1)
Kevin Moerman
il 26 Apr 2016
Modificato: Kevin Moerman
il 26 Apr 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 Commenti
Natasha Kovacevic
il 19 Giu 2022
Use gcf to get handle of your current figure, then set figure color to white:
set(gcf,'Color','w');
Adam Danz
il 8 Nov 2024 alle 15:46
Note that colordef will be removed very soon.
hf = figure; %Open figure and keep handle
hf=colordef(hf,'white')
Vedere anche
Categorie
Scopri di più su Colormaps in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!