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
0
votes
2 answers

Seaborn (violinplot) too many y-axis values

I have a couple of subplots and the data are probabilities, so should (and do) range between 0 and 1. When I plot them with a violinplot the y-axis of ax[0] extends above 1 (see pic). I know this is just because of the distribution kernel that the…
fffrost
  • 1,659
  • 1
  • 21
  • 36
0
votes
1 answer

How to avoid overlapping labels using split violin plot in ggplot2 (R)

I am generating split violin plots using the geom_split_violin function created here: Split violin plot with ggplot2. Then, I add labels for sample sizes (n = ...) for each split violin. However, unfortunately the labels overlap. How could I please…
Sylvia Rodriguez
  • 1,203
  • 2
  • 11
  • 30
0
votes
1 answer

Why do some of my violin plots look "wavy" for discrete scales?

I have overlayed violin plots comparing group A and group B scores for a particular section of a survey, facet wrapped by section. The scores are discrete 1-7 values. In some of these violin plots, the smoothing works as expected. In others, one…
Carolyn
  • 93
  • 8
0
votes
1 answer

Geom_violin + geom_error_bar

I have 500 estimations of 3 objects. My goal is to plot a violin plot to understand the distribution of the estimation, but at the same time, I want to visualize the standard error (evaluated in another way), the mean value estimate and the true…
TheAvenger
  • 458
  • 1
  • 6
  • 19
0
votes
1 answer

plot.ly dash multigrouped violins?

I would like to, using plot.ly dash, plot grouped violins with a hierarchical grouping. It is not apparent to me from the docs. For clarity, consider the tips dataset that they provide. Assume that I have modified the dataset to bin the tips to…
SumNeuron
  • 4,850
  • 5
  • 39
  • 107
0
votes
1 answer

Violin plots do not work with negative values in python-plotly

I am trying to plot an interactive violin plot using plotly in python, but it does not work with negative values. If you run this code, the output (out.html) does not show anything. If you remove all the "-" characters (or even just a couple of…
Fidel
  • 37
  • 5
0
votes
1 answer

Add new geom as new row in ggplot2, preventing layering of plots

I am pretty sure that this is easy to do but I can't seem to find a proper way to query this question into google or stack, so here we are: I have a plot made in ggplot2 which makes use of geom_jitter(), efficiently creating one row for each element…
schmat_90
  • 572
  • 3
  • 22
0
votes
1 answer

How to add value of mean in number in violin plot using base R

I have data Name V1 M1 50 M2 10 M1 30 M1 45 M2 5 M2 7 With my code, I was able to produce a violin plot. But I don't know how to put the value of mean in each violin plot in number using base R (not ggplot)? Here…
Lara
  • 73
  • 1
  • 8
0
votes
2 answers

Axis tranformation in ggplot - How do I change the scale on a specific interval?

I've made a violin plot that looks like this: As we can see most of the data lies near the region where the score is 0.90-0.95. What I wish is to focus on the interval 0.75 to 1.00 by changing the scale giving less space to ratings from 0 to…
Akeka
  • 3
  • 2
0
votes
0 answers

plotly.js: why an area is calculated if all values are 0?

I have an array of values from 0-10 with and 20 groups in each. For some groups or categories all values are 0. When I use violin plot, there is an area calculated which is below 0 as in figure (? mark): But I want to get the following that I got…
m.i.cosacak
  • 708
  • 7
  • 21
0
votes
1 answer

How can I create a violin plot of a list of data separated by a binary class?

I'm looking to show a violin plot of peoples ages, each belonging to either class 0 or 1. I have created a list of ages, and a seperate list corresponding to class. I am able to plot a violin plot for a single list, but how can I plot the age…
Brent
  • 51
  • 2
  • 10
0
votes
1 answer

Add legend for a custom stat_summary fun.data

How can I add a legend for an object I have added to my plot with stat_summary? Here is an example: ToothGrowth$dose <- as.factor(ToothGrowth$dose) p <- ggplot(ToothGrowth, aes(x=dose, y=len)) + geom_violin(trim=FALSE) data_summary <-…
paropunam
  • 488
  • 2
  • 11
0
votes
1 answer

How to map error bars in an R geom_violin plot

Somewhere I'm making a very simple mistake. Thank you for pointing out where this mistake is happening... I'd like to create a violin plot with overlaying confidence intervals and a group means. Much like the example at this terrific new package.…
Devon O'Rourke
  • 237
  • 2
  • 11
0
votes
1 answer

Create violinplots in seaborn using data from lists

I want to create a violinplot using seaborn and I am a little confused on how to use the parameters. I have my data stored in 6 lists (all having the same length): file1_score & file1_rms * - the 2 lists for file 1* file2_score & file2_rms * - the…
AdeEla
  • 279
  • 1
  • 3
  • 13
0
votes
1 answer

ggplot2 geom_violon fill color

I'm having trouble setting the colors of my violin plots. I have a melted matrix, where one column is X (variable) group of each violin plot, and the second column is a values for these groups. (30x2. Please see an example of the data below. I want…
Raz
  • 1
  • 1
  • 4