# Error using LazySets.plot3d

**URL:** <https://discourse.julialang.org/t/error-using-lazysets-plot3d/52994>\
**Category:** New to Julia\
**Tags:** polyhedra\
**Created:** [January 7, 2021, 2:50pm UTC](https://discourse.julialang.org/t/error-using-lazysets-plot3d/52994 "2021-01-07T14:50:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![adropintheriver](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adropintheriver/32/20634_2.png) [@adropintheriver](https://discourse.julialang.org/u/adropintheriver)\
**Post date:** [January 7, 2021, 2:50pm UTC](https://discourse.julialang.org/t/error-using-lazysets-plot3d/52994/1 "2021-01-07T14:50:01Z")

</div>

I even did Pkg.update() to ensure i have the latest versions, but still get t

```julia
using LazySets, Makie, Polyhedra
LazySets.plot3d(10. * rand(Hyperrectangle, dim=3))

```

```julia
MethodError: no method matching iterate(::Polyhedra.Mesh{3,Float64,DefaultPolyhedron{Float64,MixedMatHRep{Float64,Array{Float64,2}},MixedMatVRep{Float64,Array{Float64,2}}}})
Closest candidates are:
  iterate(!Matched::MutableArithmetics.Zero) at C:\Users\<USER>\.julia\packages\MutableArithmetics\NuiNA\src\rewrite.jl:78
  iterate(!Matched::MutableArithmetics.Zero, !Matched::Nothing) at C:\Users\<USER>\.julia\packages\MutableArithmetics\NuiNA\src\rewrite.jl:79
  iterate(!Matched::DataStructures.TrieIterator) at C:\Users\<USER>\.julia\packages\DataStructures\DLSxi\src\trie.jl:112

```

---

<div class="post-metadata">

**Author:** ![mforets](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mforets/32/298_2.png) [@mforets](https://discourse.julialang.org/u/mforets)\
**Post date:** [January 7, 2021, 6:00pm UTC](https://discourse.julialang.org/t/error-using-lazysets-plot3d/52994/2 "2021-01-07T18:00:08Z")

</div>

xref: [https://github.com/JuliaReach/LazySets.jl/issues/2496](https://github.com/JuliaReach/LazySets.jl/issues/2496)

The code works for me (see below; I also wrote @time to measure the “time-to-first-plot”). Maybe it is an issue related to your installed versions? Can you please try

```julia
julia> using Pkg; Pkg.status(["LazySets", "Makie", "Polyhedra"])
Status `~/.julia/environments/v1.5/Project.toml`
  [b4f0291d] LazySets v1.38.0 `~/.julia/dev/LazySets`
  [ee78f7c6] Makie v0.11.2
  [67491407] Polyhedra v0.6.11
julia> @time using LazySets, Makie, Polyhedra
 26.437159 seconds (47.59 M allocations: 2.562 GiB, 3.76% gc time)

julia> @time LazySets.plot3d(10. * rand(Hyperrectangle, dim=3))
glp_simplex: unable to recover undefined or non-optimal solution
 34.541621 seconds (76.54 M allocations: 4.091 GiB, 3.09% gc time)

julia> @time LazySets.plot3d(10. * rand(Hyperrectangle, dim=3))
  0.020464 seconds (71.35 k allocations: 2.947 MiB)

```

---

<div class="post-metadata">

**Author:** ![adropintheriver](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adropintheriver/32/20634_2.png) [@adropintheriver](https://discourse.julialang.org/u/adropintheriver)\
**Post date:** [January 8, 2021, 4:26am UTC](https://discourse.julialang.org/t/error-using-lazysets-plot3d/52994/3 "2021-01-08T04:26:18Z")

</div>

thanks, here’s what i get, only Polyhedra is of different version at my end - will get the v6.11 and post results again

```julia
Pkg.status(["LazySets", "Makie", "Polyhedra"])
@time using LazySets, Makie, Polyhedra
@time LazySets.plot3d(10. * rand(Hyperrectangle, dim=3))

```

```julia
Status `C:\Users\<user>\.julia\environments\v1.5\Project.toml`
  [b4f0291d] LazySets v1.38.0
  [ee78f7c6] Makie v0.11.1
  [67491407] Polyhedra v0.6.12
  0.008659 seconds (1.89 k allocations: 114.547 KiB)

```

```julia
MethodError: no method matching iterate(::Polyhedra.Mesh{3,Float64,DefaultPolyhedron{Float64,MixedMatHRep{Float64,Array{Float64,2}},MixedMatVRep{Float64,Array{Float64,2}}}})
Closest candidates are:
  iterate(!Matched::MutableArithmetics.Zero) at C:\Users\Ashish.Madkaikar\.julia\packages\MutableArithmetics\NuiNA\src\rewrite.jl:78
  iterate(!Matched::MutableArithmetics.Zero, !Matched::Nothing) at C:\Users\Ashish.Madkaikar\.julia\packages\MutableArithmetics\NuiNA\src\rewrite.jl:79
  iterate(!Matched::DataStructures.TrieIterator) at C:\Users\Ashish.Madkaikar\.julia\packages\DataStructures\DLSxi\src\trie.jl:112

```

---

<div class="post-metadata">

**Author:** ![mforets](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mforets/32/298_2.png) [@mforets](https://discourse.julialang.org/u/mforets)\
**Post date:** [January 8, 2021, 6:52pm UTC](https://discourse.julialang.org/t/error-using-lazysets-plot3d/52994/4 "2021-01-08T18:52:14Z")

</div>

LazySets.plot3d (see definition [here](https://github.com/JuliaReach/LazySets.jl/blob/master/src/Plotting/mesh.jl#L117)) calls Polyhedra’s `mesh`. Did you try plotting commands from Polyhedra directly? E.g. all the examples in the section [3D Plotting with Plots](https://juliapolyhedra.github.io/Polyhedra.jl/dev/plot/#D-plotting-with-Plots-2).
