# Please, how do I remove the key from a colored bar chart? Deadline immenient, help greatly appreciated

**URL:** https://discourse.julialang.org/t/please-how-do-i-remove-the-key-from-a-colored-bar-chart-deadline-immenient-help-greatly-appreciated/99248
**Category:** Visualization
**Tags:** gadfly
**Created:** [May 22, 2023, 7:31pm UTC](https://discourse.julialang.org/t/please-how-do-i-remove-the-key-from-a-colored-bar-chart-deadline-immenient-help-greatly-appreciated/99248 "2023-05-22T19:31:23Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![johnabs](https://avatars.discourse-cdn.com/v4/letter/j/a9a28c/32.png) [@johnabs](https://discourse.julialang.org/u/johnabs)
#### Post date: [May 22, 2023, 7:31pm UTC](https://discourse.julialang.org/t/please-how-do-i-remove-the-key-from-a-colored-bar-chart-deadline-immenient-help-greatly-appreciated/99248/1 "2023-05-22T19:31:23Z")

</div>

I currently have some separate data frames that aren’t particularly amenable to being combined; but I need to plot them on the same plot but with a single legend/color key. I have done so with the following code, but when I “hide” the legend, it’s still apparent the spacing between the two plots hasn’t decreased, and there’s still a single colored square. (Note the following code is being made for a bunch of plots, hence the map).

```julia
temp=map(x->time_behavior(x),instances)
atemp=map(x->agent_time_behavior(x),instances)
df=zip(temp,atemp)
set_default_plot_size(21cm, 8cm)

plots=map(x->hstack(plot(x[1],x=:step,y=:value,color=:Strategy, Geom.bar(position=:stack),Guide.ylabel("Count"), Guide.xlabel("Time Step"), Guide.colorkey(title="",labels=[""]),
                         ),
plot(x[2],x=:id,y=:value,color=:variable, Geom.bar(position=:stack), Guide.ylabel("Count"), Guide.xlabel("Agent"))
                  ), df)

```

Can anybody help me get this resolved? I am so close and I need these results for a conference presentation in a few days.

Best,  
johnabs

---

<div class="post-metadata">

### Author: ![bjarthur](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bjarthur/32/9638_2.png) [@bjarthur](https://discourse.julialang.org/u/bjarthur)
#### Post date: [May 22, 2023, 8:46pm UTC](https://discourse.julialang.org/t/please-how-do-i-remove-the-key-from-a-colored-bar-chart-deadline-immenient-help-greatly-appreciated/99248/2 "2023-05-22T20:46:07Z")

</div>

when asking questions like this it is much easier for folks to give you help if you post all the code needed to reproduce the problem. so they can cut and paste and try it for themselves. preferrably boiled down to just it’s essence. plus a pic of it’s output.

that being said, maybe `Theme(key_position=:none)` will do the trick?

---

<div class="post-metadata">

### Author: ![johnabs](https://avatars.discourse-cdn.com/v4/letter/j/a9a28c/32.png) [@johnabs](https://discourse.julialang.org/u/johnabs)
#### Post date: [May 22, 2023, 10:08pm UTC](https://discourse.julialang.org/t/please-how-do-i-remove-the-key-from-a-colored-bar-chart-deadline-immenient-help-greatly-appreciated/99248/3 "2023-05-22T22:08:07Z")

</div>

That worked beautifully, thank you!

And good to know, but I can’t release the data currently, so I was unsure how much to post, thank you again (and for helping regardless of the lack of code)!
