# Is label an attribute of scatter() and lines() in Makie.jl?

**URL:** https://discourse.julialang.org/t/is-label-an-attribute-of-scatter-and-lines-in-makie-jl/68961
**Category:** Visualization
**Tags:** makie
**Created:** [September 29, 2021, 8:08pm UTC](https://discourse.julialang.org/t/is-label-an-attribute-of-scatter-and-lines-in-makie-jl/68961 "2021-09-29T20:08:02Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Adam\_Fleischhacker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adam_fleischhacker/32/24468_2.png) [@Adam\_Fleischhacker](https://discourse.julialang.org/u/Adam_Fleischhacker)
#### Post date: [September 29, 2021, 8:08pm UTC](https://discourse.julialang.org/t/is-label-an-attribute-of-scatter-and-lines-in-makie-jl/68961/1 "2021-09-29T20:08:02Z")

</div>

I am working on my understanding of the Makie package. In the plot from the help documentation ([https://makie.juliaplots.org/dev/examples/layoutables/legend/](https://makie.juliaplots.org/dev/examples/layoutables/legend/)), different markers get used with their legend labels determined by the `label` argument. Is this argument considered an attribute? I ask as I do not see it when using `help_attributes(scatter)` and `help_arguments()` isn’t currently implemented correctly. If it is an argument and not an attribute, what is the operational difference between attributes and arguments of the plotting function? Is there documentation for the non-attribute arguments? Thanks for helping me further my understanding.

```julia
f = Figure()

ax = Axis(f[1, 1])

sc1 = scatter!(randn(10, 2), color = :red, label = "Red Dots")
sc2 = scatter!(randn(10, 2), color = :blue, label = "Blue Dots")
scatter!(randn(10, 2), color = :orange, label = "Orange Dots")
scatter!(randn(10, 2), color = :cyan, label = "Cyan Dots")

axislegend()

axislegend("Titled Legend", position = :lb)

axislegend(ax, [sc1, sc2], ["One", "Two"], "Selected Dots", position = :rb,
    orientation = :horizontal)

f

```

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

---

<div class="post-metadata">

### Author: ![ffreyer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ffreyer/32/21569_2.png) [@ffreyer](https://discourse.julialang.org/u/ffreyer)
#### Post date: [September 29, 2021, 10:22pm UTC](https://discourse.julialang.org/t/is-label-an-attribute-of-scatter-and-lines-in-makie-jl/68961/2 "2021-09-29T22:22:53Z")

</div>

Kind of but not really. What is listed under `help_attributes` are keyword arguments that modify the plot somehow, like `color` etc. But you’re not limited to those - you can pass whatever you want as a kwarg and it’ll end up in `plot.attributes` (like all other attributes). Legends make use of that with `label`.

---

<div class="post-metadata">

### Author: ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://discourse.julialang.org/u/jules)
#### Post date: [September 30, 2021, 10:04am UTC](https://discourse.julialang.org/t/is-label-an-attribute-of-scatter-and-lines-in-makie-jl/68961/3 "2021-09-30T10:04:38Z")

</div>

This part grew a bit organically, we will think about the place for attributes like that which every plot object should have for future refactors. The attributes dict has become a bit messy

---

<div class="post-metadata">

### Author: ![Adam\_Fleischhacker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adam_fleischhacker/32/24468_2.png) [@Adam\_Fleischhacker](https://discourse.julialang.org/u/Adam_Fleischhacker)
#### Post date: [September 30, 2021, 2:33pm UTC](https://discourse.julialang.org/t/is-label-an-attribute-of-scatter-and-lines-in-makie-jl/68961/4 "2021-09-30T14:33:14Z")

</div>

Thanks! I would never have figured this out on my own.

---

<div class="post-metadata">

### Author: ![Adam\_Fleischhacker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adam_fleischhacker/32/24468_2.png) [@Adam\_Fleischhacker](https://discourse.julialang.org/u/Adam_Fleischhacker)
#### Post date: [September 30, 2021, 2:36pm UTC](https://discourse.julialang.org/t/is-label-an-attribute-of-scatter-and-lines-in-makie-jl/68961/5 "2021-09-30T14:36:16Z")

</div>

Gotcha: I think Makie is a tremendously ambitious and cool package. As I learn it, I keep having mental hiccoughs due to some of this organic growth as I try to digest it all, but I do think that will all get resolved in time. Thx!

---

<div class="post-metadata">

### Author: ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://discourse.julialang.org/u/jules)
#### Post date: [September 30, 2021, 2:43pm UTC](https://discourse.julialang.org/t/is-label-an-attribute-of-scatter-and-lines-in-makie-jl/68961/6 "2021-09-30T14:43:25Z")

</div>

Yes I definitely understand how some things are confusing from the outside. Often it’s not clear what the best direction to go in is until some approaches are tried “live” and you go on for a couple months. So sometimes this leads to less than ideal implementations just because we don’t want to release breaking versions all the time. But most of these things will get straightened out sooner or later, so feedback from users is very valuable that points us to these issues.

---

<div class="post-metadata">

### Author: ![Bardo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bardo/32/21601_2.png) [@Bardo](https://discourse.julialang.org/u/Bardo)
#### Post date: [October 2, 2021, 2:44pm UTC](https://discourse.julialang.org/t/is-label-an-attribute-of-scatter-and-lines-in-makie-jl/68961/7 "2021-10-02T14:44:44Z")

</div>

> [@Adam\_Fleischhacker](#):
>
> I am working on my understanding of the Makie package

Had a similar question [here](https://discourse.julialang.org/t/plots-and-subplots-with-makie/69113).  
How to probe into the parts of a figure, see its components, possible attributes and values?
