# Problem with Violin and Boxplots 

**URL:** <https://discourse.julialang.org/t/problem-with-violin-and-boxplots/19149>\
**Category:** Visualization\
**Created:** [December 31, 2018, 4:31pm UTC](https://discourse.julialang.org/t/problem-with-violin-and-boxplots/19149 "2018-12-31T16:31:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![daler6](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/daler6/32/13930_2.png) [@daler6](https://discourse.julialang.org/u/daler6)\
**Post date:** [December 31, 2018, 4:31pm UTC](https://discourse.julialang.org/t/problem-with-violin-and-boxplots/19149/1 "2018-12-31T16:31:19Z")

</div>

I am fairly new to Julia, so I have been working through the Plots tutorial at [Tutorial · Plots](http://docs.juliaplots.org/latest/tutorial/). I run into a number of problems in the first example under " Using Series Recipes". Specifically, I enter the code provided:

y = rand(100,4) # Four series of 100 points each  
violin([“Series 1” “Series 2” “Series 3” “Series 4”],y,leg=false)

but receive an error stating “ERROR: BoundsError: attempt to access 1-element Array{Float64,1} at index [2]”.

I get the same error with the boxplot command.

I am using Julia 1.03 in a Atom/Juno environment and have the latest versions of the necessary packages, i.e., Plots, StatPlots, etc. I have also tried to find a workaround using DataFrames, but also run into problems there. Finally, I have been looking for clear documentation on violin and boxplot, with only limited success. Any help would be greatly appreciated.

Sincerely, Dale

---

<div class="post-metadata">

**Author:** ![Ajaychat3](https://avatars.discourse-cdn.com/v4/letter/a/ecd19e/32.png) [@Ajaychat3](https://discourse.julialang.org/u/Ajaychat3)\
**Post date:** [December 31, 2018, 5:26pm UTC](https://discourse.julialang.org/t/problem-with-violin-and-boxplots/19149/2 "2018-12-31T17:26:00Z")

</div>

Please provide full list of commands used by you.

---

<div class="post-metadata">

**Author:** ![daler6](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/daler6/32/13930_2.png) [@daler6](https://discourse.julialang.org/u/daler6)\
**Post date:** [December 31, 2018, 6:31pm UTC](https://discourse.julialang.org/t/problem-with-violin-and-boxplots/19149/3 "2018-12-31T18:31:52Z")

</div>

Here is everything I entered starting from a new session of Julia:

using Plots, StatPlots  
y = rand(100,4)  
violin([“Series 1” “Series 2” “Series 3” “Series 4”],y,leg=false)

---

<div class="post-metadata">

**Author:** ![findmyway](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/findmyway/32/4946_2.png) [@findmyway](https://discourse.julialang.org/u/findmyway)\
**Post date:** [January 1, 2019, 6:00am UTC](https://discourse.julialang.org/t/problem-with-violin-and-boxplots/19149/4 "2019-01-01T06:00:21Z")

</div>

I’m also experiencing the same error.

See

[https://github.com/JuliaPlots/StatPlots.jl/issues/198](https://github.com/JuliaPlots/StatPlots.jl/issues/198)
