When I try to plot something I get the above-mentioned error. I have tried both in atom and in Jupyter.
I have tried running Pkg.update(). I also tried renaming my “.julia” folder “.juliaold”, restarting Julia, and re-downloa- ing all packages.
This bug occurs on ( insert x below )
Backend | yes | no | untested
-------------|-----|-----|---------
gr (default) | x | |
pyplot | | |x
plotly | x | |
plotlyjs | | |x
pgfplotsx | x | |
inspectdr | | |x
This is the version of possibly related packages:
[c52e3926] Atom v0.12.10
[7073ff75] IJulia v1.21.2
[e5e0dc1b] Juno v0.8.1
[ee78f7c6] Makie v0.9.5
[58dd65bb] Plotly v0.3.0
[f0f68f2c] PlotlyJS v0.13.1
[91a5bcdd] Plots v0.27.1
[d330b81b] PyPlot v2.9.0
[3cdcf5f2] RecipesBase v0.7.0
[60ddc479] StatPlots v0.9.2
[f3b207a7] StatsPlots v0.12.0Plots.jl version:
This is a minimal example, and the corresponding error:
using Plots
plot(x -> x^2)
MethodError: no method matching get_color_palette(::Symbol, ::RGBA{Float64}, ::Int64)
Closest candidates are:
get_color_palette(::Any, ::Any) at /home/torkelloman/.julia/packages/PlotUtils/Rebxf/src/colorschemes.jl:327
get_color_palette(!Matched::ColorGradient, ::Any) at /home/torkelloman/.julia/packages/PlotUtils/Rebxf/src/colorschemes.jl:328
Stacktrace:
[1] _update_subplot_colors(::Plots.Subplot{Plots.GRBackend}) at /home/torkelloman/.julia/packages/Plots/WwFyB/src/args.jl:1436
[2] _update_subplot_args(::Plots.Plot{Plots.GRBackend}, ::Plots.Subplot{Plots.GRBackend}, ::Dict{Symbol,Any}, ::Int64, ::Bool) at /home/torkelloman/.julia/packages/Plots/WwFyB/src/args.jl:1523
[3] _subplot_setup(::Plots.Plot{Plots.GRBackend}, ::Dict{Symbol,Any}, ::Array{Dict{Symbol,Any},1}) at /home/torkelloman/.julia/packages/Plots/WwFyB/src/pipeline.jl:297
[4] _plot!(::Plots.Plot{Plots.GRBackend}, ::Dict{Symbol,Any}, ::Tuple{var"#5#6"}) at /home/torkelloman/.julia/packages/Plots/WwFyB/src/plot.jl:206
[5] plot(::Function; kw::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /home/torkelloman/.julia/packages/Plots/WwFyB/src/plot.jl:57
[6] plot(::Function) at /home/torkelloman/.julia/packages/Plots/WwFyB/src/plot.jl:51
Should work if you update Plots to at least 1.1. That may be still conflicting with Makie (not sure if Makie is already compatible with PlotUtils 1.0. Until then I recommend not having Plots and Makie in the same environment.
Thank you, that is really helpful.
I am not using Makie, so can happily remove it (I think I added it at some point to test).
Right now trying to get the plot update working, seems some complicated set of requirements from other packages is forcing it to stay at its current version.
I have the exact same problem. My code that used to work before, now throws the described color_palette error. When I Pkg.update("Plots"), the version is still
Status ~/.julia/environments/v1.2/Project.toml
[91a5bcdd] Plots v0.28.4
Now my question is a bit more basic:
I downloaded a newer Plots release (v1.1.4) from github and put it into ~/.julia/packages (called the new version "Plots" and the old version "Plots_old"). But somehow julia sticks to the v0.28.
Torkel, how did you succeed to force julia to use the new version?
You can get the offending package by pkg> add [email protected]
Thanks Simon! Is that supposed to work in jupyter too? I get an error: syntax: extra token "Plots" after end of expression
in jupyter you can use
using Pkg; pkg"add [email protected]"
I kind of don't understand why it happens though, since Plots v0.28.4 should upper bound PlotUtils to v0.6.1
Ok, this gave me another error "Unsatisfiable requirements detected for packages ...", but in the end updating julia seems to have solved the whole issue. Thanks a lot!
I had met the same problem in Julia 1.1 with Plots 0.27.1, and it seems that the Colors packages had been updated due to some new package installation, so after downgrading Colors from v0.10.3 to v0.9.6, the problem was solved. Not sure if this strategy works for you.
JuliaPlots/PlotUtils.jl#87 is the culprit...
Ok, this gave me another error "Unsatisfiable requirements detected for packages ...", but in the end updating julia seems to have solved the whole issue. Thanks a lot!
Yes. I also did this and the problem was solved!
I've got this same error, but add [email protected] is a downgrade for me, from 1.5.7. (It also doesn't solve the problem.) And yet the advice was given just 2 months ago, and seems to have work as little as 18 days ago...what am I missing?
Hard to tell without knowing your environment, can you run ] st -m and post the output?
(@v1.4) pkg> st -m
Status `~/.julia/environments/v1.4/Manifest.toml`
[79e6a3ab] Adapt v2.0.2
[bf4720bc] AssetRegistry v0.1.0
[9e28174c] BinDeps v1.0.1
[ad839575] Blink v0.12.3
[6e34b625] Bzip2_jll v1.0.6+2
[35d6a980] ColorSchemes v3.9.0
[3da002f7] ColorTypes v0.10.7
[5ae59095] Colors v0.12.3
[34da2185] Compat v3.13.0
[8f4d0f93] Conda v1.4.1
[d38c429a] Contour v0.5.4
[9a962f9c] DataAPI v1.3.0
[864edb3b] DataStructures v0.17.19
[e2d170a0] DataValueInterfaces v1.0.0
[ffbed154] DocStringExtensions v0.8.2
[c87230d0] FFMPEG v0.3.0
[b22a6f82] FFMPEG_jll v4.1.0+3
[53c48c17] FixedPointNumbers v0.8.4
[d7e528f0] FreeType2_jll v2.10.1+2
[559328eb] FriBidi_jll v1.0.5+3
[de31a74c] FunctionalCollections v0.5.0
[28b8d3ca] GR v0.49.1
[5c1252a2] GeometryBasics v0.2.15
[4d00f742] GeometryTypes v0.8.3
[cd3eb016] HTTP v0.8.17
[9fb69e20] Hiccup v0.2.2
[7073ff75] IJulia v1.21.2
[83e8ac13] IniFile v0.5.0
[c8e1da08] IterTools v1.3.0
[82899510] IteratorInterfaceExtensions v1.0.0
[97c1335a] JSExpr v0.5.2
[682c06a0] JSON v0.21.0
[c1c5ebd0] LAME_jll v3.100.0+1
[b964fa9f] LaTeXStrings v1.1.0
[50d2b5c4] Lazy v0.15.0
[dd192d2f] LibVPX_jll v1.8.1+1
[1914dd2f] MacroTools v0.5.5
[739be429] MbedTLS v1.0.2
[c8ffd9c3] MbedTLS_jll v2.16.6+1
[442fdcdd] Measures v0.3.1
[e1d29d7a] Missings v0.4.3
[ffc61752] Mustache v1.0.3
[a975b10e] Mux v0.7.0
[77ba4419] NaNMath v0.3.4
[2bd173c7] NodeJS v1.1.1
[47be7bcc] ORCA v0.4.0
[510215fc] Observables v0.3.1
[e7412a2a] Ogg_jll v1.3.4+0
[458c3c95] OpenSSL_jll v1.1.1+4
[91d4177d] Opus_jll v1.3.1+1
[bac558e1] OrderedCollections v1.3.0
[69de0a69] Parsers v1.0.7
[fa939f87] Pidfile v1.2.0
[ccf2f8ad] PlotThemes v2.0.0
[995b91a9] PlotUtils v1.0.5
[a03496cd] PlotlyBase v0.3.1
[f0f68f2c] PlotlyJS v0.13.1
[91a5bcdd] Plots v1.5.7
[438e738f] PyCall v1.91.4
[d330b81b] PyPlot v2.9.0
[3cdcf5f2] RecipesBase v1.0.2
[01d81517] RecipesPipeline v0.1.11
[189a3867] Reexport v0.2.0
[ae029012] Requires v1.0.1
[992d4aef] Showoff v0.3.1
[b85f4697] SoftGlobalScope v1.0.10
[a2af1166] SortingAlgorithms v0.3.1
[90137ffa] StaticArrays v0.12.4
[2913bbd2] StatsBase v0.33.0
[09ab397b] StructArrays v0.4.4
[3783bdb8] TableTraits v1.0.0
[bd369af6] Tables v1.0.5
[30578b45] URIParser v0.4.1
[81def892] VersionParsing v1.2.0
[0f1e0344] WebIO v0.8.14
[104b5d7c] WebSockets v1.5.2
[cc8bc4a8] Widgets v0.6.2
[c2297ded] ZMQ v1.2.1
[8f1865be] ZeroMQ_jll v4.3.2+4
[83775a58] Zlib_jll v1.2.11+14
[0ac62f75] libass_jll v0.14.0+2
[f638f0a6] libfdk_aac_jll v0.1.6+2
[f27f6e37] libvorbis_jll v1.3.6+4
[1270edf5] x264_jll v2019.5.25+2
[dfaa095f] x265_jll v3.0.0+1
[2a0f44e3] Base64
[ade2ca70] Dates
[8bb1440f] DelimitedFiles
[8ba89e20] Distributed
[7b1f6079] FileWatching
[b77e0a4c] InteractiveUtils
[76f85450] LibGit2
[8f399da3] Libdl
[37e2e46d] LinearAlgebra
[56ddb016] Logging
[d6f4376e] Markdown
[a63ad114] Mmap
[44cfe95a] Pkg
[de0858da] Printf
[3fa0cd96] REPL
[9a3f8284] Random
[ea8e919c] SHA
[9e88b42a] Serialization
[1a1011a3] SharedArrays
[6462fe0b] Sockets
[2f01184e] SparseArrays
[10745b16] Statistics
[8dfed614] Test
[cf7118a7] UUIDs
[4ec0a83e] Unicode
Most helpful comment
I had met the same problem in Julia 1.1 with Plots 0.27.1, and it seems that the
Colorspackages had been updated due to some new package installation, so after downgradingColorsfrom v0.10.3 to v0.9.6, the problem was solved. Not sure if this strategy works for you.