# Odd behaviour of labels with plotlyjs in Plots.jl

**URL:** https://discourse.julialang.org/t/odd-behaviour-of-labels-with-plotlyjs-in-plots-jl/3419
**Category:** General Usage
**Tags:** question
**Created:** [April 28, 2017, 6:20am UTC](https://discourse.julialang.org/t/odd-behaviour-of-labels-with-plotlyjs-in-plots-jl/3419 "2017-04-28T06:20:54Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![colintbowers](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/colintbowers/32/8033_2.png) [@colintbowers](https://discourse.julialang.org/u/colintbowers)
#### Post date: [April 28, 2017, 6:20am UTC](https://discourse.julialang.org/t/odd-behaviour-of-labels-with-plotlyjs-in-plots-jl/3419/1 "2017-04-28T06:20:54Z")

</div>

Hi all,

I’m having a bit of trouble with labels when using `plotlyjs()` in Plots.jl. I’m running Julia v0.5 on Ubuntu 16.04, with Plots 0.10.3, and PlotlyJS 0.6.0. Working in the REPL:

```
using Plots
plotlyjs()
plot(randn(10, 2))

```

produces two lines with a legend that has labels “y1” and “y2” (the default labels). All good so far. Now I try:

```
plot(randn(10, 2), label=["hello", "world"])

```

and I get a legend that has labels “trace 0” and “trace 1”. Am I doing something stupid here? I know Plots.jl is under heavy development, so if this is a bug and it would be useful for me to file a bug report, please let me know and I will do so.

Thanks in advance to all responders.

Colin

---

<div class="post-metadata">

### Author: ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)
#### Post date: [April 28, 2017, 6:25am UTC](https://discourse.julialang.org/t/odd-behaviour-of-labels-with-plotlyjs-in-plots-jl/3419/2 "2017-04-28T06:25:15Z")

</div>

Plots.jl uses columns for each separate “series” (line). Your labels should match that. This you want your one label per column, i.e. you want a row vector `label=["hello" "world"]`

---

<div class="post-metadata">

### Author: ![colintbowers](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/colintbowers/32/8033_2.png) [@colintbowers](https://discourse.julialang.org/u/colintbowers)
#### Post date: [April 28, 2017, 10:28am UTC](https://discourse.julialang.org/t/odd-behaviour-of-labels-with-plotlyjs-in-plots-jl/3419/3 "2017-04-28T10:28:31Z")

</div>

Gah! Sorry, I should have tried that.

Thanks for the quick reply.

Colin
