# boxPlot3D
Create three-dimensional boxplots in Matlab
![Screenshot1](Figures/boxPlot3D.gif)
<body><div class="content"><h1></h1><!--introduction--><!--/introduction--><h2>Contents</h2><div><ul><li><a href="#1">boxPlot3D</a></li><li><a href="#2">Call boxplot with a single input argument</a></li><li><a href="#3">Call boxplot with grouping variables</a></li><li><a href="#4">Select the quantiles to display</a></li><li><a href="#5">Colour of the boxes</a></li></ul></div><h2 id="1">boxPlot3D</h2><p>The function boxPlot3D allows you to display three dimensional boxplots and control the visualisation in many ways.</p><h2 id="2">Call boxplot with a single input argument</h2><p>boxPlot3D(x) creates a three dimensional box plot of the data in x. If x is 3D a matrix, boxPlot3D creates one box for each column. Example, create a 3D matrix with normal distributions with different means:</p>
<pre class="codeinput"> xx=randn(50,2,4)+repmat((permute([0 1 2 -2;1 2 3 4],[3 1 2])),[50,1,1]);
boxPlot3D(xx)
</pre>
![Screenshot1](Figures/boxplotDescription_01.png)
<h2 id="3">Call boxplot with grouping variables</h2>
<p>boxPlot3D(x,g1,g2) groups the data of x, with the grouping variables of g1, and g2. Example, create a 1D Matrix with different values and the corresponding grouping parameters:</p><pre class="codeinput"> xx=randn(500,1)+linspace(0,5,500)';
g1= [0.1*ones(250,1);0.2*ones(250,1)];
g2= [3*ones(150,1);4*ones(150,1);5*ones(200,1)];
boxPlot3D(xx,g1,g2)
</pre>
![Screenshot1](Figures/boxplotDescription_02.png)
<h2 id="4">Select the quantiles to display</h2>
<p>boxPlot3D(x,[],[],quantDistribution) allows the selection of the quantiles to select, e.g. [0 0.25 0.5 0.75 1] [0 0.25 0.5 0.75 1] (default) creates a box between 0.25 and 0.75 with a line in 0.5 and two planes at 0 and 1 connected with a dashed line. These values can be changed. [ 0 1] creates a box within the extremes of the values selected. These values can be changed, e.g. [0.25 0.75] [ 0.25 0.5 0.75] creates a box and a line, same as the option with 5 values, but will not draw the planes with the dashed line.</p>
<pre class="codeinput">
boxPlot3D(xx,g1,g2,[0 1])
boxPlot3D(xx,g1,g2,[0.25 0.5 0.75])
</pre>
![Screenshot1](Figures/boxplotDescription_03.png)
![Screenshot1](Figures/boxplotDescription_04.png)
<h2 id="5">Colour of the boxes</h2><p>The colours of the boxes can be changed in the code.</p>
<p class="footer"><br><a href="https://www.mathworks.com/products/matlab/">Published with MATLAB® R2018a</a><br></p></div>
没有合适的资源?快使用搜索试试~ 我知道了~
boxPlot3D:在Matlab中创建三维箱形图
共9个文件
png:5个
md:1个
gif:1个
需积分: 26 24 下载量 122 浏览量
2021-05-02
08:40:17
上传
评论
收藏 3.29MB ZIP 举报
温馨提示
boxPlot3D 在Matlab中创建三维箱形图 内容 boxPlot3D 函数boxPlot3D允许您显示三维盒图并以多种方式控制可视化。 使用单个输入参数调用boxplot boxPlot3D(x)创建x中数据的三维箱形图。 如果x是3D矩阵,boxPlot3D为每一列创建一个框。 例如,使用不同的方法创建具有正态分布的3D矩阵: xx=randn(50,2,4)+repmat((permute([0 1 2 -2;1 2 3 4],[3 1 2])),[50,1,1]); boxPlot3D(xx) 调用带有分组变量的箱线图 boxPlot3D(x,g1,g2)用变量g1和g2对x的数据进行分组。 例如,创建一个具有不同值和相应分组参数的一维矩阵: xx=randn(500,1)+linspace(0,5,500)'; g1= [0.1*ones(250,1);0.2
资源详情
资源评论
资源推荐
收起资源包目录
boxPlot3D-master.zip (9个子文件)
boxPlot3D-master
Figures
boxplotDescription_01.png 28KB
boxplotDescription_04.png 22KB
boxplotDescription_03.png 17KB
boxplotDescription_02.png 26KB
boxPlot3D.gif 3.18MB
boxplotDescription.png 4KB
boxPlot3D.m 8KB
LICENSE 34KB
README.md 3KB
共 9 条
- 1
janejane815
- 粉丝: 24
- 资源: 4612
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0