How do I programmatically switch to Dark Mode (Dark Theme) in R2025a?

78 次查看(过去 30 天)
I am running R2025a pre-release. What are the commands to switch to dark mode?

采纳的回答

Mike Croucher
Mike Croucher 2025-1-13
编辑:Mike Croucher 2025-1-13
This is supported from R2025a onwards. This is what you need to do
>> s = settings;
>> s.matlab.appearance.MATLABTheme.PersonalValue = "Dark";
  1 个评论
Adam Danz
Adam Danz 2025-1-13
编辑:Adam Danz 2025-1-14
And for figures,
theme('dark') % light | auto
% Or
theme(fig,'dark')
% Or
fig = figure(Theme='dark')
% or
fig.Theme = 'dark';

请先登录,再进行评论。

更多回答(1 个)

Michelle Hirsch
Michelle Hirsch 2025-1-13
A few more notes:
  • The default behavior is to match your system theme. So, if your system theme is Dark, MATLAB is dark.
  • There's a setting (aka "preference") for it, too. An easy way to get there is to =just search for something like "dark" in the new search bar:

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by