当前位置:网站首页>Matlab paper illustration drawing template issue 40 - pie chart with offset sector
Matlab paper illustration drawing template issue 40 - pie chart with offset sector
2022-07-26 16:37:00 【A Kun's daily scientific research】
In the previous post , Shared Matlab Drawing template of pie chart :

further , Share again Pie chart with offset sector Drawing template for .
Let's take a look first Finished product effect :

hot tip :Matlab Thesis illustration drawing template series , It aims to reduce the use of Matlab The threshold for scientific research mapping , Just add the corresponding content according to the template format , You can get data illustrations that meet the format requirements of most journals and dissertations . If you feel useful, you can share it with your friends .
The most critical part of the template :
1. Data preparation
This part is mainly about reading data , Define variables .
% Reading data
X = [0.49 0.12 0.1 0.08 0.08 0.04 0.04 0.05];
explode = [0 0 1 0 1 0 0 0];
Label = {'Brazil','Colombia','Argentina','Peru','Venezuela','Chile','Ecuador','Others'};among , By putting the corresponding explode The element is set to 1 To offset No 3 And the 5 Pie slice .
2. Color definition
Color matching tests personal aesthetics , Need to try more .
here Directly use the previously shared addcolorplus Gradient in tool :
% gradient
map = addcolorplus(282);
idx = linspace(1,64,8);
idx = round(idx);
C = map(idx,:);
C = flipud(C);
3. Pie chart drawing with offset sectors
Use ‘pie’ command , draw Unrefined pie chart with offset sectors .
pie(X,explode)
hTitle = title('South American Population by Country');
4. Detail optimization
For the beauty of illustrations , utilize ’colormap’ Command to assign the color selected before :
% coloration
colormap(C)further , Adjust label 、 Font size 、 Background color, etc :
% label
hLegend = legend(Label, 'Position', [0.85 0.15 0.1 0.3]);
hLegend.ItemTokenSize = [5 5];
legend('boxoff');
% Font size
th = findobj(gca, 'Type', 'text');
set(th, 'FontName', 'Arial', 'FontSize', 11)
set(hLegend, 'FontName', 'Arial', 'FontSize', 9)
set(hTitle, 'FontSize', 12, 'FontWeight' , 'bold')
% The background color
set(gcf,'Color',[1 1 1])After setting up , With the resolution required by the journal 、 Format output picture .
%% Image output
print('test.png','-r300','-dpng');
You can also try other colors :




above .
Complete code :
边栏推荐
- Digital intelligence transformation, management first | jnpf strives to build a "full life cycle management" platform
- Comprehensively design an oppe homepage -- Design of star models
- 2022 latest Tibet Construction scaffolder (construction special operation) simulation exam questions and answers
- Bugku login1
- Analyzing method and proc in Ruby
- C#读取本地文件夹中所有文件文本内容的方法
- 如何借助自动化工具落地DevOps|含低代码与DevOps应用实践
- JS API summary of Array Operations
- 抓包与发流软件与网络诊断
- Replicationcontroller and replicaset of kubernetes
猜你喜欢
![[fluent -- advanced] packaging](/img/aa/bd6ecad52cbe4a34db75f067aa4dfe.png)
[fluent -- advanced] packaging

Advanced CAD exercises (I)

Bugku login2

营销指南 | 几种常见的微博营销打法

综合设计一个OPPE主页--明星机型的设计

Alibaba side: analysis of ten classic interview questions

【Flutter -- 进阶】打包

How to implement Devops with automation tools | including low code and Devops application practice

About the idea plug-in I wrote that can generate service and mapper with one click (with source code)

基于sisotool极点配置PI参数及基于Plecs的三相电压源逆变器仿真
随机推荐
2022牛客暑期多校训练营1(ACDGIJ)
[RCTF2015]EasySQL
Docker install redis? How to configure persistence policy?
Use verdaccio to build your own NPM private library
接口比较器
IDEA 阿里云多模块部署
Vscode batch delete
Want the clouds in the picture to float? Video editing services can be achieved in three steps with one click
综合设计一个OPPE主页--明星机型的设计
微信小程序---网络数据请求
The difference between oncreate and onrestoreinstancestate recovery data of activity
Re7:读论文 FLA/MLAC Learning to Predict Charges for Criminal Cases with Legal Basis
ZABBIX 6.2.0 deployment
Sql语句——单行注释与多行注释
First knowledge of OpenGL (2) compilation shaders
kubernetes之探针
C # set different text watermarks for each page of word
结构体和类使用的区别
Comprehensively design an oppe homepage -- the design of the top and head
Response对象-响应字符数据