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

采纳的回答

Richard Quist
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 CenterFile Exchange 中查找有关 Colormaps 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by