# Changing the colors of certain boxes in a groupedboxplot

**URL:** https://discourse.julialang.org/t/changing-the-colors-of-certain-boxes-in-a-groupedboxplot/114074
**Category:** New to Julia
**Tags:** question
**Created:** [May 10, 2024, 1:12am UTC](https://discourse.julialang.org/t/changing-the-colors-of-certain-boxes-in-a-groupedboxplot/114074 "2024-05-10T01:12:42Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![JBH\_84](https://avatars.discourse-cdn.com/v4/letter/j/c37758/32.png) [@JBH\_84](https://discourse.julialang.org/u/JBH_84)
#### Post date: [May 10, 2024, 1:12am UTC](https://discourse.julialang.org/t/changing-the-colors-of-certain-boxes-in-a-groupedboxplot/114074/1 "2024-05-10T01:12:42Z")

</div>

i am using plots.jl to create some box and whisker plots.

I would like to change the boxes of certain colors in the following graph. however when i tried defining my color array that specified which years i wanted to be of a different color i kept getting an error msg.

first i tried defining the color\_array to be the same size as the final group data (44). that didnt work.  
then i tried defining the color\_array to be the same size as the raw daily values that are getting grouped by julia (3870). that didnt work either

suggestions?

 ![example](https://global.discourse-cdn.com/julialang/original/3X/3/0/3049c10bdd63d72271cb061d0ec8c9ea89a153e9.jpeg)

````julia
CAR_8760_Temps_box = groupedboxplot(df_regions_winter_Y,df_regions_winter_CAR_8760_Temps, bar_width = 0.8, label = "CAR", color=color_array, ylims=(-20,75))
CAR_8760_Temps_box = plot!(CAR_8760_Temps_box, xrot=45, xtickfontsize=6, ylabel="Temp (*F)",ylabelfontsize=7, ytickfontsize=7, yticks=(-20:10:70))```
````
