# Asymmetric violin plot (different right/left series)

**URL:** https://discourse.julialang.org/t/asymmetric-violin-plot-different-right-left-series/3770
**Category:** Visualization
**Tags:** plotting
**Created:** [May 17, 2017, 12:06pm UTC](https://discourse.julialang.org/t/asymmetric-violin-plot-different-right-left-series/3770 "2017-05-17T12:06:32Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![sylvaticus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sylvaticus/32/203883_2.png) [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)
#### Post date: [May 17, 2017, 12:06pm UTC](https://discourse.julialang.org/t/asymmetric-violin-plot-different-right-left-series/3770/1 "2017-05-17T12:06:32Z")

</div>

Hello, I am trying to obtain a violin plot with different series on the right and on the left.

I have tried this code plying from the example in the doc, but I am unable to specify that one series should be on the left and the other one on the right:

```julia
singers = dataset("lattice","singer")
singers[:chorus] = "Scala"
singers2 = deepcopy(singers)
singers2[:Height] = singers2[:Height]+5
singers2[:chorus] = "Moscow"
singersTot = vcat(singers,singers2)
myPlot = violin(singersTot,:VoicePart,:Height, group=:chorus, marker=(0.2,:blue,stroke(0)))

```

![](https://global.discourse-cdn.com/julialang/original/3X/f/0/f027353d7231b03dc3c9535283a2c47755f8113b.png)

---

<div class="post-metadata">

### Author: ![sylvaticus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sylvaticus/32/203883_2.png) [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)
#### Post date: [May 17, 2017, 1:38pm UTC](https://discourse.julialang.org/t/asymmetric-violin-plot-different-right-left-series/3770/2 "2017-05-17T13:38:27Z")

</div>

ok, it seems it _was_ not possible… I worked on the StatsPlots package and issued a [pull request](https://github.com/JuliaPlots/StatPlots.jl/pull/52) to allow an additional `:side` parameter:

```julia
using DataFrames, Plots, StatPlots, RDatasets
singers = dataset("lattice","singer")
singers[:chorus] = "Scala"
singers2 = deepcopy(singers)
singers2[:Height] = singers2[:Height]+5
singers2[:chorus] = "Moscow"
singersTot = vcat(singers,singers2)
myPlot = violin(singers,:VoicePart,:Height, side=:right, marker=(0.2,:blue,stroke(0)), label="Scala")
violin!(singers2,:VoicePart,:Height, side=:left, marker=(0.2,:red,stroke(0)), label="Moscow")

```

![](https://global.discourse-cdn.com/julialang/original/3X/b/3/b39dbcc7639775a1e9a7369eb05c3b4eada8f7f4.png)

---

<div class="post-metadata">

### Author: ![mkborregaard](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkborregaard/32/556_2.png) [@mkborregaard](https://discourse.julialang.org/u/mkborregaard)
#### Post date: [May 17, 2017, 9:42pm UTC](https://discourse.julialang.org/t/asymmetric-violin-plot-different-right-left-series/3770/3 "2017-05-17T21:42:19Z")

</div>

Thanks for the nice work!
