当前位置:网站首页>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 :
边栏推荐
- 导数、微分、偏导数、全微分、方向导数、梯度的定义与关系
- [RCTF2015]EasySQL
- Happy 10th birthday, clojure
- Pat grade a 1050 string subtraction
- How to test the circle of friends (mind map)
- 抓包与发流软件与网络诊断
- kubernetes之ReplicationController与ReplicaSet
- 2022牛客暑期多校训练营1(ACDGIJ)
- 量化交易之数字货币篇 - 通过时间戳与方向来合并逐笔成交数据(大单合并)
- Pat class a 1047 student list for course
猜你喜欢

【Flutter -- 进阶】打包

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

My SQL is OK. Why is it still so slow? MySQL locking rules
It turns out that cappuccino information security association does this. Let's have a look.

SQL statement -- single line comment and multi line comment

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

Re9:读论文 DEAL Inductive Link Prediction for Nodes Having Only Attribute Information

2022牛客暑期多校训练营1(ACDGIJ)

Difference between C event and delegation

Internet Protocol
随机推荐
What is the complexity often said during the interview?
面试时候常说的复杂度到底是什么?
最终一致性性分布式事务 TCC
工作流引擎在vivo营销自动化中的应用实践
mysql锁机制(举例说明)
Draw a beautiful outline of the middle school playground and generate longitude and latitude data
The difference between oncreate and onrestoreinstancestate recovery data of activity
我的sql没问题为什么还是这么慢|MySQL加锁规则
综合设计一个OPPE主页--导航栏的设计
MVC和ECS两种设计架构的初浅理解
vscode批量删除
docker安装redis?如何配置持久化策略?
First knowledge of OpenGL (2) compilation shaders
Re8:读论文 Hier-SPCNet: A Legal Statute Hierarchy-based Heterogeneous Network for Computing Legal Case
guetzli简单使用
Test cases should never be used casually, recording the thinking caused by the exception of a test case
[arm learning (9) ARM compiler understanding learning (armcc/armclang)]
Threads and processes
How to configure tke cluster node Max pod
Operating system migration practice: deploying MySQL database on openeuler