violin plot -凯发k8网页登录

violin plot

版本 1.7.0.0 (9.1 kb) 作者:
violin plot based on kernel density estimation, using default ksdensity

14.6k 次下载

更新时间 2015/11/3

查看许可证

this function creates simple violin plots by estimating the kernel density, using matlabs default ksdensity(). given a matrix or table with m columns, you will get violins for each of the columns.
key features:
a) specify plotting features as facecolor, edgecolor, etc.
b) provide data with variable column length as cells if wanted, e.g. y = [100x1 double] [10x1 double]
c) plot violins on the desired x-position

notes:

1) this function is not perfect. please modify it as you like.

2) please do consider the function by jonas: "violin plots for plotting multiple distributions (distributionplot.m)" which gets you the histograms as shape.

3) please note: kernel density is estimated with ksdensity which uses a gaussian kernel by default. although the bandwidth is optimal according to the rule of thumb, it is however estimated separately for each violin. for publications, etc., please consider that you might need to use the same kernel bandwidths for all data-subsets in order to be able to really compare the distributions.

a beautiful example is given here:

引用格式

holger hoffmann (2023). violin plot (https://www.mathworks.com/matlabcentral/fileexchange/45134-violin-plot), matlab central file exchange. 检索来源 .

matlab 版本兼容性
创建方式 r2013a
兼容任何版本
平台兼容性
windows macos linux
类别
  • > > > >
在 和 中查找有关 exploration and visualization 的更多信息
标签
致谢

参考作品:

community treasure hunt

find the treasures in matlab central and discover how the community can help you!

start hunting!
版本 已发布 发行说明
1.7.0.0

title changed
documentation improved
title changed
description updated

1.6.0.0

when providing x, axis was set incorrectly previously. this is fixed now.

1.5.0.0

- changed varargin list to parameter-value combination list
- plot violins on specific x-axis position possible now

1.4.0.0

- removed unnecessary text display

1.1.0.0

removed: set(gcf,'color','w','position',[2000 100 800 600])

1.0.0.0
网站地图