# Sharing first coordinate

**URL:** https://discourse.julialang.org/t/sharing-first-coordinate/62476
**Category:** General Usage
**Tags:** algebraofgraphics
**Created:** [June 6, 2021, 9:40pm UTC](https://discourse.julialang.org/t/sharing-first-coordinate/62476 "2021-06-06T21:40:54Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![jzr](https://avatars.discourse-cdn.com/v4/letter/j/eb9ed0/32.png) [@jzr](https://discourse.julialang.org/u/jzr)
#### Post date: [June 6, 2021, 9:40pm UTC](https://discourse.julialang.org/t/sharing-first-coordinate/62476/1 "2021-06-06T21:40:54Z")

</div>

```julia
mx = mapping(:x)
mx * (mapping(_, :y1 => :y) * visual(Scatter) + mapping(_, :y2 => :y) * visual(Lines))

```

@piever How can I specify two different layers that share the same `x` coordinate without repeating myself?

---

<div class="post-metadata">

### Author: ![piever](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/piever/32/1815_2.png) [@piever](https://discourse.julialang.org/u/piever)
#### Post date: [June 7, 2021, 8:42am UTC](https://discourse.julialang.org/t/sharing-first-coordinate/62476/2 "2021-06-07T08:42:42Z")

</div>

When multiplying `mapping`s, positional arguments are concatenated, so just

```julia
mx = mapping(:x)
mx * (mapping(:y1 => :y) * visual(Scatter) + mapping(:y2 => :y) * visual(Lines))

```

should work. This may need documentation, it looks like [here](http://juliaplots.org/AlgebraOfGraphics.jl/dev/layers/operations/#Multiplication-on-individual-layers) it only says “mappings are merged”, but that’s not completely accurate for the positional part.
