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

边栏推荐
- 现货白银如何计算盈亏
- LeetCode 2351. 第一个出现两次的字母
- How to solve the pain points of 12000 small and medium-sized customers' component procurement? Say goodbye to overtime!
- HarmonyOS 3正式发布:鸿蒙手机流畅安全,鸿蒙终端常用常新
- "Wei Lai Cup" 2022 Niuke summer multi school training camp 3 supplementary problem solution (a, C, J)
- Opengauss active / standby architecture works with keeplive
- Software testing interview question: where do your performance testing requirements come from?
- Lua get started quickly
- How the test architects of bat factories interpret various disputes of the test platform
- 软件测试面试题:性能测试指标有哪些?
猜你喜欢

Sort out SQL performance optimization and collect classics!

I want to get 20K after 3 years of experience, but I haven't got it for half a month?

Lua advanced

Icml2022 | online decision transformer

【游戏】任天堂Nintendo Switch超详细购买/使用指南以及注意事项(根据自己使用持续更新中...)

数仓搭建——DWS层

Realize ABCD letter increment

PHP利用某些函数bypass waf探讨

Software process that testers need to know

Harmonyos 3 was officially released: Hongmeng mobile phones are smooth and safe, and Hongmeng terminals are often used
随机推荐
Interpretation of new features | the restriction of MySQL 8.0 on gtid is lifted
Principle of logistic regression
面试题 01.07. 旋转矩阵
氧气温湿度模组
Jingfang Technology: ASML, a lithography machine manufacturer, is one of the main customers of Anterion company, which participated in the merger and acquisition of the company
BigDecimal common API
牛客多校第三场A,C+权值线段树
Lecture 16 of project practice: using the open close principle to realize the commodity price rule engine
Codeforces暑期训练周报(7.21~7.27)
Baidu PaddlePaddle easydl: when AI enters the factory, "small bearing" can also turn "big industry"
Shutter -- password login registration interface
Fluent call interface UI
Standing at the crossroads of digital retail transformation, we need to look at it from a new perspective
还在用WIFI你就OUT了:LI-FI更牛!!!
JUC concurrent programming learning
Cesium add light sweep
From functional testing to automated testing, my monthly salary has exceeded 30k+, and I have 6 years of testing experience.
LeetCode 2341. 数组能形成多少数对
Leetcode 2341. How many pairs can an array form
Learn how Baidu PaddlePaddle easydl realizes automatic animal recognition in aquarium