📄 ex313.m
字号:
%***********************************************************
%程序:EX313.M
%功能:绘制不同类型的三维直方图
%***********************************************************
Z=[15,35,10;20,10,30] %设置坐标轴范围
subplot(2,2,1) %子图设置
h1=bar3(Z, 'detached') %绘制三维直方图
set(h1, 'FaceColor', 'W') %设置三维直方图形属性
title('分离式直方图') %添加标题
subplot(2,2,2) %子图设置
h2=bar3(Z, 'grouped') %绘制三维直方图
set(h2, 'FaceColor', 'W') %设置三维直方图形属性
title('分组式直方图') %添加标题
subplot(2,2,3) %子图设置
h3=bar3(Z, 'stacked') %绘制三维直方图
set(h3, 'FaceColor', 'W') %设置三维直方图形属性
title('叠加式直方图') %添加标题
subplot(2,2,4) %子图设置
h4=bar3h(Z) %绘制三维直方图
set(h4, 'FaceColor', 'W') %设置三维直方图形属性
title('水平放置的三维直方图') %子图设置
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -