Issues setting palette to matlplotlib's "tab10" colors


I’ve been trying to plot curves with the colors of matplotlib’s palette :tab10 but I can’t find the solution, even after removing and reinstalling Plots and ColorSchemes.
Here are the desired colors :

  • When I run palette(:auto) , I do obtain a 17-element Vector{RGBA{Float64}}, and it’s correctly plotted in the Plot panel of Juno.
  • When I run palette(:tab10), I obtain the exact same palette as in the previous bullet point : first departure from the documentation. Note that I recover the correct palette running colorschemes[:tab10], which type is ColorScheme{some_array}.
  • The same doc states that " Color palettes can be constructed with palette(cs, [n]) where cs can be a Symbol , a vector of colors, a ColorScheme , ColorPalette or ColorGradient". Yet, when running palette(colorschemes[:tab10]), I get no method matching palette(::ColorScheme{StaticArrays.SArray{Tuple{10},RGB{Float64},1,10},String,String})
  • Then I tried passing a ColorGradient : plot(data,palette=cgrad(colorschemes[:tab10].colors) but it doesn’t output what I want : issue_colors

I am a bit confused, could you help me out ? Once this is done, is it possible to make this palette a default one, meaning that no operation would be necessary at the opening of a new Julia session in order to work with the :tab10colors ?

Thank you very much in advance !

Some additional info :

cgradients() = Symbol[:blues, :viridis, :pu_or, :magma, :plasma, :inferno]
clibraries() = Symbol[:Plots, :cmocean, :misc, :colorcet, :colorbrewer]

while the desired palette :tab10, according to this page, is located in the matplotlib library.

Versions of packages :

"ColorSchemes" => v"3.9.0" , "Plots" => v"0.29.9","PyPlot" => v"2.8.2" , "Juno" => v"0.8.1" , "Atom" => v"0.12.10"

I am not sure if this helps you, but when I pass the whole tab10 palette to plots, an incorrect colorscheme shows up in the plot. But when I pass a truncated palette that matches the number of groups in the plot, I get back the correct colors, i.e., the difference in the palette keyword below:

using Plots, ColorSchemes

fullpalette = plot(1:100, rand(100), group=repeat([1,2,3,4,5], inner=20), lw=3, palette=ColorSchemes.tab10.colors, title="Full palette");
truncatedpalette = plot(1:100, rand(100), group=repeat([1,2,3,4,5], inner=20), lw=3, palette=ColorSchemes.tab10.colors[1:5], title="Truncated palette");

combinedplot = plot(fullpalette, truncatedpalette, size=(1600,800))
savefig(combinedplot, "tab10_colorschemes.png");

Which produces the following:

Great, thank you very much, problem solved !

I should add that even if the plot contains only (say) 2 curves, systematically adding [1:10] ( palette=ColorSchemes.tab10.colors[1:10]) forces the 2 curves to adopt the first 2 colors of the desired palette.