# Axis labels in makie.jl 3d plots

**URL:** <https://discourse.julialang.org/t/axis-labels-in-makie-jl-3d-plots/93050>\
**Category:** Visualization\
**Tags:** question, plotting, data, visualization\
**Created:** [January 16, 2023, 9:19pm UTC](https://discourse.julialang.org/t/axis-labels-in-makie-jl-3d-plots/93050 "2023-01-16T21:19:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![math\_opt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/math_opt/32/25317_2.png) [@math\_opt](https://discourse.julialang.org/u/math_opt)\
**Post date:** [January 16, 2023, 9:19pm UTC](https://discourse.julialang.org/t/axis-labels-in-makie-jl-3d-plots/93050/1 "2023-01-16T21:19:42Z")

</div>

I have a very basic question about plotting 3D data using `Makie.jl`. How to set the axes labels? An MWE is provided below:

```julia
using CairoMakie
using Random

fig = scatter(rand(10), rand(10), rand(10))

xlabel!("label-1")
ylabel!("label-2")
zlabel!("label-3")

```

The above code doesn’t work.

I can probably do something like:

```julia
f = Figure()
  ax = Axis3(
        f[1,1],
        xlabel = "label-1",
        ylabel = "label-2",
        zlabel = "label-3",
  );

scatter!(rand(10), rand(10), rand(10))

```

This works, but I prefer the look of the 3D plot generated from the first piece of code. What’s the way around this? Thanks.
