当前位置:网站首页>Matlab 44 animation gradient drawing programs
Matlab 44 animation gradient drawing programs
2022-07-28 01:38:00 【Lwcah】
Click on the above ‘Lwcah’, Follow my public number .
In continuous production , Please watch ~
The mapping program is aimed at people : Use MATLAB Engaged in scientific research and drawing , Have higher requirements for color control .
The MATLAB The function is used to customize the paint gradient , We use screenshots of animation 1:1 Made 44 Gradient , Available for scientific research and mapping .
Screenshot source reference :https://baijiahao.baidu.com/s?id=1671258205062995017&wfr=spider&for=pc
The following is a three-dimensional histogram drawing program demo_plotbar3.m; among mymap.p The subfunction is our drawing product ;mymap.pdf It is the instruction manual of the product , As shown in the figure below , total 44 Comparison chart .
%% Drawing template of three-dimensional histogram
close all;clear all;clc;
%% 1 That's ok 1 Column
% Define the position, length and width of the whole picture on the computer screen
figureHandle = figure;
figureUnits = 'centimeters';
figureWidth = 10;
figureHeight = 6;
set(gcf, 'Units', figureUnits, 'Position', [0 0 figureWidth figureHeight]);
%% Data preparation
% Define arguments
X = [1 2 3 4 5 6 7 8 9 10 11 12 13];%13
Y = [1 2 3 4];%4
% Define the dependent variable
Z1 = [1 2 3 4 5 6 7 6 5 4 3 2 1];
Z2 = [2 3 4 5 6 7 7 7 6 5 4 3 2];
Z3 = [2 3 4 5 6 7 7 7 6 5 4 3 2];
Z4 = [1 2 3 4 5 6 7 6 5 4 3 2 1];
Z=[Z1;Z2;Z3;Z4];%4x13
%% Given the drawing font and size
fontnamed='Arial';% Font name
ssize=10;% Size
%% Given the drawing gradient
CM1 = mymap(34);% If you want to change the gradient , Just change 34 by 1-44 Any number between .
%% Define drawing parameters
b = bar3(Z,0.5);
% hTitle = title(sprintf('(a) RMSE/m (free snow)'));
hXLabel = xlabel('Types','fontsize',ssize,'FontName',fontnamed,'rotation',45);
hYLabel = ylabel('Solutions','fontsize',ssize,'FontName',fontnamed,'rotation',-45);
hZLabel = zlabel('Values','fontsize',ssize,'FontName',fontnamed);
%% according to Z Axial coloring
for k = 1:length(b)
zdata = b(k).ZData;
b(k).CData = zdata;
b(k).FaceColor = 'interp';
end
colormap(CM1);% Use custom colors
cb = colorbar;% Add vertical color bar
set(cb,'unit','centimeters','position',[9.3,2.8,0.2,2.5]);% Set the position and size of the vertical color bar
%% Standard format code for drawing
% text(0.5,0.9,'(a) snow','fontsize',ssize,'FontName',fontnamed);%,'horiz','center'
% xlabel('SNR types','fontsize',ssize,'FontName',fontnamed);
% ylabel('R (with snow)','fontsize',ssize,'FontName',fontnamed);
axis([0 14 0 5 0 8]);%XYZ The scope of the shaft
xticks([1 2 3 4 5 6 7 8 9 10 11 12 13]);% Small scale when drawing grid
xticklabels({'1','2','3','4','5','6','7','8','9','10','11','12','13'});% Add x Axis scale marking ,'C3-MEO-S2I','C3-MEO-S6I'
yticks([1 2 3 4]);% Small scale when drawing grid
yticklabels({'1','2','3','4'});% Add x Axis scale marking
zticks([0 2 4 6 8]);% Small scale when drawing grid
zticklabels({'0','2','4','6','8'});% Add x Axis scale marking
set(gca,'xticklabelrotation',-45);
set(gca,'yticklabelrotation',45);
% set(gca,'linewidth',1,'fontsize',ssize,'FontName',fontnamed);
% set(gca,'yticklabel',[]);%y The axis doesn't show
% set(gca,'xticklabel',[]);%x The axis doesn't show
grid on;box on;hold on;
%% The background color
set(gcf,'Color',[1 1 1])
%% After setting up , According to the required resolution 、 Format output
figW = figureWidth;
figH = figureHeight;
set(figureHandle,'PaperUnits',figureUnits);
set(figureHandle,'PaperPosition',[0 0 figW figH]);
fileout = 'bar3_1';
print(figureHandle,[fileout,'.png'],'-r800','-dpng');











notes : Because the product is made for the author's own scientific research needs , Therefore, it is not intended to be publicly available for free , If necessary , Please reply to the keyword in the background of official account :mymap. Self help acquisition . thank you ~
Please respect the original achievements !!!
Statement : The original achievements of this official account , Without permission , Do not use for any commercial purpose !
Every time you like , Looking at , Attention and sharing are my greatest encouragement ~ thank you ~

边栏推荐
- Gossip: an initially perfect FS is as impractical as the first version of the program requiring no bugs
- In April, global smartphone shipments fell 41% year-on-year, and Huawei surpassed Samsung to become the world's first for the first time
- LeetCode 2341. 数组能形成多少数对
- 牛客多校第三场A,C+权值线段树
- 20 bad habits of bad programmers
- 2022/07/27 学习笔记 (day17) 代码块和内部类
- Distributed | how to import data into dble quickly through the split function of dble
- Opengauss active / standby architecture works with keeplive
- JG-数据重置(wd)
- 梳理 SQL 性能优化,收藏经典!
猜你喜欢

ABAP CDs table function introduction and examples

Redefine analysis - release of eventbridge real-time event analysis platform

Knowledge of two-dimensional array

Fluent call interface UI

Learn how Baidu PaddlePaddle easydl realizes automatic animal recognition in aquarium
![[game] Nintendo Nintendo switch ultra detailed purchase / use guide and precautions (continuous update according to your own use...)](/img/7e/9e0e17e2ea8b8679ad7e1750a8b6d1.png)
[game] Nintendo Nintendo switch ultra detailed purchase / use guide and precautions (continuous update according to your own use...)

LeetCode 2351. 第一个出现两次的字母

《安富莱嵌入式周报》第275期:2022.07.18--2022.07.24

Unity shader introduction Essentials - basic texture

数仓搭建——DWS层
随机推荐
Knowledge of two-dimensional array
From functional testing to automated testing, my monthly salary has exceeded 30k+, and I have 6 years of testing experience.
The cooperation between starfish OS and metabell is just the beginning
Fluent call interface UI
Learn how Baidu PaddlePaddle easydl realizes automatic animal recognition in aquarium
Xinyi information technology, a domestic NB IOT chip manufacturer, received 200million yuan of a+ round financing
数仓搭建——DWS层
What is the opening time of London Silver
Kibana6.2.4 version update x-pack certification
面试题 01.07. 旋转矩阵
docker 本地搭建mysql主从
Cross domain requests in nodejs
Data problems can also be found if there is a space at the end of the field value of MySQL query criteria
JG-数据重置(wd)
BigDecimal common API
Byte monthly salary 28K, share a wave of my automation testing experience
URDF integrated gazebo
Nokia announces cooperation with Broadcom to develop 5g chip
彻底搞懂kubernetes调度框架与插件
ABAP CDs table function introduction and examples