当前位置:网站首页>How matlab modifies default settings
How matlab modifies default settings
2022-07-03 06:22:00 【Favorite dish of chicken】
In today's github I downloaded a code from , After the run is over , Found it put my figure The default interpreter inside has been changed .
The original setting is :
interpreter = 'none'
But I open it figure Take a look at the properties window of , This attribute has been changed to
interpreter = 'Latex'
So in the process of drawing , Once there are Chinese characters in the text , The following warning will appear :
Warning : to update Text An error occurred when . String scalars or character vectors must have valid interpreter syntax
The solution is 2 individual :
- Every time I write
legend()perhapsxlabel()、ylabel()When it's time to addinterpreter = 'none' - Change the default settings back to the original
I decided to do it once and for all , Choose the second .
Start checking information online , eureka This article , This paper introduces how to put figure Change the background color of to white , The code is set(0,'defaultfigurecolor','w'). I am inspired by this article , Think you can find the handle of the default setting , Re pass set() Set handle parameters , Restore default settings . Say more , In the code 0 This handle represents the computer screen ( You can refer to here ).
The next step is to search the Internet MATLAB What is the default handle of , eureka This article .
The author said that it can be used get(0,'factory') To get the default attribute definition value . stay MATLAB After entering this line of command on the command line , There are many properties that can be set . But I looked for it , Not found interpreter Name , It seems that this line of code may not be used to do .
Now my mind moves , I wonder if I can factory Replace with default, Enter the code on the command line get(0,'default'), The output is as follows :
ans =
That contains the following fields struct:
defaultFigurePosition: [680 558 560 420]
defaultFigurePaperPositionMode: 'auto'
defaultFigurePaperType: 'A4'
defaultFigurePaperUnits: 'centimeters'
defaultFigurePaperSize: [21 29.7000]
defaultTextInterpreter: 'latex'
defaultLegendInterpreter: 'latex'
defaultAxesTickLabelInterpreter: 'latex'
Notice that the last three lines appear interpreter and latex Name , This is the default setting you are looking for .
Enter the following three lines of code on the command line to replace the interpreter with MATLAB The default setting of .
set(0,'defaultTextInterpreter','none');
set(0,'defaultLegendInterpreter','none');
set(0,'defaultAxesTickLabelInterpreter','none');
Input again get(0,'default') Check to see if the setup is successful , The output is as follows .
ans =
That contains the following fields struct:
defaultFigurePosition: [680 558 560 420]
defaultFigurePaperPositionMode: 'auto'
defaultFigurePaperType: 'A4'
defaultFigurePaperUnits: 'centimeters'
defaultFigurePaperSize: [21 29.7000]
defaultTextInterpreter: 'none'
defaultLegendInterpreter: 'none'
defaultAxesTickLabelInterpreter: 'none'
success ! This is figure No warning will be given when Chinese characters are used in Chinese painting .
Through this thing, I think , Still have to think more about how to solve the problem , After the problem is solved, it should be recorded in time , Prevent yourself from forgetting .
边栏推荐
- 輕松上手Fluentd,結合 Rainbond 插件市場,日志收集更快捷
- Characteristics and isolation level of database
- 简易密码锁
- conda和pip的区别
- About the difference between count (1), count (*), and count (column name)
- Kubernetes notes (II) pod usage notes
- Kubesphere - build Nacos cluster
- Openresty best practices
- Exportation et importation de tables de bibliothèque avec binaires MySQL
- 致即将毕业大学生的一封信
猜你喜欢

. Net program configuration file operation (INI, CFG, config)

tabbar的设置

Kubernetes notes (VI) kubernetes storage

Docker advanced learning (container data volume, MySQL installation, dockerfile)

Install VM tools

从小数据量分库分表 MySQL 合并迁移数据到 TiDB

Reinstalling the system displays "setup is applying system settings" stationary

Phpstudy setting items can be accessed by other computers on the LAN

Use abp Zero builds a third-party login module (I): Principles

Svn branch management
随机推荐
JMeter linked database
Fluentd is easy to use. Combined with the rainbow plug-in market, log collection is faster
MATLAB如何修改默认设置
Use abp Zero builds a third-party login module (I): Principles
ThreadLocal的简单理解
Zhiniu stock project -- 05
23 design models
Floating menu operation
从 Amazon Aurora 迁移数据到 TiDB
Kubesphere - build Nacos cluster
Nacos service installation
项目总结--2(Jsoup的基本使用)
Interface test weather API
Important knowledge points of redis
Kubesphere - Multi tenant management
第8章、MapReduce 生产经验
【无标题】8 简易版通讯录
Openresty best practices
冒泡排序的简单理解
pytorch练习小项目