Returns error after clicking on a plot

121 ビュー (過去 30 日間)
Sajith Kk
Sajith Kk 2019 年 9 月 15 日
コメント済み: ed 2022 年 3 月 23 日
Returns the following error after plotting graphs and clicking on a plot.
"Warning: Error occurred while executing the listener callback for event ButtonExited defined for
class matlab.graphics.primitive.canvas.JavaCanvas:
Error using getDatetimeSettings
Invalid default value for property 'MonthsOfYear' in class 'datetime':
Reference to non-existent field 'matlab'.
Error in matlab.graphics.controls.ToolbarController/createFadeInTimer
Error in matlab.graphics.controls.ToolbarController/get.FadeInTimer
Error in matlab.graphics.controls.ToolbarController/hideToolbar
Error in matlab.graphics.controls.ToolbarController/handleMouseExited
Error in matlab.graphics.controls.ToolbarController>@(e,d)obj.handleMouseExited(e,d)
Warning: Error occurred while executing the listener callback for event ButtonExited defined for
class matlab.graphics.primitive.canvas.JavaCanvas:
Error using getDatetimeSettings
Invalid default value for property 'MonthsOfYear' in class 'datetime':
Reference to non-existent field 'matlab'.
Error in matlab.graphics.controls.ToolbarController/createFadeInTimer
Error in matlab.graphics.controls.ToolbarController/get.FadeInTimer
Error in matlab.graphics.controls.ToolbarController/hideToolbar
Error in matlab.graphics.controls.ToolbarController/handleMouseExited
Error in matlab.graphics.controls.ToolbarController>@(e,d)obj.handleMouseExited(e,d) "
Things were working properly till yesterday. I am unable to find what changed.
The following different steps didnt resolve the issue:
1) restoredefaultpath
2) reset(gca)
3) reinstall matlab (I am using networked version in Institute)
  2 件のコメント
ed
ed 2019 年 9 月 16 日
I have the same problem. In fact, just moving the mouse over the plot causes the error for me. I'm using Matlab 2019a Update 5 on a MacOS Mojave device, and I'm using an external (non-retina) display in junction with the (retina) diplay on my laptop.
Sajith Kk
Sajith Kk 2019 年 9 月 16 日
My suggestion is to rename all the files in current folder to something else and see if the problem persists. It could be resolved if an m file in the current folder is conflicting with matlab inbuilt functions.

サインインしてコメントする。

回答 (2 件)

Sajith Kk
Sajith Kk 2019 年 9 月 16 日
I found the solution. It was happening only when the current folder was in a particular folder in which there was a m-file named 'settings.m'. Probably there was a conflict between this file and a file related to plot function. It was resolved when I renamed the file to something else.
  3 件のコメント
Lukas Hagmeyer
Lukas Hagmeyer 2020 年 9 月 29 日
I have had the same problem with settings.m, my solutions was to rename the file.
In the future, i am checking the doc for commands with similar name. This Problem could even happen with similar variables names.
z Chao
z Chao 2020 年 11 月 15 日
I met this problem when im plotting the training-progress of deep learning toolbox, this solution solved my problem perfectly, Thank u !!!

サインインしてコメントする。


jianpeng
jianpeng 2022 年 3 月 23 日
Hello, which folder do you want to change the settings.m file in, I don't understand it, it's driving me crazy, I hope you can answer it for me!
  1 件のコメント
ed
ed 2022 年 3 月 23 日
The point is that if your project contains a file called 'settings.m' (or some other filename which conflicts with a built in matlab file) you may have this problem. Try renaming files in your project with rather generic filenames to use more custom names.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeInteractive Control and Callbacks についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by