当前位置:网站首页>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 .
边栏推荐
- The most classic 100 sentences in the world famous works
- PHP用ENV获取文件参数的时候拿到的是字符串
- [set theory] relational closure (relational closure solution | relational graph closure | relational matrix closure | closure operation and relational properties | closure compound operation)
- 从小数据量分库分表 MySQL 合并迁移数据到 TiDB
- Luogu problem list: [mathematics 1] basic mathematics problems
- scroll-view指定滚动元素的起始位置
- POI dealing with Excel learning
- Synthetic keyword and NBAC mechanism
- 项目总结--2(Jsoup的基本使用)
- Kubernetes notes (VII) kuberetes scheduling
猜你喜欢

GPS坐标转百度地图坐标的方法

Simple solution of small up main lottery in station B

SQL实现将多行记录合并成一行

轻松上手Fluentd,结合 Rainbond 插件市场,日志收集更快捷

项目总结--2(Jsoup的基本使用)

Time format record

Interesting research on mouse pointer interaction

Migrate data from Mysql to tidb from a small amount of data

Merge and migrate data from small data volume, sub database and sub table Mysql to tidb

剖析虚幻渲染体系(16)- 图形驱动的秘密
随机推荐
UNI-APP中条件注释 实现跨段兼容、导航跳转 和 传参、组件创建使用和生命周期函数
Scripy learning
Support vector machine for machine learning
Kubesphere - build MySQL master-slave replication structure
ODL framework project construction trial -demo
轻松上手Fluentd,结合 Rainbond 插件市场,日志收集更快捷
Judge whether the date time exceeds 31 days
Mysql database table export and import with binary
Luogu problem list: [mathematics 1] basic mathematics problems
代码管理工具
Svn branch management
Openresty best practices
The mechanical hard disk is connected to the computer through USB and cannot be displayed
Oauth2.0 - explanation of simplified mode, password mode and client mode
Get a screenshot of a uiscrollview, including off screen parts
Cesium Click to obtain the longitude and latitude elevation coordinates (3D coordinates) of the model surface
23 design models
PMP笔记记录
Method of converting GPS coordinates to Baidu map coordinates
Selenium ide installation recording and local project maintenance