Plots.jl has z-value attributes available for line and scatter plots. Is there a way to change the palette used for this gradient to a named colorscheme?
begin
import Plots as Pt
t = range(0.0,stop=2π,length=1000)
y = sin.(t)
Pt.plot(t,y,
linewidth=5,
linez=range(0.0,stop=1.0,length=1000),
legend=false,
colorbar=:true)
end
![image](https://global.discourse-cdn.com/julialang/original/3X/a/f/afca349d4d4dfe4f562e01ea2139e5aad88b7bfa.png)
Found the right syntax! Just needs c = :scheme_name
.
begin
import Plots as Pt
t = range(0.0,stop=2π,length=1000)
y = sin.(t)
Pt.plot(t,y,
linewidth=5,
linez=range(0.0,stop=1.0,length=1000),
c=:batlow,
legend=false,
colorbar=:true)
t_s = range(0.0,stop=2π,length=10)
y_s = sin.(t_s)
Pt.scatter!(t_s,y_s,
markersize=6,
zcolor=range(0.0,stop=1.0,length=10),
c=:batlow)
end
![image](https://global.discourse-cdn.com/julialang/original/3X/1/e/1e5aaefe0f00572c0f9b259048ec9f563388a8a9.png)