# Legend position for 3D plots

**URL:** <https://discourse.julialang.org/t/legend-position-for-3d-plots/115539>\
**Category:** General Usage\
**Tags:** question, plotting, gr\
**Created:** [June 12, 2024, 9:07am UTC](https://discourse.julialang.org/t/legend-position-for-3d-plots/115539 "2024-06-12T09:07:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![HahaRIP](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/haharip/32/209266_2.png) [@HahaRIP](https://discourse.julialang.org/u/HahaRIP)\
**Post date:** [June 12, 2024, 9:07am UTC](https://discourse.julialang.org/t/legend-position-for-3d-plots/115539/1 "2024-06-12T09:07:53Z")

</div>

Hey, I am plotting surfaces which have some small values and I need the legend. But the problem is that the legend goes out of the image and can’t see the values. I tried positioning the legend, but could not move it at all. Any help is appreciated.

The plot:

```julia
p = plot(1:64, 1:64, 0.001.*rand(64,64), dpi = 600, st = :surface, c = :blues, legend = :left)

```

output:

 ![whereAreYou](https://global.discourse-cdn.com/julialang/original/3X/2/a/2a755732bb702a1f034e3077908e36e90030ca91.jpeg)

---

<div class="post-metadata">

**Author:** ![devel-chm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/devel-chm/32/3572_2.png) [@devel-chm](https://discourse.julialang.org/u/devel-chm)\
**Post date:** [June 16, 2024, 5:30pm UTC](https://discourse.julialang.org/t/legend-position-for-3d-plots/115539/2 "2024-06-16T17:30:26Z")

</div>

Your code does not run:

```julia
ERROR: UndefVarError: `plot` not defined
Stacktrace:
 [1] top-level scope
   @ REPL[26]:1

```

Please include a MWE including packages/modules used and any data needed…

---

<div class="post-metadata">

**Author:** ![HahaRIP](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/haharip/32/209266_2.png) [@HahaRIP](https://discourse.julialang.org/u/HahaRIP)\
**Post date:** [June 18, 2024, 9:35am UTC](https://discourse.julialang.org/t/legend-position-for-3d-plots/115539/3 "2024-06-18T09:35:54Z")

</div>

Sorry about that, before this, I had imported Plots. The version I am using is version 1.40.4.

```julia
using Plots;
p = plot(1:64, 1:64, 0.001.*rand(64,64), dpi = 600, st = :surface, c = :blues, legend = :left)

```
