-
-
Notifications
You must be signed in to change notification settings - Fork 357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New colorscheme for Plots.jl 2.0 #4966
New colorscheme for Plots.jl 2.0 #4966
Comments
These look really good as suggested by @cormullion esp the |
@cormullion can I also get the categorial palette of the scientific gradients somehow in ColorSchemes.jl? |
Its hard to judge without examples, so here is some code and pictures: using StatsPlots
@userplot BackendPlot
@recipe function f(bp::BackendPlot; n = 4, colorgradient = :inferno)
t = range(0, 3π, length = 100)
d = rand(3, 3)
plot_title := "p = $(plotattributes[:color_palette]), cg = $colorgradient"
layout := n
@series begin
subplot := 1
f = s -> -cos(s) * log(s)
g = t -> sin(t) * log(t)
f1 = s -> -cos(s) * log(s) + 5
g1 = t -> sin(t) * log(t) + 5
f2 = s -> -cos(s) * log(s) + 10
g2 = t -> sin(t) * log(t) + 10
linewidth --> 3
[f g f1 g1 f2 g2]
end
@series begin
subplot := 2 + (n > 2)
RecipesBase.recipetype(:groupedbar, d)
end
if n > 2
@series begin
subplot := 2
line_z := t
label := false
seriestype := surface
seriescolor := colorgradient
t, t, (x, y) -> x * sin(x) - y * cos(y)
end
@series begin
subplot := 4
seriestype := contourf
seriescolor := colorgradient
t, t, (x, y) -> x * sin(x) - y * cos(y)
end
end
end
schemes = [:batlowW, :batlowK, :lipari, :navia, :imola, :devon, :lajolla, :bamako, :davos, :bilbao, :lapaz, :acton]
mkdir("plots_colors")
for scheme in fschemes
savefig(backendplot(colorgradient = scheme, palette = :tol_bright), joinpath("plots_colors", "$scheme.png"))
end |
I like navia, lajolla, devon and lipari |
Thats not what I meant. On their homepage they have sequential continuous palettes, discrete palettes and categorial palettes. But in ColorSchemes.jl I can only find the first two. |
lajola looks great and inline with notion of |
@BeastyBlacksmith Ah, I’m with you now.
Version 3.26 includes the |
batlowS looks weird in that the primary color isnt bright blue https://juliagraphics.github.io/ColorSchemes.jl/stable/catalogue/#Color-Vision-Deficient-friendly-schemes I also like Overall seaborn colors and |
I think, being distinct is a good thing. I made some more examples for palettes using the gradients identified before: There is something neat about having the same colors in gradient and palette, but this would possibly only work with batlow: code```julia using StatsPlots @userplot BackendPlot @recipe function f(bp::BackendPlot; n = 4, colorgradient = :inferno) t = range(0, 3π, length = 100) d = rand(3, 3)
schemes = [:lipari, :navia, :devon, :lajolla, :batlow, :batlowK] mkdir("plots_colors")for (scheme, palette, background) in Iterators.product(schemes, [:tol_bright, :tol_light, :seaborn_colorblind, :batlowS], [:white, :black])
|
but I think we narrowed the options enough, that I could make a poll on discourse |
@BeastyBlacksmith @t-bltg
So I've been on search on new colorschemes and what we could choose. I think we should also update the color gradient while at it too. Upon hearing feedback I think we should settle with colorblind friendly scheme:
https://juliagraphics.github.io/ColorSchemes.jl/stable/basics/#For-CVD-(color-vision-deficient-or-%22color-blind:)-users
Upon which
tol_bright
looks good to mehttps://juliagraphics.github.io/ColorSchemes.jl/stable/basics/#For-CVD-(color-vision-deficient-or-%22color-blind:)-users
looks good to ne
For the colorgradient, upon watching this and this setting viridis or some of the other 3 would be good in my opinion.
I'm hoping we could reach some consensus here
The text was updated successfully, but these errors were encountered: