Questions tagged [violin-plot]

A violin plot is a method of plotting numeric data. It is a box plot with a rotated kernel density plot on each side.

A violin plot is a method of plotting numeric data. It is a box plot with a rotated kernel density plot on each side.

https://en.wikipedia.org/wiki/Violin_plot

364 questions
2
votes
1 answer

Adding p-values to a violin plot in seurat

I currently have a seurat object scData in which I have applied module scored by using AddModuleScore. AddModuleScore(scData, features = inflam, name = "inflam_score", seed = 1, search = FALSE, assay = NULL, nbin = 21, ctrl = 100, pool = NULL) I've…
mmpp
  • 125
  • 4
2
votes
0 answers

Swap Axes of Violin plot

I am trying to create Violin Plots using the StatsPlots.jl library. However, I would like to have the returned Violin plot to be horizontal instead of vertical as I want to show the distribution of a variable (e.g. Temperature) for different…
niltsz
  • 75
  • 5
2
votes
1 answer

How can I fix the axes in plotly to see the title?

If I am plot a plotly violin plot, it snipps the title away. How can I fix that? I have followed code: len <- c(4.5, 3.0, 4.0, 4.0, 3.0, 3.5, 4.5, 3.0, 3.0, 4.0, 3.0, 4.5, 4.5, 4.0, 3.0,2.0,2.0,1.0,1.5,1.5, 3.5, 4.5,…
JAdel
  • 1,309
  • 1
  • 7
  • 24
2
votes
1 answer

How to adjust error box to violin plot using geom_violin?

***editing: errbar_lims <- group_by(dt, together) %>% dplyr::summarize(mean=mean(score), se=sd(score)/sqrt(n()), upper=mean+(2*se), lower=mean-(2*se)) > dput(dt) structure(list(ï..count = c(50L, 7L, 21L, 22L, 94L, 58L, 147L, 4L,…
2
votes
1 answer

Difficulty plotting a split Violinplot using Seaborn and a Pandas Dataframe

I have dataframe full of likelihoods from a model I am using to identify points of interest on a set of images. The rows correspond to an image and the columns correspond to a label. There are "Left" and "Right" versions of the labels. I would like…
Tetraquark
  • 33
  • 5
2
votes
1 answer

split violinplot with different ranges

I am trying to plot two variables with different ranges using split violinplots in seaborn. Here's what I have done so far: from matplotlib import pyplot as plt import seaborn as sns import numpy as np df1 = pd.read_csv('dummy_metric1.csv') df2 =…
Chica_Programmador
  • 107
  • 1
  • 3
  • 16
2
votes
1 answer

Put violin plot on sides and have a line with group average in R ggplot

I have a dataset, of which a subset is: structure(list(Session = structure(c(2L, 1L, 1L, 2L, 2L, 2L, 1L, 2L, 2L, 2L, 1L, 1L, 1L, 2L, 2L, 1L, 1L, 1L, 2L, 1L, 2L, 2L, 1L, 2L, 2L, 2L, 2L, 1L, 2L, 2L, 2L, 1L, 1L, 2L, 1L, 1L, 1L, 1L, 2L, 2L, 1L, 1L,…
CanyonView
  • 401
  • 3
  • 15
2
votes
1 answer

How to determine the x value on the edge of the violinplot for a mean line

I am trying to draw a mean line on violin plots, since I was not able to find a way to make sns replace the "median" line that comes from "quartiles", I decided to code so that for each case it draws on top. I am planning on drawing horizontal lines…
Cindy Burker
  • 117
  • 9
2
votes
2 answers

How to generate separate violinplots for each class and group

I have a pandas dataframe: df = pd.DataFrame(np.random.randint(0,100,size=(100, 4)), columns=list('ABCD')) df['Label'] = np.random.randint(0,2,size=100) I would like to create a figure in python where x-axis shows the class labels ('Class 0' and…
khemedi
  • 774
  • 3
  • 9
  • 19
2
votes
0 answers

Making violin plots for a time series in R

I'm trying to make violin plots for my study with repeated measures. Temperature was measured every minute during rest, exercise, and recovery. I want to visualize my data using violin plots every 10 minutes. Connecting the time points with a trace…
VeerleNL
  • 21
  • 2
2
votes
1 answer

python violin plot regular axis

I want to to a violin plot of binned data but at the same time be able to plot a model prediction and visualize how well the model describes the main part of the individual data distributions. My problem here is, I guess, that the x-axis after the…
Fuegon
  • 81
  • 1
  • 7
2
votes
1 answer

Violin plot with a strange shape

I want to compare the distribution of several dimensions of technologization using violin plots (the dimensions are measured by indices ranging from 1 to 5). 5 out of 6 violin plots look as you would expect, but one has a really odd shape that isn't…
2
votes
1 answer

Violin plot problem in Julia: Cannot use same x-positions for 2 datasets

I use Julia Version 1.4.2 and want to make a violin plot, where I have two datasets A and B, which I want to plot using the same x-ticks. I want that data A is the left half of each x-position and B the right half. Here a test example: using…
GeorgKyoto
  • 31
  • 3
2
votes
1 answer

How to make a grouped violinplot from dictionary

I'd like to make a violin plot from a dictionary. Here is an example of what my dictionary looks like, though my actual one has many more patients and many more values. paired_patients={'Patient_1': {'n':[1, nan, 3, 4], 't': [5,6,7,8]}, …
Emerson
  • 125
  • 8
2
votes
2 answers

Matplotlib / Seaborn violin plots for different data sizes

I have 3 one-dimensional data arrays A, B, C. All of them have different length. I would like to make a violin plot with 3 violins, one per each array. How do I do this? EDIT: I have solved the problem by writing a proxy function, but having to…
Aleksejs Fomins
  • 688
  • 1
  • 8
  • 20