# How to set the same uniform units for all axes in 3D surface plot using Plots.jl?

**URL:** <https://discourse.julialang.org/t/how-to-set-the-same-uniform-units-for-all-axes-in-3d-surface-plot-using-plots-jl/108510>\
**Category:** Visualization\
**Tags:** plots, 3d\
**Created:** [January 8, 2024, 11:30am UTC](https://discourse.julialang.org/t/how-to-set-the-same-uniform-units-for-all-axes-in-3d-surface-plot-using-plots-jl/108510 "2024-01-08T11:30:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![homocomputeris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/homocomputeris/32/8933_2.png) [@homocomputeris](https://discourse.julialang.org/u/homocomputeris)\
**Post date:** [January 8, 2024, 11:30am UTC](https://discourse.julialang.org/t/how-to-set-the-same-uniform-units-for-all-axes-in-3d-surface-plot-using-plots-jl/108510/1 "2024-01-08T11:30:34Z")

</div>

I want to have a “normal” plot where all axes are the same, without any scaling, i.e. the length in every axis is the same.

```julia
surface(xs, ts, f; fillalpha=0.9, camera=(20, 40), aspect_ratio=1)

```

gives this where 1 in the z-axis is approximately equal to 12 in the x- and y-axes.  
 ![surface](https://global.discourse-cdn.com/julialang/original/3X/3/e/3ecc87e8fe3d26be16b4e3c1ff22456336300735.png)

---

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [January 8, 2024, 11:51am UTC](https://discourse.julialang.org/t/how-to-set-the-same-uniform-units-for-all-axes-in-3d-surface-plot-using-plots-jl/108510/2 "2024-01-08T11:51:52Z")

</div>

Check [this post](https://discourse.julialang.org/t/plots-jl-aspect-ratio-1-0-for-3d-plot/58607/2) on isometric 3D plotting using Plots.jl.

---

<div class="post-metadata">

**Author:** ![homocomputeris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/homocomputeris/32/8933_2.png) [@homocomputeris](https://discourse.julialang.org/u/homocomputeris)\
**Post date:** [January 8, 2024, 12:47pm UTC](https://discourse.julialang.org/t/how-to-set-the-same-uniform-units-for-all-axes-in-3d-surface-plot-using-plots-jl/108510/3 "2024-01-08T12:47:41Z")

</div>

Thanks!  
Though it seems easier just to ignore the problem.

---

<div class="post-metadata">

**Author:** ![JM\_Beckers](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jm_beckers/32/22482_2.png) [@JM\_Beckers](https://discourse.julialang.org/u/JM_Beckers)\
**Post date:** [January 8, 2024, 3:10pm UTC](https://discourse.julialang.org/t/how-to-set-the-same-uniform-units-for-all-axes-in-3d-surface-plot-using-plots-jl/108510/4 "2024-01-08T15:10:32Z")

</div>

You could just normalize each coordinate

```julia
surface((xs.-minimum(xs)./(maximum(xs)-minimum(xs)), (fs.-minimum(fs)./(maximum(fs)-minimum(fs)), (f.-minimum(f)./(maximum(f)-minimum(f)); fillalpha=0.9, camera=(20, 40), aspect_ratio=1)

```
