Violin Plots for plotting multiple distributions (distributionPlot.m​)

Function for plotting multiple histograms side-by-side in 2D - better than boxplot.

下载
下载

您现在正在关注此提交

编者注: This file was selected as MATLAB Central Pick of the Week

引用格式

Jonas (2026). Violin Plots for plotting multiple distributions (distributionPlot.m) (https://ww2.mathworks.cn/matlabcentral/fileexchange/23661-violin-plots-for-plotting-multiple-distributions-distributionplot-m), MATLAB Central File Exchange. 检索时间: .

致谢

参考作品: plot spread points (beeswarm plot)

启发作品: Violin Plot, gQSPSim

一般信息

MATLAB 版本兼容性

  • 兼容任何版本

平台兼容性

  • Windows
  • macOS
  • Linux
版本 已发布 发行说明 Action
1.15.0

renamed histogram to myHistogram to avoid clash with new Matlab function of the same name, added support for boxplot overlays

下载
1.14.0

Improved documentation (more examples, link to plotSpread), added quantiles (thanks to Warwick for suggestion & testing). Also, belated thanks to Kelly for suggesting horizontal orientation.

下载
1.13.0

Added the following new features:
- Horizontal plotting
- Plotting of half distributions
- Bugfixes

Additionally, plotSpread is now a separate submission.

下载
1.12.0

Added option to align the bars at the left or the right (option "histOri"), as suggested by Yuri. Also, bugfix.

下载
1.9.0

Improved normalization options. Thanks to Jake for the suggestion.

下载
1.7.0

Fixed a bug in the code, and two mistakes in the example.

下载
1.6.0

Made colorbar more meaningful if there is only one colormap and the bins are normalized globally (i.e. globalNorm is set to 1). Thanks to Brian Katz for the suggestion.

下载
1.4.0

Changed input from optional arguments to parameterName/parameterValue pairs (note that the old syntax still works!).
Added several new features, such as support for grouped variables, overlay of data points, and user-defined colormaps.

下载
1.3.0

Updated title to Violin Plot, because that's how (part) of these plots are called elsewhere.

下载
1.2.0

Documented previously undocumented functionality, chose better screenshot to demonstrate how distributionPlot is better for comparing distributions than boxplot

下载
1.1.0

Fixed cryptic error if the data was all NaNs (thanks Christopher for pointing it out!).
distributionPlot now also automatically converts arrays in cells to vectors and throws a warning.

下载
1.0.0

下载