当前位置:网站首页>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 ~

边栏推荐
- URDF 集成 Gazebo
- Realize ABCD letter increment
- MySQL JPA support for JSON type data in database
- Unity Shader入门精要学习——基础纹理
- JUC concurrent programming learning
- Gossip: an initially perfect FS is as impractical as the first version of the program requiring no bugs
- PHP利用某些函数bypass waf探讨
- Sort out SQL performance optimization and collect classics!
- 同心向前,Google Play 十周年啦!
- Lua advanced
猜你喜欢

Leetcode 2347. the best poker hand

Lecture 16 of project practice: using the open close principle to realize the commodity price rule engine

"Wei Lai Cup" 2022 Niuke summer multi school training camp 3 supplementary problem solution (a, C, J)

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

Develop plug-ins for the recording function of flutter

docker 本地搭建mysql主从

Shutter -- password login registration interface

Data problems can also be found if there is a space at the end of the field value of MySQL query criteria

ICML2022 | 在线决策Transformer

Codeforces summer training weekly (7.14~7.20)
随机推荐
迅为i.MX6ULL开发板Qt系统移植-交叉编译Qt代码
Harmonyos 3 was officially released: Hongmeng mobile phones are smooth and safe, and Hongmeng terminals are often used
docker 本地搭建mysql主从
Kibana6.2.4 version update x-pack certification
Count the number of given strings in a string
Huami technology "Huangshan No.2" release: AI performance is improved by 7 times, and power consumption is reduced by 50%!
Lua advanced
Centralized management of clusters
糟糕程序员的20个坏习惯
Insider of container network hard core technology (7) sailing on the sea depends on the helmsman
自定义事件
普通设备能不能接入TSN时间敏感网络?
Nokia announces cooperation with Broadcom to develop 5g chip
Qlib教程——基于源码(二)本地数据保存与加载
Can anime characters become "real people"? Paddegan helps you find the TA of "tear man"
20 bad habits of bad programmers
Meguiar sued liandian for secret theft and sentenced: liandian was fined NT $100million and three employees were sentenced!
还在用WIFI你就OUT了:LI-FI更牛!!!
伦敦银开盘时间知多少
【样式集合1】tab 栏