# 3D scatter with AlgebraOfGraphics.jl

**URL:** https://discourse.julialang.org/t/3d-scatter-with-algebraofgraphics-jl/63686
**Category:** Visualization
**Tags:** makie, algebraofgraphics
**Created:** [June 28, 2021, 10:37am UTC](https://discourse.julialang.org/t/3d-scatter-with-algebraofgraphics-jl/63686 "2021-06-28T10:37:38Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![juliohm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juliohm/32/215266_2.png) [@juliohm](https://discourse.julialang.org/u/juliohm)
#### Post date: [June 28, 2021, 10:37am UTC](https://discourse.julialang.org/t/3d-scatter-with-algebraofgraphics-jl/63686/1 "2021-06-28T10:37:38Z")

</div>

Is it possible to get a 3D scatter plot with AlgebraOfGraphics.jl? I tried it with

```julia
data(df) * mapping(:X, :Y, :Z) |> draw

```

but it only shows a 2D scatter as if the3rd argument `:Z` was ignored.

---

<div class="post-metadata">

### Author: ![lazarusA](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lazarusa/32/6571_2.png) [@lazarusA](https://discourse.julialang.org/u/lazarusA)
#### Post date: [June 28, 2021, 11:11am UTC](https://discourse.julialang.org/t/3d-scatter-with-algebraofgraphics-jl/63686/2 "2021-06-28T11:11:41Z")

</div>

did you pass your axis as

`axis = (type = Axis3,),` ?

with that, it should work, i.e.,

`draw(plt3d; axis = (type = Axis3,))`

---

<div class="post-metadata">

### Author: ![juliohm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juliohm/32/215266_2.png) [@juliohm](https://discourse.julialang.org/u/juliohm)
#### Post date: [June 28, 2021, 11:37am UTC](https://discourse.julialang.org/t/3d-scatter-with-algebraofgraphics-jl/63686/3 "2021-06-28T11:37:55Z")

</div>

Remember trying it as well but the scatter dots didn’t show up. Will try again with larger marker size.

---

<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: [June 28, 2021, 12:11pm UTC](https://discourse.julialang.org/t/3d-scatter-with-algebraofgraphics-jl/63686/4 "2021-06-28T12:11:34Z")

</div>

GLMakie has a 3d scatter bug in Axis3, which gives tiny markers that are basically invisible. CairoMakie will work.

---

<div class="post-metadata">

### Author: ![juliohm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juliohm/32/215266_2.png) [@juliohm](https://discourse.julialang.org/u/juliohm)
#### Post date: [June 28, 2021, 12:20pm UTC](https://discourse.julialang.org/t/3d-scatter-with-algebraofgraphics-jl/63686/5 "2021-06-28T12:20:01Z")

</div>

This bug also affects WGLMakie?

---

<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: [June 28, 2021, 12:23pm UTC](https://discourse.julialang.org/t/3d-scatter-with-algebraofgraphics-jl/63686/6 "2021-06-28T12:23:49Z")

</div>

Probably, as its implementation is derived from GLMakie.

---

<div class="post-metadata">

### Author: ![sdanisch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sdanisch/32/1406_2.png) [@sdanisch](https://discourse.julialang.org/u/sdanisch)
#### Post date: [June 28, 2021, 12:33pm UTC](https://discourse.julialang.org/t/3d-scatter-with-algebraofgraphics-jl/63686/7 "2021-06-28T12:33:15Z")

</div>

In the near future, we want to make a markersize bug fixing session, which will involve writing rigorous tests for markersizes/line sizes across backends + plotting types, and fix all bugs we find along the way 😉

---

<div class="post-metadata">

### Author: ![juliohm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juliohm/32/215266_2.png) [@juliohm](https://discourse.julialang.org/u/juliohm)
#### Post date: [June 28, 2021, 1:18pm UTC](https://discourse.julialang.org/t/3d-scatter-with-algebraofgraphics-jl/63686/8 "2021-06-28T13:18:50Z")

</div>

Also, it would be nice if AOG.jl could figure out the Axis type directly from the number of arguments in `mapping(:X, :Y, :Z)`.
