当前位置:网站首页>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 .
边栏推荐
- Project summary --2 (basic use of jsup)
- Apifix installation
- 论文笔记 VSALM 文献综述《A Comprehensive Survey of Visual SLAM Algorithms》
- 深入解析kubernetes controller-runtime
- Mysql database
- Advanced technology management - do you know the whole picture of growth?
- Kubernetes notes (III) controller
- Pdf files can only print out the first page
- 从小数据量分库分表 MySQL 合并迁移数据到 TiDB
- . Net program configuration file operation (INI, CFG, config)
猜你喜欢
Oauth2.0 - user defined mode authorization - SMS verification code login
深入解析kubernetes controller-runtime
【5G NR】UE注册流程
Svn branch management
ssh链接远程服务器 及 远程图形化界面的本地显示
Redis cluster creation, capacity expansion and capacity reduction
Merge and migrate data from small data volume, sub database and sub table Mysql to tidb
GPS坐标转百度地图坐标的方法
Use selenium to climb the annual box office of Yien
第8章、MapReduce 生产经验
随机推荐
Exportation et importation de tables de bibliothèque avec binaires MySQL
JMeter performance automation test
从小数据量分库分表 MySQL 合并迁移数据到 TiDB
YOLOV2学习与总结
Cesium entity(entities) 实体删除方法
Various usages of MySQL backup database to create table select and how many days are left
Interface test weather API
Phpstudy setting items can be accessed by other computers on the LAN
Click cesium to obtain three-dimensional coordinates (longitude, latitude and elevation)
SQL实现将多行记录合并成一行
Luogu problem list: [mathematics 1] basic mathematics problems
Important knowledge points of redis
Kubernetes notes (III) controller
Project summary --2 (basic use of jsup)
Synthetic keyword and NBAC mechanism
致即将毕业大学生的一封信
PHP用ENV获取文件参数的时候拿到的是字符串
Zhiniu stock -- 03
智牛股--03
scroll-view指定滚动元素的起始位置