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
1 answer

Pattern fill violin plots (vioplot package)

Is there a way to fill violin plots with different patterns when using vioplot package to create plots in R? I have figured out how to change color using col as shown below. But I don't even know how to begin with hatching in…
d.b
  • 32,245
  • 6
  • 36
  • 77
0
votes
1 answer

How to convert a ggplot2 bar plot into a violin plot

I have searched in some topics and I have found the main idea of ploting a violin plot but when I combine those scripts in mine (I am going to show it below), the results is not acceptable. it seems that drawing a violin plot from scratch is more…
Farbod
  • 67
  • 3
  • 12
0
votes
1 answer

Seaborn and plotly violin plots in Jupyter Notebook kill kernel

I am trying to generate a violin plot using seaborn 0.7.1 in a Jupyter notebook. Boxplot works fine for the same data, but violinplot causes the kernel to "die unexpectedly." I have also tried using plotly 1.12.9 to do a violin plot (following the…
Taylor
  • 151
  • 1
  • 2
  • 9
0
votes
0 answers

Getting a strange scatterplot like image when trying to create a violin plot using R ggplot2

I am trying to create a violin plot comparing genetic variant class against age at time of surgery and I am getting some very weird results. I have been using the below guide, which makes creating violin plots look easy:…
David Ross
  • 1,087
  • 1
  • 14
  • 21
0
votes
1 answer

Adding extra info to a plot! R

I created the following violin plot by appending different plots and with this lines: windows() mat<-(matrix(1:3,ncol=3)) layout(mat,widths = rep.int(1, ncol(mat)),heights = rep.int(1,nrow(mat)),respect =F) layout.show(n = 3) par(mar=c(4, 0.2, 2,…
Cebs
  • 180
  • 13
0
votes
1 answer

boxplot in seaborn violin plot based on actual data or on kde?

I'm using seaborn violinplot with inner='box' and with cut=0. I see the boxplot has a line that extends all the way to the cut. That suggests to me that the boxplot was computed not on the data itself, but on the kde. Is this correct?
nbecker
  • 1,645
  • 5
  • 17
  • 23
0
votes
0 answers

R - generate multiple datasets for vioplot based on number of levels of a column

When I am using violin plot for one species (Pan), my code looks like this: my.vioplot(getFemales(toPlotAggregated,"Pan"),getMales(toPlotAggregated,"Pan"),col=c("red","blue"),names=c("females","males")) it generates single plot with females in red…
Perlnika
  • 4,796
  • 8
  • 36
  • 47
0
votes
2 answers

Linear density plots

I currently have data that tell me blood pressure by age for those 10-18. I would like to create a density plot for each age similar to a violin plot. It would sort of look like this, but with just the density plots. The key is to get a histogram…
0
votes
1 answer

How does one create a box/violin plot in ggplot with numeric x values?

I would like to create a box or violin plot from 2D numerical data much like the one given in Figure 1A and 1B here (Goodman, et al., Science, 2003) and given below: Is there an intuitive way to do this in ggplot2 given the x-y data? Essentially, I…
saladi
  • 3,103
  • 6
  • 36
  • 61
-1
votes
2 answers

Why does my violinplot start at a negative number even though my scale starts at 0?

Hi everyone, im currently just trying around some different visualisation methods in Kaggle and I stumbled upon the violinplot in seaborn. Even though my data set only contains positive numbers (0-1900ish), the violinplot still starts at -100 and…
SAugustus
  • 27
  • 2
-1
votes
1 answer

Only Show positive side of a violin plot (Remove Negative Tail) in Plotly R

The violin plot im currently trying to create shows tails going into the negative side of the y-axis. Is there anyway to remove the negative tail of these violin plots? Im using this plotly function to generate the plot: fig <- plot_ly(data =…
Danish Zahid Malik
  • 541
  • 2
  • 7
  • 19
-1
votes
1 answer

violinplot: split parts aren't joined

Who do know why the splitted parts aren't joined? sns.violinplot(x = "good", y = "fixed acidity", hue = "good", data = df, palette="muted", split=True, inner = "quartile", bw=.2)
Mike B.
  • 1
  • 1
-1
votes
1 answer

Discrete color sequence for plotly violin plot

How can I apply the color sequence color_discrete_sequence=["green", "blue", "yellow", "magenta"] to the days “Sunday”, “Saturday”, “Thursday”, “Friday” in the plot below, i.e. Sunday should be green, Saturday blue etc? import plotly.graph_objects…
hans
  • 323
  • 1
  • 14
-1
votes
1 answer

Split violin plot for two variables with seaborn

I would like to create a split violin plot for two variables only. There is a lack of examples like this on internet. Using => http://seaborn.pydata.org/generated/seaborn.violinplot.html For example: VAR1: 2, 3, 5, 6, 2, 4, 5 and VAR2: 3, 2, 5, 6,…
Pinguim
  • 3
  • 1
  • 3
-1
votes
1 answer

Violin graph in r

I am trying to write a script that plots violin plot without explicitly describing the levels of the plot. lets say: x1=c(x11,x22,....,x1n), x2=c(x21,x22,...,x2m), ... xp=(xl1,....,xlj). If I had the number of levels in advance I could have…
user552231
  • 1,095
  • 3
  • 21
  • 40
1 2 3
24
25