# How to set gap between multiple scatter plot - Plotly

**URL:** <https://discourse.julialang.org/t/how-to-set-gap-between-multiple-scatter-plot-plotly/12145>\
**Category:** Performance\
**Created:** [July 3, 2018, 8:14pm UTC](https://discourse.julialang.org/t/how-to-set-gap-between-multiple-scatter-plot-plotly/12145 "2018-07-03T20:14:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mvcavalcanti](https://avatars.discourse-cdn.com/v4/letter/m/919ad9/32.png) [@mvcavalcanti](https://discourse.julialang.org/u/mvcavalcanti)\
**Post date:** [July 3, 2018, 8:14pm UTC](https://discourse.julialang.org/t/how-to-set-gap-between-multiple-scatter-plot-plotly/12145/1 "2018-07-03T20:14:25Z")

</div>

Hi.

I’d like to compare values of two different cases through scatter plots and basically this is what I have now:

 ![discourse-question](https://global.discourse-cdn.com/julialang/original/3X/0/2/02edf927916f346cd409ff45c006dadc3610793d.png)

As you can see, each correspondent variable of my cases are above the another. What I would like to do is put the value of floor case 1 side by side with the value of floor case 2, and so on, something like change the bargap in a bar plot situation.

Is there a way to do this in Plotly?

Thanks.

---

<div class="post-metadata">

**Author:** ![davidanthoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidanthoff/32/223493_2.png) [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Post date:** [July 4, 2018, 5:23am UTC](https://discourse.julialang.org/t/how-to-set-gap-between-multiple-scatter-plot-plotly/12145/2 "2018-07-04T05:23:07Z")

</div>

Here is how you could do it with [VegaLite.jl](https://github.com/fredo-dedup/VegaLite.jl) (assuming you have precomputed `floor`, `average` and `roof`):

```julia
data |>
@vlplot(:point, x="case:o", column={"year:n"}, y={:values, title=""}, color=:cat1, shape=:cat1)

```

And you’ll get:  
 ![foo](https://global.discourse-cdn.com/julialang/original/3X/e/5/e5167dde515be3cdde31f176fb4301dad0d27e77.png)

This assumes you have your data in a table with columns `cases`, `year`, `values` and `cat1`.

---

<div class="post-metadata">

**Author:** ![mvcavalcanti](https://avatars.discourse-cdn.com/v4/letter/m/919ad9/32.png) [@mvcavalcanti](https://discourse.julialang.org/u/mvcavalcanti)\
**Post date:** [July 5, 2018, 8:30pm UTC](https://discourse.julialang.org/t/how-to-set-gap-between-multiple-scatter-plot-plotly/12145/3 "2018-07-05T20:30:18Z")

</div>

@davidanthoff Thank you very much!!
