Hi all,
after following It’s all Set tutorial on JuliaCon2021 I have found a speed bump when I try this:
using Plots, LazySets, LaTeXStrings
p(args...; kwargs...) = plot(xlims=(0,4), ylims=(0,4), ratio=1, lab="",
xlab=L"x_{1}", ylab=L"x_{2}", args...; kwargs...)
p!(args...; kwargs...) = plot!(lab="", args...; kwargs...);
X = BallInf([1.5, 2.0], 1.0)
v = [1.5, -1.0]
Y = translate(X, v)
# arrows
p([0, v[1]], [0, v[2]], linecolor=:gray, arrow-:arrow, linestyle=:dot, width=2)
p!([high(X, 1), high(Y, 1)], [high(X, 2), high(Y, 2)], linecolor=:gray,
arrow=:arrow, linestyle=:dot, width=2)
p!([center(X,1), center(Y, 1)], [center(X, 2), center(Y, 2)], linecolor=:gray,
arrow=:arrow, linestyle=:dot, width=2)
# sets
p!(X, lab="X")
p!(Singleton(v), alpha=0.8, lab="v")
p!(Y, lab="X + v")
I got an error of:
WARNING: both LazySets and Plots export “translate”; uses of it in module Main must be qualified
ERROR: LoadError: UndefVarError: translate not defined
Stacktrace:
** [1] top-level scope**
** @ ~/LasthrimProjection/plot.jl:9**
** [2] include(fname::String)**
** @ Base.MainInclude ./client.jl:451**
** [3] top-level scope**
** @ REPL[4]:1**
in expression starting at /home/browni/LasthrimProjection/plot.jl:9
Is translate a function of another package? In every row I write the using LazySets, Plots,...
again because I might not run the first row at the notebook.