I have been trying to make a surface plot using GLMakie in Julia, with a PolarAxis.
However the colors in the image are much darker than the colorbar.
In addition, there is an artificial bright line at one specific angle (always the same, at around 55 degrees). This line is not present in the data.
MWE surface plot
I have been able to reproduce the problem with this MWE :
using GLMakie
rmin=1.0
rmax=200.0
nr=75
ntheta=75
R=Float64[rmin*(rmax/rmin)^((i-1.0)/(nr-1.0)) for i=1:nr]
THETA=Float64[(pi/2-pi/2*(i-1.0)/(ntheta-1.0)) for i=1:ntheta]
MOL_DENSITY=Array{Float64,2}(undef,ntheta,nr)
for itheta=1:ntheta
for ir=1:nr
MOL_DENSITY[itheta,ir]=log(1.0/(R[ir]*(THETA[itheta]-pi/4+0.1)^2.0))
end
end
fig=Figure(fontsize=22,size=(700,600))
ax1=PolarAxis(fig[1,1])
thetalims!(ax1,0,pi/2)
rlims!(ax1,0,rmax)
p=surface!(ax1,THETA,R,MOL_DENSITY,colormap=:hot)
Colorbar(fig[1,2],p)
save("test.png",fig)
I have the last Julia and GLMakie version (30-04-2024).
I have tried to change to CairoMakie, which solves the artifical line problem, but not the dark colors. All color palettes I have tried have this dark colors issue.
Pierre Marchand is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.