• Stars
    star
    191
  • Rank 202,217 (Top 4 %)
  • Language
    MATLAB
  • License
    BSD 3-Clause "New...
  • Created over 8 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Violin Plots for Matlab

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

More Repositories

1

org-journal

A simple org-mode based journaling mode
Emacs Lisp
1,235
star
2

SoundCard

A Pure-Python Real-Time Audio Library
Python
641
star
3

python-soundfile

SoundFile is an audio library based on libsndfile, CFFI, and NumPy
Python
586
star
4

annotate.el

Annotate.el
Emacs Lisp
373
star
5

org-static-blog

A static site generator using org-mode
Emacs Lisp
304
star
6

lunatic-python

A two-way bridge between Python and Lua
C
285
star
7

transplant

Transplant is an easy way of calling Matlab from Python
MATLAB
106
star
8

PySoundCard

PySoundCard is an audio library based on PortAudio, CFFI and NumPy
Python
85
star
9

simple-cython-limiter

A simple real-time limiter implemented using Python, Cython, Numpy and PyAudio
Python
44
star
10

WebGL-Spectrogram

A smoothly animated spectrogram display in WebGL (FFT in Python/Tornado)
JavaScript
40
star
11

libsndfile-binaries

Pre-compiled shared libraries for libsndfile
Shell
29
star
12

Fujifilm-Auto-Settings-for-Darktable

Automatically apply Fujifilm film simulation LUTs, crop, and DR correction when importing images in Darktable
Lua
28
star
13

twilight

A Circular Color Map
Python
22
star
14

MatlabCodeAnalyzer

A Code Style Checker and Analyzer for Matlab Code
MATLAB
21
star
15

MAPS-Scripts

A fundamental frequency estimation algorithm using features from the magnitude and phase spectrogram.
MATLAB
17
star
16

matlab-msgpack

msgpack.org[Matlab]
MATLAB
14
star
17

python-oscillator

See what your sound card is doing in real time
Python
13
star
18

Map-Matlab

Draws an OSM map on a Matlab axes.
MATLAB
12
star
19

PySoundFile

DEPRECATED version of SoundFile
Python
11
star
20

bastibe.github.com

This is the generated HTML and sources for my blog
HTML
10
star
21

RunForrest

Batch and run your code in parallel. Simply.
Python
10
star
22

Replication-Dataset-Scripts

Scripts for recreating the Replication Dataset for Fundamental Frequency Estimation. Part of the dissertation "Pitch of Voiced Speech in the Short-Time Fourier Transform". © 2020, Bastian Bechtold. All rights reserved.
Python
9
star
23

.emacs.d

Emacs Lisp
8
star
24

LUT-Maker

Python
8
star
25

jbof

Use Just a Bunch of Files as Datasets
Python
8
star
26

KDE-Media-Keys

Shell
6
star
27

MatlabXML

Read XML files in pure Matlab, because xmlread is too slow.
MATLAB
5
star
28

pomodoro-timer

A graphical timer for your Pomodoro workflow
4
star
29

MusicTagger

Python
4
star
30

Raspberry-Pi-Camera

Python
4
star
31

Dissertation-Website

The Companion Website to my Dissertation "Pitch of Voiced Speech in the Short-Time Fourier Transform: Algorithms, Ground Truths, and Evaluation Methods"
HTML
4
star
32

PinBoarder

Prettyfies Youtube links in Pinboard
Python
3
star
33

Speqtrogram

C++
3
star
34

meteogram

Grabbing weather data from the web and plotting a meteogram.
Python
3
star
35

pocoder

A vocoder implemented in Python
MATLAB
3
star
36

QtWorkshop

Example projects and documentation for a Qt Workshop
Python
3
star
37

Darktable-Film-Simulation-Panel

Lua
3
star
38

Consensus-Truth-Scripts

A new ground truth for speech corpora and fundamental frequency estimation, based on the consensus of multiple fundamental frequency estimation algorithms.
Python
3
star
39

timeup

Create Backups much like Time Machine, using rsync.
Python
2
star
40

org-journal-telegram-bot

Python
2
star
41

MatType

Test your typing skills in Matlab
MATLAB
2
star
42

MiniHUD

An X-Plane plugin that shows a small instrument panel for flying without seeing the cockpit
Lua
2
star
43

PythonSoundExperiment

Python
1
star
44

beegeewedding

HTML
1
star
45

MissionGeneratorSite

HTML
1
star
46

fish-config

My fish configuration
Shell
1
star
47

com1

just a test
1
star
48

vim

these are my vim settings
Vim Script
1
star
49

Photography-Analyzer

Crawl all your photos, and analyze your shooting habits
Python
1
star