• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

bastibe/Violinplot-Matlab: Violin Plots for Matlab

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

bastibe/Violinplot-Matlab

开源软件地址(OpenSource Url):

https://github.com/bastibe/Violinplot-Matlab

开源编程语言(OpenSource Language):

MATLAB 100.0%

开源软件介绍(OpenSource Introduction):

Violin Plots for Matlab

A violin plot is an easy to read substitute for a box plot that replaces the box shape with a kernel density estimate of the data, and optionally overlays the data points itself. The original boxplot shape is still included as a grey box/line in the center of the violin.

Violin plots are a superset of box plots, and give a much richer understanding of the data distribution, while not taking more space. You will be able to instantly spot too-sparse data, or multi-modal distributions, which could go unnoticed in boxplots.

violinplot is meant as a direct substitute for boxplot (excluding named arguments). Additional constructor parameters include the width of the plot, the bandwidth of the kernel density estimation, and the X-axis position of the violin plot.

For more information about violin plots, read "Violin plots: a box plot-density trace synergism" by J. L. Hintze and R. D. Nelson in The American Statistician, vol. 52, no. 2, pp. 181-184, 1998 (DOI: 10.2307/2685478).

For a simple call:

load carbig MPG Origin
Origin = cellstr(Origin);
figure
vs = violinplot(MPG, Origin);
ylabel('Fuel Economy in MPG');
xlim([0.5, 7.5]);

example image

You can also play around with the different options, and tune your violin plots to your liking.

grouporder={'England','Sweden','Japan','Italy','Germany','France','USA'};
vs = Violin({MPG(strcmp(Origin, grouporder{pos}))},...
    position,...
    'HalfViolin','right',...% left, full
    'QuartileStyle','shadow',... % boxplot, none
    'DataStyle', 'histogram',... % scatter, none
    'ShowNotches', false,...
    'ShowMean', false,...
    'ShowMedian', true,...
    'ViolinColor', color);

example image2

Citation

DOI

If you want to cite this repository, use

Bechtold, Bastian, 2016. Violin Plots for Matlab, Github Project
https://github.com/bastibe/Violinplot-Matlab, DOI: 10.5281/zenodo.4559847




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap