# Plots units of measure

**URL:** <https://discourse.julialang.org/t/plots-units-of-measure/8323>\
**Category:** Visualization\
**Created:** [January 12, 2018, 6:37pm UTC](https://discourse.julialang.org/t/plots-units-of-measure/8323 "2018-01-12T18:37:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bbrunaud](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bbrunaud/32/1737_2.png) [@bbrunaud](https://discourse.julialang.org/u/bbrunaud)\
**Post date:** [January 12, 2018, 6:37pm UTC](https://discourse.julialang.org/t/plots-units-of-measure/8323/1 "2018-01-12T18:37:41Z")

</div>

Hello

I had a plot code using margins that was working correctly. I started getting the following error

`plot(pl1,pl2,layout=grid(2,1,heights=[0.7,0.2]),size=(800,400),left_margin=10)`

```julia
MethodError: no method matching +(::Measures.Length{:mm,Float64}, ::Int64)
Closest candidates are:
  +(::Any, ::Any, ::Any, ::Any...) at operators.jl:424
  +(::Complex{Bool}, ::Real) at complex.jl:247
  +(::Char, ::Integer) at char.jl:40`

```

The backend is plotly. What is the correct use of this?

thanks

---

<div class="post-metadata">

**Author:** ![mohamed82008](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mohamed82008/32/18171_2.png) [@mohamed82008](https://discourse.julialang.org/u/mohamed82008)\
**Post date:** [January 12, 2018, 6:45pm UTC](https://discourse.julialang.org/t/plots-units-of-measure/8323/2 "2018-01-12T18:45:04Z")

</div>

Use:

```julia
using Measures
plot(pl1,pl2,layout=grid(2,1,heights=[0.7,0.2]),size=(800,400),left_margin=10mm)

```

---

<div class="post-metadata">

**Author:** ![mkborregaard](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkborregaard/32/556_2.png) [@mkborregaard](https://discourse.julialang.org/u/mkborregaard)\
**Post date:** [January 12, 2018, 9:04pm UTC](https://discourse.julialang.org/t/plots-units-of-measure/8323/3 "2018-01-12T21:04:49Z")

</div>

Alternatively `using Plots.PlotMeasures`. There were complaints that the workspace was exporting too many names.
