I encountered the following issue - I’d appreciate any thoughts on how to resolve it.
My current environment is using Julia 1.7.1 and UnicodePlots version 2.12.4. I have this issue whether I am in the VSCode integrated terminal or in a standalone REPL.
I was playing around with the line plots and noticed the following multi-series lineplot command gives me an error (shown on the github page).
ERROR: MethodError: no method matching lineplot(::UnitRange{Int64}, ::Matrix{Int64}; color=[:green :red :yellow :cyan])
Closest candidates are:
lineplot(::AbstractVector{<:Union{Real, Unitful.AbstractQuantity{<:Real}}}, ::AbstractVector{<:Unitful.Quantity}; unicode_exponent, xlabel, ylabel, kw...) at ~/.julia/packages/UnicodePlots/Z7FG6/src/interface/lineplot.jl:153
lineplot(::AbstractVector; kw...) at ~/.julia/packages/UnicodePlots/Z7FG6/src/interface/lineplot.jl:79
lineplot(::AbstractVector, ::AbstractVector) at ~/.julia/packages/UnicodePlots/Z7FG6/src/interface/lineplot.jl:65 got unsupported keyword argument "color"
I reasoned that I must have an old version that does not work with the latest examples. I checked the github page and it says the latest is 3.0.5. I tried to update my current installation but it won’t update, it stays stuck at 2.12.4.
] update UnicodePlots # does nothing
I have read you can force a specific version so I could do this right?
] update UnicodePlots@3.0.5
I guess I’m confused why it has to be forced, is something wrong with my environment? Its over a year old, not sure if that matters.
For one thing, ITensorUnicodePlots v0.1.2 still has UnicodePlots = "2.5.0" in its [compat] section. I would assume your version (v0.1.1) is what is keeping you at v2.12.4 for UnicodePlots. There may well be other packages in your environment that also has direct or indirect dependencies on UnicodePlots that hold back the update.
I won’t preach you about having this many packages in the main environment (I often find myself in the same situation and then “spring clean” a little), but this is what happens when you do…
I think there are a few packages there that are not current - CairoMakie, ColorSchemes, Cthulhu, Graphs, to name a few. In particular, I happen to remember that UnicodePlots.jl requires ColorSchemes.jl 3.19.
I think using REPL commands such as ] add package@1.2.3 might be useful here.
@braamvandyk’s advice is good - as the number of packages in the Julia ecosystem continues to grow, and as many are regularly updated, it makes sense to organize your project/environment to use only the packages you need, or to fix sets of packages that work together.