All figure backgrounds became black with white axes.
4 次查看(过去 30 天)
显示 更早的评论
Hi. All of a sudden all of the figures and graphs I plot in Matlab turn up with a completely black background and white axes. As far as I know I did not press any buttons or write a command that made it happen. The graphs are legible but if I try to save them as an image file, e.g. JPEG then only the plot it self is displayed, without any axes or background, so it is suspended in midair. I have tried everything that came to mind, I have used restarted Matlab and tried using the commands "whitebg" and "colordef white" but Matlab did not recognize those commands and gives the following errors: >> whitebg ??? Attempt to execute SCRIPT dot as a function: C:\Users\Helgi\Documents\MATLAB\dot.m
Error in ==> whitebg at 98 lum = dot([.298936021 .58704307445 .114020904255],c(k,:));
>> colordef white ??? Attempt to execute SCRIPT dot as a function: C:\Users\Helgi\Documents\MATLAB\dot.m
Error in ==> whitebg at 98 lum = dot([.298936021 .58704307445 .114020904255],c(k,:));
Error in ==> colordef>wdefault at 128 whitebg(fig,[1 1 1])
Error in ==> colordef at 75 wdefault(fig)
I am using a Dell Inspiron 1525 computer with Windows 7 installed. If anyone knows how to solve this problem I would be ever so grateful. Thank you
0 个评论
采纳的回答
Richard Quist
2012-11-8
编辑:Richard Quist
2012-11-8
The clue is in the error message:
Error in ==> whitebg at 98 lum = dot([.298936021 .58704307445 .114020904255],c(k,:));
>> colordef white ??? Attempt to execute SCRIPT dot as a function: *C:\Users\Helgi\Documents\MATLAB\dot.m
You have a file named dot.m (C:\Users\Helgi\Documents\MATLAB\dot.m) that is overriding the MATLAB function of the same name.
Rename your file/function and then restart MATLAB.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Colormaps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!