필터 지우기
필터 지우기

whitebg limitations on color

조회 수: 7 (최근 30일)
Hong Gu Kang
Hong Gu Kang 2016년 9월 10일
답변: Jordan Ross 2016년 9월 19일
I accidently changed my figure option of MATLAB R2016a. whitebg made my figure background turn into gray
To make it default, i commanded 'whitebg('w')', but it does not change into complete white,In another way,
white must be [1 1 1] in color map, and i commanded 'whitebg([1 1 1])', and checked it through 'gcf' command, it showed that color is [0.855387679992951 0.855387679992951 0.855387679992951].
Why does it have limitation? why cannot have complete white?

채택된 답변

Jordan Ross
Jordan Ross 2016년 9월 19일
Hello Hong,
The function 'whitebg' will change the background color of the axes, not the figure. See the documentation for 'whitebg': http://www.mathworks.com/help/releases/R2016a/matlab/ref/whitebg.html?searchHighlight=whitebg
To change the background color for the figure (i.e. the window) you can use the following command:
set(gcf,'color','white')
which will set the background color of the current figure to white. Here is a related MATLAB Answers post about changing the default background color: https://www.mathworks.com/matlabcentral/answers/96816-how-do-i-change-the-default-background-color-of-all-figure-objects-created-in-matlab

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Colormaps에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by